Business Template Forums Macros Double click and sustain macro function

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #5091

    Hi,
    I am looking for some macro function that can be defined in milliseconds and thereby listen to midi input and detect a double click of a button. And if this is detected some actions would be performed. I also have the same question for a sustained midi click of a button. Are there any such functions defined? I looked in the Reference Guide but couldn’t find it. Thanks again!

    #5093
    Philippe
    Keymaster

    Hi Daniel,
    This is a long standing feature request, and I am also very interested by the possibility to use simple click, double click and long push in the macros.
    We will have a look to thins and if that’s no to complicated, we will imagine to implement this in Logelloop 5.5

    In the meantime, you may use this macro to detect a double click in a macro using the expression monotonic_ms()
    Ok, that’s not very handy as it is very necessary to achieve this detection outside of the macro…

    Philippe

    //*************************** Macro Begin ***************************
    // This macro will report the elapsed time between
    // two user actions

    // At the first User action, we initiate the $begin$ variable
    // and we set the time duration to 0
    Declare int $begin$ = {monotonic_ms()}
    Declare int $time_duration_ms$ = 0

    //We wait for a second user action
    WaitUserAction

    // Then we calculate the elapsed time between the first and the second user action
    $time_duration_ms$ = {monotonic_ms() – $begin$}

    // We send it as a message to the Logelloop user interface.
    Message $time_duration_ms$

    If {$time_duration_ms$ < 250} MessageMain "Double click" //MacroStartIfNeededByName "Perpetual Hamster" //MacroStopByName "Perpetual SFX OstinatO" // Here you can do something for the double click Else MessageMain "Simple click" //MacroStartIfNeededByName "Perpetual SFX OstinatO" //MacroStopByName "Perpetual Hamster" // Here you can do something for the simple click EndIf //*************************** Macro End ***************************

    #5096

    Thanks for your help! I saw you had added this functionality as part of the latest 5.5 Beta.

    //
    Daniel

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.