Can someone give a clue?

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

Can someone give a clue?

Post by lulu m » Wed Mar 29, 2017 3:55 pm

Hi,

I have this Lua code module, to fill up the first 16 A slots in the slot rack, in my program:

----

defineParameter("loadedPatch", "The Loaded Patch", "init", nil)

function onLoad()
prog=this.program
--Load it into the slots
for t=2, 16 do
this.parent.instance:getSlot(t):setProgram(prog)
end
loadedPatch=prog.name
end

----

All is well when I load the patch the first time, and it's placed into the first slot in the program table and into the 16 A slots in the slot rack!
When I load another program, with the same script, the program is automatically loaded into the next slot of the program table, instead of replacing the already loaded and selected program!!???

When I out-comment the loop for loading the program into the slots, the program does gets replaced in the program table, but of course only 1 slot filled?!

(I tried with this.parent, this.program, ... no change :x )
I hope I'm a bit clear?

Someone, please :?:
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: 180
Joined: Fri Nov 14, 2014 11:41 am
Contact:

Re: Can someone give a clue?

Post by AposMus » Sat Apr 01, 2017 6:36 pm

I haven't tested this, but have you tried

function onLoadIntoSlot()

or

function onInit()

This delays the callback even more. At the moment your script is triggered when the script module is loaded, which is before the program is loaded.

Like I said, I have no idea if this is the answer, but it seems like an option.
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: 54
Joined: Mon Apr 08, 2013 3:55 pm
Contact:

Re: Can someone give a clue?

Post by lulu m » Mon Apr 03, 2017 9:05 am

AposMus wrote:I haven't tested this, but have you tried

function onLoadIntoSlot()

or

function onInit()

This delays the callback even more. At the moment your script is triggered when the script module is loaded, which is before the program is loaded.

Like I said, I have no idea if this is the answer, but it seems like an option.
Thanks AposMus for the tip,

Yes I tried the onLoadIntoSlot and the result is the same unfortunately :-(
The onInit doesn't work and gives an error message 'No matching overload found, candidates: init setProgram(....). I guess, onInit needs a program that is already set into a slot.

I hope someone at Steinberg could give me a clue, so I can continue to move on? Please steiny I'm out of ideas ;-)
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