Controlling Cubase with Arduino based MIDI




A friend of mine wanted to control Cubase, his audio recording software, with a push button so that he could stop and start recordings remotely without having to go over to the computer and type on the keyboard. You may be able to do this in other recording software, we just happen to use Cubase.

Step 1: What you need

Normally open push buttons (one for every action you want to perform like these)
10K-Ohm resistor (one for every button)
Arduino with a good solid 5V. I had to externally power mine (I’m using the bare-bones version running Diecimila) get it here
Solderless breadboard (like this one)
MIDI jack (you only need one, since all you’re doing is sending like a dis)
220-Ohm resistor (for the MIDI jack)
Computer running Cubase or some other recording software
MIDI Cable (here’s a 20’er)
You may need a USB to MIDI input, I have used and liked, this one, and this one

Arduino Controlling Cubase




Step 2: Hardware Setup

Schematic and pic attached. NOTE: the schematic is the work of ITP Physical Computing

Basically it’s 5V to switch, switch to control pin, 10K resistor from control pin to GND
For the MIDI jack it’s pin 5 to serial pin, pin4 to 5V through the 220 resistor
Load the following sketch on your Arduino:
{{{
/* Convert Arduino to a MIDI controller using as many digital inputs
* as you need.
*
* This sketch is set up to send 2 MIDI notes on MIDI channel 5,
* but it can be easily reconfigured for other notes and channels
*
* Created 3 Nov 2008
* By Hyeki Min
*
* Modified 14 May 2009
* By Petyr Stretz
* Changed switch logic so that the pin low and high made the
* notes play like a keyboard, removed unneeded pins, changed
* output MIDI channel to 5
*/

// define the pins we use, MIDI port is always on Arduino pin 1 (TX)
int switchPin1 = 2;
int switchPin2 = 3;

// general midi notes
char note1 = 60; //Middle C
char note2 = 62; //D

// Variables
int switchState1 = LOW;
int switchState2 = LOW;
int currentSwitchState1 = LOW;
int currentSwitchState2 = LOW;

void setup() {
// set the states of the I/O pins:
pinMode(switchPin1, INPUT);
pinMode(switchPin2, INPUT);

// set MIDI baud rate :
Serial.begin(31250);
}

Arduino Controlling Cubase Schematic
void loop() { //switchPin1
currentSwitchState1 = digitalRead(switchPin1);
if( currentSwitchState1 == HIGH && switchState1 == LOW ) // push
//Note on channel 5 (0x94), some note value (note), middle velocity (0x45):
noteOn(0x94, note1, 0x45);
if( currentSwitchState1 == LOW && switchState1 == HIGH ) // release
//Note on channel 5 (0x94), some note value (note), silent velocity (0x00):
noteOn(0x94, note1, 0x00);
switchState1 = currentSwitchState1; //switchPin2
currentSwitchState2 = digitalRead(switchPin2);
if( currentSwitchState2 == HIGH && switchState2 == LOW ) // push
//Note on channel 5 (0x94), some note value (note), middle velocity (0x45):
noteOn(0x94, note2, 0x45);
if( currentSwitchState2 == LOW && switchState2 == HIGH ) // release
//Note on channel 5 (0x94), some note value (note), silent velocity (0x00):
noteOn(0x94, note2, 0x00);
switchState2 = currentSwitchState2;
}// Send a MIDI note-on/off message.
void noteOn(char cmd, char data1, char data2) {
Serial.print(cmd, BYTE);
Serial.print(data1, BYTE); Serial.print(data2, BYTE);
}
}}}

Major Components in Project

Arduino with a good solid 5V. I had to externally power mine
Solderless breadboard
MIDI jack

 

For more detail: Controlling Cubase with Arduino based MIDI




Clip to Evernote

Leave a Comment

(Spamcheck Enabled)

Read previous post:
Plugduino – Arduino based 120 Volt outlet controller

give your Arduino a 120 volt kick in the pants! The Arduino is a great tool for anyone interested in...

Close
Scroll to top