Teletype and MIDI

a thread to discuss how we can integrate MIDI with teletype. 2 obvious use cases:

  • use MIDI controllers to trigger and control scripts
  • sequence other MIDI gear

but the main attraction, of course, is being able to use TT scripting to process MIDI messages. it would be really easy to write scripts to merge / split channels, to transpose sequences, to create arpeggiations - basically, you’d have a pretty powerful scriptable MIDI processor with the ability to have multiple presets. and then you could integrate it with the rest of the modular via I2C and CV.

the 2 main questions are - how do we get MIDI into teletype, and how do we output MIDI from teletype? obviously there are CV-to-MIDI and MIDI-to-CV converters but that’s not what we’re interested in.


sending MIDI: this would require an expander of some sort, that would translate TT I2C messages to MIDI. as it happens, we already have 2 options:

with the faderbank ops you can send MIDI notes to either USB MIDI or minijack MIDI. the only requirement here (other than updating the firmware itself) is having faderbank connected to TT via I2C. this is a nice option as more folks now have 16n, but it would be great to have a smaller solution just for the MIDI output.

something like the I2C-select bus or a similar solution - a teensy (or some other CPU) based little board or a small module or board that would do I2C-MIDI conversion (extra bonus points for something that can connect to intellijel’s MIDI tiles).

the experimental ops we used so far for the above are:

FB.ON channel note velocity
FB.OFF channel note

send MIDI notes to faderbank (could add an op to send CCs too)

MIDI.ON channel note vel
MIDI.OFF channel note
MIDI.CC channel cc value
MIDI.PRG channel program

send MIDI messages to I2C-select bus (see the link above for more info)


receiving MIDI: as TT works as a USB host, MIDI sequencers/controllers could be simply plugged directly into the TT USB port. one thing to consider is that some MIDI devices will require power that TT is not capable of providing - basically, the same rule applies as with TT and grids - if you have the latest rev TT you could likely plug directly into it, if you have an earlier rev you’ll need to power it externally (using offworld or monome switch or two>one module). i did a super quick test yesterday with MIDI twister and it seems to work fine (big thanks to @ngwese for doing all the heavy lifting by adding MIDI support to libavr32).

here is how it could work: we could have ops that would assign MIDI messages (notes and CCs, maybe others) to specific scripts. then whenever a MIDI message is received that is assigned to a script it would trigger that script. additional ops would return the latest received note or CC.

not sure what would be a good name base for such ops - M.IN for “MIDI in”? then we could have the following:

M.IN.NR channel start end script
assign Note Range (all notes between start and end) from the specified channel to the specified script (0 to receive from any channel, 0 for both start and end to receive all notes)

M.IN.CCR channel start end script
same thing for CCs

M.IN.N
get the last received note’s pitch

M.IN.V
get the last received note’s velocity

M.IN.CC
get the last received CC

M.IN.CH
get the last channel

M.IN.T
get the type of last message received (0 - note off, 1 - note on, 2 - CC etc)

here is a scene that would merge all channels to channel 1 and transpose all notes up by an octave:

#I
M.IN.NR 0 0 0 1

#1
I + 12 M.IN.N
IF NZ M.IN.T: MIDI.ON 1 I M.IN.V
ELSE: MIDI.OFF 1 I M.IN.V

as a side note, with the recent ansible ops added by @csboling one could in theory create teletype scripts that would allow you to use ansible apps with a MIDI controller instead of grid/arc…

20 Likes

I haven’t really wrapped my head fully around this, so this might be a dumb question. Is there a reason you can’t both send and receive midi out of the USB port on teletype?

1 Like

you probably could (implementation would need to be added for sending MIDI, libavr32 only supports receiving MIDI as far as i know). there wouldn’t be much point of doing both with the same device (other than providing visual feedback to those controllers that support it), but it could be useful for just sequencing/controlling external gear.

would you be able to use one of these?

then a midi controller could be sending info to TT, while TT sends midi info to a synth…

i have a similar m-audio thingy, will give it a try

1 Like

I’d also be curious how/if midi clock and metro could work together :slight_smile: !

that would be a good use case - i think MIDI events should be assignable to any scripts incl metro and init, and supporting MIDI clock definitely makes sense. probably some division of the clock though, as at 120 bpm this would result in ~21ms metro rate which is pretty extreme for teletype.

4 Likes

I don’t have anything constructive to add as far as development goes… but I’ve been translating some microtonal scales from my Just Type experiments to my DX7iid (which support microtuning natively), and being able to sequence them side-by-side would be a dream :star_struck:

