Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Description

Enumerator to identify the different modulation sources and types.

Available in: Controller.

IndexsourceTypesourceInfo1sourceInfo2
0ModulationSource.unassigned--
1ModulationSource.lfo1--
2ModulationSource.lfo2--
3ModulationSource.ampEnv--
4ModulationSource.filterEnv--
5ModulationSource.pitchEnv--
6ModulationSource.userEnv--
7ModulationSource.stepMod--
8ModulationSource.glide--
9ModulationSource.keyFollow--
10ModulationSource.noteOnVelocity--
11ModulationSource.noteOnVelocitySquared--
12ModulationSource.noteOnVelocityNormalized--
13ModulationSource.noteOffVelocity--
14ModulationSource.pitchBend--
15ModulationSource.modWheel--
16ModulationSource.aftertouch--
17ModulationSource.midiControlMIDI controller number (0 - 127)

-

18ModulationSource.quickControlElement object of the layerIndex of the quick control (1 - 11)
19ModulationSource.modulationModuleElement object of the MIDI moduleNumber of the output channel
20ModulationSource.noteExpressionNumber of the custom note expression (1-8)-
21ModulationSource.noise--
22ModulationSource.output--
23ModulationSource.bus1--
24ModulationSource.bus2--
25ModulationSource.bus3--
26ModulationSource.bus4--
27ModulationSource.bus5--
28ModulationSource.bus6--
29ModulationSource.bus7--
30ModulationSource.bus8--
31ModulationSource.bus9--
32ModulationSource.bus10--
33ModulationSource.bus11--
34ModulationSource.bus12--
35ModulationSource.bus13--
36ModulationSource.bus14--
37ModulationSource.bus15--
38ModulationSource.bus16--

Example

-- define the modulation source types and infos in an array
modSources = {
    { sourceType = ModulationSource.lfo1, bipolar = 1 },
    { sourceType = ModulationSource.midiControl, bipolar = 0, sourceInfo1 = 1 },
    { sourceType = ModulationSource.quickControl,bipolar = 1, sourceInfo1 = this.program, sourceInfo2 = 1 },
    { sourceType = ModulationSource.modulationModule, bipolar = 0, sourceInfo1 = this, sourceInfo2 = 1 },
    { sourceType = ModulationSource.modulationModule, bipolar = 0, sourceInfo1 = this, sourceInfo2 = 2 },
    { sourceType = ModulationSource.noteExpression, bipolar = 0, sourceInfo1 = 1 }
}

-- define two modulation outputs for the script module
defineModulation("50%", false)
defineModulation("100%", false)

-- calculate the modulation outputs
function calcModulation()
    return 0.5, 1
end

-- get the element object of the first zone
zone = this.program:findZones(true)[1]

-- assign the modulation sources to source 1 in the modulation rows 1 to 6
for i=1, #modSources do
    modRow = zone:getModulationMatrixRow(i)
    modRow:setSource1(modSources[i].sourceType, modSources[i].sourceInfo1, modSources[i].sourceInfo2)
    modRow:setParameter("Source1.Polarity", modSources[i].bipolar) -- set the polarity of the source
end

  • No labels