From f9396cc19bacdd0bca7c31a228355eebaceebe22 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 28 Jun 2023 19:08:50 +0200 Subject: [PATCH] Add example lua script presets --- share/scripts/singen.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/share/scripts/singen.lua b/share/scripts/singen.lua index 623f9379e8..0d11b8cc9a 100644 --- a/share/scripts/singen.lua +++ b/share/scripts/singen.lua @@ -7,6 +7,19 @@ ardour { description = [[Simple sine wave generator with gain and frequency controls]] } +function presets () + return + { + -- one can speficy parmaters by name.. + { name = "1k", params = { Frequency = 1000, Gain = -18 } }, + { name = "440", params = { Frequency = 440, Gain = -3 } }, + -- ..or using zero-based indexing as number. + { name = "C4", params = { [0] = 261.625565, [1] = -6 } }, + -- partial preset are also possible + { name = "max volume", params = { [1] = 0 } }, + } +end + local lpf = 0 function dsp_params ()