Been a bit slack on this project due to 2 new jobs in the past few months. I laid out a PCB that mounts to the rear of the teletype that serves as an I2C busboard, and an I2C -> MIDI converter, putting the MIDI messages onto the CV bus (can then be broken out via the expert sleepers cv bus -> DIN MIDI module)

Ill try and get it assembled soon for testing. It does need another revision though. It began as a modified monome teletype backpack with the same SMD parts (voltage reg and pullups) and then I added in everything else through hole. The mixed part footprints are bugging me so that will change.

@scanner_darkly just emailed intellijel to see if they would share the pinout for the MIDI module. Currently im using the Expert sleepers MIDI output module

3 Likes

i think this would be a great option to have, especially if it can be used with either ES bus to DIN MIDI or intellijel MIDI tiles. i’ll test using a USB to DIN MIDI converter (like the one @shellfritsch posted above) as that would be the simplest option to get MIDI in and out, but the backpack version would mean the USB port is available for other things (so you don’t have to switch between keyboard and MIDI and you could use grid or a MIDI controller at the same time).

2 Likes

Norns; TT reacting to the state of the modular and Norns. Keyboard midi into Norns for recording/manipulation/etc to join with feedback from TT. Norns midi out to synth. Seems like Crow territory?

i don’t think you could connect norns and teletype with a USB cable directly as both act as USB hosts, so you’d need to use something else in between, and yeah, this is probably the territory crow will cover. it’d be definitely pretty interesting to use tt scripts with something like softcut!

3 Likes

Overjoyed reading this thread - I’ve been lurking the forum for the past few weeks (this is my first post) trying to find anything diving into this, it seems like such a huge piece of functionality I was surprised at how little discussion there was around it. I fell in love immediately with the Teletype a couple months ago and have shifted my entire modular rack/composition approach to center around it, but it’s been a struggle to find a solution to incorporate my vintage rack synths and such into the system. Tried a Hermod for a couple weeks but it felt like I was essentially sequencing things in two different places and sending a note or two here or there or converting a few CVs to CCs – and overall in some cases generating voltage just to convert it to MIDI felt wrong from a design standpoint. I really love having all the pattern data and logic being driven outward from the Teletype, so the Hermod had to depart and I had to start teaching myself C++ and Arduino in a foolhardy attempt to see if I could spike something like the above out (I have web dev and creative coding experience but this is very new harder core territory for me).

I’ll keep pushing on learning, but I’m so excited to see more experienced hands and minds are diving into this as well! :pray:

@scanner_darkly thank you for the explanation of the experimental fader ops as well! I’ve been scouring the web after seeing some of your Instagram posts that seemed to be doing conversion and could not understand how it was happening, as all the 16n docs seem to refer to everything being output-only (even if the protocols should/could be bi-directional). This encourages my need to build a 16n in the short term and excitement for something smaller in the modular in the longer term.

I have nothing helpful to add for the moment, just wanted to say I’m very grateful I’m not alone in dreaming about this functionality!

2 Likes

testing m-audio MIDI-USB converter, seems to work fine for sending MIDI to teletype. a quick demo:

machinedrum MIDI notes are sent to teletype which then sends them to just friends via i2c. i also have CC LFO translated into one of the CV outputs, controlling filter cutoff - seems pretty smooth!

going to see if i can send MIDI from teletype now.

13 Likes

afraid MIDI is a no go. i’m not able to make it work reliably with the teletype USB port, and i’m not able to troubleshoot / fix without doing a deep dive into USB/MIDI (if anybody has any ideas this thread has some details).

so the only feasible option at this point is sending MIDI via I2C and some I2C to MIDI converter.

9 Likes

it seems like crow may be able to fill this position?

possibly - but this depends on crow/tt integration.

Is there a list of controllers that work?

Teletype MIDI + I2C busboard v2 is almost done. Ive added the intellijel header for communication with the MIDI ports on their cases. They were helpful on that part. Last thing I will include on the board is connectors for the teensy USB data pins. The intellijel case USB port sends its data over the same ribbon cable. May as well include the option to connect that to the Teensy 3.2 data pins.

That seems simplest for getting USB Midi outside the case

6 Likes

great news, and super useful additions!

not sure what you’re asking? i haven’t tried bidirectional MIDI via TT USB port with any MIDI controllers, just the USB-MIDI m-audio adapter. i did try sending MIDI from MIDI twister controller to TT and that worked, but there is no sense in implementing something that will only work on some but not all devices.