Support Center

Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Midi Value Loop

Maxwell Jul 18, 2017 08:34PM CEST

Hi Guys,

Is there a way to have Lemur send midi from 0-127 and then once it reaches 127 is loops back to 0 continuously? And vice versa if going down once it hits 0 it loops back to 127.

I have a continuous knob that I would like to send continuous midi, essentially. I have it set up to send a midi message when the value is higher than its previous value and another midi message when the value is lower than its previous value.

My only issue is that even thought he knob is continuous, it stops sending midi once it reaches 0 or 127.



Up 0 rated Down
Moritz Feb 25, 2018 11:03PM CET
I recently had the same problem. Even this is an old post, I'd like to share my answer for other users.

I made a script which is triggered by the Expression Knob.x. This script contains only one line:

ctlout(TARGET,MIDI-CC,round(range(abs(Knob.x % 1),0,127)),MIDI-CH);

Basically what is does is sending a MIDI-CC to the specified target and channel everytime the knob changes. The value is calculated like this (in this order):

1. Knob.x % 1 delivers only the value of Knob.x after the decimal Point
2. abs() makes it always a positive value between 0 and 1
3. range(a,x,y) maps the values between 0 and 1 to a value between 0 and 127
4. round() rounds this value to the next integer

Hopefully this is useful for somebody.

Best regards,

This question has received the maximum number of answers.
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
Invalid characters found