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
merged 1 commit into from Aug 7, 2016

Conversation

@zonkmachine
Copy link
Member

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
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"/>
</pattern>
@zonkmachine
Copy link
Member Author

zonkmachine commented Aug 7, 2016

Merge?

@Umcaruje
Copy link
Member

Umcaruje commented Aug 7, 2016

Yes from me 👍

@zonkmachine zonkmachine merged commit 54a9aa6 into LMMS:master Aug 7, 2016
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@zonkmachine zonkmachine deleted the zonkmachine:miditimeoffbyone branch Aug 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.