It looks like buttonChanged() could be the trick to getting sample accurate clock inputs. I couldn’t find any example patches that use it. Does anyone have any code snippets that show how it works?
Anyone have any information at all about this function? classPatch.html tells me the args but I’m still not sure how it works.
Ok I found this…
To receive button changes there is a new virtual method: virtual void buttonChanged(PatchButtonId bid, uint16_t value, uint16_t samples)
By implementing this method you will receive Pushbutton changes as well as MIDI note on/off messages. Having an event-based model makes it easier to manage button state in the patch. The ‘samples’ parameter gives the sample position (in the following audio block) at which the event belongs.
Note on and off messages are received with a button ID greater than or equal to MIDI_NOTE_BUTTON (defined to be 128). The note velocity is scaled up to a 12-bit value, with a value of zero for note off events.
…in this thread https://hoxtonowl.com/forums/topic/owl-firmware-release-v12/
Makes much more sense now. I’ll give it a try.
yes that’s the preferred way, and you can get MIDI notes that way too.
An example is here:
https://hoxtonowl.com/patch-library/patch/Poly_Sub
(sorry about not replying sooner, I’ve been otherwise engaged!)