Interest in MIDI

Started by mimmotronics, October 19, 2020, 09:43:41 AM

Previous topic - Next topic

mimmotronics

Have you worked with MIDI before? Is it difficult? What are some concepts you need to know before diving in to design for MIDI capability? If I wanted to build MIDI-USB, how would the hardware design differ to the normal 5-pin MIDI jack?

For those who haven't worked with MIDI, why not? Do you not have a use-case for it? Or does it seem too complicated to pursue as a DIY project?

anotherjim

I've not worked on USB midi, but I've a suspicion you can use a usb-serial chip with new firmware so it tells the OS it's a class compliant USB-midi device.
Have to say I just do not like USB midi because...
There is no ground loop isolation which DIN midi does.
There is no speed or controller resolution advantage with the gear I have.
I use Windows and have never had a happy experience when multiple USB devices are plugged in.
The best experience is with devices for which there is a bespoke driver rather than the default class compliant one.

mimmotronics

Quote from: anotherjim on October 19, 2020, 10:00:48 AM
I've not worked on USB midi, but I've a suspicion you can use a usb-serial chip with new firmware so it tells the OS it's a class compliant USB-midi device.
Have to say I just do not like USB midi because...
There is no ground loop isolation which DIN midi does.
There is no speed or controller resolution advantage with the gear I have.
I use Windows and have never had a happy experience when multiple USB devices are plugged in.
The best experience is with devices for which there is a bespoke driver rather than the default class compliant one.

Those are the FTDI chips you're referencing as generic "usb-serial" chips?

How has your experience been with using/designing normal 5-pin connector MIDI applications?

anotherjim

I'm not certain if its the FTDI serial chip or those Arduino's that have a dedicated AVR chip emulating the serial port.

The hardware for DIN midi interfacing is simple and well known. With an MCU, you are using the UART and as long as you get its Baud rate right, the Tx & Rx is straightforward.

mimmotronics

Quote from: anotherjim on October 19, 2020, 01:51:04 PM
I'm not certain if its the FTDI serial chip or those Arduino's that have a dedicated AVR chip emulating the serial port.

The hardware for DIN midi interfacing is simple and well known. With an MCU, you are using the UART and as long as you get its Baud rate right, the Tx & Rx is straightforward.

Assuming the hardware is set up and the UART is straightened out, there is still the task of programming the CC and PC messaging. Do you know if there is a standard for how commands are encoded?

FiveseveN

Of course there's a standard, it's called MIDI :icon_mrgreen: Link to official specs: https://www.midi.org/specifications
Requires free registration IIRC but there's also a summary that probably covers what you're asking: https://www.midi.org/specifications-old/item/table-1-summary-of-midi-message
All the Arduinos and such have comprehensive MIDI libraries and yes, you can implement MIDI over USB if you have UART over USB. USB hosts however are a different story, but I'm assuming your host would be a PC.

If you're asking how to make a particular device do what you want through MIDI commands, that should be covered in the device's manual.
Quote from: R.G. on July 31, 2018, 10:34:30 PMDoes the circuit sound better when oriented to magnetic north under a pyramid?

garcho

I love working with MIDI. I've made MIDI controllers, a few random MIDI utilities, and MIDI sync for Electric Druid's stompLFOs. I didn't really know anything about coding before I started with MIDI (still don't, outside of MIDI), it's pretty simple and straight ahead. Starting with Arduino/Teensy worked well for me, and they're small enough to fit in larger enclosures. I hate 1590As anyway. Mike Cook has published some good resources about MIDI Arduino projects, and is a big help over at the Arduino forum.
  • SUPPORTER
"...and weird on top!"

Processaurus

#7
Hi!  I did some tinkering with USB MIDI, using a Teensy 2.0 (arduino cousin, 8 bit).  I chose the Teensy because they have a library written specifically for USB MIDI, and some built in options to make it show up as a class compliant USB midi interface once it's programmed.


potul

I love MIDI... and creating MIDI DIN projects is quite straightfwd. As it has been mentioned, it's just UART at 31250 baud rate. The protocol is quite simple and easy to understand looking at the MIDI standard documentation.

In addition, if you work with an Arduino or AVR, there are already available libraries for MIDI you can use.

USB-Midi is another animal, and quite tricky depending on what you want to do. First of all, USB by nature has 2 different types of devices, Host and Guest.  Most arduinos are USB guests, but not Hosts. But you can add Host capabilities to Arduino with a shield. Even if Arduino has USB guest capabilities, not all of them can enumerate themselves as a USB MIDI, so not all Arduinos will work unless you reflash its firmware. Not a friendly approach.

I have built both DIN MIDI and USB MIDI devices, and my summary is:
MIDI DIN: Piece of cake. The most complex thing is not to mess up with the cable connection.
USB MIDI: Painful




garcho

teesny 4.0 and 4.1 have USB host capabilities: 4.1 has 5 pins with power management and 4.0 has two SMT pads, tons of great info, examples and projects, many including MIDI (and lots of other audio stuff) and great help over at the teensy forum, too.
  • SUPPORTER
"...and weird on top!"