Default values of the default macro/connect parameters?

Use this forum to post about your macro page designs in HALion 6
Post Reply
User avatar
Senior Member
Posts: 1448
Joined: Thu Feb 17, 2011 6:17 am

Default values of the default macro/connect parameters?

Post by ggc » Sat Feb 18, 2017 8:19 pm


So.. When one connects "default" parameters to stuff on the macro page:

Where can we define what the default value is? - ctrl+clicking on some default parameters makes them jump to a value of 50...

Cant we define the "default value" somewhere?

(Yes, it is possible with the defineParameter.... But.....only numbers so far (for me) without some table or so... Sooo... If one wants to directly connect a knob with values of 1/2, 1/8t , etc, it would be nice to simply be able to set a default value somewhere?)

Thanks for your help:)

(OT- Nice would also be to perform jumps from a-> c ->f instead of going a>b>c>d>e>f) - but thats still cloudy too)

Matthias Klag
Steinberg Employee
Posts: 32
Joined: Sat Feb 23, 2013 9:33 am

Re: Default values of the default macro/connect parameters?

Post by Matthias Klag » Mon Feb 20, 2017 3:44 pm


Here is an example for you. Anima uses only a subset of the filter types. Legacy filter types like HALion 3 or Waldorf are not used.

Below, you find script code how to do this. I copied this code from the "Anima" script module.

Code: Select all

-- define the filter types
filterTypes = {
				{ name = "Tube", 					  index = 2 },
				{ name = "Hard Clip", 				  index = 3 },
				{ name = "Bit Reduction", 			  index = 4 },
				{ name = "Rate Reduction", 			  index = 5 },
				{ name = "Rate Reduction Key Follow",      index = 6 },

-- create table with the names of the filter types
function getFilterTypeNames()
	filterTypeNames = {}
	for i=1, #filterTypes do
		filterTypeNames[i] = filterTypes[i].name

-- parameter change callback
function onFilterTypeChanged()
    this.parent:getZone():setParameter("Filter.Type", filterTypes[FilterType].index)

-- define parameters for the filter section
defineParameter("FilterType", 	  "Filter Type", 	 1, filterTypeNames, onFilterTypeChanged)
Here is the basic idea behind this:
  • filterTypes is an array that contains one table for each filter type. Each of these tables has the keys name and index with the desired values.
  • The function getFilterTypeNames creates the table "filterTypeNames" by reading the names from the filterTypes table. filterTypeNames is used as the strings table in defineParameter.
  • The change callback "onFilterTypeChanged" uses setParameter. The correct value is read from the index field of the filterTypes table.
This might look complicated, but the advantage is that if you change the table filterTypes, the rest of your code will still work.


Matthias Klag - HALion Developer
Steinberg Media Technologies GmbH
Hamburg, Germany
Checkout Steinberg on YouTube, Twitter and Facebook!

Post Reply

Return to “Macro Page Design”

Who is online

Users browsing this forum: No registered users and 1 guest