Single Pitch knob

Use this forum to post about your macro page designs in HALion 6
Post Reply
User avatar
abject39
Member
Posts: 259
Joined: Sat Jan 17, 2015 8:20 pm
Location: Ventura, Ca
Contact:

Single Pitch knob

Post by abject39 » Sat Mar 25, 2017 5:29 am

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.
My vision is uncompromising: to transcend my clients dreams by mesmerizing their audience with the world's finest audio arrangements and products.

ClausWagner
New Member
Posts: 4
Joined: Fri Mar 17, 2017 3:50 pm
Contact:

Re: Single Pitch knob

Post by ClausWagner » Sun Apr 23, 2017 11:48 am

It is not very easy to create such a thing as it is required to use Lua-Scripting.

it requires 3 steps:

1) Insert a new Midi-Module - Object / Lua-Script
2) 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_fine*100)
zone1:setParameter("Osc 2.Fine", O1_fine*100)

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

3) Create a Big Knob on the MaroDesigner-Page

4) Open up "Maco Page Designer Extended", select the Lua-Script and right click on the new variable Osc1Pitch.
5) Select Connect to Macro Page
6) rightclick on the Knob and select Connect to Parameter "Lua.Script...Osc1Pitch"

I added an example as vstpreset
Attachments
Lua Script One-Knob for Pitch.zip
(15.95 KiB) Downloaded 112 times

User avatar
abject39
Member
Posts: 259
Joined: Sat Jan 17, 2015 8:20 pm
Location: Ventura, Ca
Contact:

Re: Single Pitch knob

Post by abject39 » Mon Apr 24, 2017 4:57 am

ClausWagner wrote:It is not very easy to create such a thing as it is required to use Lua-Scripting.

it requires 3 steps:

1) Insert a new Midi-Module - Object / Lua-Script
2) 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_fine*100)
zone1:setParameter("Osc 2.Fine", O1_fine*100)

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

3) Create a Big Knob on the MaroDesigner-Page

4) Open up "Maco Page Designer Extended", select the Lua-Script and right click on the new variable Osc1Pitch.
5) Select Connect to Macro Page
6) rightclick on the Knob and select Connect to Parameter "Lua.Script...Osc1Pitch"

I added an example as vstpreset
Oh wow! Thank you!
My vision is uncompromising: to transcend my clients dreams by mesmerizing their audience with the world's finest audio arrangements and products.

Post Reply

Return to “Macro Page Design”

Who is online

Users browsing this forum: No registered users and 2 guests