>>MIDI to USB Cable: The Ultimate Custom Guide

MIDI to USB Cable:
The Ultimate Custom Guide

The MIDI-USB cable is the fastest and most direct way to get a MIDI instrument (such as a keyboard or piano) to use with your computer.

However, the MIDI-USB adapter market is crawling using low-cost, mediocre interfaces that may display garbled and distorted information in a few days or weeks, eventually leading to failure.

If you have been struggling to find an affordable, high-quality interface device or cable to meet your needs, then customizing your product may be the best option.

This article outlines the basics of the MIDI protocol, the importance of MIDI for the USB interface, and, most importantly, how long it takes to build a MIDI-USB cable from scratch.

MIDI to USB Cable:
The Ultimate Custom Guide

The MIDI-USB cable is the fastest and most direct way to get a MIDI instrument (such as a keyboard or piano) to use with your computer.

However, the MIDI-USB adapter market is crawling using low-cost, mediocre interfaces that may display garbled and distorted information in a few days or weeks, eventually leading to failure.

If you have been struggling to find an affordable, high-quality interface device or cable to meet your needs, then customizing your product may be the best option.

This article outlines the basics of the MIDI protocol, the importance of MIDI for the USB interface, and, most importantly, how long it takes to build a MIDI-USB cable from scratch.

CHAPTER 1:

What Is MIDI to USB Cable?

CHAPTER 1:

The IoT Revolution Is Here

Musical Instrument Digital Interface, or MIDI, is a standard protocol for digital instruments, synthesizers, and computers to communicate with each other. While its initial purpose was to allow a keyboard to play notes generated by another keyboard, it was quickly adopted for PC use.

Instead of representing musical sounds directly using analog waves like a tape recorder, MIDI transmits information about how music is produced, which includes the beginning of a note, its length, pitch, volume and other attributes.

The sound waves generated are those already contained in a wavetable in the receiving device or sound card. Because MIDI files only represent player information, they take up considerably less space than formats that have the actual sound.

MIDI to USB interfaces

As mentioned earlier, a typical MIDI connection is made through a standard five-pin DIN plug. Some newer keyboards have USB Type B MIDI ports, which means a standard USB cable will suffice for your computer interfacing needs.

