RustAudio / rimd

Library for handling Midi and Standard Midi Files in Rust
MIT License
80 stars 17 forks source link

Several fixes, improving robustness and compatibility with MIDI files. #2

Closed Boscop closed 7 years ago

Boscop commented 8 years ago

I added some things that I found necessary in my usage:

mitchmindtree commented 7 years ago

Thanks @Boscop! I don't have much experience with this crate yet so it's hard for me to review.

@nicklan any chance you might be able to take a quick look at this?

Boscop commented 7 years ago

I added three more fixes: When writing SMF files:

The fix was just to put the variables in the loop that goes over the tracks when writing, so that they are reset before writing each track.

The third fix was: In the SMF conversion from type 0 (single-track) to 1 (multi-track) files, the times for the events were converted back to delta time at the end, but not for the meta-event track aka track 0. This caused some software like AIMP to report a very long song length (and of course meta events didn't get triggered at the right time). Now this is fixed too.

mitchmindtree commented 7 years ago

Nice work @Boscop :)

I'll leave this up a little longer to give nicklan a chance to reply, otherwise I'll merge.

Boscop commented 7 years ago

@nicklan Any comments? :)

Boscop commented 7 years ago

@mitchmindtree Can you merge, please :)