I see my thread came alive just when I was thinking about deleting the topic. 
So I’ll give it a go with some of my “utility” scripts.
If you want to try them but you get a syntax error when trying to copy and paste the code into Halion download the attachment. I’ve included these examples as both lua script files and Halion MIDI Module presets (plus two more midi module presets with a simple macro page).
Halion.zip (17 KB)
Quick Control Setup.
Tries to assign Filter Cutoff and Resonance, Amp Attack and Release (Offsets) and some of the parameters of Reverb, Delay and Modulation effects.
It does remove any already existing quick control assignments of the program.
program=this.program
zones=this.parent:findZones(true)
effects=program:findEffects(true)
function removeAllQCAssignments(layer)
for i=1,11 do
local assignment=layer:getNumQCAssignments(i)
if assignment>0 then
for j=assignment,1,-1 do
layer:removeQCAssignment(i,j)
end
end
layer:setParameter("QuickControl.QC"..i,50)
end
end
removeAllQCAssignments(program)
function trimRangeQC(layer,qc,index,paramNorm)
layer:setParameterNormalized("QuickControl.QC"..qc,paramNorm)
layer:setQCAssignmentMin(qc,index,50-paramNorm*100/2)
layer:setQCAssignmentMax(qc,index,50+(1-paramNorm)*100/2)
end
function assignQC(layer,qc,element,param,scope,qcName)
layer:addQCAssignment(qc,element,param,scope)
layer:setParameter("QuickControl.Name"..qc,qcName)
local paramNorm=element:getParameterNormalized(param)
local assignment=layer:getNumQCAssignments(qc)
trimRangeQC(layer,qc,assignment,paramNorm)
end
function assignSphere()
assignQC(program,9,zones[1],"CutoffModOffset",program,"Cutoff Offset")
assignQC(program,10,zones[1],"ResoModOffset",program,"Resonance Offset")
print("Sphere assigned to Filter Cutoff and Resonance Offset")
end
paramNames={
{parameter="Filter.Cutoff", name="Filter Cutoff"},
{parameter="Filter.Resonance", name="Resonance"},
{parameter="DCAAttOffset", name="Attack"},
{parameter="DCARelOffset", name="Release"}
}
if zones[1] then
for i=1,4 do
assignQC(program,i,zones[1],paramNames[i].parameter,program,paramNames[i].name)
print("QC"..i..": "..paramNames[i].name)
end
for i,zone in ipairs(zones) do
if zone:getParameter("Filter.Type")==0 then
zone:setParameter("Filter.Type",1)
end
if zone:getParameter("ZoneType")==3 then
print("Filter Cutoff and Resonance have no effect on Organ Zones")
end
end
assignSphere()
else
print("No Zones Found")
end
effectParameters={
["Reverb"]= {par={"Predelay","Mix"}, nam={"Predelay","Mix"}},
["REVerence"]= {par={"predelay","mix"}, nam={"Predelay","Mix"}},
["Chorus"]= {par={"Rate","Depth"}, nam={"Rate","Depth"}},
["Flanger"]= {par={"Rate","Depth"}, nam={"Rate","Depth"}},
["Phaser"]= {par={"rate","mix"}, nam={"Rate","Mix"}},
["Multi Delay"]= {par={"feedbackoverall","Mix"}, nam={"Feedback","Mix"}},
["Studio EQ"]= {par={"gainlfl","gainhfl"}, nam={"Gain Low","Gain High"}},
["Resonator"]= {par={"CutoffSpread","Mix"}, nam={"Cutoff Spread","Mix"}},
["Ring Modulator"]= {par={"Freq","Mix"}, nam={"Frequency","Mix"}},
["Frequency Shifter"]= {par={"ModCoarse","Mix"}, nam={"Mod Coarse","Mix"}},
["Compressor"]= {par={"ratio","threshold"}, nam={"Ratio","Threshold"}},
}
qc=5
k=0
if effects[1] then
for i,effect in ipairs(effects) do
local name=effect.name
if effectParameters[name] then
k=k+1
end
end
if k<=2 then
for i,effect in ipairs(effects) do
local name=effect.name
if effectParameters[name] then
for j=1,2 do
local parameter=effectParameters[name].par[j]
local qcName=effect.name.." "..effectParameters[name].nam[j]
assignQC(program,qc,effect,parameter,program,qcName)
print("QC"..qc..": "..qcName)
qc=qc+1
end
end
end
else
for i,effect in ipairs(effects) do
local name=effect.name
if effectParameters[name] then
local parameter=effectParameters[name].par[2]
local qcName=effect.name.." "..effectParameters[name].nam[2]
assignQC(program,qc,effect,parameter,program,qcName)
print("QC"..qc..": "..qcName)
qc=qc+1
if qc>8 then break end
end
end
end
else
print("No Effects Found")
end
Modwheel Vibrato
Looks for two empty modulation matrix rows and assigns LFO 1 to pitch.
It does so each time the script is reloaded so you might end up with duplicate assignments.
zones=this.parent:findZones(true)
function findEmptyRow(zone)
for j=1,31 do
local modRow1=zone:getModulationMatrixRow(j)
local modRow2=zone:getModulationMatrixRow(j+1)
if modRow1:getSource1()==0 and modRow2:getSource1()==0 then return j end
end
end
function assignModwheelVibrato()
for i,zone in ipairs(zones) do
local j=findEmptyRow(zone)
if j then
local modRow1=zone:getModulationMatrixRow(j)
local modRow2=zone:getModulationMatrixRow(j+1)
modRow1:setSource1(15)
modRow1:setParameter("Destination.Destination",46)
modRow1:setParameter("Destination.Depth",41)
modRow2:setSource1(1)
modRow2:setParameter("Source1.Polarity",1)
modRow2:setSource2(15)
modRow2:setParameter("Destination.Destination",1)
modRow2:setParameter("Destination.Depth",3)
print("Zone "..i.." Modulation Row "..j.." and "..j+1)
print("Modwheel assigned to Vibrato")
else
print("No Empty Modulation Row Found")
end
end
end
if zones[1] then
assignModwheelVibrato()
else
print("No Zones Found")
end
Aftertouch Vibrato
Same as above but with aftertouch.
zones=this.parent:findZones(true)
function findEmptyRow(zone)
for j=1,31 do
local modRow1=zone:getModulationMatrixRow(j)
local modRow2=zone:getModulationMatrixRow(j+1)
if modRow1:getSource1()==0 and modRow2:getSource1()==0 then return j end
end
end
function assignAftertouchVibrato()
for i,zone in ipairs(zones) do
local j=findEmptyRow(zone)
if j then
local modRow1=zone:getModulationMatrixRow(j)
local modRow2=zone:getModulationMatrixRow(j+1)
modRow1:setSource1(16)
modRow1:setParameter("Destination.Destination",46)
modRow1:setParameter("Destination.Depth",41)
modRow2:setSource1(1)
modRow2:setParameter("Source1.Polarity",1)
modRow2:setSource2(16)
modRow2:setParameter("Destination.Destination",1)
modRow2:setParameter("Destination.Depth",3)
print("Zone "..i.." Modulation Row "..j.." and "..j+1)
print("Aftertouch assigned to Vibrato")
else
print("No Emty Modulation Row Found")
end
end
end
if zones[1] then
assignAftertouchVibrato()
else
print("No Zones Found")
end
Reset Modulation Matrix
zones=this.parent:findZones(true)
function resetModulationMatrix()
if zones[1] then
for i,zone in ipairs(zones) do
for j=1,32,1 do
local modRow=zone:getModulationMatrixRow(j)
local defs=modRow.parameterDefinitions
for k,paremeter in ipairs(defs) do
modRow:setParameter(paremeter.id,paremeter.default)
end
end
end
print("Modulation Matrix Has Been Reset")
else
print("No Zones Found")
end
end
resetModulationMatrix()