Script won't load after changing directory structure

Post Reply New Topic
RELATED
PRODUCTS

Post

I had a script which was loading fine and showing in the list of controller scripts (under a folder with the vendor name which I had set) but now I have tried to reorganise a bit the controller has permanently disappeared. I am referring to the "add a controller manually" process.

If I have a script under a sub-folder of "Controller Scripts" then it won't load, and if I further nest the folder it doesn't make any difference either.

I'm absolutely stumped as to what has changed. If I use my own name as the vendor then it doesn't show up and if I use the actual manufacturer name then the script doesn't show along with other scripts using the same vendor name which do load. I have looked at other scripts (like the generic controllers from Thomas Helzle) and they don't have a matching vendor name to the folder name so that obviously doesn't matter either.

Help! I was making progress and had a working (but basic) script but now it won't load so I can't continue development!

Post

So what directory structure are you using right now? Have you tried resetting Bitwig? Are you sure the script itself is valid?

Post

The structure has nothing to do with the folders on disk, it's derived from the header of the script where you define the controller:

Code: Select all

host.defineController("Acme", "Acme Keyboard", "1.0", "d84e03d0-b605-11e3-a5e2-0800200c9a66");
This script will show up in a folder "Acme" with the name "Acme Keyboard" in the dropdown. It should not matter where it is on disk, although I don't know how many subfolders are scanned.

Just make sure you have it all in the correct folder. In 2.0 you can set a custom folder, in 1.x you had to put it in "Documents\Bitwig Studio\Controller Scripts..."

Cheers,

Tom
"Out beyond the ideas of wrongdoing and rightdoing, there is a field. I’ll meet you there." - Rumi
ScreenDream Instagram Mastodon

Post

Thanks a lot for replying. I'm not entirely sure what happened but we're all back in order now.

I have a suspicion that I had an error somewhere in the code that meant the script was never initialising properly. Something along the lines of a call to a library function with bad parameters or something like that.

Some good news - making progress with the script so I can now navigate a "window" of clips and launch individual clips or the whole scene with my LaunchControl XL, and the buttons light up to reflect the status of the clips as playing, recording, queued to play, empty slot etc. I'm going to clean it up a bit, write plenty of comments and upload it soon in the hope that it will help others.

I think what would really help to increase understanding would be to comment our code generously.

Post

Well, such errors should show up in the scripting console - always the first place to look.

But great you got it solved!

Cheers,

Tom
"Out beyond the ideas of wrongdoing and rightdoing, there is a field. I’ll meet you there." - Rumi
ScreenDream Instagram Mastodon

Post Reply

Return to “Controller Scripting”