First, a modified low pass filter (as built-in to the plug-in) but with an LFO. Param 3 is the LFO rate, and Param 4 is the depth.
Code: Select all
local lfoT = 0
local function scriptedBrickWallLPFWithLFO( state )
local maxBin = state.maxBin
local cutoff = state.param2 * maxBin
local frequency = 0.1 + state.param3 * 10
local twopi = 2 * math.pi
lfoT = lfoT + twopi * frequency * (maxBin-1)/44100
while lfoT >= twopi do
lfoT = lfoT - twopi
end
local lfo = state.param4 * maxBin * math.sin( lfoT )
cutoff = cutoff + lfo
cutoff = math.max( cutoff, 0 )
local zeroBin = zeroBin
for i=cutoff,maxBin,1 do
zeroBin( i )
end
end
addSpectralScript( "LFO Low Pass", scriptedBrickWallLPFWithLFO )
Code: Select all
local frozen = 0
local frozenStateRe = { 1 }
local frozenStateIm = { 1 }
local function scriptedFreeze( state )
local maxBin = state.maxBin
if frozen == 1 then
if state.param2 == 0 then
frozen = 0
else
local setBin = setBin
for i=0,maxBin,1 do
setBin( i, frozenStateRe[i], frozenStateIm[i] )
end
end
elseif state.param2 > 0 then
frozen = 1
local getBin = getBin
for i=0,maxBin,1 do
re, im = getBin( i )
frozenStateRe[i] = re
frozenStateIm[i] = im
end
end
end
addSpectralScript( "Freeze", scriptedFreeze )