Closed mt-collins closed 8 months ago
Good catch Matt, thanks for this. I think I found it. Caused some head scratching but it turns out I'd shot myself in the foot by trying to save execution time by not reversing potentially long lists of events and instead doing all the processing in reverse. Serves me right for thinking I can run backwards. We all know what happens there. Latest source on the Michael branch should help you out here. Ping this back to me if not. Best, Michael
Thanks Michael, that's great. I think it's all working fine now!
There seems to be an issue with the midi-file-to-events function at the moment where the first event in a MIDI file is always omitted from the outputted events list.
midi-tests.zip
The attached MIDI files are just two examples of several I've tried with this function -- always with the same result. test-midifile.mid is from the SC test suite and cmajor2.mid is of my own creation. Below is the first few events of what's returned for me when the latter file is passed to the function. The first event returned has start time of 0.500 and pitch D4, when the first event should be start time 0.000 and pitch C4:
Similarly for test-midifile.mid, which has several instruments:
Hopefully I haven't missed anything obvious here!