summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-04-15 00:17:09 +0200
committerRobin Gareus <robin@gareus.org>2016-04-15 00:17:09 +0200
commit769163c8899424f839f5cf0f66b76f7dd51eacae (patch)
treea345944878bf6e11fe239914cb2d59a2e57f420e
parentba67217dbccc2d9abf758ad47fb2fe4e9ff4b54a (diff)
change lua synth to multi-output
lua processors follow the same connection logic I/O as AudioUnit. handy for testing.
-rw-r--r--scripts/synth1.lua9
1 files 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