Hello,
I am trying to have a very easy and limited menus with only matrix source destinations.
I have some problem only to callback the Modulation Module (LFO), other sources are ok.
I attach the preset.
I hope in your help…
Thanks
-- MATRIX SOURCES
function assignLFO3(row, source, polarity, smoothing)
local LFO3 = this.parent:getMidiModule("LFO3")
if LFO3 then
setSource(row, source, polarity, smoothing, ModulationSource.modulationModule, LFO3)
else
setSource(row, source, polarity, smoothing, ModulationSource.unassigned)
end
end
matrixSources={
{name="Off", index=0},
{name="LFO 1", index=1},
{name="LFO 2", index=2},
{name="LFO 3", assignLFO3},
{name="Env 3", index=6},
}
function getMatrixSourceNames()
matrixSourceNames={}
for i=1,#matrixSources do
matrixSourceNames[i]=matrixSources[i].name
end
end
getMatrixSourceNames()
last = {}
function matrixSourceChanged()
this:setParameter("M2OSCSource", MatrixSource)
this:setParameter("M2OSCSource", MatrixSource)
this:setParameter("M3OSCSource", MatrixSource)
this:setParameter("M4OSCSource", MatrixSource)
this:setParameter("M1WaveSource", MatrixSource)
this:setParameter("M2WaveSource", MatrixSource)
this:setParameter("M3WaveSource", MatrixSource)
this:setParameter("M4WaveSource", MatrixSource)
end
defineParameter("MatrixSource",nil,1,matrixSourceNames,matrixSourceChanged)
function M1OSCSourceChanged()
this.parent:getLayer("Generators"):getZone("OSC Zone"):getModulationMatrixRow(1):setParameter("Source1.Source",matrixSources[M1OSCSource].index)
end
defineParameter("M1OSCSource",nil,1,matrixSourceNames,M1OSCSourceChanged)
function M2OSCSourceChanged()
this.parent:getLayer("Generators"):getZone("OSC Zone"):getModulationMatrixRow(2):setParameter("Source1.Source",matrixSources[M2OSCSource].index)
end
defineParameter("M2OSCSource",nil,1,matrixSourceNames,M3OSCSourceChanged)
function M3OSCSourceChanged()
this.parent:getLayer("Generators"):getZone("OSC Zone"):getModulationMatrixRow(3):setParameter("Source1.Source",matrixSources[M3OSCSource].index)
end
defineParameter("M3OSCSource",nil,1,matrixSourceNames,M3OSCSourceChanged)
function M4OSCSourceChanged()
this.parent:getLayer("Generators"):getZone("OSC Zone"):getModulationMatrixRow(4):setParameter("Source1.Source",matrixSources[M4OSCSource].index)
end
defineParameter("M4OSCSource",nil,1,matrixSourceNames,M4OSCSourceChanged)
function M1WaveSourceChanged()
this.parent:getLayer("Generators"):getZone("OSC Zone"):getModulationMatrixRow(5):setParameter("Source1.Source",matrixSources[M1WaveSource].index)
end
defineParameter("M1WaveSource",nil,1,matrixSourceNames,M1WaveSourceChanged)
function M2WaveSourceChanged()
this.parent:getLayer("Generators"):getZone("OSC Zone"):getModulationMatrixRow(6):setParameter("Source1.Source",matrixSources[M2WaveSource].index)
end
defineParameter("M2WaveSource",nil,1,matrixSourceNames,M2WaveSourceChanged)
function M3WaveSourceChanged()
this.parent:getLayer("Generators"):getZone("OSC Zone"):getModulationMatrixRow(7):setParameter("Source1.Source",matrixSources[M3WaveSource].index)
end
defineParameter("M3WaveSource",nil,1,matrixSourceNames,M3WaveSourceChanged)
function M4WaveSourceChanged()
this.parent:getLayer("Generators"):getZone("OSC Zone"):getModulationMatrixRow(8):setParameter("Source1.Source",matrixSources[M4WaveSource].index)
end
defineParameter("M4WaveSource",nil,1,matrixSourceNames,M4WaveSourceChanged)
Test Matrix Source.vstpreset.zip (11.8 KB)