Project showcase
6-Channel USB-MIDI Controller

6-Channel USB-MIDI Controller © GPL3+

MIDI controller for DAW's or anything else.

  • 225 views
  • 0 comments
  • 3 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

Automatic Water Level Controller

Project showcase by karthickcj0083

  • 27,194 views
  • 8 comments
  • 41 respects

RGB LED Button Controller

Project showcase by Re

  • 12,896 views
  • 2 comments
  • 17 respects

Arduino - Drawing via Web Using Step Motor Controller

Project tutorial by IoT_lover

  • 9,790 views
  • 7 comments
  • 81 respects

Arduino Ethernet Controller

Project showcase by Team TATCO Inc

  • 8,356 views
  • 1 comment
  • 33 respects

Automatic Room Light Controller with Bidirectional Visitor

Project showcase by Team Amrendra Sahni

  • 8,263 views
  • 3 comments
  • 11 respects
Add projectSign up / Login