Custom Knob or Menu with Multiple values & intervals of the same parameter

Post topics about HALion scripting.
Post Reply
FedericoS
New Member
Posts: 20
Joined: Fri Jan 03, 2020 5:40 pm
Contact:

Custom Knob or Menu with Multiple values & intervals of the same parameter

Post by FedericoS »

Hello,
I've been trying to create a knob or menu with multiple specific values of the same parameter.
In particular, I would have a knob or menu with only 2 limited waveform, for example: Sine and Saw.

At the moment I succeed to have a limited range of the selected parameter, limiting the value range of the OSC waveform from position 1 to 2 (obtaining a limited selection of Tri and Saw), but I need to create intervals (0, 2).

Is it possible? Someone can help me?

Many thanks

misohoza
Member
Posts: 952
Joined: Sun Oct 05, 2014 12:18 am
Contact:

Re: Custom Knob or Menu with Multiple values & intervals of the same parameter

Post by misohoza »

Hi FedericoS,

Look at some of the factory instruments. I think that Anima filter shape parameter could be a good example.

Or see this thread: viewtopic.php?f=268&t=122127
Win 10 Home, 64 bit, 8 gb ram,
Cubase Pro 10.5, Wavelab Pro 9.5, Halion 6, Dorico 3,
NI Komplete 10 Ultimate, Ozone 7,
UR 44

FedericoS
New Member
Posts: 20
Joined: Fri Jan 03, 2020 5:40 pm
Contact:

Re: Custom Knob or Menu with Multiple values & intervals of the same parameter

Post by FedericoS »

Hello Misohoza and thanks for your fast feedback. I am trying to apply a filter on a "destination" of the Matrix row. I am trying to apply it on many zone... but no result :(
I find the Studio String script, but it is very complex for me and it is no good for my easier quest.
Hope you can help me.

misohoza
Member
Posts: 952
Joined: Sun Oct 05, 2014 12:18 am
Contact:

Re: Custom Knob or Menu with Multiple values & intervals of the same parameter

Post by misohoza »

Hello Misohoza and thanks for your fast feedback. I am trying to apply a filter on a "destination" of the Matrix row. I am trying to apply it on many zone... but no result
Take a look here: https://developer.steinberg.help/displa ... tion+Types

You can adapt the example from the link above to make it work for all zones.

Code: Select all

-- define modulation destinations
defineSlotLocal("modDestinations")
modDestinations = {
  { name = "-",           index = ModulationDestination.unassigned },
  { name = "Pitch",       index = ModulationDestination.pitch },
  { name = "Cutoff",      index = ModulationDestination.cutoff },
  { name = "Resonance",   index = ModulationDestination.resonance },
  { name = "Distortion",  index = ModulationDestination.distortion }
}

-- create table with the names of the modulation destinations
function getModDestNames()
  modDestNames = {}
  for i=1, #modDestinations do
    modDestNames[i] = modDestinations[i].name
  end
end
getModDestNames()

-- parameter change callback to set the modulation destination
function onModDestChanged(row, modDestinationParam)
  local zones = this.parent:findZones(true)
  if zones[1] then
    for _, zone in ipairs(zones) do
      local modRow = zone:getModulationMatrixRow(row)
      local modDestination = modDestinations[modDestinationParam]
      modRow:setParameter("Destination.Destination", modDestination.index)
    end
  end
end

-- define parameters for modulation matrix destinations 1-4
defineParameter("ModDestination1", "Modulation Destination 1",  1, modDestNames, function() onModDestChanged(1,  ModDestination1)  end)
defineParameter("ModDestination2", "Modulation Destination 2",  1, modDestNames, function() onModDestChanged(2,  ModDestination2)  end)
defineParameter("ModDestination3", "Modulation Destination 3",  1, modDestNames, function() onModDestChanged(3,  ModDestination3)  end)
defineParameter("ModDestination4", "Modulation Destination 4",  1, modDestNames, function() onModDestChanged(4,  ModDestination4)  end)
Win 10 Home, 64 bit, 8 gb ram,
Cubase Pro 10.5, Wavelab Pro 9.5, Halion 6, Dorico 3,
NI Komplete 10 Ultimate, Ozone 7,
UR 44

FedericoS
New Member
Posts: 20
Joined: Fri Jan 03, 2020 5:40 pm
Contact:

Re: Custom Knob or Menu with Multiple values & intervals of the same parameter

Post by FedericoS »

Misohoza, thanks to your helps, finally, I am close to finishing my dream virtual machine

Post Reply

Return to “Halion Scripting”

Who is online

Users browsing this forum: No registered users and 1 guest