Skip to content

Fixes index error for staffs and removes invalid last note#8

Open
lars-erik wants to merge 1 commit intocal-pratt:masterfrom
lars-erik:master
Open

Fixes index error for staffs and removes invalid last note#8
lars-erik wants to merge 1 commit intocal-pratt:masterfrom
lars-erik:master

Conversation

@lars-erik
Copy link
Copy Markdown

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! 👍

Comment thread main.py
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):
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got index out of range, so moved the index check first.

Comment thread main.py
time += duration

midi.addNote(track,channel,pitch,time,4,0)
# midi.addNote(track,channel,pitch,time,4,0)
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got pitch undefined here

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