[feature request] Custom settings functions
-
@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.
-
@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!
-
@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.
-
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.
HiseSnippet 1757.3ocsY80aaaCDmJMpqwcFqYXuN.U+jBVSpcZZWAxJVSbRFxZSqQcWwdX.ELRzwbQlTPhJMdE46y9NrOR6k8MXi+ShT1RJ1FX9Iwi2w628SGOdhdPBM.klRS.Na79owHfyW5NbJgMt+XHl.N8HfyltAYoL5jsSQLFlbQJ3vowvzTTHvw4N+jPMmMVGH+8O+3gvHHI.YDA.efhCPuFOAyLRG7xWgihNAFhdOdhk168xSCnj9zHZFGR2wsKHFFbI7BzafB0VyE3b2iCwLZxPFjgR45bHMb5vwzOQT5+AbJ97HjXPOvP9BoDC5OFGENHObSA.m0GXB96nB9uw8LbHtPtgDdfbBOiE1bfyZkgz5kfTu5fzIznPwBTC7brf25J3so6vfDbLyLi.a228TBCkLBxocaXozEr1uroaeJW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SZigsUebyGy408aNlmc+cEV0TLWQ4gZhYUwAOUCj2domFiaqd1l2FQraehQyweU0rpw5l3gZK8ciUWpugxSs4etcqO2ZiV2zxa1oFMpx4z8yFI9b+JlVeQ.0anOIax4nj7tfyUD3rd4a84tK1s9DnZy2RQJ4TdU72FiziM2KTuJtWHf96D3O8KmdDjAEWUjVFWuXTBCKfiio7NvYC2iPoWxnwRc0soygLSNa67qUBx29CvgBIVWlA3ZfiqyFbGNM+gOgCYiEC9ZG.XLBewXlXzewG43Z4fMTN3AZGvm4b5gzqk939tEkzUdXTtG5veXBTJaM9iL9mQ.btmqV2XnHG1xIkAaJ7JzojAIHdhj3VvjcAI71Aud3As94C5+JAEtDHTRiyfPTMHTo6pgvu0McZJ+wVCx3aOjG+3IfKuNG4xkCypRoyf4+rZLq0c0v79twQvohu57i83avKFraqI3P7GKMYYI6VJht2sEQpBkyDQ+sUXnUX0Bi651q6t6svH5qbKUxZFTsiSNp36qLUsWQn8Et687tc6B.yeavOv8LZXVDjU9hpE2HudBdcrR2Hr3VeIoX1T6areIt85tUd60UVkZAg6ltCvrfwUi20p.u7BL+eiW8+EPa2i4oTALCXW28jecUu3+k.Jui23DOk3LHKAKRsdS1jgzrj.T9WhmuEVOtqXrfYFhHgxA+K+mdxdhwN5I6kOIuPPPB8iApS3D+aC2SJgiIh7OZYC2yDi85Ajm5wsys6NcAx8vAABpX6d.P01r6JXySVAa1aEr4oqfMOaEr46WAaddi1H9+mNHiQmn1lvEL3X4w+NNGSDWcfLiD7eTuCXHE
-
@d-healey Is this in scriptnode?
-
@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!