filling in slots Halion vs Sonic

Post topics about HALion scripting.
Post Reply
User avatar
lulu m
Junior Member
Posts: 50
Joined: Mon Apr 08, 2013 3:55 pm
Contact:

filling in slots Halion vs Sonic

Post by lulu m » Mon Feb 20, 2017 3:33 pm

Hi,

I finally made a test instrument (aimed also at H Sonic users) that takes an program and fills up the 16 slots in Halion 6 5the A slots)

Little code to make it work:

program = this.program.instance:getProgram(1)

t=1
repeat
-- clear slot t of the Slot Rack before assigning
this.program.instance:getSlot(t):setProgram(nil)
this.program.instance:getSlot(t):setProgram(program)
t=t+1
until t>16

Point is that after creating the Instrument with the library creator tool (yes we DO have to save/convert H Sonic layer sounds into programs to get this working ;-)) and the instrument registered in the library manager, all works fine in Halion!! Program shows up, macropage OK, sounds open up into the 16 slots. In H Sonic however, the instrument shows up, macropage OK, but sounds are opened up only in the first slot!?

Does someone know what I'm missing? Is it the fact that Halion has the A,B,C and D slots and Sonic not?

Someone a clue?

Thanks
L.
CPU: Intel Core i7-4790 3.60ghz / RAM: 8G / Windows 10 (64bit)
1 SSD Kingston 240 / 1 WD Caviar Black 1T / 1 WD Caviar Blue 1T / 1 WD ext usb 1.5T
DAW Cubase pro 9.5 / Motu Ultralite MKIII / ADAM F7 / Nektar Panorama P6/ Roli Seaboard Rise 25

AposMus
Junior Member
Posts: 179
Joined: Fri Nov 14, 2014 11:41 am
Contact:

Re: filling in slots Halion vs Sonic

Post by AposMus » Tue Feb 21, 2017 12:11 pm

As for the code, couldn't this work too:

Code: Select all

program = this.program.instance:getProgram(1)

	for i = 2, 16 do
		this.program.instance:getSlot(i):setProgram(program)
	end
With a for loop you don't need to manually iterate. Having the setProgram(nil) in each loop might be unnecessary function calls. Unless the other slots are filled, but I'm not sure.

I did see that the setProgram() function is part of the Halion script controller thread, so it should be in the UI script. Strictly speaking it should have given you an error on running this in the script module.

I know the manual example mixes UI and module script too, but this might be why Sonic doesn't complete the slot loads.

If I find anything else I'll let you know.
Cubase Pro 8.5.2
Halion 6
HSO
Padshop Pro
Dark Planet
Windows 7 64bit, AMD Phenom IIx6 1055t, 8GB Ram, Gigabyte GA-880G-UD3H F2, Nvidia GeForce GTS450
https://dewetvanderspuy.co.za/

User avatar
lulu m
Junior Member
Posts: 50
Joined: Mon Apr 08, 2013 3:55 pm
Contact:

Re: filling in slots Halion vs Sonic

Post by lulu m » Tue Feb 21, 2017 4:58 pm

AposMus wrote:As for the code, couldn't this work too:

Code: Select all

program = this.program.instance:getProgram(1)

	for i = 2, 16 do
		this.program.instance:getSlot(i):setProgram(program)
	end
With a for loop you don't need to manually iterate. Having the setProgram(nil) in each loop might be unnecessary function calls. Unless the other slots are filled, but I'm not sure.

I did see that the setProgram() function is part of the Halion script controller thread, so it should be in the UI script. Strictly speaking it should have given you an error on running this in the script module.

I know the manual example mixes UI and module script too, but this might be why Sonic doesn't complete the slot loads.

If I find anything else I'll let you know.
Yes Aposmus you're completely right, Will try out if this will work on Halion Sonic too. Thanks
CPU: Intel Core i7-4790 3.60ghz / RAM: 8G / Windows 10 (64bit)
1 SSD Kingston 240 / 1 WD Caviar Black 1T / 1 WD Caviar Blue 1T / 1 WD ext usb 1.5T
DAW Cubase pro 9.5 / Motu Ultralite MKIII / ADAM F7 / Nektar Panorama P6/ Roli Seaboard Rise 25

Post Reply

Return to “Halion Scripting”

Who is online

Users browsing this forum: No registered users and 1 guest