Geromatic / Midi-Unreal

Midi for Unreal Engine
129 stars 31 forks source link

Speed of 1.0 plays MIDI file too fast #15

Open echolevel opened 6 years ago

echolevel commented 6 years ago

I've got a short MIDI file - a 64-note phrase at 110bpm - and I'm running it against a 110bpm looping metronome click WAV. The only way I can get the MIDI to play at approximately the correct speed is to set the Speed option to ~0.92, since at 1.0 it runs way too fast.

Is this a bug? What's the relationship between Speed and the tempo of MIDI files?

Ideally (and maybe this counts as a feature request) I'd like to have a settable BPM value that overrides any tempo messages in a MIDI file and can be changed programmatically - this would be great for procedural note variations. I understand that BPM is a meta-event in MIDI files, and that it's only a guide to the delta time between ticks in the file...so maybe a BPM setter could work on files which include a BPM event (and be ignored for files which don't).

Meanwhile though, I'm really struggling to play at the right speed and stay synced with other fixed-tempo material.

Thanks in advance! (And I can share the MIDI file, if that helps)

Geromatic commented 6 years ago

the speed is the play rate of the file so it should not affect the rate of the midi when set to 1. play rate is calculated after the original time is calculated.. basically. (time elapsed * play speed) . I just included play speed(should of named it play rate to prevent confusion) for unknown reason. Was thinking it could be used for difficulty modes (DDR, Guitar Hero, etc).