mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-22 14:46:34 +01:00
LuaProc: sort MIDI events
This allows plugins to produce an unsorted list of events. see also https://discourse.ardour.org/t/lua-arpeggiator-plugin-anyone/108862/64?u=x42
This commit is contained in:
parent
c5511040ec
commit
71d45286f4
1 changed files with 4 additions and 1 deletions
|
|
@ -887,7 +887,10 @@ LuaProc::connect_and_run (BufferSet& bufs,
|
||||||
}
|
}
|
||||||
if (size > 0 && size < 64) {
|
if (size > 0 && size < 64) {
|
||||||
if (tme >= 1 && tme < nframes + 1) {
|
if (tme >= 1 && tme < nframes + 1) {
|
||||||
mbuf.push_back(tme - 1 + offset, Evoral::MIDI_EVENT, size, data);
|
Evoral::Event<samplepos_t> ev;
|
||||||
|
ev.set (data, size, tme - 1 + offset);
|
||||||
|
ev.set_event_type (Evoral::MIDI_EVENT);
|
||||||
|
mbuf.insert_event (ev);
|
||||||
} else {
|
} else {
|
||||||
std::cerr << string_compose ("LuaException: MIDI Event timestamp %1 is out of bounds (0, %2)\n", tme, nframes + 1);
|
std::cerr << string_compose ("LuaException: MIDI Event timestamp %1 is out of bounds (0, %2)\n", tme, nframes + 1);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue