16n Faderbank: build help, dev suggestions

that would be wonderful! yeah, sending new sysex with each fader update seems right.

My rough, back-of-the-envelope guide would be:

  • optional things go behind DEFINEs.
  • it feels like all you’re doing is sending sysex messages at the same time you’d send a MIDI message, so that’s an easy part of the code to do something like #ifdef TRANSMIT_SYSEX
  • I’d put the sysex mapping itself in another file, eg sysex_mapping.h, which is irrelevant if the flag is off.

The feature flags, whilst not as nice as browser-based config, work well to tidy whole features away, I think.

i just compiled the firmware from github to use the 16n as master, and it works as expected apart from the first (leftmost) fader: no value from this fader is transmitted either on i2c or via usb-midi (browser test page).
If i load the hex firmware v132, this first fader (as well as the others) works, so it is likely not a hardware issue. Any ideas ?

@Nordseele @scanner_darkly I know you two were talking about having 16n as a bridge for MIDI to I2C. It’s that still in the works?

I’m super interested in the idea of sending MIDI from my laptop/controllers over the USB port on the 16n and then through to my ER-301 via I2C. :exploding_head:

Many thanks!

2 Likes

Ha, just saw you two talking on the OD forum:

Exciting stuff!

yep, i should hopefully have something soon. to summarize, here are the currently discussed options for 16n:

  • 16n in follower mode: the ability to send MIDI notes and poll CC values from teletype (already done, experimental firmwares posted here). notes will be sent via either minijack or USB MIDI, CCs can only be read from USB MIDI.

  • 16n in leader mode: the ability to convert MIDI notes and CCs to i2c. i did a quick test with just friends, working on adding er-301 support (need to implement voice allocation and adjust SC.CV / SC.TR mapping once it’s finalized).

for completeness sake, there are also these solutions for i2c-MIDI:

7 Likes

20 characters of :fire:

ok added support for sysex in this branch:

to enable sysex you need to uncomment TRANSMIT_SYSEX define in config.h. i copied the sysex from the repo you linked, but you probably want to set mks50Groups and mks50Params to something that makes sense.

i’ve structured it so that it’s easy to add more implementations in the future. instead of using hard coded data i went with functions in case some additional calculations/transformations will be needed. for now it will send to both minijack and USB MIDI, this could be split eventually. channels are controlled in config.h similar to how CC channels are determined.

can you give it a try? i don’t have mks-50 but i’ve tested with midi-ox and i can see sysex being sent properly.

1 Like

hello,

can I use the Faderbank USB Midi as an input for Teletype, in order to get an USB-Midi to I2C Bride?
Sorry if that has been already answered :slight_smile:

i posted firmwares upthread that allow you to read USB MIDI CCs from teletype. for notes it’s not really suitable as teletype works as i2c leader, so you couldn’t, say, trigger scripts when a note is sent.

yes! amazing. i was about to test this out but then i realized i need some sort of midi combiner to be able to send notes and 16n controls to the mks-50 at the same time. is there currently a way to forward incoming usb midi notes to the 16n din output?

thanks for your answer.
I use exactly your firmware, but for some reason I get no reaction on teletype.
This is the Syntax:
M X FB 1

you are reading fader value, not MIDI CC. to read MIDI CC the op is FB.CC channel cc. you will need to update teletype firmware with the version posted above to get the op (make sure to backup your presets first). i assume M just denotes metro script, not part of actual script?

add this to setup():

usbMIDI.setHandleNoteOn(midiHandleNoteOn);
usbMIDI.setHandleNoteOff(midiHandleNoteOff);

and add these 2 functions:

void midiHandleNoteOn(uint8_t channel, uint8_t note, uint8_t velocity) {
    MIDI.sendNoteOn(note, velocity, channel);
}

void midiHandleNoteOff(uint8_t channel, uint8_t note, uint8_t velocity) {
    MIDI.sendNoteOff(note, velocity, channel);
}

getting the following error on compile:

Arduino: 1.8.5 (Mac OS X), TD: 1.45, Board: “Teensy 3.2 / 3.1, MIDI, 120 MHz (overclock), Faster, US English”

_16n_faderbank_firmware: In function ‘void setup()’:
_16n_faderbank_firmware:112: error: ‘midiHandleNoteOn’ was not declared in this scope
usbMIDI.setHandleNoteOn(midiHandleNoteOn);
^
_16n_faderbank_firmware:113: error: ‘midiHandleNoteOff’ was not declared in this scope
usbMIDI.setHandleNoteOff(midiHandleNoteOff);
^
_16n_faderbank_firmware:118: error: a function-definition is not allowed here before ‘{’ token
void midiHandleNoteOn(uint8_t channel, uint8_t note, uint8_t velocity) {
^
_16n_faderbank_firmware:122: error: a function-definition is not allowed here before ‘{’ token
void midiHandleNoteOff(uint8_t channel, uint8_t note, uint8_t velocity) {
^
‘midiHandleNoteOn’ was not declared in this scope

This report would have more information with
“Show verbose output during compilation”
option enabled in File -> Preferences.

you probably put the 2 functions in setup(). they need to be outside, just put them at the very end of the file.

I’m feeling very dumb at the moment, but I cannot make it working.
The OPs are known, and the display shows TELETYPE 16N MIDI. (or is there another one??)

I run every 10ms a Metro Script with with :
X FB.CC 1 32

1 means the Midi Channel , 32 the first Fader, right?

btw. 16n USB midi is working, I checked it with my Mac
I change on the fly the Keyboard and the 16n on my teletype, could that be a problem?

so, you’re sending MIDI CCs on channel 1, CC number is 32? can you describe what you are trying to do?

Whoa I was not aware of this, thanks for the heads up!

1 Like

not sure if I get the question right, but my goal is controlling variable X of Teletype by Fader number 1 on my 16n :slight_smile: