Project showcase
6-Channel USB-MIDI Controller

6-Channel USB-MIDI Controller © GPL3+

MIDI controller for DAW's or anything else.

  • 8,289 views
  • 4 comments
  • 15 respects

Components and supplies

About this project

Simple MIDI controller for DAW's or anything else.

1; Build the circuit

2; Download Hairless MIDI and install. After installation run it plus In the preferences set the 'Baud rate' to 57600.

3; Download loopMIDI and install.

4; Connect Arduino and upload the code.

5; In Hairless MIDI set the serial port same as Arduino and the output to loopMIDI and whoala! there is an internal general MIDI device!

6; You can find it in Ableton MIDI settings this loopMIDI and map to anything. Traktor Pro also recognize it as general midi :)

7; Have fun!

Code

CodeArduino
int v0 = 0;
int v0_ = 0;
int v1 = 0;
int v1_ = 0;
int v2 = 0;
int v2_ = 0;
int v3 = 0;
int v3_ = 0;
int v4 = 0;
int v4_ = 0;
int v5 = 0;
int v5_ = 0;
int threshold = 2;
int int_to_midi_ratio = 1024 / 128;
void SendMidiToSerial (unsigned char word0, unsigned char word1, unsigned char word2) {
  Serial.write(word0);
  Serial.write(word1);
  Serial.write(word2);
}
void setup () {
  Serial.begin(57600);
}
void loop () {
  v0 = analogRead(0) / int_to_midi_ratio;
  v1 = analogRead(1) / int_to_midi_ratio;
  v2 = analogRead(2) / int_to_midi_ratio;
  v3 = analogRead(3) / int_to_midi_ratio;
  v4 = analogRead(4) / int_to_midi_ratio;
  v5 = analogRead(5) / int_to_midi_ratio;
  
  if (v0 - v0_ >= threshold || v0_ - v0 >= threshold) {
    v0_ = v0;
    SendMidiToSerial(176, 42, v0);
  }
  
  if (v1 - v1_ >= threshold || v1_ - v1 >= threshold) {
    v1_ = v1;
    SendMidiToSerial(176, 43, v1);
  }

  if (v2 - v2_ >= threshold || v2_ - v2 >= threshold) {
    v2_ = v2;
    SendMidiToSerial(176, 44, v2);
  }

    if (v3 - v3_ >= threshold || v3_ - v3 >= threshold) {
    v3_ = v3;
    SendMidiToSerial(176, 45, v3);
  }
  
  if (v4 - v4_ >= threshold || v4_ - v4 >= threshold) {
    v4_ = v4;
    SendMidiToSerial(176, 46, v4);
  }

  if (v5 - v5_ >= threshold || v5_ - v5 >= threshold) {
    v5_ = v5;
    SendMidiToSerial(176, 47, v5);
  }
  
}

Schematics

Shematic
Midi jtno4li3u4

Comments

Similar projects you might like

Unopad - Arduino MIDI Controller with Ableton

Project tutorial by Stefan Vasic

  • 4,497 views
  • 5 comments
  • 9 respects

Arduino - Drawing via Web Using Step Motor Controller

Project tutorial by IoT_lover

  • 15,520 views
  • 10 comments
  • 95 respects

VOLCADE - Arcade Scale Progression Controller

Project showcase by zombits

  • 1,275 views
  • 0 comments
  • 0 respects

Automatic Water Level Controller

Project showcase by karthickcj0083

  • 45,818 views
  • 12 comments
  • 54 respects

How to Create a Joystick Controller with Arduino

Project tutorial by Ingeimaks Ingeimaks

  • 27,483 views
  • 2 comments
  • 23 respects
Add projectSign up / Login