Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameter mapping no longer supports proportionally relative encoder CCs #1802

Open
Dewb opened this issue Oct 18, 2024 · 3 comments
Open

Parameter mapping no longer supports proportionally relative encoder CCs #1802

Dewb opened this issue Oct 18, 2024 · 3 comments

Comments

@Dewb
Copy link
Collaborator

Dewb commented Oct 18, 2024

The behavior of relative encoder CC messages on mapped parameters in accum mode came up in a discussion on Discord. It looks like norns at one time supported proportionally relevant CCs, where the controller could decide how large the delta should be, but now it restricts incoming changes to +/-1 tick of the parameter.

The code in question:

if d.accum then

I don't think there is a formal spec for encoder CCs from the MIDI Association, but there are two vague in-practice standards for the behavior. The old norns behavior correctly implemented one category (sometimes called relative offset mode), and the new implementation in #1606 adds support for devices in the other category (2s complement relative mode) at the cost of dropping support for anything but single ticks per message in either format. (Also, I think the current behavior implements 2s complement backwards; 1 should be an increment, and 127 (-1) should be a decrement.)

Here's a random forum post with a good explanation of offset vs. 2s complement: https://forum.bome.com/t/translating-absolute-midi-cc-into-relative-1-1-values/1369

I propose a (non-breaking?) fix: change the accum parameter to an option parameter with 4 values. "off" or "none" can be the current accum = false behavior; "simple" can be the current accum = true behavior; "relative" the previous behavior, and "relative-2s" can be the 2's complement behavior described above. Most devices will work with "simple" but only with one step per message movement; every device that sends proportionally relative messages should* work with one of the other two options.

(* based on my current understanding, a survey of devices would be good to verify)

@Dewb
Copy link
Collaborator Author

Dewb commented Oct 18, 2024

It appears both Faderfox and Behringer call these modes "Relative 1" (for 2s complement, 1/127) and "Relative 2" (offset, for 63/65.) So perhaps those are good names to reuse.

Unfortunately, Arturia calls offset "Relative Main" and 2s complement "Relative Alt 1". M-Audio quite dryly calls the relative modes "Right 65, Left 63", "Right 63, Left 65", "Right 127, Left 01", etc.

Faderfox only sends single ticks, not proportional values. Behringer doesn't say. It also offers a "Relative 3" "MSB" mode with unknown behavior. Unfortunately I got rid of my BCR2000 so I can't experiment. Arturia does send proportional values, and also offers a "Relative Alt 2" centered around 16 instead of 64. This sounds like it could be similar to Behringer's Relative 3, or it could be the opposite (using the LSB only instead of the MSB?)

Novation only supports absolute encoder modes on their current line of controllers, which is surprising.

Faderfox UC4 (page 9):
http://www.faderfox.de/PDF/UC4%20Manual%20V03.pdf

Behringer BCR2000 (page 16):
https://mediadl.musictribe.com/media/PLM/data/docs/P0245/BCF2000_BCR2000_M_EN.pdf

Arturia Keylab mk3 (page 59):
https://dl.arturia.net/products/keylab-49-mk3/manual/keylab-mk3_Manual_1_0_4_EN.pdf

M-Audio Oxygen Pro (page 39):
https://cdn.inmusicbrands.com/m-audio/maudio_documentation/Oxygen%20Pro%20Series%20-%20User%20Guide%20-v1.1.pdf

@Dewb
Copy link
Collaborator Author

Dewb commented Oct 18, 2024

So perhaps I'd amend the initial proposal to be a new parameter "mode", with values "absolute", "relative offset", "relative 2s". On the other hand, I haven’t yet found a modern controller that can send relative encoder CC values which doesn’t support sending both offset and 2s complement, so perhaps going back to the old behavior and just implementing support for receiving offset is sufficient.

@tehn
Copy link
Member

tehn commented Oct 19, 2024

this is a very sensible proposal! i approve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants