Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pattern::changeTimeSignature(), off by one #2959

merged 1 commit into from Aug 7, 2016


Copy link

@zonkmachine zonkmachine commented Aug 3, 2016

Fixes #2926

OK. This is bit deeper in the code than I usually go...

I didn't manage to wrap my head around MidiTime positions, but it looks like it's supposed to go from 0, as that's the way it's done in other places ( Pattern::ensureBeatNotes() , so the last position must be one lower.

With this fix the last note will instead be first in a new second beat.

Edit: Fixed links...

Copy link
Member Author

zonkmachine commented Aug 3, 2016

Yeah, it goes from 0. Here is what a note at the first and last positions at max resolution looks like in the .mmp

<pattern steps="16" muted="0" type="0" name="Kicker" pos="0" len="384">
  <note pan="0" key="57" vol="100" pos="0" len="-192"/>
  <note pan="0" key="57" vol="100" pos="191" len="-192"/>

Copy link
Member Author

zonkmachine commented Aug 7, 2016


Copy link

Umcaruje commented Aug 7, 2016

Yes from me 👍

@zonkmachine zonkmachine merged commit 54a9aa6 into LMMS:master Aug 7, 2016
1 check passed
@zonkmachine zonkmachine deleted the miditimeoffbyone branch Aug 20, 2016
sdasda7777 pushed a commit to sdasda7777/lmms that referenced this pull request Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants