MIDIbox
Encyclopedia
The MIDIbox project is an open source
modular DIY framework (hardware and software) MIDI platform built around the PIC
family of microcontroller
s (specifically the PIC18F452, PIC16F88, PIC18F4620 and PIC18F4685) and recently with STM32
32-bit ARM Cortex too. It can be used to build hardware MIDI control units for various synthesizer
s, multi-track recording software, and other MIDI devices; as well as stand-alone synthesizers, sequencers and other projects.
s, and prototype boards designed with a freeware
CAD program. Almost all components are through-hole for easier assembly.
The MIDIbox hardware platform runs its own open-source operating system
: MIOS (MIDIbox Operating System), written in PIC assembly language
for speed and accuracy. There is a C
wrapper layer available for simplified coding. MIOS is designed and documented to allow simple reconfiguration, adaptation and extension by hobbyists and enthusiasts.
Most controllers built by the community are based on existing documented designs, and begin life with the feature set provided by the existing firmware. End users can enhance their devices with exchangeable program code, and customize them to suit their host application, synthesizer or other MIDI device. Users can also customize to suit their own preferred workflow
, or design a new project from scratch.
Application source code, module schematics and PCB layouts are available free for non-commercial use as templates for modifications and improvements. Thus MIOS and the Hardware Platform allow an easy entry to hobbyist microcontroller development, while making possible applications outside the realms of the commercial, mainstream MIDI market.
MIOS was licensed under the GPL
until version 1.8. Later versions now require Thorsten Klose's permission for commercial use.
One core module with a PIC18F452 microcontroller can handle
Background drivers are available for the following control tasks:
The whole operating system has been written in assembly language and has been optimized for speed.
MIOS currently uses 8k of program memory and 640 bytes of RAM.
Only 75 µs
is required to read 128 digital input pins and to write to 128 output pins. 16 rotary encoders are handled within 100 µs. Analog inputs are scanned in the background every 200 µs; changes larger than a definable minimum range trigger a user hook.
Up to 256 MIDI events can trigger dedicated functions; processing of the event list requires about 300 µS. MIDI events can also be processed by a user routine for sysex parsing or similar jobs. A user timer is available for time triggered code.
Support for other high-level languages apart from C is possible.
PIC18F452 microcontroller. This PIC is pin compatible to the PIC16F877 which was used in early MIDIbox projects. Thus it is backwards compatible with older MIDIbox Core modules, with one board modification.
The PIC18F452 features more internal flash, much more internal RAM, some new instructions and a better system architecture. It is available for the same price as the PIC16F877 in most countries.
16 Track Live Step and Morph Sequencer + advanced Arpeggiator
Hardware MIDI-controllable Synthesizer based on the MOS Technology SID
(MOS6581) sound chip as shipped with the Commodore 64/128
Hardware synthesizer based on the Yamaha YMF262 sound chip (also known as OPL3) for generating the famous FM sounds known from Soundblaster (compatible) soundcards of the early 90s
Merges two separate MIDI inputs to a single output
Routes various MIDIboxes to a single MIDI port
Provides basic functionality to receive and transmit MIDI events
Provides CV and gate outputs to drive voltage controlled devices such as analog modular synthesizer
s
Full-fledged 64 channel MIDI controller
Extended version of the MIDIbox 64
The MIDIO128 interface is used to drive up to 128 digital output pins and to react on up to 128 digital input pins via MIDI
Alternative to the MIDIbox 64/64E
Reports events, which are transmitted over the MIDI cable, in a readable form
Open source
The term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology...
modular DIY framework (hardware and software) MIDI platform built around the PIC
PIC microcontroller
PIC is a family of Harvard architecture microcontrollers made by Microchip Technology, derived from the PIC1650 originally developed by General Instrument's Microelectronics Division...
family of microcontroller
Microcontroller
A microcontroller is a small computer on a single integrated circuit containing a processor core, memory, and programmable input/output peripherals. Program memory in the form of NOR flash or OTP ROM is also often included on chip, as well as a typically small amount of RAM...
s (specifically the PIC18F452, PIC16F88, PIC18F4620 and PIC18F4685) and recently with STM32
STM32
STM32 is a family of multiple series of microcontroller ICs, by STMicroelectronics , based on the 32-bit RISC Cortex-M3 and Cortex-M4F cores from ARM Holdings...
32-bit ARM Cortex too. It can be used to build hardware MIDI control units for various synthesizer
Synthesizer
A synthesizer is an electronic instrument capable of producing sounds by generating electrical signals of different frequencies. These electrical signals are played through a loudspeaker or set of headphones...
s, multi-track recording software, and other MIDI devices; as well as stand-alone synthesizers, sequencers and other projects.
History
The MIDIbox Hardware Platform is the continuation of Thorsten Klose's earlier work on MIDI controllers. Designs are based around a standardized environment of reusable and exchangeable modules. Soon after the release of the first modules, a small group of enthusiasts formed which grew into a thriving open source development community.The MIDIbox Hardware Platform (MBHP)
The focus of the platform is on well defined and documented modules based on small, uncomplicated circuits to allow for amateur assembly. These modules are then assembled into a complete project. All boards can be made as single-layer PCBPrinted circuit board
A printed circuit board, or PCB, is used to mechanically support and electrically connect electronic components using conductive pathways, tracks or signal traces etched from copper sheets laminated onto a non-conductive substrate. It is also referred to as printed wiring board or etched wiring...
s, and prototype boards designed with a freeware
Freeware
Freeware is computer software that is available for use at no cost or for an optional fee, but usually with one or more restricted usage rights. Freeware is in contrast to commercial software, which is typically sold for profit, but might be distributed for a business or commercial purpose in the...
CAD program. Almost all components are through-hole for easier assembly.
The MIDIbox hardware platform runs its own open-source operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...
: MIOS (MIDIbox Operating System), written in PIC assembly language
Assembly language
An assembly language is a low-level programming language for computers, microprocessors, microcontrollers, and other programmable devices. It implements a symbolic representation of the machine codes and other constants needed to program a given CPU architecture...
for speed and accuracy. There is a C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....
wrapper layer available for simplified coding. MIOS is designed and documented to allow simple reconfiguration, adaptation and extension by hobbyists and enthusiasts.
Microcontroller modules
- Core Module
- PIC Programmer Modules like an actual PIC-Burner or the JDM Module
Output modules
- DOUT Module Digital Output (e.g. LED ON/OFF)
- LCD Module Liquid Crystal Display
- AOUT Module Analog Out to output Voltages (for Controls)
Sound modules
- SID Module for the MOS Technology SIDMOS Technology SIDThe MOS Technology 6581/8580 SID is the built-in Programmable Sound Generator chip of Commodore's CBM-II, Commodore 64, Commodore 128 and Commodore MAX Machine home computers...
(as found in the Commodore 64Commodore 64The Commodore 64 is an 8-bit home computer introduced by Commodore International in January 1982.Volume production started in the spring of 1982, with machines being released on to the market in August at a price of US$595...
) - OPL3 Module for the FM-Chips YMF262 and YAC512
- IIC SpeakJet Module for the SpeakJet SoundChip
MIDI I/O modules
- LTC Module MIDI LED Indicators + 1 MIDI-Out + 1 Thru (+ 1 optional to-COM-Port)
- USB Modules PC/USB Interface
Miscellaneous modules
- MF Module to control Motorfaders
- IIC Modules to communicate to other (Microcontroller-)Devices via I2C
The MIDIbox Operating System (MIOS)
The MIDIbox Operating System (MIOS) has been developed to allow the design of flexible MIDI controller applications. MIOS adheres to a non-commercial, open platform as fundamental to the exchange of ideas and personal adaptations which are not possible with commercial controllers.Most controllers built by the community are based on existing documented designs, and begin life with the feature set provided by the existing firmware. End users can enhance their devices with exchangeable program code, and customize them to suit their host application, synthesizer or other MIDI device. Users can also customize to suit their own preferred workflow
Workflow
A workflow consists of a sequence of connected steps. It is a depiction of a sequence of operations, declared as work of a person, a group of persons, an organization of staff, or one or more simple or complex mechanisms. Workflow may be seen as any abstraction of real work...
, or design a new project from scratch.
Application source code, module schematics and PCB layouts are available free for non-commercial use as templates for modifications and improvements. Thus MIOS and the Hardware Platform allow an easy entry to hobbyist microcontroller development, while making possible applications outside the realms of the commercial, mainstream MIDI market.
MIOS was licensed under the GPL
GNU General Public License
The GNU General Public License is the most widely used free software license, originally written by Richard Stallman for the GNU Project....
until version 1.8. Later versions now require Thorsten Klose's permission for commercial use.
Specifications
The operating system consist of a kernel that provides user hooks to hardware and software events, and functions for interaction with Hardware Platform modules.One core module with a PIC18F452 microcontroller can handle
- up to 128 digital inputs
- up to 128 digital outputs
- up to 64 analog inputs
- character and graphical LCDs
- up to 8 BankSticks (I2C EEPROMEEPROMEEPROM stands for Electrically Erasable Programmable Read-Only Memory and is a type of non-volatile memory used in computers and other electronic devices to store small amounts of data that must be saved when power is removed, e.g., calibration...
s) - one MIDI In and one MIDI Out, or an RS232 serial COM port
Background drivers are available for the following control tasks:
- MIDI I/O processing
- Bootstrap loader
- Analog conversion of up to 64 potsPotentiometerA potentiometer , informally, a pot, is a three-terminal resistor with a sliding contact that forms an adjustable voltage divider. If only two terminals are used , it acts as a variable resistor or rheostat. Potentiometers are commonly used to control electrical devices such as volume controls on...
, faders or other analog sources with a 10-bit resolution - Motor handling for up to 8 motorized moving faders with a 10-bit resolution
- Handling of up to 64 rotary encoderRotary encoderA rotary encoder, also called a shaft encoder, is an electro-mechanical device that converts the angular position or motion of a shaft or axle to an analog or digital code. The output of incremental encoders provides information about the motion of the shaft which is typically further processed...
s - Handling of up to 128 buttons, touch sensors or similar digital input devices
- Handling of up to 128 LEDs, relays, Digital-Analog-Converters or similar output devices. In multiplexMultiplexingThe multiplexed signal is transmitted over a communication channel, which may be a physical transmission medium. The multiplexing divides the capacity of the low-level communication channel into several higher-level logical channels, one for each message signal or data stream to be transferred...
mode a nearly unlimited number of LEDs, LED rings and LED digits can be driven - Read/Write from/to EEPROM, Flash, and BankStick
- Linking PIC18F Core modules via MIDIbox Link
The whole operating system has been written in assembly language and has been optimized for speed.
MIOS currently uses 8k of program memory and 640 bytes of RAM.
Only 75 µs
Nanosecond
A nanosecond is one billionth of a second . One nanosecond is to one second as one second is to 31.7 years.The word nanosecond is formed by the prefix nano and the unit second. Its symbol is ns....
is required to read 128 digital input pins and to write to 128 output pins. 16 rotary encoders are handled within 100 µs. Analog inputs are scanned in the background every 200 µs; changes larger than a definable minimum range trigger a user hook.
Up to 256 MIDI events can trigger dedicated functions; processing of the event list requires about 300 µS. MIDI events can also be processed by a user routine for sysex parsing or similar jobs. A user timer is available for time triggered code.
Support for other high-level languages apart from C is possible.
MIOS hardware
MIOS is a dedicated operating system for the Microchip TechnologyMicrochip Technology
Microchip Technology is an American manufacturer of microcontroller, memory and analog semiconductors. Its products include microcontrollers , Serial EEPROM devices, Serial SRAM devices, KEELOQ devices, radio frequency devices, thermal, power and battery management analog devices, as well as...
PIC18F452 microcontroller. This PIC is pin compatible to the PIC16F877 which was used in early MIDIbox projects. Thus it is backwards compatible with older MIDIbox Core modules, with one board modification.
The PIC18F452 features more internal flash, much more internal RAM, some new instructions and a better system architecture. It is available for the same price as the PIC16F877 in most countries.
Complete solutions
At this point there are 11 fully documented projects available, as well as a large number of user projects generated by the community. The official projects are as follows:- MIDIbox SEQ V3:
16 Track Live Step and Morph Sequencer + advanced Arpeggiator
- MIDIbox SID V1:
Hardware MIDI-controllable Synthesizer based on the MOS Technology SID
MOS Technology SID
The MOS Technology 6581/8580 SID is the built-in Programmable Sound Generator chip of Commodore's CBM-II, Commodore 64, Commodore 128 and Commodore MAX Machine home computers...
(MOS6581) sound chip as shipped with the Commodore 64/128
- MIDIbox FM V1:
Hardware synthesizer based on the Yamaha YMF262 sound chip (also known as OPL3) for generating the famous FM sounds known from Soundblaster (compatible) soundcards of the early 90s
- MIDI Merger V1:
Merges two separate MIDI inputs to a single output
- MIDI Router V1:
Routes various MIDIboxes to a single MIDI port
- MIDI Processor:
Provides basic functionality to receive and transmit MIDI events
- MIDIbox CV
Provides CV and gate outputs to drive voltage controlled devices such as analog modular synthesizer
Modular synthesizer
The modular synthesizer is a type of synthesizer consisting of separate specialized modules connected by wires to create a so-called patch. Every output generates a signal – an electric voltage of variable strength...
s
- MIDIbox 64:
Full-fledged 64 channel MIDI controller
- MIDIbox 64E V2:
Extended version of the MIDIbox 64
- MIDIO128 V2:
The MIDIO128 interface is used to drive up to 128 digital output pins and to react on up to 128 digital input pins via MIDI
- MIDIbox LC V1:
Alternative to the MIDIbox 64/64E
- MIDImon V2:
Reports events, which are transmitted over the MIDI cable, in a readable form
External links
- MIDIbox project website
- the MIDIbox wiki
- the MIDIbox forums
- ucapps.de (Non-commercial DIY Projects for MIDI Hardware Geeks website)
- Connecting SpeakJet to PIC 16F877 Microcontroller
- The Protodeck: midibox controller designed for interact with Ableton Live used by protofuse