I don’t know if this belongs in the scripting section or in the Macro section. Is it possible to create a single knob to control pitch instead of 3 (octave, coarse and fine). I’m trying to figure out if there’s a to make one knob move in semi tones (coarse) for more than 1 octave and then move in fine when shift is held. Not sure if this is even possible though. Even if I can combine octave and coarse into a single knob that would be better. I don’t even have to be able to combine fine and I’ll still be somewhat satisfied.
It is not very easy to create such a thing as it is required to use Lua-Scripting.
it requires 3 steps:
- Insert a new Midi-Module - Object / Lua-Script
- Edit the Lua-Script and write your code: (i named my synth-zone “Zone1a”)
–Amp and Filter Offsets
zone1=this.parent:getZone(“Zone1a”)
– the callback-Function (it is called when you turn the knob in the Macro-Window)
function onO1ChangePitch()
O1_oct, Oct1rest = math.modf(Osc1Coarse / 12)
Osc1PitFin=Osc1Coarse-(O1_oct*12)
O1_coarse, O1_fine=math.modf(Osc1PitFin)
– this are the parameter in the layer (only OSC 1 & 2 activated)
zone1:setParameter(“Osc 1.Octave”, O1_oct)
zone1:setParameter(“Osc 2.Octave”, O1_oct)
zone1:setParameter(“Osc 1.Coarse”, O1_coarse)
zone1:setParameter(“Osc 2.Coarse”, O1_coarse)
zone1:setParameter(“Osc 1.Fine”, O1_fine100)
zone1:setParameter(“Osc 2.Fine”, O1_fine100)
end
– This it the function/variable that can be linked with the Macro-Designer Extended when you select the luascript and look under PARAMSLIST
defineParameter(“Osc1Pitch”,“Osc1Pitch”,0,-36,36,onO1ChangePitch)
2) copy this little programm (please excuse my bad “hacking”) in in the Lua-Script
-
Create a Big Knob on the MaroDesigner-Page
-
Open up “Maco Page Designer Extended”, select the Lua-Script and right click on the new variable Osc1Pitch.
-
Select Connect to Macro Page
-
rightclick on the Knob and select Connect to Parameter “Lua.Script…Osc1Pitch”
I added an example as vstpreset
Lua Script One-Knob for Pitch.zip (15.9 KB)
Oh wow! Thank you!