is it possible to control the loop length in halion via modwheel? It is possible in Kontakt but i guess this must also be possible in halion? But I found nothing about this topic in the documentation. Please let me know.
thanks
I think so, as I see it exposed as a VST Parameter in PARAMSLIST.
- I call up a PARAMLIST pane.
- I click a sample in the Program Tree.
- I find the parameter under SampleOsc
Is there only one sample in the layer, or do you have many to deal with?
There are a few ways I can think of to register and access this parameter so it can be automated.
You can do it through a Macro control, or you can do it directly through a LUA Script.
I succeeded in registering the parameter by making a macro page, dragging on a knob, and linking it to the Parameter.
If some HALion Master doesn’t beat me to it, I’ll try to come back soon with some walk through examples. First I’ll find a good Program that’s included with HALion to experiment with. Then I’ll try to refresh my memory on some things. I need to remember how to set min and max limits on the control.
Yes, it’s possible to deal with a layer that has loads of samples, each with different loop points. The control can move ALL of the loop points in many samples at one time in a ‘relative’ manner. I just need to remember ‘how’.
thanks for your answer. I just want to control the loop length of one sample/ one layer.
i can only control sample start / speed factor / formant shift. but not the loop length in a direct way.
So yes please show me the way how to do this. (I guess Kontakt has a more comfortable way :-))
Hi @faxinger and @Brian_Roland
Here is a script idea. It should work for a single sample. Might not be as smooth as in Kontakt.
zone = this.parent:findZones(true)[1]
assert(zone)
loopStartId = 655382
loopEndId = 655383
sampleEndId = 655371
function onController(e)
postEvent(e)
if e.controller == 1 then
local loopstart = zone:getParameter(loopStartId) + 1
local sampleEnd = zone:getParameter(sampleEndId)
local loopRange = sampleEnd - loopstart
local value = math.pow(e.value / 127, 3)
local loopEndTarget = loopstart + loopRange * value
zone:setParameter(loopEndId, loopEndTarget)
end
end
OK, this should be pretty easy to at least get a connection. I’ll go ahead and walk you through ‘one’ of the ways to accomplish this. There are probably way more…but this hit me first.
I still don’t remember right away how to set ‘limits’ on the control though…
In this example I’ve started out with “Solo Violin” from “Sonic Factory Content”. It’ll be one of the Violins included with HALion that has an unlocked sample layer.
First lets find the parameter you want to automate. Loads of ways you can manage this (frames/tabs/pop-out-windows/etc), so I’ll just get a fresh start in a new window.
I’m going to start by undocking one of the simpler windows.
Next I’ll change this window to display a Parameter List.
Next I’ll make a new frame beside my Parameter list.
Resize the window a bit and open a Macro Page Designer.
Since this Instrument doesn’t yet have a Macro Page, I’m going to make one real quickly.
I’ll click/select the most parent layer of the Program tree…
And start a new Macro Page.
I’ll use the Controls browser to find one I like. In this case I’ll go for a horizontal slider that displays the value in a floating box (Slider H). I just grab it and drag it on. I’m going to stretch it out a bit with my mouse to make it wider.
Next I’ll select the sample I want to manipulate in the Program Tree, and look in the Parameter List for the osc parameter I’ll be registering. The one you want might be different, but you should be able to find it and sort it out. I’m going to go for the SustainLoopEndA parameter in this example. It’s optional, but I’ve also split off a new frame below the Macro Designer so I can easily see the sample editor where it’s easier to get a visual and confirm it’s the parameter I want.
Yep, it’s the ONE! So, I’ll right click it in the Parameter List and choose “Connect to Macro Page”.
Then, I’ll right click the control in the Macro Page Designer and Connect it.
I’d like to be able to see more of that label, so I’ll right click “Slider H” in the Macro Page Tree (top left frame) and stretch the text and background fields in the template out a bit. Once I’m done I’ll click the back arrow to get back to parent level of the Macro Designer.
It’s probably a good idea to save a backup of the preset at this point. My new control can make some ‘radical changes’ with slight movements as it is. It’ll be nice to have a reference preset backed up in case I forget.
Now I’m ready to test the control. I’ll click this “Test Marco Page” icon up here, move it, and Yay! It is adjusting the Sustain Ending loop point for that ONE sample.
From there I can open the actual Macro Editor for the instrument, right click it, and learn a CC. Or, register it as a VST parameter in a DAW that does VST automation lanes. It could also be linked up other ways…
Now I’ll have to refresh my memory on how to set limits for controls like this.
thanks for both answers! they are very exact and explicit.
I will try both and see how they work. Have a nice day Brian and Misohoza
Ugg, I’ve missed something. At this stage when I right click the slider on the macro page I don’t get the usual options to learn a CC, bind to a QC, etc.
Shows how rusty I’ve gotten…I’ll have to go back to school to figure out what I missed.
That LUA script misohoza posted is a more direct approach.
Thanks misohoza!
@ misohoza. I have tried out your script now and it works perfect to me! thanks a lot.
this is the simplest way to achieve loop length
Just a little annotation: in case the modwheel is at 0 to about 5 percent and i play high pitched notes, the loop seems to be skipped. when i play low notes, the loop does well.
And another thing i would like to have implemented if possible: could the starting point of the loop also be modulated by pitchbend or another CC? this would make it easier to move the loop through the whole sample.
Have a nice day
You are right. When you pitch the sample down minimum loop length of 1 sample seems to work. But this doesn’t work when you pitch the sample up.
Simple fix could be to increase the number when you check the loopstart (currently set to + 1)
This should fix the loop being skipped:
zone = this.parent:findZones(true)[1]
assert(zone)
loopStartId = 655382
loopEndId = 655383
sampleEndId = 655371
rootkeyId = 655362
rootkey = zone:getParameter(rootkeyId)
minLoopLength = 1
function onNote(e)
minLoopLength = math.ceil(2 ^ ((e.note - rootkey) / 12))
local loopStart = zone:getParameter(loopStartId) + minLoopLength
if zone:getParameter(loopEndId) < loopStart then
zone:setParameter(loopEndId, loopStart)
end
postEvent(e)
end
function onController(e)
postEvent(e)
if e.controller == 1 then
local loopstart = zone:getParameter(loopStartId) + minLoopLength
local sampleEnd = zone:getParameter(sampleEndId)
local loopRange = sampleEnd - loopstart
local value = math.pow(e.value / 127, 3)
local loopEndTarget = math.floor(loopstart + loopRange * value)
zone:setParameter(loopEndId, loopEndTarget)
end
end
Thank you so much misohoza. I ve taken your script and saved it as a MIDI module. So I can use it immediatly any time I need it.
Ps. the version2 works well - no loopskipping at high pitches. Thank you