Inconsistent clip rendering
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 1.3k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 7
Description
Bug Summary
Notes, waveforms, and automation nodes are not consistently rendered on the X axis.
Steps to reproduce
Create a clip containing alternating notes and rests of the same length. In the same way, create a sample clip with alternating sine/silence sections and a flipflopping automation clip. In the example this has been done with third and quarter notes. Sample clips were generated in Audacity with lengths of 3s and 4s, then imported at 20 BPM.
Expected behavior
Notes, samples, and automation clips all display their content at the same position and with the same same length, as they are synchronized.
Our bars are 16 pixels wide and 32 pixels tall at 100% zoom, with each bar encompassing the border to it's left. Thus, quarter notes should be 4 pixels wide, and their start points should be 0, 4, 8, and 12 pixels from the leftmost pixel of the bar. Note that borders must be ignored for positions to be correct relative to the timeline.
Actual behavior
Notes in note clips are rendered with correct starting points, but are 1 pixel too long (quarter notes are 5 rather than 4 pixels wide).
Conversely, lengths but not positions are correct in sample and automation clips. Contents are shifted to the right by two pixels (width of the clip border) compared to note clips and the playhead's position. Fixed in #6182.
These offsets appear to be absolute, as they are unchanged between 100% and 400% zoom.
Screenshot
100% Zoom

400% Zoom

Note playhead is precisely on bar start, but sample and automation clips' contents appear to start after current position.

Affected LMMS versions
Reproduced in 1.3-Alpha.1, more thorough testing in 1.3-Alpha.2. Tested on Windows 10 with scale set to 100%, and DPI scaling handled by LMMS (Properties > Compatibility > Change high DPI settings > Override, scaling performed by application.)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in LMMS 1.3 using alternating note, sample, and automation clips at 100% and 400% zoom, following the steps and screenshots. Compare content start positions and widths against the timeline and playhead; done means synchronized positions and correctly sized quarter-note sections, with the already-fixed sample and automation offset excluded.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- audio-video-rtc, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100