Skip to content

Commit

Permalink
Merge pull request #17 from 16n-faderbank/flip_feature
Browse files Browse the repository at this point in the history
Flag to flip faders top/bottom.
  • Loading branch information
infovore authored Jan 20, 2019
2 parents ad3a5b1 + 3b29ef4 commit 8920613
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
18 changes: 12 additions & 6 deletions firmware/_16n_faderbank_firmware/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,38 +19,44 @@ Written for Teensy 3.2.
Most configuration you'll want to do is handled in `config.h`, through a set of `define` statements.

```C
#define DEV 1
#define REV 1
```
will restrict everything to a single channel. Designed for breadboard development.
will reverse the order of the faders in MIDI and I2C, right-to-left
```C
#define REV 1
#define FLIP 1
```

will reverse the order of the analogue ports.
will invert the direction of the faders, top-to-bottom, for MIDI and I2C. Combined with `REV`, this will allow you to use the faderbank upside down - useful if your sole connection is I2C.

```C
#define DEBUG 1
```
will log debug messages to the serial port.
```C
#define DEV 1
```

will restrict the faderbank to its first channel. Designed for breadboard development; almost certainly not of interest.

```C
#define MASTER 1
```
will put the 16n into I2C MASTER mode, broadcasting values from the 16n directly.
MASTER MODE supports up to 4 TXo modules and/or up to 4 Ansible devices and/or 1 ER-301.
MASTER MODE supports up to 4 TXo modules and/or up to 4 Ansible devices and/or 1 ER-301.
If you want to use 16n with an ER-301, you need to turn MASTER MODE on. If you want to use it with a Monome Teletype, leave you want MASTER MODE off - leave it commented out.
### Customising continuous controller numbers and MIDI channels
`config.h` also contains the MIDI configuration.
Midi Continuous Controller numbers are specified by the `usb_ccs` and `trs_ccs` variables; each array has sixteen items, for the faders, left to right. You can alter these should you want specific CCs to come out of the faderbank (if, for instance, you have a tool with fixed mapping, or want to directly control a piece of hardware). It is possible to set the USB MIDI port and the TRS MIDI port to output on different CCs if you wish.
Midi Continuous Controller numbers are specified by the `usb_ccs` and `trs_ccs` variables; each array has sixteen items, for the faders, left to right. You can alter these should you want specific CCs to come out of the faderbank (if, for instance, you have a tool with fixed mapping, or want to directly control a piece of hardware). It is possible to set the USB MIDI port and the TRS MIDI port to output on different CCs if you wish.
Channels are set per-fader in `usb_channels` and `trs_channels`; again, you can have a different channel per fader if you'd like, and different channels for USB and TRS.
Expand Down
6 changes: 6 additions & 0 deletions firmware/_16n_faderbank_firmware/_16n_faderbank_firmware.ino
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,13 @@ void loop() {

// read from the smoother, constrain (to account for tolerances), and map it
temp = analog[i]->getValue();

#ifdef FLIP
temp = MAXFADER - temp;
#endif

temp = constrain(temp, MINFADER, MAXFADER);

temp = map(temp, MINFADER, MAXFADER, 0, 16383);


Expand Down
3 changes: 3 additions & 0 deletions firmware/_16n_faderbank_firmware/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
// reverses faders left-to-right
// #define REV 1

// flips faders up-down. You almost certainly want #REV enabled as well for this.
// #define FLIP 1

// activates printing of debug messages
// #define DEBUG 1

Expand Down

0 comments on commit 8920613

Please sign in to comment.