A couple of Spectral Conquest scripts

Official support for: expertsleepers.co.uk
os
KVRian
1360 posts since 22 Mar, 2002 from UK

Post Tue Jul 06, 2010 12:46 am

Just to give a flavour of what can be done.

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 )
Secondly, a 'freeze' script. Param 2 freezes the spectrum when it's non-zero. Works best when the FFT size is set to 4096.

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 )

Return to “Expert Sleepers”