1. IMPORTANT:
    We launched a new online community and this space is now closed. This community will be available as a read-only resources until further notice.
    JOIN US HERE

Differentiating between long and short presses of a button?

Discussion in 'Building With Reaktor' started by namke, May 20, 2013.

  1. namke

    namke NI Product Owner

    Messages:
    58
    Ok, this is making my head hurt :)

    I'm trying to simplify one of my ensembles, which currently uses two buttons (mapped to footswitches). I would like some way of saying that a short-click equates to one of the buttons, whilst a long-click equates to the other (it's a looper ensemble, so one would be 'record' the other 'overdub')

    Can anyone think of a way to implement this? Core or standard modules, I don't mind (it will probably need a single parameter to decide whether a press is 'long' or 'short').

    Any hints, gratefully received :)
     
  2. colB

    colB NI Product Owner

    Messages:
    3,969
    That is a tricky thing to get right from a usability point of view. Single/Double click may be better?

    In implementation terms, you should be looking at counters, maybe stepfilter/dupFilters.
    When the button is pressed, start a counter, as soon as the button is not being pressed, look at the counter value and use that with a separator or router to send a trigger event to either record or dub, then reset the counter.
     
  3. salamanderanagram

    salamanderanagram NI Product Owner

    Messages:
    3,454
    if you have note on/off values coming from the footpedal you can use a timer module to see how long a note was held for.
     
  4. namke

    namke NI Product Owner

    Messages:
    58
    Thanks for the replies; I had wondered about multiple-clicks but I wonder about my ability to perform such activities with my foot ;-)

    I'll have a further experiment, and see what occurs…