Can rotary encoders send different syses's based on rotational direction.

3 posts / 0 new
Last post
volovicg
volovicg's picture
Can rotary encoders send different syses's based on rotational direction.

 

I would like to send one sysex ( fixed all the time no variables in the sysex ) - such that when you rotate the encoder to the right is sends sysex #1 ( keeps repeating as your continue to rotate right) and a different sysex  #2 when rotating the ecoder to the left.

So two different sysex's based on encoder rotation direction...

If I assign one encoder to send the rotate right custom sysex and another encoder to send a rotate left sysex - it works - but using two encoders... I would like to use only one.  

Let me know if this can be done.... just incredible software!

Reasoning.. I have a generic rotary wheel on the receiving device that is used for many things basd on context - I would like to duplicate this functionality on the B-Control.

Royce
Royce's picture

Short answer "Yes"

In you transmission string you can use  ifp (if posative ie clockwise) and ifn (you guessed it "if negative" anticlockwise)

eg for 14 bit data of CW = 1 and CCW = -1 the transmit BCL line would be  

.tx $F0 $41 $10  ifp 00 01 F7 ifn $7F $7F $F7

result CW  F0 41 10 00 01 F7

result CCW  F0 41 10 7F 7F F7

If your wheel sends out increasing values on increased rotation speed and you are using either positive values or negative values based on rotation direction...

(Although this method also sends out a CC message as well as the tx sysex. Just use the easypar val in the main tx statement)

.tx $F0 $41 $10  val7.13 val0.6 $F7

"relative-x"  is placed at the end of the easypar statement where most often you would have "absolute".
 .easypar CC 1 1 0 127 absolute       ; CC Midi out ... B0 val (between 0 and 127)

instead you use one of the relative commands

.easypar CC 1 1 0 127 relative-1

With the "relative" endings  output "val" is dependent on direction and speed of turn
(and the result of the resolution speed is affected by BCL line ".resolution a b c d")

 .relative-1
 .easypar CC 1 1 0 127 relative-1  ; val is +ve clockwise (cw) and -ve counter clockwise (ccw) 7bit midi 7F, 7E,7D,...
.tx $F0 $41 $10  val7.13 val0.6 $F7

Output..CW increasing speed - sequential vals difficult to obtain
B0 01 01    F0 41 10  01 01 F7
B0 01 01    F0 41 10  01 01 F7
B0 01 03    F0 41 10  01 03 F7
B0 01 08    F0 41 10  01 08 F7   etc

CCW increasing speed
B0 01 7F     F0 41 10  7F 7F F7
B0 01 7E     F0 41 10  7F 7E F7
B0 01 7E     F0 41 10  7F 7E F7
B0 01 7D     F0 41 10  7F 7D F7
B0 01 7B     F0 41 10  7F 7B F7
 
.relative-2

 .easypar CC 1 1 0 127 relative-2  ; val is like relative-1 but with 0x40 offset so it is always positive (this is common technique in Roland sysex)
CW increasing speed

B0 01 41 you can guess the all positive sysex
B0 01 41
B0 01 43
B0 01 48  etc

CCW increasing speed
B0 01 3F
B0 01 3E
B0 01 3E
B0 01 3D
B0 01 3B

.relative-3
 
.easypar CC 1 1 0 127 relative-3  ; val is CW like relative-1 and relative-2, but ccw is an increasing value stating at 0x40
CW increasing speed -

B0 01 01
B0 01 01
B0 01 03
B0 01 08  etc

CCW increasing speed
B0 01 41
B0 01 42
B0 01 44
B0 01 45  etc
 
 
Hope this helps
Royce

 

volovicg
volovicg's picture

Works Perfect - Exactly as you describe -  Amazing - thanks!