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

Support devices with reversed fader direction #62

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

threedaymonk
Copy link

I realise that you don't necessarily want to support every possible device, so I won't be offended if you don't want to merge this! However, I think this is quite general and clarifies some of the intention of the code, and it might make it easier to maintain forks that add functionality.

This separates the meaning of flip into its two components:

  • flipOrder - which fader is 1 and which is 16 etc.
  • reverseMinMax - which end of the fader is which

By default, these are both the same, following the layout of the original 16n in which the fader is at its lowest voltage at the bottom.

However, in order to support the Sweet Sixteen or any other hypothetical build with reversed faders, we can define REVERSED_FADERS, and the normal (non-flipped) order will be with the highest voltage at the bottom. This is implemented by interpreting reverseMinMax as the opposite of flip.

Or, in tabular form:

| variable      | 16n   | S16   |
+---------------+---+---+---+---+
| flip          | 0 | 1 | 0 | 1 |
| flipOrder     | 0 | 1 | 0 | 1 |
| reverseMinMax | 0 | 1 | 1 | 0 |

This also allows the Sweet Sixteen to be operated upside down, if desired.

This separates the meaning of "flip" into its two components:

- flipOrder - which fader is 1 and which is 16 etc.
- reverseMinMax - which end of the fader is which

By default, these are both the same, following the layout of the
original 16n in which the fader is at its lowest voltage at the bottom.

However, in order to support the Sweet Sixteen, we can define
REVERSED_FADERS, and the normal (non-flipped) order will be with the
highest voltage at the bottom. This is implemented by interpreting
reverseMinMax as the opposite of flip.

Or, in tabular form:

    | variable      | 16n   | S16   |
    +---------------+---+---+---+---+
    | flip          | 0 | 1 | 0 | 1 |
    | flipOrder     | 0 | 1 | 0 | 1 |
    | reverseMinMax | 0 | 1 | 1 | 0 |

This allows the Sweet Sixteen to be operated upside down, if desired.
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

Successfully merging this pull request may close these issues.

1 participant