- This topic has 2 replies, 2 voices, and was last updated 4 years, 7 months ago by
DanielAkerberg.
-
AuthorPosts
-
9 May 2021 at 11 h 25 min #5091
DanielAkerbergMemberHi,
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!10 May 2021 at 8 h 43 min #5093
PhilippeKeymasterHi 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.5In 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 ***************************
14 May 2021 at 9 h 31 min #5096
DanielAkerbergMemberThanks for your help! I saw you had added this functionality as part of the latest 5.5 Beta.
//
Daniel -
AuthorPosts
- You must be logged in to reply to this topic.