buttonChanged()

Home Forums OWL buttonChanged()

This topic contains 3 replies, has 2 voices, and was last updated by  Martin Klang 8 months, 3 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2720

    electricnoodles
    Participant

    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?

    #2723

    electricnoodles
    Participant

    Anyone have any information at all about this function? classPatch.html tells me the args but I’m still not sure how it works.

    #2728

    electricnoodles
    Participant

    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.

    #2730

    Martin Klang
    Keymaster

    yes that’s the preferred way, and you can get MIDI notes that way too.
    An example is here:

    Patches

    (sorry about not replying sooner, I’ve been otherwise engaged!)

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.


Latest News

Links

Follow us on Twitter