You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello and thank you for this great library! I am using it to do some processing on midi files, but I am having an issue with the TimeSignature of certain midi files.
Making a csv csv_string = py_midicsv.midi_to_csv(source) gives me the line 1, 0, Time_signature, 4, 2. Then when I try to parse it back to midi (without any processing) midi = py_midicsv.csv_to_midi(csv_string) I get the following error:
File ".../py_midicsv/csvmidi.py", line 46, in parse
event = csv_to_midi_map[identifier](tr, time, identifier, line[3:])
File ".../py_midicsv/csv_converters.py", line 142, in to_TimeSignatureEvent
num, denom, click, notesq = map(int, line)
ValueError: not enough values to unpack (expected 4, got 2)
Is this a known issue and how can I prevent it?
The text was updated successfully, but these errors were encountered:
Hm yes, that does indeed appear to be a bug. Would you be able to supply the exact file that you used when you encountered this error? I would like to reproduce this on my end as faithfully as possible.
Alright, seems like there was an issue with some MIDI files containing the full TimeSignature spec that I expected. We're now adding default values if they don't exist, fixing this issue. I'll prepare a new release shortly.
Hello and thank you for this great library! I am using it to do some processing on midi files, but I am having an issue with the TimeSignature of certain midi files.
Making a csv
csv_string = py_midicsv.midi_to_csv(source)
gives me the line1, 0, Time_signature, 4, 2
. Then when I try to parse it back to midi (without any processing)midi = py_midicsv.csv_to_midi(csv_string)
I get the following error:Is this a known issue and how can I prevent it?
The text was updated successfully, but these errors were encountered: