soul-lang / SOUL

The SOUL programming language and API
Other
1.71k stars 95 forks source link

jassert in SOULPatchAudioProcessor::injectMIDIMessage #50

Closed ellapollack closed 3 years ago

ellapollack commented 3 years ago

Calling soul::patch::SOULPatchAudioProcessor::injectMIDIMessage leads to a jassert in juce::MidiMessageCollector::addMessageToQueue

https://github.com/juce-framework/JUCE/blob/b8206e3604ebaca64779bf19f1613c373b9adf4f/modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.cpp#L59

because the MIDI message timestamp is set to 0.0.

https://github.com/soul-lang/SOUL/blob/d62a15e8567de5a7510e2019bd5240de34594905/include/soul/patch/helper_classes/soul_patch_AudioProcessor.h#L382

Should a double timeStamp argument be added to injectMIDIMessage?

julianstorer commented 3 years ago

Thanks - yes, that does look like a simple bug on my part, it should use the current time instead. I'll get a fix pushed to master asap!