[feature request] Custom settings functions
d.healey last edited by
What I'd like is to have access via the scripting API to each of the custom settings functions.
This way I could add whatever GUI I like to control things like relocate samples folder, and changing the interface size, etc.
I can see these functions in the source code and how they interact with the custom settings panel controls but I'm not skilled enough to link to these functions from the scripting API code. So if I was going to implement it I would probably just end up duplicating the code inside the scripting API and that wouldn't be a good way to do it.
So @Christoph-Hart could you implement this or give me some pointers about how to do it?
I'd also like to see the relocate samples folder function able to handle expansions, so clicking the button would relocate the samples folder for the current expansion.
@d-healey Yes yes yes!
@d-healey In a similar vein, it would also be amazing to have access to some of the preset browser functionality in the Scripting API, so you could more easily do custom UI for things like the preset tags or preset notes, etc. Even something as simple as getting the notes from the currently loaded user preset so you can display them elsewhere in the plugin. I think this might be super easy to add, but I'm still digging through it.
ustk last edited by ustk
@Lunacy-Audio For the notes you can put a label and save it with presets already
@ustk Realized that literally right after I posted that haha. Good to go there!
ustk last edited by
@Lunacy-Audio Yeah but it's not as convenient since you need to save the preset after updating the note or you'll lose it, while in the preset browser it is handled instantly...
@ustk Yup, that makes sense. Honestly I think that's fine. That'd probably be my expectation as a user anyway. If you don't save it, it won't save lol
@d-healey The change sample location API would be SUPER handy though.
d.healey last edited by d.healey
The change sample location API would be SUPER handy though.
You can do this with the file and file system APIs.
Christoph implemented the Settings class a few weeks ago and I've populated it with functions to do most of the stuff available in the custom settings floating tile and MIDI floating tiles.
Here is a snippet that demonstrates how to make a custom audio settings panel. It's a little convoluted because each time one setting is changed the other comboboxes have to be updated.
Another thing I found was on init is processed before the audio engine has fired up, this means checking for the current (or last used) audio driver/device will return nothing. To get around this I run a one time timer callback function which waits until after the audio engine is initialised before setting up the comboboxes. This issue only presents itself once you compile your project as a standalone app.
ulrik last edited by
@d-healey Is this in scriptnode?
d.healey last edited by
@ulrik Yes, although I added a few "safety checks" yesterday which haven't been merged yet so if you get crashses that's why.
@d-healey Yup yup, all good Thanks for the update!