MIDI file with SMPTE time format bug


#1

Juce midi files with SMPTE time format does not work in popular DAWs (tested on Reaper and Studio One).
The below code creates a file with a note on every second, but in DAWs the timestamps appear around 100 times faster - any idea?

[code]{
MidiFile mf;
mf.setSmpteTimeFormat (25, 40);

MidiMessageSequence seq;
seq.addEvent(MidiMessage::noteOn(1,45,1.0f), 1000.0f);
seq.addEvent(MidiMessage::noteOn(1,48,1.0f), 2000.0f);
seq.addEvent(MidiMessage::noteOn(1,52,1.0f), 3000.0f);

seq.addEvent(MidiMessage::noteOff(1,52,1.0f), 4000.0f);
seq.addEvent(MidiMessage::noteOff(1,48,1.0f), 4000.0f);
seq.addEvent(MidiMessage::noteOff(1,45,1.0f), 4000.0f);

mf.addTrack(seq);

FileOutputStream fos(f);

mf.writeTo(fos);

}[/code]


#2

Anybody ever used MIDI recording with absolute timestamps?


#3

Your file sounds good in Windows Media Player, VLC media player and in my own juce based daw for what it’s worth…
Sounds like a very fast staccato forte in Synthfont however. And on my Android it plays veeeerrryy slooooooooowwww…
Maybe Reaper can´t handle smpte coded midi files?