Notifications
Clear all

Endless Rotary Encoders

5 Posts
2 Users
0 Reactions
244 Views
(@laidbackdood)
Active Member
Joined: 2 years ago
Posts: 13
Topic starter  

Hello, does Unify support endless encoders (there's 4 different types). I can't seem to find the answer anywhere and can't get it to work on the macro knobs. I appreciate if anyone has info on this?

 

Mike


   
Quote
(@getdunne)
Illustrious Member Admin
Joined: 5 years ago
Posts: 4452
 

@laidbackdood

Can you send me some references/links about the "4 different types"? Once I know what's required, I can add the necessary code.


   
ReplyQuote
(@laidbackdood)
Active Member
Joined: 2 years ago
Posts: 13
Topic starter  

@getdunne 

Hey Shane, I forgot where I got this, but I used it to program substitutions for use in other apps (i.e. keyboard up and down keys) using my midi controller. 

My controller uses the 2s complement which basically sends out 1 (increment) or 127 (decrement), it can adjust coarseness by adding value so for example if I turn really fast it will return 3 for increment, and maybe 126 or 125 for decrement.  Unfortunately not all software supports it, Arturia plugins require 65 + #(0 to 2 for speed) for increment, and 63 - # for decrement. 

Bitwig supports all 4 and you can select the type your controller uses.

Let me know if this helps, I can try to find other resources.

-------------------------------------------------

 

Relative Signed Bit

Relative Signed Bit 2

Relative Bin Offset

Relative 2s Complement

 

  • enc-r: Relative Signed Bit. If the most sign bit is set, Then the offset is positive. The lower 6 significant bits are the offset. <Binding channel="1" enc-r="13" … The offset value is formed as 0svvvvvv. Where s is the sign or direction and vvvvvv is the number of ticks turned.

 

  • enc-l: Relative Signed Bit 2". If the most sign bit is unset, Then the offset is positive. The lower 6 significant bits are the offset. This is the same as enc-r but with the direction of turn reversed. This is the method the Mackie Control Protocol uses. <Binding channel="1" enc-l="13" … The offset value is formed as 0svvvvvv. Where s is the sign or direction and vvvvvv is the number of ticks turned.

 

  • enc-2: Relative 2s Complement. Positive offsets are sent as normal from 1 to 64 and negative offsets are sent as 2s complement negative numbers. This is a signed 7 bit int. <Binding channel="1" enc-2="13" …

 

  • enc-b: Relative Binary Offset. Positive offsets are sent as offset plus 64 and negative offsets are sent as 64 minus offset. 64 is zero, 65 is +1, 63 is -1. <Binding channel="1" enc-b="13" …

 

14 bit encoders are also supported with:

  • rpn-delta - The value is expected to be a signed 14bit value that is added to the current value. For use with encoders
  • nrpn-delta - The value is expected to be a signed 14bit value that is added to the current value. For use with encoders

   
ReplyQuote
(@getdunne)
Illustrious Member Admin
Joined: 5 years ago
Posts: 4452
 

This is all completely new to me; thank you for bringing it to my attention.

The text you included above--is it from Bitwig? I'd be interested in any other links/resources you can point me to.

Also, can you give example(s) of MIDI controllers that feature endless encoders and support these protocols? Ultimately I may have to get the hardware to test with.


   
ReplyQuote
(@laidbackdood)
Active Member
Joined: 2 years ago
Posts: 13
Topic starter  

@getdunne

I'm using MidiFighter Twister from DJTechTools, as well as a Monogram Panel. The Twister is great in that you can select which relative type you want to use, the Monogram is hard coded to 2's complement only and needs an intermediary to utilize the others. I believe the Arturia midi keyboards (except keystep 32 and 37) and Native Instruments keyboards also support endless rotary functions that you may have to enable via their software. I believe Novation Fader controllers and one of the Behringer faders also have endless knobs.

As for the documentation, I found where i copied it, https://manual.ardour.org/using-control-surfaces/generic-midi/working-with-encoders/

I also found this: https://tutorials.renoise.com/wiki/MIDI_Mapping

  • CC Type: The type of MIDI CC controller.
    • Absolute 7 bit: Use the CC value as an absolute value.
    • Relative signed bit: Increase at [065 - 127], decrease at [001 - 063].
    • Relative signed bit 2: Increase at [001 - 063], decrease at [065 - 127].
    • Relative bin offset: Increase at [065 - 127], decrease at [063 - 000].
    • Relative two's comp: Increase at [001 - 64], decrease at [127 - 065].

I will look for anything else but it seems the concept is the same across all 4 types where the controller will send a specific cc value based on which direction you turn and how fast, the software in-turn interprets the value and increments or decrements the parameter value accordingly:

Turn left = start value + offset (acceleration)

Turn right = start value + offset (acceleration)

The acceleration increases or decreases the current stored knob value by a greater amount depending on speed.

-------------------------------------------------------

This was my experience with what I have:

Relative Bin Offset (CC Value 64 is deadzone - no change, looks like signed bit is the same):

Turn right (increment) = CC Value 65 + (0-63+ Depending on how fast you turn)
    Note: The encoder will keep returning 65 as you turn if you do it slow, otherwise it will fluctuate between 65 and 68 from my average use, 68 increases the value of the linked parameter by 3 when turning fast.
Turn left (decrement) = CC Value 63 - (0-63+ Depending on how fast you turn)

Relative 2s Complement (CC Value 64 is not a deadzone but instead increments the linked parameter by 64):

Turn right (increment) = CC Value 1 + (0-63+ Depending on how fast you turn)
Turn left (decrement) = CC Value 127 - (0-63+ Depending on how fast you turn)

Hope this helps. Looking forward to your implementation.

Mike

This post was modified 2 years ago by laidbackdood

   
ReplyQuote
Share: