hi!
First off, just wanna say I’m very new to csound and cabbage, just starting to wrap my head around it, but really enjoying it so far.
So, I’m making a sampler, and I’m coding an array of tall thin buttons to be draggable with the mouse on the x axis so I can use them as markers on top of my soundfiler to set the start times for different notes (like Slicex).
Now, since their position isn’t part of the button widget’s state, I’m trying to figure out the best way to store and retrieve their position, in such a way that when I export this as a VST, it’ll save and recall properly in a DAW.
My first attempt was to use cabbageSetStateValue
to store an array of values. But cabbageGetStateValue
doesn’t run at i-rate (which I now understand from browsing this forum is for good reason) so any time I change a marker position, my diskin2
’s skip time doesn’t actually update until the second time I play a note.
I thought of generating an array of invisible sliders and just keeping their values synced, but that seems like it might add more overhead than is actually necessary?
Or do I need to take a look at reinit
?
I figured I’d ask and see if you guys have any thoughts / suggestions that might point me in the right direction.
Thanks!