I’m currently trying to implement a VU meter for a sampler I’m creating however I’ve run into the issue of the meter freezing after the note is finished playing. I understand that this is happening because the note event is over and there is nothing to update the value but trying to move the VU meter to a different instrument has not worked either. I was wondering if there was a way to keep my instrument perpetually on even when there are no notes that might not have to go through score section as that could cause p-field issues.
VU meter freezing
Welcome to the forum @MarkoJ0621. If you like, you can just reset the VU meter when the note ends:
cabbageSetValue "vumeter1", 0, lastcycle:k()
The lastcycle
opcode will output a 1 when the instrument is performing its very last cycle.
Btw, if you simply paste your code it’s easier for people to work with it.
Thanks a lot! Works just as intended.