From 769163c8899424f839f5cf0f66b76f7dd51eacae Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 15 Apr 2016 00:17:09 +0200 Subject: [PATCH] change lua synth to multi-output lua processors follow the same connection logic I/O as AudioUnit. handy for testing. --- scripts/synth1.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/synth1.lua b/scripts/synth1.lua index d0c6ad7a52..046d27404b 100644 --- a/scripts/synth1.lua +++ b/scripts/synth1.lua @@ -11,7 +11,9 @@ ardour { function dsp_ioconfig () return { - { audio_in = 0, audio_out = 1}, + { audio_in = 0, audio_out = -1}, -- any number of channels + -- { audio_in = 0, audio_out = 4}, -- values > 0, precisely N channels + -- { audio_in = 0, audio_out = -6}, -- values < -2, up to -N channels, here 1,..,6 } end @@ -34,7 +36,6 @@ end function dsp_run (ins, outs, n_samples) -- initialize output buffer - assert (#outs == 1) local a = {} for s = 1, n_samples do a[s] = 0 end @@ -96,5 +97,7 @@ function dsp_run (ins, outs, n_samples) synth(tme, n_samples) -- copy - outs[1]:set_table(a, n_samples) + for c = 1,#outs do + outs[c]:set_table(a, n_samples) + end end