Fixes index error for staffs and removes invalid last note#8
Open
lars-erik wants to merge 1 commit intocal-pratt:masterfrom
Open
Fixes index error for staffs and removes invalid last note#8lars-erik wants to merge 1 commit intocal-pratt:masterfrom
lars-erik wants to merge 1 commit intocal-pratt:masterfrom
Conversation
lars-erik
commented
Nov 30, 2019
| i = 0; j = 0; | ||
| while(i < len(staff_notes)): | ||
| if (staff_notes[i].rec.x > staffs[j].x and j < len(staffs)): | ||
| if (j < len(staffs) and staff_notes[i].rec.x > staffs[j].x): |
Author
There was a problem hiding this comment.
Got index out of range, so moved the index check first.
lars-erik
commented
Nov 30, 2019
| time += duration | ||
|
|
||
| midi.addNote(track,channel,pitch,time,4,0) | ||
| # midi.addNote(track,channel,pitch,time,4,0) |
PierreLepagnol
approved these changes
May 24, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I just had a play with this. Sadly the sheet I attempted to read probably have too low resolution, including three-note chords, so the result was a total catastrophe. 🤣 (Happy to provide outputs, but won't post IP here)
In any case, I thought I'd just PR these two changes I had to make for it to go through the whole process.
I'll be moving on to other libraries to see if I can use my crappy source material, but good luck with this one! Will be looking for updates for sure! 👍