yet another midi project, newb

Status
Not open for further replies.

gminorcoles

New member
Hi,
I am going to attempt a teensy 4.1 MIDI project. I make music, and while I like using the editing abilities of the DAW software that exists, I prefer to track my compositions through hardware sequencers. There is no approach that I have been happy with that allows me to bridge between the ease of editing MIDI in software, with the simplicity and reliability of hardware for midi playback. N.B. - I have lots of hardware synths which is why I dont just do everything on one computer.

So, sufficiently motivated, I am hoping that enough people have gone before me at this point, that I can cobble something together leveraging my existing software development skills and my non-existing hardware skills. Teensy seems like a good platform. I found an 8 in / 8 out MIDI breakout board for sale:

https://www.tindie.com/products/deftaudio/teensy-41-midi-breakout-board-8in-8out-usb-host/

This is huge, because it solve a lot of issues for me off the shelf, if it has the connections and features I need. "USB Host", I am hoping, means that I can hook my computer up to this and the Teensy over USB, and push MIDI files from my PC to the Teensy, and store the files on the Teensy SD card. I have done some due diligence on this forum and I am aware that code exists that would allow me to write to the SD card over USB from an external device, I hope I am correct about that.

And I know that there is at least rudimentary MIDI playback code that exists on github.

The workflow I hope to enable is for a user to save a MIDI composition from their software of choice, in SMF 0 or SMF 1 format, which itself is blessedly out of scope, to the Teensy, via USB, and then hit "play" in their MIDI software, connecting to the Teensy via MIDI, on one of its many MIDI DIN ports.

For the MVP of this idea, I dont really even need a display. I was thinking that a very minimal display could just display a number, which by convention would represent the current patch selected over MIDI via standard MIDI "program change".

I ordered a bread board from pjrc, just to be prepared, but I dont know what other electronics tools or parts I will need. The bill of materials, not including any case, includes the Teensy, the MIDI Breakout board, both en-route, and maybe a display?

Any suggestions about what I could do for a toolkit for soldering and wiring? Any suggestions on an adequate display? How do I write to the display? Is anyone aware of better than barebones MIDI playback code? Does anyone want to help me with this as a consultant? Am I missing anything? Am I wrong that this can work as I envision?

thanks
george
 
The workflow I hope to enable is for a user to save a MIDI composition from their software of choice, in SMF 0 or SMF 1 format, which itself is blessedly out of scope, to the Teensy, via USB, and then hit "play" in their MIDI software, connecting to the Teensy via MIDI, on one of its many MIDI DIN ports.

That description is a bit confusing. But it sort of sounds to me like what you want is a MIDI interface. You want to be able to control a legacy 5 pin DIN MIDI instrument (synth or something?) with the MIDI data from a computer, right? May I ask, why does "saving the file to the Teensy" have to be a part of that process? Plug the Teensy into the computer, use the USB MIDI library to send the received data out the serial UART to what ever device is plugged in to your breakout board. Maybe I misunderstood what you're looking for.

The 8x8 MIDI breakout board has 8 ins/outs because there are 8 hardware serial ports (UART with RX/TX) on the teensy 4.1. To play back a MIDI file, you only need 1 UART, even that has 16 channels. With MIDI thru, you can have 16 different devices playing different things, just with one serial connection. You can always double up code for the other UARTs if for some reason you want to plug a lot of devices in but not deal with different channels. I would just worry about one for now.
 
thanks a lot for taking the time to reply.

I have many MIDI interfaces, but I have never found one that my computer can address as a mass storage device, onto which I can load a SMF, and control which SMF plays using MIDI program change commands. I have or have had some legacy sequencers (thinking of Akai MPC 4000, Roland MV8800, Roland MC-909) which can do this, but the workflow is very onerous, and these 20 year old devices are obsolete and cost a lot of money, and when they break, I am unhappy. There is a modern device I can think of that does most of what I want, the Midibox Seq V4, but to fulfill the BOM is many hundreds of dollars, and it still is not intended for the use I describe, and as a project it would take me weeks, it is a lot more complex than what I am proposing, and I am not sure it can even deal with unquantized MIDI.

Are you making the point that is is too technically challenging to try to play MIDI out of more than one port? If so, I will have to take your opinion seriously, because of my ignorance of the computing environment. My aim is to provide as many physical ports out as MIDI tracks in my typical song, but not beyond a reasonable point, and the 8 port kit exists, off the shelf, and all I need to do is assemble it, I don't need to know much or design any PCBs or anything, After the kit is put together, my understanding is that I just place the Teensy into it, but I am not exactly sure which pins are connected, I have not received either item yet.

Also, buying a kit with 8 ports in and out seems similar conceptually as buying a kit with only one MIDI port in and out. Am I wrong about that? The amount of soldering is greater, and thus the chance I will make a mistake. Is that part of your concern?

The sequentix Cirklon has a large number of MIDI ports, but it is unobtainable except used for > 3000 usd, and even though it can somewhat laboriously load a SMF from SD card, you still have to "walk" the SD card from your computer to the sequencer. I dont see why that should be required, I want to push the MIDI composition to the sequencer directly from my software application, and hit "play". Saving a file is a well known operation, and sending MIDI commands is well known and well supported. So my analysis is focused less on whether I should want to do this, and more about whether I can DIY it at reasonable cost, and with my limited skills.

thx
george
 
Last edited:
Interesting kit. A quick look at the T4.1 indicates that you could hook up an ILI9341 SPI screen, encoders or whatever and it looks like an excellent starting point. You might consider fitting stackable headers to the T4.1 so you can plug stuff into pins not used by the kit itself.

In the IDE, File>Exampless>Teensy>USB_MIDI>Interface_3x3 is a good starting point for a Class Compliant 8x8 usb - Midi interface and I see nothing preventing a second one being plugged into the USB host of the first making a 16x16Midi interface with extra hardware to play with.

The rest is up to the coder to get it all working..
 
Interesting kit. A quick look at the T4.1 indicates that you could hook up an ILI9341 SPI screen, encoders or whatever and it looks like an excellent starting point. You might consider fitting stackable headers to the T4.1 so you can plug stuff into pins not used by the kit itself.

In the IDE, File>Exampless>Teensy>USB_MIDI>Interface_3x3 is a good starting point for a Class Compliant 8x8 usb - Midi interface and I see nothing preventing a second one being plugged into the USB host of the first making a 16x16Midi interface with extra hardware to play with.

The rest is up to the coder to get it all working..

Ok thank you I will refer to that resource. This device in its first iteration will not itself be a midi interface per se, the only real time midi it will receive will be control Change events P. It will play back midi from the SD card when it receives a certain midi command from the serial MIDI in.

The stackable header comments, I can’t really process yet, that is how ignorant I am about electronics. I will look into these issues though and figure out what is implied. Edit - looked into it, I think I understand they are just longer headers

I am happy to have found the midi kit, it seems like it will simplify things a lot for me.

Edit - the ILI9341 SPI looks pretty manageable and I see there are some existing libraries for using touch with it. That might round out the kit. I could use touch / double touch / swipe to maybe start and stop and switch to the next sequence, if I want to start playback independent of the PC.
 
Status
Not open for further replies.
Back
Top