LUA scripts not working in VST

Home Forums General Using Ctrlr LUA scripts not working in VST

Tagged: ,

This topic contains 18 replies, has 5 voices, and was last updated by lfo2vco lfo2vco 1 month, 1 week ago.

Viewing 19 posts - 1 through 19 (of 19 total)
  • Author
    Posts
  • #73938
    lfo2vco
    lfo2vco
    Participant
    • Topics: 25
    • Replies: 161
    • Total: 186
    • ★★

    Hi Guys,

    I’m revisiting a panel and making some updates, my DAW (Reason) now hosts VSTs so I am now looking to use my panel as a VST. However I have hit a problem.

    LUA scripts in Ctrlr Standalone and the Ctrlr VST work fine. If I export an Instance or Restricted Instance from the Ctrlr VST it seems that none of the LUA scripts function.

    Oddly the same panel exported from the Ctrlr Standalone works fine.

    I am using a Mac running OS 10.9.5 and Ctrlr 5.3.0.

    Any pointers would be much appreciated. Thanks.

    Here is some noise I organised into an acceptable format:
    https://soundcloud.com/lfo2vco/a-dark-crystal

    #73941

    human fly
    Participant
    • Topics: 123
    • Replies: 1057
    • Total: 1180
    • ★★★★

    how about making a simple mini test panel to test a single script?
    or a selection of operation types, so you can narrow it down?

    a thought: when you run it in Ctrlr VST, it’s running Ctrlr
    hosted in a VST plugin, isn’t it? ie: has everything it needs.

    does the VST need to unpack any resources first time it runs?
    have tried it in other hosts? ie: minihost etc.

    #73942
    lfo2vco
    lfo2vco
    Participant
    • Topics: 25
    • Replies: 161
    • Total: 186
    • ★★

    Hi human fly,

    Indeed, I will try a simple panel… that said the problem is anything LUA across the board, every single script both large and small.

    To your second point, that is exactly what I thought and the fact that it works as a standalone but not a VST points towards an issue with the Ctrlr VST or my implementation of something the Ctrlr VST requires.

    I tried my exported VST in Minihost and Defective Records Klee; same result no LUA.

    Here is some noise I organised into an acceptable format:
    https://soundcloud.com/lfo2vco/a-dark-crystal

    #73943
    proton
    proton
    Participant
    • Topics: 16
    • Replies: 83
    • Total: 99

    Hi lfo2vco,

    the problem might be the Ctrlr version you are using, if you use the latest build you shouldn’t. Atom said few times already that it is full of bugs and the Lua implementation might be broken there. I use a Ctrlr version from March 2016 and all works as intended. Cheers!

    #73944
    lfo2vco
    lfo2vco
    Participant
    • Topics: 25
    • Replies: 161
    • Total: 186
    • ★★

    Thanks Proton,

    Thats cured the problem!
    It’s ironic as I recently updated due to using a really old version of Ctrlr.

    Have a great day guys and thanks for your assistance,
    M.

    Here is some noise I organised into an acceptable format:
    https://soundcloud.com/lfo2vco/a-dark-crystal

    #73992
    lfo2vco
    lfo2vco
    Participant
    • Topics: 25
    • Replies: 161
    • Total: 186
    • ★★

    Aaaargh,

    It’s gone again, how odd!

    So it worked the immediately after I backdated Ctrlr then the next time I saved my panel and exported it… zilch. That doesn’t make much sense.

    Here is some noise I organised into an acceptable format:
    https://soundcloud.com/lfo2vco/a-dark-crystal

    #73995

    human fly
    Participant
    • Topics: 123
    • Replies: 1057
    • Total: 1180
    • ★★★★

    kill your ctrlr.settings file?

    #73996
    lfo2vco
    lfo2vco
    Participant
    • Topics: 25
    • Replies: 161
    • Total: 186
    • ★★

    Hi human fly,

    Thanks for the suggestion, I deleted the ctrlr.settings file as suggested, I also cleared out the ctrlr folder, deleted the com.instigator.Ctrlr.plist and by my exported VSTs prefs folder.

    This worked and then again it failed.

    But from this I have found that it seems to be an interaction between the com.instigator.Ctrlr.plist file and the exported VST prefs folder. Deleting these seems to sort out the problem until the next time I launch the VST.

    Not sure where to go from here.

    Here is some noise I organised into an acceptable format:
    https://soundcloud.com/lfo2vco/a-dark-crystal

    #73997

    human fly
    Participant
    • Topics: 123
    • Replies: 1057
    • Total: 1180
    • ★★★★

    soz, i don’t know… was just a wild tilt to help
    troubleshoot it.

    remember that Win10 doesn’t allow unpacking of certain
    files on first run – depends on directory permissions.
    synthedit plugins always had a problem with this. was
    with the *.sem files (that are really *.dlls)

    the workaround was the run the file locally, and then
    distribute with the unpacked files in the zip folder.

    #73998
    lfo2vco
    lfo2vco
    Participant
    • Topics: 25
    • Replies: 161
    • Total: 186
    • ★★

    Cheers fella,

    I am going to try disabling some LUA drop down menus in my panel. I have noticed when I place my VST into the Reason rack from the side bar these drop downs all launch outside the Reason VST wrapper. Which isn’t right!

    This may or may not be causing issues… but at least I should eliminate it.

    Here is some noise I organised into an acceptable format:
    https://soundcloud.com/lfo2vco/a-dark-crystal

    #73999

    human fly
    Participant
    • Topics: 123
    • Replies: 1057
    • Total: 1180
    • ★★★★

    do your drop down methods have this at the top?

    if panel:getBootstrapState() then
    	return
    end

    i think this is the script. basically load was
    hanging because of popups.

    #74000

    human fly
    Participant
    • Topics: 123
    • Replies: 1057
    • Total: 1180
    • ★★★★

    or this one:

    -- This stops issues during panel bootup
    if panel:getRestoreState() or panel:getProgramState() then return end
    #74001
    lfo2vco
    lfo2vco
    Participant
    • Topics: 25
    • Replies: 161
    • Total: 186
    • ★★

    OK I disabled the drop down menus and deleted the methods for them, re-exported but still had the same problem. So it is not the drop down menus loading outside the VST that causes the LUA issues.

    Regarding the above post this is the method I have in place:

    	-- This variable stops index issues during panel bootup
    	if panel:getRestoreState() == true or panel:getProgramState() == true then
    		return
    	end

    It does seem to come down to an issue with the instigator / panel prefs. Deleting these, especially the former cures the LUA issue.

    Cheers M.

    Here is some noise I organised into an acceptable format:
    https://soundcloud.com/lfo2vco/a-dark-crystal

    #83855
    lfo2vco
    lfo2vco
    Participant
    • Topics: 25
    • Replies: 161
    • Total: 186
    • ★★

    OK, so I found what was causing the issue.

    It was a conflict between the Lua data in my old panel and my new panel, because the panels shared the exact same name. Ctrlr creates a preferences folder on the Mac that also shares the panel name, so if you have two panels with the same name but with differing Lua methods it creates a conflict.

    So to get around this problem (as I was still using and referring to the old panel) I renamed the new panel.

    I hope this helps others avoid the same issue.

    Here is some noise I organised into an acceptable format:
    https://soundcloud.com/lfo2vco/a-dark-crystal

    #115527
    goodweather
    goodweather
    Participant
    • Topics: 40
    • Replies: 392
    • Total: 432
    • ★★

    Hi,
    I’m just busy to make my first VST versions of my panels and had the problem that no Lua code was launched as dll. Spent the whole afternoon reading the forum about VST preparation.
    Found the issue then found also your post here.

    I discovered that we should not have getProgramState() in the condition in the isPanelReady function.
    Removing that and thus only using
    if panel:getBootstrapState() == false and bPanelLoaded == true then
    solves the issue.

    I will search further in the forum about the meaning of getProgramState().
    All the startup phase of a panel is still a bit cryptic even if I understand it more and more.

    #115533
    lfo2vco
    lfo2vco
    Participant
    • Topics: 25
    • Replies: 161
    • Total: 186
    • ★★

    Hi John,

    Yes that is correct if memory serves me right (and I stand to be corrected on this) it seemed that getProgramState() solved a problem when exporting the Standalone and also when working in ctrlr app.
    However it seemed t cause a conflict when exporting VSTs. Sorry I can’t remember if I got to the reason for this or stumbled on it by trail and error.

    I do not have much buffer to for memory and old info gets purged so I can function on a day to day basis with my 16 MHz microprocessor!

    Here is some noise I organised into an acceptable format:
    https://soundcloud.com/lfo2vco/a-dark-crystal

    #115535
    dnaldoog
    dnaldoog
    Participant
    • Topics: 1
    • Replies: 175
    • Total: 176
    • ★★

    Further discussion of the getProgramState() situation: http://ctrlr.org/forums/topic/standalone-images-not-loading/not-loading/

    #115540
    goodweather
    goodweather
    Participant
    • Topics: 40
    • Replies: 392
    • Total: 432
    • ★★

    We may need to have 2 versions for each panel then: one using getProgramState() check for standalone export and one without for VST export.

    Good that you remembered there was something about that!
    I checked the forum for getProgramState() but didn’t fins any info.

    #115542
    lfo2vco
    lfo2vco
    Participant
    • Topics: 25
    • Replies: 161
    • Total: 186
    • ★★

    Indeed I did make two sets of panels for my project, one for the app and one for the VSTs.

    Here is the download link if you wish to peruse them:
    https://www.dropbox.com/s/ob6jbxtzv6l7gn6/Kiwi-3P%20Editor%20Ctrlr%20Panels.zip?dl=0

    Actually I think I deleted all the getProgramState() and replaced them with a single
    popup timer call back in my initialise script.

    I hope this helps.

    • This reply was modified 1 month, 1 week ago by lfo2vco lfo2vco.

    Here is some noise I organised into an acceptable format:
    https://soundcloud.com/lfo2vco/a-dark-crystal

Viewing 19 posts - 1 through 19 (of 19 total)

You must be logged in to reply to this topic.

There is currently 0 users and 30 guests online
No users are currently active
Forum Statistics
Threads: 2,241, Posts: 15,791, Members: 55,954
Most users ever online was 12 on January 22, 2019 3:47 pm
Do NOT follow this link or you will be banned from the site!