Multisample/Zone selector or dropdown?

Post general topics related to sound design with HALion 6.
Post Reply
User avatar
MarcoScherer
New Member
Posts: 21
Joined: Fri Apr 14, 2017 7:19 pm
Contact:

Multisample/Zone selector or dropdown?

Post by MarcoScherer » Tue May 02, 2017 10:49 am

Hi guys,

is it possible to include a multisample or zone selector within a preset or layer? I want to design a simple instrument that enables the user to combine two multisamples, that he selects from a given bunch.

Thanks,
Marco
electronic music & sound design // www.marcoscherer.de

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

Re: Multisample/Zone selector or dropdown?

Post by misohoza » Tue May 02, 2017 4:40 pm

Hi Marco.

I was trying to do something similar.
I still don't know how to make the sample selector to work (macro page template from Studio Strings).

But I managed to create a menu that lets me load a layer preset within a program.
viewtopic.php?f=268&t=114073
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

User avatar
MarcoScherer
New Member
Posts: 21
Joined: Fri Apr 14, 2017 7:19 pm
Contact:

Re: Multisample/Zone selector or dropdown?

Post by MarcoScherer » Tue May 02, 2017 6:41 pm

Thanks, I'll check that. Maybe it gives an idea...
electronic music & sound design // www.marcoscherer.de

User avatar
MarcoScherer
New Member
Posts: 21
Joined: Fri Apr 14, 2017 7:19 pm
Contact:

Re: Multisample/Zone selector or dropdown?

Post by MarcoScherer » Tue May 23, 2017 12:36 pm

Today I managed to create dropdowns for existing layers that contains multisamples (or other zones). Thought I share it with you. Find the code below.

My program contains TWO main layers which contains SUB layers, which finally represent multisamples. The script searches for the TWO main layers and then adds their SUB layers into corresponding dropdowns. When the user selects an instrument from the layers, all others get muted.

Code: Select all

function muteLayers(layers)
	if layers[1] then
	    for i, layer in ipairs(layers) do
		   layer:setParameter("LayerMute", true)
	    end
		layers[1]:setParameter("LayerMute", false)
	end
end


function onLayerSelectChanged(parameter, layers)
   if layers[1] then
       for i, layer in ipairs(layers) do
		   layer:setParameter("LayerMute", true)
       end
   end
   
   s = this:getParameter(parameter)
   layers[s]:setParameter("LayerMute", false)
end


-- Find all layers
mainLayers = getElement():findLayers(false)
syntheticLayers = mainLayers[1]:findLayers(false)
traditionalLayers = mainLayers[2]:findLayers(false)
muteLayers(syntheticLayers)
muteLayers(traditionalLayers)

-- Prepare option arrays
synthLayersArray = {}
for i, layer in ipairs(syntheticLayers) do
	synthLayersArray[i] = layer.name
end
defineParameter("syntheticOptions", nil, 1, synthLayersArray, function() onLayerSelectChanged("syntheticOptions", syntheticLayers) end)

tradiLayersArray = {}
for i, layer in ipairs(traditionalLayers) do
	tradiLayersArray[i] = layer.name
end
defineParameter("traditionalOptions", nil, 1, tradiLayersArray, function() onLayerSelectChanged("traditionalOptions", traditionalLayers) end)
electronic music & sound design // www.marcoscherer.de

Post Reply

Return to “General”

Who is online

Users browsing this forum: No registered users and 0 guests