Skip to content

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

Merged
zonkmachine merged 1 commit intoLMMS:masterfrom
zonkmachine:miditimeoffbyone
Aug 7, 2016
Merged

Pattern::changeTimeSignature(), off by one#2959
zonkmachine merged 1 commit intoLMMS:masterfrom
zonkmachine:miditimeoffbyone

Conversation

@zonkmachine
Copy link
Copy Markdown
Contributor

@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...

@zonkmachine
Copy link
Copy Markdown
Contributor 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"/>
</pattern>

@zonkmachine
Copy link
Copy Markdown
Contributor Author

Merge?

@Umcaruje
Copy link
Copy Markdown
Member

Umcaruje commented Aug 7, 2016

Yes from me 👍

@zonkmachine zonkmachine merged commit 54a9aa6 into LMMS:master Aug 7, 2016
@zonkmachine zonkmachine deleted the miditimeoffbyone branch August 20, 2016 09:44
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants