Digishow-Jam With Everything





The Santasizer – MIDI Controlled Santa madness
Sam Battle (LOOK MUM NO COMPUTER) released a new MIDI creation just in time for Christmas- “The Santasizer.” It’s a choir of toy Santas that can be played from a MIDI keyboard. Add some MIDI and modular synths for the sound track and you have everything you need to have a very MIDI Christmas.
Happy Holidays to all and sincere wishes for a joyous New Year in 2022!
“I have designed a keyboard, drum pad, chord keyboard, arpeggiator and a step sequencer. One special feature is that the units have RGB LEDs for each key, enabling playback visualization (so each device is both MIDI out and in). This is helpful for music training and editing, but it also looks great. They can be used as input devices to any computer with a DAW (Digital Audio Workstation) like Ableton, Logic, Cubase, Garageband etc. It will run on Windows, Mac or Linux (including Raspberry Pi). They can even be connected to your mobile phone (Android or iOS), providing a tactile super portable music development platform.”
by Johan Von Konow
The devices are easy to build and anyone with a 3D printer and basic soldering skills should be able to replicate them. They are designed to use few components that are easily accessible and affordable (one keyboard cost around $6).
Everything is open source and built with the easy to use Arduino framework.
Sometimes you just need to relax and do something cool.
So on Labor day weekend 2020 we shared this video from MEZERG enjoying some cool watermelon, some bright sun and a dip in the pool.
Oh yeah, and MIDI of course!
Playtron is a new type of music device.
Connect Playtron to fruits and play electronic music using online synthesizers or use it as a MIDI controller with any music software and conductive objects.
by Playtronic
Hi everyone! In this article I will teach you how to build your own Arduino powered MIDI controller. MIDI stands for Musical Instrument Digital Interface and it is a protocol that allows computers, musical instruments and other hardware to communicate. If you follow each and every step of this tutorial you will be able to make music with an Arduino!
What you are going to learn from this article:
Make sure you watch the video because it´s more illustrative. Subscribe to my Youtube channel so you don´t miss out on new project and to help me grow!
Here is a list of the material and tools we need to complete this project:
12 x Arcade Push Buttons
Material to build the case ( I decided to build a wooden case )
I chose the Arduino Starter Kit because this kit provides a lot of useful material for this project such as resistors and all the wiring and connectors. Also, if you are a begginer like me, other material with this kit can help you getting started with electronics
I bought the Arcade Buttons from the link above but if I were to buy again, I would buy THESE BUTTONS instead because I wanted to give a pattern to the interface and it was impossible with single colored buttons so I had to paint them.
Tools you will need:
I highly recommend sketching your interface so you are sure of the dimensions you need to build the case.
I projected my interface on a A4 sheet, using a pencil a ruler and a compass. You can see the result in the picture below. By sketching the interface, you get to know the dimensions you need to install all the components. My Push Buttons have a 29.7mm diameter so I am going to drill a 30mm hole to install it. Every hole is spaced by 10mm. Basically each circle center is spaced by 40mm (diameter = 30 + space = 10).
Pot Knobs have a 10mm diameter. It is recommended to drill with increasing diameter bits to make sure not to crack the wood. I also left a 10mm space between buttons and pot knob potentiometers.
And finally, the sliding potentiometers. From the data sheet I know their travelling distance is about 80mm. You should use a Dremel to open the slots to fit in the sliding potentiometers, a.k.a. FADERS. If you don´t have this specific tool you can always do it as I show on the video. Think about a slot with 80mm length and 3mm wide.
This was my COVID-19 quarantines project. I was determined to find a productive way to spend my time and the Arduino that was left in a drawer came to mind. I went to my local store to buy wood to make the enclosure and as I bought it I was told they weren´t cutting wood because of the lack of personnel and due to this whole self-isolating/lockdown. So, I decided to buy the wood and cut it at home with the material I had available.
After removing the splinters with sand paper and preparing the surface I applied varnish paint. Two coating were applied. After I chose a color to paint the enclosure. You can check the pictures to see the result!
I decided to Illustrate the circuit diagram instead of drawing the conventional circuit diagram because it can get very confusing. I used several colors to separate jumper wires so you can understand where each wire belongs.
The chip used on the Arduino contains internal pull-up resistors, so there´s no need to wire resistors for each of the arcade buttons. This greatly simplifies the controller wiring.
All we need to do is choosing one leg of the Arcade Buttons to be the ground, the other will be power, which will be connected to one of the digital inputs on the Arduino board.
Faders have three legs, the first one (counting from the bottom) is the ground (-), second is power (+) and the third one is the signal.
For the Pot knob potentiometers its the following: left leg is ground (-), middle leg is the signal and right leg will be power (+).
The Arduino is going to be the brain of the MIDI Controller. It is going to send MIDI instructions to the software, depending on the button pushing input.
The interior is going to get very messing because of all the wires, I would advice you to structure the soldering process. For example, I decided to solder all the ground wires first, the power and finally I soldered the signal jumper wires.
After soldering and connecting all the pins to the Arduino board, we can close the enclosure. Have a look at the pictures to see the final outcome!
You will need three pieces of software in order to be able to make music with your Arduino.
First, you need to download the Arduino IDE software to start writing your own code and upload sketches to the Arduino board.
Secondly, you need to download the LoopMidi software which is essentially a virtual midi cable.
Finally, to send your midi serial data to the LoopMidi software you will need the Hairless Midi to Serial Bridge software. This software is great to let you know if your wiring is correct because you can see the data flux exchanged between the MIDI Controller and the Hairless Midi Serial.
First step is opening the Arduino software and the code I am attaching to this Instructable (called MIDI_Controller). Credits are given to the Author Michael Balzer. You should not need to modify the code. Just verify the sketch which is kind of like a “debug” and when you get the message that the compilation is complete you can send it to the Arduino board.
Then head to the LoopMidi and chose a new port name. Once you chose one just press the plus button which will create the new port. After this step open the Hairless Midi Serial Bridge and start by selecting the MIDI In port that you have just created. Then select the same MIDI Out port. Finally chose the serial port of your computer (usually COM#). Congratulations, you have just enabled your MIDI Controller to communicate with the computer!
If you got this far Congratulations!!! You are just a few steps from start making music with Arduino and playing with your MIDI Controller!
Now you want to head over to your DAW (Digital Audio Workstation) and set the settings to recognize the external input which is your MIDI Controller. The example I am providing is with Ableton Live. You need to go to
Options >> Preferences : The Input Midi Port should be the one you defined earlier and you need turn the track and remote toggle button on.
Now if you press any button on your MIDI interface you should see a light flashing at the top right corner of the DAW which means the software is receiving the midi signals you are sending! To map the MIDI Controller just click on the “MIDI” button and the DAW color should turn purple. Now click over any slot and then press any button, you will see a note/control associated to it which means the button is mapped!
And you are done! Congratulations! Great project and great job! Let me know if you made it!
Tristan is an acoustic musician and a coder so he combined his skills in this musical performance.
Tristan tried a number of different types of motors for his robot including Car Door Locks, Stepper Motors and Solenoids, but they were all too noisy for the acoustic application he was going for.
He finally settled on Hitec HS-311 servos normally used for RC cars/airplanes.
The key thing here is that the Arduino controller maps MIDI note values to servo angles, and midi velocity values to the speed at which we move to those angles. For example if I sent a MIDI message (note: C2, velocity: 120), then every 1ms the controller will step the servo towards the C2 angle using some increment size determined by the velocity value.
by Tristan Calderbank
Tristan has more details of his project on his web page and has made the Arduino code available on his Github.
At SXSW 2019, Moritz Simon Geist performed and presented several workshops on using robots and MIDI. His new EP is created completely with MIDI controllers controlling robots he created himself.
Geist is deeply into MIDI. His blog details a proposal for how to overcome the latency caused by physical movements of robots using MIDI and Cycling 74′ Max.
I created the Plastic Pitch Plus (PPP) to experiment with microtonality. My primary design goal was to create a physical interface that gives immediate and independent control of pitches in a scale. One way of doing microtonality involves generating lists of frequencies or ratios. In contrast, I wanted something that would naturally engage my ear and provide an intuitive way to experiment with pitches.
Here are some technical details. The PPP provides two microtonal scale modes.
1) A twelve-tone scale mode in which the twelve knobs are used to tune up or down each of the twelve notes in a scale.
2) An equal divisions per octave mode in which the keys of a MIDI keyboard are remapped to an integer number of equal divisions per octave between 5 and 53.
The two scale modes are implemented in two ways.
1) Using MIDI pitch bend. This is somewhat of a MIDI hack intended to support microtonality with any MIDI keyboard. In short, each key is mapped to a microtonal pitch as specified by the knobs. The PPP listens for incoming MIDI notes and sends out MIDI pitch bends and notes that correspond to the microtonal pitches. To support polyphonic playing, the outbound pitch bends and notes are carefully distributed to multiple MIDI channels so that each note can have its own pitch bend value.
2) Using the MIDI Tuning Specification. This is my first time playing with this relatively new specification. (It works great!) The PPP acts as a controller–no MIDI input is required. When the knobs are turned, corresponding SysEx messages are sent out to retune the synthesizer’s internal tuning table.
See my website for more information and how to buy one.
Gridi is a large scale physical midi sequencer (2.80 X 1.65 Meters) with embedded LEDs. It
was created by music producer Yuval Gerstein with the simple aim, to allow visitors to create
a musical composition in an accessible and intuitive way. GRIDI translates the methodology
of composing electronic music inside a computer software, into an interactive physical
installation. It could easily act as a permanent stand alone installation, as well as part of an
art exhibition or event. GRIDI could also have a role in music education, as a tool for learning
musical concepts in a non threatening, intriguing way.
Visit GRIDI for more info: http://www.gridi.infoCredits:
Yuvi Gerstein – Creator
Michael Zeron – Electronics & Programming
Ronen Peri – Programming Max/MSP
Nadav Vainer – Industrial design
images by – Andreas Mueller
6
The Tirare is a custom performance interface. In Italian, Tirare means: (to) throw, (to) to pull. The name refers to the primary performative action employed in order to generate sound. Initially, I was trying to create a form of MIDI concertina. I wanted to pull and push the interface to generate sound, similar to a concertina. I also made the intentional choice to not use a myriad of interface sensors like buttons, switches, sliders, etc. My goal was to create a simple interface that could handle all operations without the need for excessive methods of control.
I decided to use a Gametrak as the primary hardware for this interface (https://en.wikipedia.org/wiki/Gametrak). I have used the Gametrak in previous performances as a controller. This time I set out to assimilate the pieces of the Gametrak into a new interface. I used only one of the joysticks in my final design.
The Gametrak is a video game controller created by In2Games. The Gametrak controller consists of two three-dimensional (3D) joysticks. Each joystick generates X, Y, and Z data (when the string is pulled out of the interface), so each joystick control works like three faders that are interdependent of one another. Each joystick can be manipulated on its X, Y, and Z axes. Each axis outputs an integer. The uniqueness of the Gametrak lies in the three-dimensional joystick. The handle on both 3D faders is connected to a string-pot that pulls out of the box. A string-pot is simply a potentiometer that is turned by pulling a long, spring-wound spool of string. This pulling of the string-pot turns the potentiometer which outputs data. According to In2Games, the mechanisms can determine position, “to an accuracy of 1 millimeter anywhere within a 3 meter cube around the unit, with no processor overhead or time delay.” This level of responsiveness and precision was essential for the controller’s original purpose — to control a virtual golf swing! This level of precision and responsiveness is also well suited for use as a real-time performance interface.
I disconnected the main logic board in the Gametrak and connected one of the joysticks directly to the analog inputs on an Arduino Pro Micro. Since the Arduino’s ADC is 10-bit, the values genrated by the joysticks range from 0-1023. I scaled these values in the Arduino software to a range of 0-127 to conform to MIDI 1.0. Each axis of the joystick outputs two MIDI CC values. I programmed this feature to allow the Tirare to function with MPE software.
The next step was to reassemble the pieces into a new form. I looked for an old concertina thinking I could insert the Gametrak pieces but this search was unsuccessful. After several attempts to create my own bellow for the Tirare, I realized copying the physical form of a concertina would not work because there would be no way to keep the bellow from resting on the string. I decided to find a new physical form to house the Gametrak pieces. Ultimately, I chose to use two small round pieces of wood (craft store), basic drawer handles (Home Depot), and a small strainer (dollar store). I initially intended this design to be a working prototype and not the final product. However, I have yet to find a better way to embody the joystick.
I used the flywheel from the unused joystick to reroute the string from the potentiometer. This was necessary because I wanted the joystick as close to the center of the piece of wood as possible. However, the size and shape of the wood and the parts left me few options for assembly. It was important to route the string from the bottom of the joystick becue the IC board on the joystick prevented any other way of routing the string.
Data is generated when the joystick is moved or the string is pulled. The Arduino scales the incoming data and generates MIDI CC values. The Arduino sends MIDI data over USB to MaxMSP. I use MaxMSP to receive the MIDI data from the Tirare and route that data to Kyma to generate sound.
The string-pot also generates MIDI CC values during performance. I use MaxMSP to detect the direction the string is moving at any time, and I map that data to different destinations. I basically get two unique data streams from a single movement. In MaxMSP, I set thresholds at various points along the movement of the string in order to generate events that are used to trigger notes (see photo below), CC values, and control messages for Kyma.
My software is very simple. I use the view on the left (below) to initialize the Tirare and turn on the three axes. I use the view on the right (below) during performance to monitor the values from each axis and to monitor where the string values are in relation to the triggers I set up for controlling notes, expression, and control for Kyma.
The Tirare is only a controller and does not generate sound. The combination of physical interface, software mapping layer, and sound production software make up the entire Data-driven Instrument for live performance.
The next step for this projects is to allow for MIDI over USB or Bluetooth. I am currently working on a Max patch that will allow the Tirare, when connected, to change the way it transmits MIDI — USB or BLE. I also still have hope that I will dream up a better physical form for the Tirare.
***Video Coming Soon!
This custom-built instrument is called
I designed and fabricated Curve over the course of about 6 months, from the initial 3D model (done in Blender, https://www.blender.org) to the final version that you see now. The physical interface consists of one large laser-cut piece of clear 1/4″ acrylic to which I have adhered 20 FSR’s (force sensitive resistors, aka pressure sensors, https://www.sparkfun.com/products/9376), two touch-potentiometers (faders, https://www.sparkfun.com/products/8679), a keypad (https://www.adafruit.com/product/419), and a 9-degrees of freedom motion sensor (https://www.sparkfun.com/products/13944). I have also affixed 60 RGB LED lights (DotStars, https://www.adafruit.com/product/2240) that are individually addressable and correspond to various inputs from the sensors for an added layer of visual feedback. The black cubes that cover each of the FSR’s are made out of a semi-dense foam which when attached to its corresponding FSR allow me to have a far greater range of pressure and interaction than I otherwise would have had with just the FSR on its own. Each of the sensors, lights, and keypad are connected to an Arduino Mega microcontroller (https://www.arduino.cc/en/Guide/Introduction, https://store.arduino.cc/usa/arduino-mega-2560-rev3) that allowed me to completely customize the programming and functionality of each individual sensor and light.
Software-wise, I programmed all of the electronics using the Arduino IDE, which then connects via USB serial to Max/MSP where all of my data-mapping and data-processing happens. From Max/MSP, the data is then sent as MIDI data to Ableton Live, where all of my sound design and musical composition was done. I relied heavily on Max for Live instruments and devices for the majority of my sound design, leaning heavily towards a synth-based musical soundscape for my first piece with Curve.
It is important to note that while the hardware controller itself does not generate sound, Curve is nonetheless a comprehensive instrument in its own right when coupled with the customized software that I have designed in Arduino, Max/MSP, and Ableton Live. The individual components only form the complete instrument when they are all working together, similar to the way that a modular synthesizer operates. Curve (as an instrument) consists of the hardware, data-mapping, and sound design layers all functioning together as a complete package.
My Étude No.1, for
For my biography and more of my works, please visit http://nathanasman.com
Nick Demopoulos started out as a jazz musician and played with legends like Chico Hamilton. But then he began exploring the possibilities of using MIDI and that led him to a new path as a DIY maker and creator of some fascinating and unique MIDI devices.
HIs website (Smomid.com) is named after the first instrument he ever built. Smomid is an acronym for String Modeling Midi Device.
Nick also created software that works with his instruments and allows him to approach music in a totally unique way, from the samples and sounds used, to the way beats are played, to the way loops are recorded and manipulated.
by Snomid.com
Here is an example of the music Nick makes with his DIY instruments. All of the sounds are made by instruments of his own design. He
At SXSW, we got a chance to check out the Cabor MIDI cahon. Cabot is a project of UTSUWA, Inc., a Kyoto, Japan based tech start-up.
The Cabot percussion robot was conceived by Hideaki Iio, Director of the Cabot development team and guitar player/singer.
“I wanted to create a product that would rev up my solo performance.”
by Hideaki Iio
The Cabot team went through a long process of prototyping and improving the design. At SXSW, they showed a new prototype that looked much closer to a production version. You can subscribe on their website for updates on a launch date.
Cabot’s target market is solo perfomers who want to add cahon accompaniment to their live solo performances. A foot pedal allows you to select different MIDI patterns in realtime.
The Cabot has a 4 pin DIN plug on its body which is not a standard MIDI connector, but it sends and receives standard MIDI messages.
There are two ways to program patterns for the Cabot. There is an iOS app that is under development and you can also connect the Cabot to your DAW.
Here are some videos of the Cabot MIDI Cahon in action
We collected up links to the top MIDI DIY resources from around the web. Links are embedded in the logos, the pictures and the text in blue. Clicking on a link takes you to the site’s search engine with the keyword MIDI so the latest MIDI DIY projects will always appear.
Learn how to make anything with Instructables. Easy to follow step-by-step instructions, online classes, and a vibrant maker community.
SparkFun is an online retail store that sells the bits and pieces to make your electronics projects possible.
MIDIBox-Non-commercial DIY Projects for MIDI Hardware Geeks
With the boom in open-source electronics platform like Arduino and the growth of 3-D printers, it’s become easier and easier to create your own MIDI controller. We wanted to introduce you to some of the people and companies who helped create the DIY MIDI revolution.
Moldover is the acknowledged godfather of controllerism. He has been a long time supporter of The MIDI Association and we featured him as a MIDI artist in 2016. He was one of the first people to develop his own DIY MIDI controller.
Ean Golden (who now runs djtechtools) wrote an article about Moldover “Music Maneuvers: Discover the Digital Turntablism Concept, Controllerism, Compliments of Moldover” in the October 2007 issue of Remix Magazine.
Soon after that he put out a Youtube video on how to make your own MIDI controller and started djtechtools.
DJ Tech Tools continues to update their YouTube channel with videos on how to make your own MIDI controller.
Shawn Wasabi has 574,651 subscribers and 54,314,415 views on his Youtube channel. He started combining multiple 16 button MIDI Fighters together and combining them with game controllers. Eventually he convinced DJ TechTools to make him a 64 button version of the MIDI Fighter with Sanwa arcade buttons.
Evan Kale is a young creator who has 2,736,359 views on YouTube. Here is how he describes himself on his Youtube channel.
I break stuff. All things Arduino, guitar, ukulele, MIDI, mods, music, explosions, and hacks.
by Evan Kale
Notes and Volts has some really nice videos on Arduino, MIDI and building your own synths.
Livid Instruments has been at the forefront of MIDI controller experimentation since 2004. They have a number of manufactured products.
But Livid also makes some great components for DIY projects like the Brain V2.
Easily create your own MIDI controller with Brain v2. Brain V2 contains the Brain with a connected Bus Board for simple connectivity. Connect up to 128 buttons, 192 LEDs, and 64 analog controls. Components are easily connected with ribbons cables and we’ve created the Omni Board to allow dozens of layouts with a single circuit board.
Brain v2 supports faders, rotary potentiometers, arcade buttons, rubber buttons, LEDs, RGB LEDs, LED rings, encoders, velocity sensitive pads, accelerometers, and more.by Livid
There has recently been a surge in robotic MIDI devices as Arduinos and low cost CPUs make it easier and easier to develop MIDI-controlled robotic components.
At Super Booth 2017, there were a number of significant MIDI robot introductions.
From a very early age Felix was inspired by both visual and sound arts. He studied both drawing and painting and piano in his formative years, but he never seemed to be able to settle on more traditional artistic paths and was always looking to combine sonic and visual arts together. Felix creates new experiences that combine real objects, music and design.
Felix’s Machines are not intended to replace human-made music, but like Conlon Nancarrow, Felix focuses on how machines can exceed human’s ability to perform because of their mechanical nature.
“Although my medium focuses on the development of acoustic sounds, I am continually inspired by electronic music – the countless abstractions act as blueprints for the construction of its acoustic counterparts. I aim to build a space where artificial and dream-like environments can become a reality.
by Felix Thorn
Bastl Instruments
Okay, technically this isn’t MIDI, it’s control voltages, but we just didn’t think it was right to have a piece on robotics and not include Bastl. In any case, their new Thyme effect is MIDI controllable and it’s a sequenceable robot-operated digital tape machine.
DadaMachines
Inspired in part by Felix Thorn, Johannes Lohbihler created a Kickstarter to develop DADA Machines. The dadamachines automat toolkit lets anyone create robotic orchestras with everyday objects. Automat is open source, hackable and Arduino compatible.
The center of each toolkit is the automat controller. Plug in your favorite software or hardware MIDI input directly into the controller. For output, automat controller has 12 universal DC outputs to connect motors, solenoids, LEDs – whatever you want to start playing. The automat is plug & play – offering unlimited possibilities. Simply connect your favorite MIDI hardware device, music App or DAW and trigger the actuators of your choice to create a composition.
by Dada Machines
Polyend Perc Pro
Polyend was only started in 2015, but they have been working hard on their ideas to expand musicians’ creativity
PERC PRO, a MIDI-controlled device that mechanically plays any percussive surface. It make a drumming machine out of anything. Aphex Twin, Daedelus, and Dan Deacon have all utilized the Perc Pro in their work. Any percussion instrument you strike with a stick or your bare hands works with PERC PRO. Open yourself up to new possibilities. Congas, xylophone, sauce pan?
At Super Booth 2017, Polyend introduced tempos so fast for the Perc Pro that the drum rolls became audible pitches.
Yamaha reface robot
Yamaha also showed a robot at Super Booth 2017. Designed in collaboration with Anno Labs, a design company from Fukuoka, Japan. Here is a little bit about the reface robot and annon labs and then a couple of Youtube videos about the reface robot project.
“#refacerobot”. Custom-made robot for reface CS dynamically controlling all sound parameters. From it’s fierce and full-blast performance you will experience unheard sounds freed from conventional two-handed tweaking.
by Yamaha
“#annolab”. anno lab is an emerging creative group focused on media art and interactive design. Most of their works aim at inspiring curiosity and fun for people in their daily life.
by anno lab
The Arduino UNO is a popular open-source microcontroller that, in many respects, is a perfect complement to the extensible nature of the Music Instrument Digital Interface (MIDI) protocol. Microcontroller platforms such as Arduino, Teensy, and others, make it relatively easy to develop custom MIDI controllers that respond to light, pressure, sound, and many other forms of input. In this way, microcontrollers provide a unique way to expand the possibilities of MIDI into the physical realm. MIDI musicians can now envision and create an astounding array of custom hardware devices from custom controllers to algorithmic composers and beyond.
Note that this article focuses on the basics of MIDI output on an Arduino UNO. Future articles will cover MIDI input on the Arduino and Teensy platforms as well as the use of potentiometers, switches, and other components for real-time MIDI control.
It is necessary to utilize a MIDI interface in order to send MIDI messages from an Arduino to a synthesizer, Digital Audio Workstation, or other MIDI device. Fortunately, it is easy (and inexpensive) to create a simple circuit that can handle MIDI output. The circuit can be mocked up on a solderless breadboard for experimentation or a permanent version can be soldered to solderboard. Users who are new to electronics might want to consider a commercial version such as the SparkFun MIDI Shield, offered at a nominal cost by SparkFun Electronics and other vendors.
As is evident in Figure 1, a circuit that was documented in David Miles Huber’s The MIDI Manual, the circuit for MIDI output is relatively simple and consists of:
Figure 2 demonstrates one way that the transmitter circuit could be configured on a solderless breadboard. Note that the top rail of the solderless breadboard is connected to the 5V pin on the Arduino and the bottom rail is connected to the Arduino GND pin.
While it is generally more convenient to use a MIDI library to program MIDI sketches on an Arduino, we will start with a low-level “pure” sketch in order to demonstrate how MIDI bytes are handled. If you have ever programmed MIDI applications for Windows, OS X, or Linux you are in for a pleasant surprise because MIDI output can be achieved with just a few lines of code on an Arduino. If you haven’t done so already, be sure to download the Arduino Software (Integrated Development Environment) from https://www.arduino.cc/en/Main/Software. Next, run the Arduino software and select File…New and enter the code that is described in the following paragraphs.
While the basics of C and C++ programming are beyond the scope of this article (and covered in detail in my own Arduino for Musicians as well as numerous other books and online resources), rest assured that the basics of coding a simple MIDI sketch are not unduly difficult. Start by typing the functions shown in Listing 1 which form the basis for all Arduino sketches. Note that the term function is used to describe a block of “functional” code denoted by the function name and opening and closing braces:
Listing 1 Boilerplate functions
void setup()
{
}
void loop()
{
}
The setup() function is called once when your sketch is first run on an Arduino. You will use that block of code (between the opening and closing braces) to establish the serial transmission rate and any other initialization required by the sketch. The loop() function is where the action happens. As the name of the function implies, the loop() function continues to loop throughout the duration of your sketch unless you pause it with a delay() function or some other blocking activity.
To establish a serial MIDI connection between the Arduino and a MIDI receiver, add the code shown in Listing 2 to the setup() function. The Serial object represents a class (an object or pre-programmed chunk of code) that handles all of the low-level details of establishing and maintaining a serial connection. Note that the Serial class provides a function (typically called a method in the context of a class) titled begin() that takes the baud rate as a parameter. In this example, serial transmission is set to 31250 baud, the expected MIDI transmission rate as per The Complete MIDI 1.0 Detailed Specification (available from the MIDI Association at midi.org).
Listing 2 Setting up a serial connection
void setup()
{
Serial.begin(31250);
}
Although there is nothing wrong with writing code for sending MIDI data in the loop() function, custom functions can help to produce code that is extensible and easier to read and maintain. Listing 3 demonstrates one approach to sending Note-On messages. Notice how the function takes three bytes that correspond to the MIDI channel, note, and velocity. The only tricky part of the code is the first line which translates the expected MIDI channel range of 1-16 to the range of Note-On status bytes starting at 0x90 (hexadecimal). The Serial.write() method is used to transmit the status byte and data bytes that form a Note-On message:
Listing 3 Custom function for outputting MIDI Note-On messages
void playMIDINote(byte channel, byte note, byte velocity)
{
//MIDI channels 1-16 are really 0-15
byte noteOnStatus = 0x90 + (channel-1);
//Transmit a Note-On message
Serial.write(noteOnStatus);
Serial.write(note);
Serial.write(velocity);
}
Now that a convenience function is available to handle the transmission of Note-On messages, it is easy to fill in some simple code in the loop() function to output a series of notes. Note that this example uses a blocking delay—generally a bad idea for more robust applications—but the use of timers is beyond the scope of this article and would only serve to obfuscate the underlying concept of sending MIDI data via a serial connection. In Listing 4, a “for loop” is used to output MIDI Note-On messages in the range of 60 to 72. The function delays and then the transmits the same note with a velocity of zero—which is functionally equivalent to sending a corresponding Note-Off message.
Listing 4 Outputting a chromatic scale
void loop()
{
//Play a chromatic scale starting on middle C (60)
for(int note = 60; note < 72; note++)
{
//Play a note
playMIDINote(1, note, 100);
//Hold the note for 60 ms (delay() used for simplicity)
delay(60);
//Turn note off (velocity = 0)
playMIDINote(1, note, 0);
//Pause for 60 ms
delay(60);
}
}
The complete sketch is shown in Listing 5. Once you have typed or copied the code into the Arduino Integrated Development Environment (IDE), click the leftmost check button to ensure that the sketch is free from errors. If you are relatively new to programming it might be helpful to remember that C code is case sensitive. It is also easy to omit an opening or closing brace or semicolon which can create any number of error messages. A final step is to connect the Arduino to your computer via a USB cable and select the upload button to upload the code to the Arduino. Assuming you have connected a valid MIDI output circuit, the chromatic scale should be received by any MIDI receiver device that is connected to the circuit via a MIDI cable.
Listing 5 Complete listing
void setup()
{
//Set up serial output with standard MIDI baud rate
Serial.begin(31250);
}
void loop()
{
//Play a chromatic scale starting on middle C (60)
for(int note = 60; note < 72; note++)
{
//Play a note
playMIDINote(1, note, 100);
//Hold note for 60 ms (delay() used for simplicity)
delay(60);
//Turn note off (velocity = 0)
playMIDINote(1, note, 0);
//Pause for 60 ms
delay(60);
}
}
void playMIDINote(byte channel, byte note, byte velocity)
{
//MIDI channels 1-16 are really 0-15
byte noteOnStatus=0x90 + (channel-1);
//Send notes to MIDI output:
Serial.write(noteOnStatus);
Serial.write(note);
Serial.write(velocity);
}
That’s it—Arduino MIDI output can be achieved with just a few lines of code! Consider how you might use the boilerplate code in this example to develop a simple algorithmic generator (perhaps using the Arduino random() function) or a sketch that outputs chords, exotic scales, or drum beats.
Although this introduction is necessarily limited, it forms the basis for many exciting possibilities including algorithmic composition, automation, and real-time control. As you will see in future articles, a basic MIDI output circuit can also be used for useful applications such as using a potentiometer to send continuous controller messages to a DAW or a two-axis joystick as an expressive real-time controller. As noted in the introduction, detailed coverage of Arduino MIDI and audio concepts are provided in Arduino for Musicians: A Complete Guide to Arduino and Teensy Microcontrollers as well as other books online resources.
Happy coding!
Dana Dolfi has created what is probably the loudest MIDI controlled instrument ever made out of recycled ship, truck and train air horns and steam whistles.
Dolfi, a pipe-fitter and project manager for Chapman Corp. in Washington, Pennsylvania sets his 3-ton, red, white and blue atop a car trailer and performs at Maker Faires, July Fourth events and graduation parties.
But his contraption (It’s great when you can use an old-timey word like contraption in it’s proper context) creates some limitations in where he can perform. The GAHM is as loud as a jet engine and so Dana marks off a 100 yard perimeter around the instrument and even then recommends ear plugs. It’s no wonder it is so loud as it is powered by a gasoline-powered air compressor and a 620-gallon air tank blows the horns and whistles.
Among the horns and whistles Dolfi has collected are a large horn from the USS Mississinewa, a Naval replenishment oiler; horns off a Coast Guard cutter and an ocean-going dredge; a horn that was used on a California drawbridge; a set of horns from a Great Lakes ore freighter; whistles from the Donora American Steel and Wire Works; an 1890s whistle from a fire hall in Gloucester, Mass.; a whistle from an antique popcorn machine, and several train and towboat horns and whistles.
by Karen Mansfield
Staff Writer for the award-winning Observer-Reporter. a daily newspaper headquartered in Washington, Pa., the newspaper has been part of Southwestern Pennsylvania since the early 1800s.
The Great American Horn Machine has performed at lots of Maker Faires and here are a couple of video examples.
Happy Memorial Day-2016
Instructables is a site which hosts DIY projects and is a platform for people to share what they make through words, photos, video and files. We have gone through the many MIDI DIY projects and picked our some of our favorite projects. To see all the MIDI projects that are available on the site, just click here.
Companies and products listed here do not imply any recommendation or endorsement by the MIDI Manufacturers Association. |
MIDI Processing, Programming, and Do It Yourself (DIY) Components |
These are just examples of such products — we make no warranty MIDI Processing Devices and DIY Hardware
Programming Tools
|
I write, sing, play various instruments, program drums etc, edit, mix and produce my own work in my home studio or wherever a project takes me.
I’m now fully independent, with no management, publishing or label! It feels amazing to be completely untethered.
Over the last 5 years I’ve been developing with a team of now 8 people, a gestural performance system around wireless gloves. We call the system Mi.Mu. To reach inside the technology of the computer and sculpt music. Changing the way creatively we think about sound both at the writing and performance end of the spectrum and closer engagement with the audience.
I tend to make things where i find gaps in my life, workflow or business. Songs, gloves and recently imagining a Fair Trade Music industry i call Mycelia.
A sound module in the cupboard at the music school I went to. In there was an Atari with Notator and the sounds I played were off of this device… but I actually have no idea what it was but it was hooked up via midi! I was 12, this was back in 1990.
I use it mainly when mapping my gloves into Ableton live. Choosing the midi channel and note or cc, I can automate anything within the program, wirelessly and fluidly. For example, simply panning a sound from left to right, by moving my arm left to right.
Or gaining the length of a reverb by One Finger Point, to the top right ‘corner’ of the space before me.
The standard is one of the few, where because of it’s elegance and simplicity, has been adopted across the industry and so making it possible to try out all manner of weird and wonderful applications. It just works. We just need someone to sort out wireless a bit better now so we don’t have to have all those darned midi cables!
Just thank you!