Figure 3 USB Type A-Type B interface Cables(Cloom

Other DAW setups are equipped with soundcards that have MIDI ports, and therefore only require a 5-pin to 5-pin MIDI cable. Figure 4: PC MIDI soundcard(inta-audio.com)

If you’re looking to connect a keyboard without a USB port to a computing device that doesn’t have MIDI ports, however, you will need a MIDI to USB cable.

Musical Instrument Digital Interface, or MIDI, is a standard protocol for digital instruments, synthesizers, and computers to communicate with each other. While its initial purpose was to allow a keyboard to play notes generated by another keyboard, it was quickly adopted for PC use.

Instead of representing musical sounds directly using analog waves like a tape recorder, MIDI transmits information about how music is produced, which includes the beginning of a note, its length, pitch, volume and other attributes.

The sound waves generated are those already contained in a wavetable in the receiving device or sound card. Because MIDI files only represent player information, they take up considerably less space than formats that have the actual sound.

MIDI to USB interfaces

As mentioned earlier, a typical MIDI connection is made through a standard five-pin DIN plug. Some newer keyboards have USB Type B MIDI ports, which means a standard USB cable will suffice for your computer interfacing needs.

Figure 3 USB Type A-Type B interface Cables(Cloom

Other DAW setups are equipped with soundcards that have MIDI ports, and therefore only require a 5-pin to 5-pin MIDI cable. Figure 4: PC MIDI soundcard(inta-audio.com)

If you’re looking to connect a keyboard without a USB port to a computing device that doesn’t have MIDI ports, however, you will need a MIDI to USB cable.

Request for Quick Quote

CHAPTER 2:

MIDI to USB Types and Their Applications

Figure 5: Roland UM-ONE USB MIDI cable

CHAPTER 2:

MIDI to USB Types and Their Applications

Figure 5: Roland UM-ONE USB MIDI cable

MIDI is a single-direction communication protocol, which means a single MIDI plug can either transmit or receive data. Most off-the-shelf MIDI to USB cable, therefore, have two MIDI jacks – In and Out – connecting to an instrument’s Out and In MIDI ports respectively.

Of course, a setup with more than one instrument will require an interface with enough MIDI ports to support all the devices. An 8-port interface or MIDI snake, for instance, is ideal for users that have several external sound modules, keyboards and control surfaces to connect.

Why Would You Need A MIDI-USB Cable?

We may have already established that a MIDI interface is required to connect a keyboard to a computer via USB, but although that is the most common use of these devices, it’s not the only one.

For starters, you might have a sound module whose output you would like to use in your current composition. A MIDI-USB  cable will enable you to send note information to and from your computer. That means you can post parts of your balance back and forth within your keyboard, equipment, and module.

Figure 6: Interfacing a MIDI keyboard, module, and PC

Even if you’re not recording, MIDI can be excellent for synchronizing events. For instance, if you’re performing using previously recorded tracks that also have tempo sensitive effects like delays, you can use your computer to sync them with the MIDI clock to keep everything perfectly in time.

A MIDI-USB cable with a Mini-USB plug can also come in handy if you want to connect your MIDI keyboard to a tablet or smartphone. Your iPad can be a tremendously useful backup device for MIDI files.

Class-compliant cables such as the Roland UM-One MK2 are compatible across different platforms, which means you can use them to back up your synth sounds and settings to your portable device. That way, if your gear crashes, your composition and parameters will still be intact.

Figure 7: Connecting electronic piano to iPad with the iRig2 interface(ikmultimedia.com)

MIDI is a single-direction communication protocol, which means a single MIDI plug can either transmit or receive data. Most off-the-shelf MIDI to USB cable, therefore, have two MIDI jacks – In and Out – connecting to an instrument’s Out and In MIDI ports respectively.

Of course, a setup with more than one instrument will require an interface with enough MIDI ports to support all the devices. An 8-port interface or MIDI snake, for instance, is ideal for users that have several external sound modules, keyboards and control surfaces to connect.

Request for Quick Quote

Why Would You Need A MIDI-USB Cable?

We may have already established that a MIDI interface is required to connect a keyboard to a computer via USB, but although that is the most common use of these devices, it’s not the only one.

For starters, you might have a sound module whose output you would like to use in your current composition. A MIDI-USB  cable will enable you to send note information to and from your computer. That means you can post parts of your balance back and forth within your keyboard, equipment, and module.

Figure 6: Interfacing a MIDI keyboard, module, and PC

Even if you’re not recording, MIDI can be excellent for synchronizing events. For instance, if you’re performing using previously recorded tracks that also have tempo sensitive effects like delays, you can use your computer to sync them with the MIDI clock to keep everything perfectly in time.

A MIDI-USB cable with a Mini-USB plug can also come in handy if you want to connect your MIDI keyboard to a tablet or smartphone. Your iPad can be a tremendously useful backup device for MIDI files.

Class-compliant cables such as the Roland UM-One MK2 are compatible across different platforms, which means you can use them to back up your synth sounds and settings to your portable device. That way, if your gear crashes, your composition and parameters will still be intact.

Figure 7: Connecting electronic piano to iPad with the iRig2 interface(ikmultimedia.com)

CHAPTER 3:

How to Custom MIDI to USB Cable (Step by Step)

CHAPTER 3:

How to Custom MIDI to USB Cable (Step by Step)

The main component of a MIDI to USB cable is the USB MIDI adapter. It comprises of processing circuitry that receives notes and pedal data from your instrument’s MIDI OUT and transmits them to your computer via USB.

Many DIY approaches to making a MIDI to USB cable exist, but only a few are likely to cost you less enough than buying a ready-made interface to make the work worth it. One of these is using the ATmega32u4 microcontroller board, commonly known as the Arduino Leonardo.

While prior Arduino knowledge will make building your cable a lot easier, this guide is easy to follow, even if you’ve never tinkered with the platform. That said, some experience with soldering, multimeter use, and other electronics 101 stuff is essential.

Required Components

To build this USB-MIDI cable, you will need roughly $6 worth of hardware.

1.Standard or micro Arduino Leonardo board (Some clones with the ATmega32u4 cost as low as $3 on the internet

2.6N137 optocoupler

3.330 ohm and 2kohm resistors

4.MIDI connector

5.Mini or Micro USB cable depending on your Arduino board

Step 1: Preparing Your Atmega32u4 Board

Before making the connections, it’s recommended to start by flashing a simple USB MIDI test program to your microcontroller. You’ll need Arduino IDE installed on your computer to program your device.

The LUFA library for AVR microcontrollers like the ATmega32u4 will have everything you need to perform this test, and also to process your new adapter.

  • ·Download and install Arduino IDE.
  • ·Download the latest version of LUFA
  • ·Navigate to Demos\Device\ClassDriver and create a copy of the MIDI demo directory here. You can name it ATmega_miditest
  • ·Download ATmega32u4_miditest.zip and replace the midi.c, midi.h and makefile files in the ClassDriver with the ones in the ATmega32u4_miditest.zip file
  • ·Open Arduino IDE and navigate to this new directory
  • ·Run make to compile
  • ·Plug in your ATmega board. Short the RST and GND pins to reset the board
  • ·Upload the code to flash the firmware

Studying the system will reveal that the test looks at the RX pin on the ATmega board (pin PD2) and if its voltage toggles ON (VCC) or OFF (GND), the microcontroller sends a MIDI note OFF or ON respectively. So, if you short the RX pin to GND, the program should trigger middle C from “LUFA-MIDI Demo” USB-MIDI device.

Step 2: Wiring

Every USB MIDI interfacing device has an optocoupler to isolate the MIDI instrument and the computer electronically.

Figure 9: 6N137 optocoupler and standard MIDI DIN pinout

The top views of the 6N137 optocoupler and MIDI DIN connector are as shown in figure () above. Use a breadboard/stripboard and jumper cables to connect the components as follows:

  • Pin 5 of the MIDI DIN connector to pin 2 of the optocoupler
  • Pin 4 of the MIDI DIN connector to pin 3 of the optocoupler through a 330-ohm resistor.
  • Pin 7 and 8 of the optocoupler to ATmega32u4 VCC
  • Pin 6 of the optocoupler to ATmega32u4 RX
  • Pin 5 of the optocoupler to ATmega32u4 GND
  • A 2Kohm pullup resistor between pin 6 and 8 (Signal out and VCC)

Figure 10: Custom USB MIDI interface

Step 3: Programming the Adapter

The procedure of flashing the code is similar to the MIDI test in step 1, only that you will need to replace the standard midi.c, midi.h and makefile files in the ClassDriver folder with the ones in this zip: ATmega32u4_midiadapter.zip

After flashing the firmware, you should be able to connect your new adapter between a keyboard with MIDI OUT and a computer with USB, fire up your DAW and play away!

Step 4: Final Touches (Packaging)

Once you have your circuit working, you may want to make an enclosure for it, either by salvaging and being creative or by 3D printing. Of course, a more compact assembly will mean a smaller and more manageable complete package.

Figure 11: Compact packaging

Having followed these steps to the end, you will have made a cable that will work well for most, if not all casual MIDI-USB uses, at a fraction of what you would have spent for an off-the-shelf purchase.

The main component of a MIDI to USB cable is the USB MIDI adapter. It comprises of processing circuitry that receives notes and pedal data from your instrument’s MIDI OUT and transmits them to your computer via USB.

Many DIY approaches to making a MIDI to USB cable exist, but only a few are likely to cost you less enough than buying a ready-made interface to make the work worth it. One of these is using the ATmega32u4 microcontroller board, commonly known as the Arduino Leonardo.

While prior Arduino knowledge will make building your cable a lot easier, this guide is easy to follow, even if you’ve never tinkered with the platform. That said, some experience with soldering, multimeter use, and other electronics 101 stuff is essential.

Required Components

To build this USB-MIDI cable, you will need roughly $6 worth of hardware.

1.Standard or micro Arduino Leonardo board (Some clones with the ATmega32u4 cost as low as $3 on the internet

2.6N137 optocoupler

3.330 ohm and 2kohm resistors

4.MIDI connector

5.Mini or Micro USB cable depending on your Arduino board

Step 1: Preparing Your Atmega32u4 Board

Before making the connections, it’s recommended to start by flashing a simple USB MIDI test program to your microcontroller.

You’ll need Arduino IDE installed on your computer to program your device.

The LUFA library for AVR microcontrollers like the ATmega32u4 will have everything you need to perform this test, and also to process your new adapter.

  • ·Download and install Arduino IDE.
  • ·Download the latest version of LUFA
  • ·Navigate to Demos\Device\ClassDriver and create a copy of the MIDI demo directory here. You can name it ATmega_miditest
  • ·Download ATmega32u4_miditest.zip and replace the midi.c, midi.h and makefile files in the ClassDriver with the ones in the ATmega32u4_miditest.zip file
  • ·Open Arduino IDE and navigate to this new directory
  • ·Run make to compile
  • ·Plug in your ATmega board. Short the RST and GND pins to reset the board
  • ·Upload the code to flash the firmware

Studying the system will reveal that the test looks at the RX pin on the ATmega board (pin PD2) and if its voltage toggles ON (VCC) or OFF (GND), the microcontroller sends a MIDI note OFF or ON respectively.

So, if you short the RX pin to GND, the program should trigger middle C from “LUFA-MIDI Demo” USB-MIDI device.

Step 2: Wiring

Every USB MIDI interfacing device has an optocoupler to isolate the MIDI instrument and the computer electronically.

Figure 9: 6N137 optocoupler and standard MIDI DIN pinout

The top views of the 6N137 optocoupler and MIDI DIN connector are as shown in figure () above. Use a breadboard/stripboard and jumper cables to connect the components as follows:

  • Pin 5 of the MIDI DIN connector to pin 2 of the optocoupler
  • Pin 4 of the MIDI DIN connector to pin 3 of the optocoupler through a 330-ohm resistor.
  • Pin 7 and 8 of the optocoupler to ATmega32u4 VCC
  • Pin 6 of the optocoupler to ATmega32u4 RX
  • Pin 5 of the optocoupler to ATmega32u4 GND
  • A 2Kohm pullup resistor between pin 6 and 8 (Signal out and VCC)

Figure 10: Custom USB MIDI interface

Step 3: Programming the Adapter

The procedure of flashing the code is similar to the MIDI test in step 1, only that you will need to replace the standard midi.c, midi.h and makefile files in the ClassDriver folder with the ones in this zip: ATmega32u4_midiadapter.zip

After flashing the firmware, you should be able to connect your new adapter between a keyboard with MIDI OUT and a computer with USB, fire up your DAW and play away!

Step 4: Final Touches (Packaging)

Once you have your circuit working, you may want to make an enclosure for it, either by salvaging and being creative or by 3D printing. Of course, a more compact assembly will mean a smaller and more manageable complete package.

Figure 11: Compact packaging

Having followed these steps to the end, you will have made a cable that will work well for most, if not all casual MIDI-USB uses, at a fraction of what you would have spent for an off-the-shelf purchase.

CHAPTER 4:

Specifications and Standards of Custom MIDI to USB From Cloom Company

custom Usb cable

CHAPTER 4:

Specifications and Standards of Custom MIDI to USB From Cloom Company

custom Usb cable

As you may have discovered, assembling a USB MIDI adapter from scratch isn’t exactly a walk in the park.

In addition to the numerous points of failure in wiring and coding, your makeshift cable will probably not work with certain hardware-specific utilities, such as SysEx Librarian.

Thankfully, you don’t have to go at it alone.

Cloom is one of the finest companies that deal with specialized, high-quality cable fabrication, and they’re only a phone call or email away from fulfilling your USB MIDI needs. Below is a breakdown of what to expect from Cloom.

20 Years of Professional Experience

Cloom has been in the wire-harnessing business for a long time, and its staff is well equipped to handle a variety of client needs, including electronics wiring, power cables, signal harnesses, and automobile circuitry. Official website: www.wiringo.com

The professionals at Cloom will help you to understand the USB MIDI cable you want and will develop it while upholding industry standards. 

Guaranteed Duration

As a one-point source of wiring and cabling supplies, Cloom achieves customer satisfaction by ensuring quick turnaround and timely support, as well as high-quality, long-lasting products.

Competitive Price

Cloom promises its clients unrivaled service at competitive prices. You may able and willing to fabricate a USB MIDI cable on your own, but a quick quote from the company will be enough to convince you to rest your hands.

Rapid Custom Channels

Whether you want to interface one or ten MIDI instruments with high-speed channels to your DAW, Cloom will help you develop the cable setup you need to get everything working together.

Get your quote today!

As you may have discovered, assembling a USB MIDI adapter from scratch isn’t exactly a walk in the park.

In addition to the numerous points of failure in wiring and coding, your makeshift cable will probably not work with certain hardware-specific utilities, such as SysEx Librarian.

Thankfully, you don’t have to go at it alone.

Cloom is one of the finest companies that deal with specialized, high-quality cable fabrication, and they’re only a phone call or email away from fulfilling your USB MIDI needs. Below is a breakdown of what to expect from Cloom.

20 Years of Professional Experience

Cloom has been in the wire-harnessing business for a long time, and its staff is well equipped to handle a variety of client needs, including electronics wiring, power cables, signal harnesses and automobile circuitry.

The professionals at Cloom will help you to understand the USB MIDI cable you want and will develop it while upholding industry standards. 

Guaranteed Duration

As a one-point source of wiring and cabling supplies, Cloom achieves customer satisfaction by ensuring quick turnaround and timely support, as well as high-quality, long-lasting products.

Competitive Price

Cloom promises its clients unrivaled service at competitive prices. You may able and willing to fabricate a USB MIDI cable on your own, but a quick quote from the company will be enough to convince you to rest your hands.

Rapid Custom Channels

Whether you want to interface one or ten MIDI instruments with high-speed channels to your DAW, Cloom will help you develop the cable setup you need to get everything working together.

Get your quote today!

2018-10-15T07:06:26+00:00