Thread: Midi <-> OSC
View Single Post
Old 12-07-2017, 05:54 AM   #121
Join Date: Feb 2014
Location: Moscow, Russia
Posts: 554

Tried to solve acceleration issue with the following workaround:
1. Get value from encoder (1+ clockwise, 65+ counter clockwise, depending on rotation speed).
2. Check the direction and store it, so CCW will give -1 argument to /r/scroll and CW will give positive argument.
3. Divide 64 out of CCW value, so that both directions would give 1+ values.
4. Check if the value is higher that 12, cause, otherwise, the cursor would jump across the project like crazy.
5. Run loop for osc action /r/scroll with positive or negative argument, based on direction of rotation. Do it as many times as the CC "times", but not more than 12 times.
6. Done.

The problem is that it's not working. According to Reaper's log, osc command is sent only once per encoder's click.

Here's the code (pic and text):

oscii-bot log shows that printing in loop works both when "times" argument is set as an integer or taken from CC value:
Is it some kind of oscsend protection that doesn't allow multiple similar osc messages to be generated?

Last edited by fundorin; 12-07-2017 at 06:05 AM.
fundorin is offline   Reply With Quote