--------------------------------------------------------------------------------
--! @example Ensemble.lua
--! Ensemble script
--! trigger multiple voices
--------------------------------------------------------------------------------
PanSpread =
Knob(
"PanSpread", 1.0, 0, 1)
TimeSpread =
Knob("TimeSpread", 0.5, 0, 1)
shifts = {0, 1, -1, 2, -2}
--shifts = {0, 1, -1, 2, -2, 3, -3}
--shifts = {0, 1, -1, 2, -2, 3, -3, 4, -4}
local panSpread = PanSpread.value
local timeSpread = TimeSpread.value
local numShifts = #shifts
for i=1,numShifts do
local shift = shifts[i]
local note = e.note + shift
local tune = -shift
wait(timeSpread*10) -- 10 ms jitter
end
end
-- eat event release is automatic in
playNote
end