I’m not seeing that? The samphold chokes the frequency of the updates, but the changed opcode should ensure the values are sent to the UI. I did it this way so we’re not calling cabbageSet on each k-cycle, or every 20 times a second, even if no changes have occurred. Here’s my simple test in full:
Ok it works for me! I made a mistake and used the trigger instead of the value in this line (kFreqMinAttackTrigger and kFreqMaxAttackTrigger instead of the actual values):
Thanks. For my csound knowledge, how would you adapt the code for a button? Also with samphold? I tried to do it but I can’t find an elegant way to do it… With the same approach it looks like it updates the value exactly when metro() and the kTrigger are triggered at the same time.
Sorry for this dumb question but it’s the first time I’m using samphold() so I’m still trying to see how to use it properly.
When the mouse is over a widget, I display some information in a text box. Since the user can move the mouse very quickly, it can raise the same errors/issues.
Since this time I’d like to use kTrigger, I was wondering what could be the best way to do it. I think I could increment a global variable everytime kTrigger==1, then use the same code with samphold and changed, but it looks dirty.