Update Lua scripts to use new APIs
This commit is contained in:
parent
89a0258c31
commit
2b21a571b9
@ -27,11 +27,11 @@ function dsp_runmap (bufs, in_map, out_map, n_samples, offset)
|
|||||||
local ba = C.ByteVector () -- construct a byte vector
|
local ba = C.ByteVector () -- construct a byte vector
|
||||||
ba:add ({0x90, 64, 127}) -- add some data to the vector
|
ba:add ({0x90, 64, 127}) -- add some data to the vector
|
||||||
-- send a message at cycle-start
|
-- send a message at cycle-start
|
||||||
mb:push_back (offset, ba:size (), ba:to_array());
|
mb:push_back (offset, Evoral.EventType.MIDI_EVENT, ba:size (), ba:to_array());
|
||||||
|
|
||||||
ba:clear ()
|
ba:clear ()
|
||||||
ba:add ({0x80, 64, 127})
|
ba:add ({0x80, 64, 127})
|
||||||
mb:push_back (n_samples - 1 - offset, ba:size (), ba:to_array());
|
mb:push_back (n_samples - 1 - offset, Evoral.EventType.MIDI_EVENT, ba:size (), ba:to_array(), 0);
|
||||||
end
|
end
|
||||||
ARDOUR.DSP.process_map (bufs, n_out, in_map, out_map, n_samples, offset)
|
ARDOUR.DSP.process_map (bufs, n_out, in_map, out_map, n_samples, offset)
|
||||||
end
|
end
|
||||||
|
@ -171,7 +171,7 @@ function factory () return function ()
|
|||||||
-- parse message to C/C++ uint8_t* array (Validate message correctness. This
|
-- parse message to C/C++ uint8_t* array (Validate message correctness. This
|
||||||
-- also returns C/C++ uint8_t* array for direct use with write_immediate_event.)
|
-- also returns C/C++ uint8_t* array for direct use with write_immediate_event.)
|
||||||
if parser:process_byte (syx:byte (b)) then
|
if parser:process_byte (syx:byte (b)) then
|
||||||
tx:write_immediate_event (parser:buffer_size (), parser:midi_buffer ())
|
tx:write_immediate_event (Evoral.EventType.MIDI_EVENT, parser:buffer_size (), parser:midi_buffer ())
|
||||||
-- Slow things down a bit to ensure that no messages as lost.
|
-- Slow things down a bit to ensure that no messages as lost.
|
||||||
-- Physical MIDI is sent at 31.25kBaud.
|
-- Physical MIDI is sent at 31.25kBaud.
|
||||||
-- Every message is sent as 10bit message on the wire,
|
-- Every message is sent as 10bit message on the wire,
|
||||||
|
Loading…
Reference in New Issue
Block a user