MIDI turns 30

Thirty years ago, Dave Smith worked with Roland on a way to make synths and musical instruments communicate. They connected a JP-6 and a Prophet600, and MIDI was born.

Since then, it has been (and still is) at the heart of musical hardware, and even though the technology is behind other means of communications (Bluetooth, WiFi), its presence is still expected. What makes its strength is its simplicity: not much hardware is required, the messages are simple enough to be handled by a small microcontroller (or even discrete logic chips, with a bit of courage), and since it’s not in constant change, there is no need for updates or revisions.

The first MIDI device I made was actually not a musical device. It was an accelerometer-base inclination meter, made for a school project, and we figured out it was a convenient way of transmitting data between the board and the computer, since there was already a program on the other side that can understand the data. Then I started controlling MIDI effects, like the Digitech Whammy, from an Arduino, and that’s when I started developing the MIDI library.

Source: Adafruit & BBC

Review of devboards and tools

Boarduino by LadyAda / Adafruit.

My first Arduino-compatible board. It’s the clone of the old Arduino Diecimila (with an ATmega 168P), in a breadboard-friendly format. It’s ideal to start with hardware computing and the breadboard format helps interfacing it with sensors and other circuits.


Sanguino by Zach “Hoeken” Smith

I needed more memory and pins than the usual 168P,  so I started using the 644P in the Sanguino, and made it a basis for most of my projects. It has been my main devboard for quite some time, before I made the Mobius Modular board.


Teensy 2.0 by Paul Stoffregen

Graciously donated by Paul for the purpose of developing the MIDI library on the Teensy, I’ve been using it mainly for this purpose. It has the same chip as the Arduino Leonardo, meaning it has native USB HID support.


Teensy 3.0 by Paul Stoffregen

One of my last acquisitions. ARM M4-powered, this little board can be one of the next big things in the ARM devboard race. I don’t think it might be powerful enough to run an OS “comfortably” like the Rasberry Pi, but a small RTOS should not be a problem.Detailed review here.


Arduino Leonardo

I currently use it as a unit test platform for the MIDI Library. The native USB driver in the ATmega32U4 makes it a good board to experiment with native MIDI USB, to create plug and play MIDI controllers and synths.


Mobius Modular Motherboard

I made this board to simplify the prototyping of MIDI devices and to be the heart and mind of my Mobius project. It’s using an ATmega 644P and features an IO expander for an LCD screen, as well as a hardware switch debouncer. The central connector breaks out access to 10 GPIO pins.


Raspberry Pi

I feel a bit guilty of using it only as a Git/Web home server, but it’s doing the job quite well. It’s running the Wheezy distro without many modifications. I might give a try to the Adafruit Occidentalis distro to play with the GPIO.


Texas Instruments Stellaris LaunchPad

The cheapest ARM board I’ve ever seen ($4.99 including worldwide shipping), but comes with limitations, as it’s only a demo board. Still, for that price, you get two ARM M4 chips.

Review here.



Open Workbench Logic Sniffer by Dangerous Prototypes

Logic Sniffers are useful when debugging digital circuits, but also for firmware debugging: toggle pins when you enter and leave a function to check how much time you spent inside it! It can also analyse most serial transmissions (when setup correctly, took me some time to get it right).

Bus Pirate by Dangerous Prototypes

Very useful little tool to control almost everything that talks a serial language. Scriptable in Python, so with PySide you can make nice interfaces to analyse, control and hack the world. Note: If you plan to use it as an AVR programmer, prefer an USBtiny or something similar, it’s damn too slow.


Arduino MIDI Library v4.0 beta

I’m starting the beta of the Arduino MIDI Library version 4.0.

It includes the following changes:

  • Support for SoftwareSerial
  • Multiple instances (a merger demo has been added to the examples)
  • Refined build options
  • Support for other targets than Arduino

If you’re interested, you can clone the release/4.0 branch of the GitHub repository, or download the latest snapshot. If you find any issue, please report them to beta@fortyseveneffects.com.

Teensy 3.0 announced with Cortex M4

Here’s a new creation from Paul Stoffregen, creator of the Teensy board. This third evolution of the Teensy series brings an ARM Cortex M4 of the Kinetis family for more processing power and connection capabilities, while still programmable with the Arduino language and software.

What is interesting here (among the other set of features listed below), is the presence of SIMD instructions (used for DSP processing), and an I2S interface to connect to a high quality audio DAC. Some higher variants of this chip include an FPU, but this specific one lacks it.

Another nice feature is the high number of timers and their independance from PWM channels, which allow internal event systems without compromising on output capabilities.

Technical Specifications:

  • 32 bit ARM Cortex-M4 48 MHz CPU (M4 = DSP extensions)
  • 128K Flash Memory, 16K RAM, 2K EEPROM
  • 14* High Resolution Analog Inputs (13 bits usable, 16 bit hardware)
  • 34* Digital I/O Pins (10 shared with analog)
  • 10 PWM outputs
  • 8 Timers for intervals/delays, separate from PWM
  • USB with dedicated DMA memory transfers
  • 3 UARTs (serial ports)
  • SPI, I2C, I2S, IR modulator
  • I2S (for high quality audio interface)
  • Real Time Clock (with user-added 32.768 crystal and battery)
  • 4 general purpose DMA channels (separate from USB)
  • Touch Sensor Inputs

Nice job, Paul!

Arduino Pro Nano

Les plateformes Arduino sont géniales, cependant quand on cherche à faire des applications pratiques avec, qui ne nécessitent pas (ou plus) de prototypage, débuggage ou autres reprogrammations, ils sont assez peu appropriés.

J’ai donc pensé à une carte qui contiendrait très peu de choses (le strict minimum, à savoir le µC, un quartz, ses condensateurs, et la résistance de pull-up pour le reset), de petite taille (tout le monde en CMS), et de forme carrée pour limiter la place. Une sorte de CPU..

Cette version est basée sur un ATmega 168, comme ceux qu’on trouve maintenant dans les Arduino Pro et en version DIL dans tous les autres boards. Je travaille encore à une version adaptée du Sanguino, tournant sur un ATmega644.

Librairie Buttons

Je continue sur ma lancée dans l’écriture de librairies pour l’environnement Arduino, cette fois-ci c’est une petite lib qui gère l’utilisation des boutons déjà débouncés en hardware (il existe plein de fonctions pour faire du software-debouncing, ce n’est pas le sujet ici..). Ca parait simple, mais ça évite pas mal de répétition de code, pour faire par exemple un bouton en one-shot qui incrémente un compteur, si on reste appuyé dessus et qu’on utilise digitalRead(), le compteur va monter en flèche. 

J’ai donc défini des modes d’utilisation pour les boutons:
OneShot: Ne renvoie ON qu’une fois par cycle d’appui du bouton (littéralement, compter les ON revient à compter le nombre de fois que le bouton est appuyé).
Memory: Renvoie ON lorsque le bouton est appuyé, mais aussi Pressed lors du front montant, et Released lors d’un front descendant.
Timer: un système de Hold, renvoie ON tant que le bouton est appuyé, s’il l’est pendant suffisament longtemps (ce temps est réglable), il revoie Hold.
Les autres modes sont des combinaisons de ces trois-ci.