Skip to content

Install

snhirsch edited this page Jun 25, 2016 · 17 revisions

Recommended Platforms

The MIDI bridge will build and run on any recent Linux distribution on a variety of architectures. A desktop machine will serve well for testing and coding, while a small single-board system is most practical for live performance. Code is tested on Raspberry Pi (B) and Beaglebone Green. The USB subsystem on RPi appears to have some latency issues, so the Beaglebone would be the recommended choice.

Required Skills

You must be able to:

  • Use an 'ssh' client to obtain a command line session on a remote machine
  • Make use of Google to locate solutions for generic operating system problems that I may not cover in this document

If any of this makes you uncomfortable, please wait until a turn-key system becomes available. The project is very much in a raw development mode and may not be suitable for complete Linux newbies.

Singleboard Setup

Write System to SD Card

Beaglebone:

Download:

https://debian.beagleboard.org/images/bone-debian-8.4-lxqt-4gb-armhf-2016-05-13-4gb.img.xz

Then follow directions here:

https://beagleboard.org/getting-started#update

The official instructions want you to boot the BBG by connecting as a USB slave device to a PC. I don't know anything about this approach and won't address it. The only sane way I can make these instructions generic is to treat the device as Just Another Linux Machine.

  • Plug an ethernet cable into the board
  • Insert the SD card
  • Hold down the 'reset' button while plugging a source of USB power into the small port (an old cell phone charger works fine). Release the reset button when you see the power LED (far side of the ethernet port from reset) light up.
  • Log in to your router and find the IP address for the Beaglebone (all home routers I'm aware of have the ability to show you IP addresses and names for DHCP clients like the BB).
  • From your PC or Mac, log in to the BB:
hirsch@z87:~$ ssh root@192.168.245.105
Debian GNU/Linux 8

BeagleBoard.org Debian Image 2016-05-13

Support/FAQ: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian

default username:password is [debian:temppwd]

Last login: Thu Jun 23 15:47:53 2016 from 192.168.245.27
root@beaglebone:~# 

RaspberryPi

Go to this page and download Raspbian Jessie Lite:

https://www.raspberrypi.org/downloads/raspbian/

Then follow the instructions here to write to SD:

https://www.raspberrypi.org/documentation/installation/installing-images/README.md

  • Plug an ethernet cable into the board
  • Insert the SD card
  • Apply power to the board
  • Log in to your router and find the IP address (all home routers I'm aware of have the ability to show you IP addresses and names for DHCP clients like the BB).
  • From your PC or Mac, log in to the BB:
$ ssh pi@192.168.245.105
  passwd: raspberry
$ sudo su -
$ 

Initial Setup

  • Setup a non-privileged account for yourself (repeat after me: "Running routinely as root will bite you in the butt sooner than later.."), adding your id to three important groups. While logged in as root per above:
$ useradd -m -s /bin/bash -G audio,sudo,plugdev steven
$ passwd steven
  new password: xxxxxx
  enter again: xxxxxx
  • Install some required packages:
$ apt-get update
$ apt-get install librtmidi-dev libusb-1.0-0-dev git g++ 
  • Log out as root and back in under your new account name:
$ ssh steve@192.168.245.105

Build and Install MIDI Bridge

  • While logged as your new account, download and build the MIDI bridge (there should be no errors or warnings)
$ git clone git@github.com:snhirsch/mustang-midi-bridge.git
$ cd mustang-midi
$ make
  • Temporarily become root again to install the device rules for the Mustang interface (use the same login password you just used to connect to the board):
$ sudo su -
  passwd: xxxxxxx
$ cd /home/steve/mustang-midi-bridge
$ cp 50-mustang.rules /etc/udev/rules.d
$ chown root:root /etc/udev/rules.d/50-mustang.rules
$ udevadm control --reload
$ exit
$

You now are ready to try running.

  • Connect your MIDI controller and the Mustang amplifier to the single-board computer (you will have to use a USB hub if running on a Beaglebone Green).
  • Start the MIDI bridge from the location where you built it (controller number is the USB id of your MIDI controller - usually 2 - and channel is the MIDI channel you want it to respond to):
$ mustang_midi controller# channel#

If you see any connection errors:

  • Disconnect the amp and controller and 'tail' the system logs:
$ sudo su -
  passwd:  xxxxxxx
$ tail -f /var/log/syslog
  • Plug the amp and controller in one at a time and see if they are being detected. You should see something like this (on a Raspberry Pi you won't see the hub device since it has two built-in ports):
Jun 25 16:14:12 beaglebone kernel: [  596.511271] usb 1-1: new full-speed USB device number 6 using musb-hdrc
Jun 25 16:14:12 beaglebone kernel: [  596.644669] usb 1-1: New USB device found, idVendor=058f, idProduct=9254
Jun 25 16:14:12 beaglebone kernel: [  596.651611] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Jun 25 16:14:12 beaglebone kernel: [  596.658963] usb 1-1: Product: Generic USB Hub
Jun 25 16:14:12 beaglebone kernel: [  596.663473] usb 1-1: Manufacturer: ALCOR
Jun 25 16:14:12 beaglebone kernel: [  596.681647] hub 1-1:1.0: USB hub found
Jun 25 16:14:12 beaglebone kernel: [  596.697589] hub 1-1:1.0: 4 ports detected
...
Jun 25 16:14:12 beaglebone kernel: [  596.979234] usb 1-1.2: new full-speed USB device number 7 using musb-hdrc
Jun 25 16:14:12 beaglebone kernel: [  597.073151] usb 1-1.2: New USB device found, idVendor=0763, idProduct=0160
Jun 25 16:14:12 beaglebone kernel: [  597.080272] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=
Jun 25 16:14:12 beaglebone kernel: [  597.087828] usb 1-1.2: Product: USB MS1x1 MIDI Interface
Jun 25 16:14:12 beaglebone kernel: [  597.093299] usb 1-1.2: Manufacturer: M-Audio
...
Jun 25 16:14:12 beaglebone kernel: [  597.203860] usb 1-1.3: new full-speed USB device number 8 using musb-hdrc
Jun 25 16:14:12 beaglebone kernel: [  597.309194] usb 1-1.3: New USB device found, idVendor=1ed8, idProduct=0005
Jun 25 16:14:12 beaglebone kernel: [  597.316379] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=
Jun 25 16:14:12 beaglebone kernel: [  597.323952] usb 1-1.3: Product: Mustang Amplifier
Jun 25 16:14:12 beaglebone kernel: [  597.328810] usb 1-1.3: Manufacturer: FMIC
Jun 25 16:14:12 beaglebone kernel: [  597.332956] usb 1-1.3: SerialNumber: C478FF393337483157208416

If you don't see both the MIDI controller interface and the Mustang amp, then something went wrong with device enumeration.

** STILL UNDER CONSTRUCTION **

Clone this wiki locally