Changing time signature causes incorrect BB track to be displayed in the BBEditor
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
When time signature isn't n/n, BBEditor displays incorrect tracks. I tracked the bug to the TimePos::getBar() function call, which gives inaccurate results. Unfortunately fixing this problem will require some class restructuring, and given I am new to the project, I wasn't able to do so.
#### Steps to reproduce
Create multiple BB tracks, enter steps for clarity, change time signature.
#### Expected behavior
I would hope correct track would be displayed, which is not the case.
#### Actual behavior
Incorrect track is displayed. This is because the track number is calculated as m_ticks divided by m_ticksPerBar, where m_ticks doesn't get updated as time signature changes. That means that instead of track 0, track 1 is displayed when the time signature is 5/4 (because 192/240 is 0), etc..
#### Affected LMMS versions
Both stable and nightly.
#### Logs
Click to expand
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
Start by tracing the BBEditor track-selection path through TimePos::getBar(), especially how m_ticks and m_ticksPerBar change after a time-signature change. Reproduce the issue with multiple BB tracks and a non-n/n signature such as 5/4. Done means the correct track remains displayed after changing the time signature.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100