Go Down

Topic: PAID Midi controller  (Read 8 times) previous topic - next topic

jovid196168

Hello

I'm building a midi controller/loop pedal to use in mobius which I have scripts for each pedal, I have built most of it but I have become stuck and can't get any further from here. Rather than the standard midi controller the one I want to build is a bit more complex.

This is I want to achieve, I have programmed the pedals but the bank pedal as I don't know how to program that. Just need it to change preset. Though I probably won't use it much.

So I need to logo to light up green when it is powered. I didn't know what would be the best way to do this if to use multiple common cathode led's or a panel etc? I then need the logo to flash red when the clear pedal is pressed. I also want the led's above the each track to light green when that track is playing and light red when the track is recording. Then last thing the circle on the left I was thinking of using a pixel ring so when the midi controller is in play mode it lights spiralling green, if in record mode it spirals in red and when a track is overdubbing spirals yellow. Drawing here explaining what each things does. I don't know if this is possible? I've been told it is and I've also seen a project accomplish it.



This is my current set up minus the shift register connected (ignore the led)


and this is the code I'm running.
Code: [Select]
#include <SoftwareSerial.h>
SoftwareSerial midi(0,1); ///RX TX

int clearbtn = 9;
int recordbtn = 5;
int stopbtn = 6;
int track1btn = 10;
int track2btn = 11;
int track3btn = 12;
int track4btn = 13;
int modebtn = 8;
int undobtn = 7;
int led = 2;

int toggle1 = 0;
int toggle2 = 0;
int toggle3 = 0;
int toggle4 = 0;
int toggle5 = 0;
int toggle6 = 0;
int toggle7 = 0;
int toggle8 = 0;
int toggle9 = 0;


int mode = 0;



void setup(){
  pinMode (clearbtn, INPUT_PULLUP);
  pinMode (undobtn, INPUT_PULLUP);
  pinMode (recordbtn, INPUT_PULLUP);
  pinMode (stopbtn, INPUT_PULLUP);
  pinMode (track1btn, INPUT_PULLUP);
  pinMode (track2btn, INPUT_PULLUP);
  pinMode (track3btn, INPUT_PULLUP);
  pinMode (track4btn, INPUT_PULLUP);
  pinMode (modebtn, INPUT_PULLUP);
  pinMode (undobtn, INPUT_PULLUP);
 
  pinMode (led, OUTPUT);
  digitalWrite(led, HIGH);
  delay(250);
  digitalWrite(led, LOW);
 
  midi.begin(31250);
}



void loop(){

  if (digitalRead(undobtn) == HIGH && toggle1 == 0){
    toggle1 = 1;
    if(mode == 0){
      midi.write(0x90);
      midi.write(0x41);
      midi.write(0x01);
      // delay(300);
    }

    if(mode == 1){
      midi.write(0x90);
      midi.write(0x36);
      midi.write(0x01);
      // delay(300);
    }
  }

  if (digitalRead(undobtn) == LOW && toggle1 == 1){
    toggle1=0;
    if(mode == 0){
      midi.write(0x90);
      midi.write(0x41);
      midi.write((byte)0x00); 
      delay(300);
    }

    if(mode == 1){
      midi.write(0x90);
      midi.write(0x36);
      midi.write((byte)0x00); 
      delay(300);
    }

  }




  if(digitalRead(clearbtn) == HIGH && toggle2 == 0){
    toggle2 = 1;
    if(mode == 0){
      midi.write(0x90);
      midi.write(0x01);
      midi.write(0x45);
      //delay(300);
    }
    if(mode == 1){
      midi.write(0x90);
      midi.write(0x37);
      midi.write(0x45);
      //delay(300); 
    }
  }


  if(digitalRead(clearbtn) == LOW && toggle2 == 1){
    toggle2 = 0;

    if(mode == 0){
      midi.write(0x90);
      midi.write(0x01);
      midi.write((byte)0x00);
      delay(300);
    }
    if(mode == 1){
      midi.write(0x90);
      midi.write(0x37);
      midi.write((byte)0x00);
      delay(300);
    }

  }



  if(digitalRead(recordbtn) == HIGH && toggle3 == 0){
    toggle3 = 1;
    if(mode == 0){
      midi.write(0x90);
      midi.write(0x10);
      midi.write(0x45);
      //delay(300);
    }
    if(mode == 1){
      midi.write(0x90);
      midi.write(0x35);
      midi.write(0x45);
      // delay(300);
    }
  }

  if(digitalRead(recordbtn) == LOW && toggle3 == 1){
   toggle3 = 0;
    if(mode == 0){
      midi.write(0x90);
      midi.write(0x10);
      midi.write((byte)0x00);
      delay(300);
    }
    if(mode == 1){
      midi.write(0x90);
      midi.write(0x35);
      midi.write((byte)0x00);
      delay(300);

    }
  }




  if(digitalRead(stopbtn) == HIGH && toggle4 == 0){
    toggle4 = 1;
    ///Serial.println("mute/stop"); 
    if(mode == 0){
      midi.write(0x90);
      midi.write(0x07);
      midi.write(0x45);
      //delay(300);
    }
    if(mode == 1){
      midi.write(0x90);
      midi.write(0x34);
      midi.write(0x45);
      //delay(300);
    }
  }


  if(digitalRead(stopbtn) == LOW && toggle4 == 1){
    toggle4 = 0;
    if(mode == 0){
      midi.write(0x90);
      midi.write(0x07);
      midi.write((byte)0x00);
      delay(300);
    }
    if(mode == 1){
      midi.write(0x90);
      midi.write(0x34);
      midi.write((byte)0x00);
      delay(300);

    }
  }




  if (digitalRead(track1btn) == HIGH && toggle5 == 0){
    toggle5 = 1;
    if(mode == 0){
      midi.write(0x90);
      midi.write(0x14);
      midi.write(0x01);
      // delay(300);
    }
    if(mode == 1){
      midi.write(0x90);
      midi.write(0x33);
      midi.write(0x01);
      //  delay(300);
    }
  }

  if (digitalRead(track1btn) == LOW && toggle5 == 1){
    toggle5 = 0;
    if(mode == 0){
      midi.write(0x90);
      midi.write(0x14);
      midi.write((byte)0x00);
      delay(300);
    }
    if(mode == 1){
      midi.write(0x90);
      midi.write(0x33);
      midi.write((byte)0x00);
      delay(300);
    }
  }

  if (digitalRead(track2btn) == HIGH && toggle6 == 0){
    toggle6 = 1;
    if(mode == 0){
      midi.write(0x90);
      midi.write(0x15);
      midi.write(0x01);
      // delay(300);
    }
    if(mode == 1){
      midi.write(0x90);
      midi.write(0x32);
      midi.write(0x01);
      // delay(300);
    }

  }

  if (digitalRead(track2btn) == LOW && toggle6 == 1){
    toggle6 = 0;
    if(mode == 0){
      midi.write(0x90);
      midi.write(0x15);
      midi.write((byte)0x00); 
      delay(300);
    }
    if(mode == 1){
      midi.write(0x90);
      midi.write(0x32);
      midi.write((byte)0x00); 
      delay(300);
    }
  }


  if (digitalRead(track3btn) == HIGH && toggle7 == 0){
    toggle7 = 1;
    if(mode == 0){
      midi.write(0x90);
      midi.write(0x16);
      midi.write(0x01);
      //  delay(300);
    }
    if(mode == 1){
      midi.write(0x90);
      midi.write(0x31);
      midi.write(0x01);
      // delay(300);
    }
  }

  if (digitalRead(track3btn) == LOW && toggle7 == 1){
    toggle7 = 0;
    if(mode == 0){
      midi.write(0x90);
      midi.write(0x16);
      midi.write((byte)0x00);
      delay(300);
    }
    if(mode == 1){
      midi.write(0x90);
      midi.write(0x30);
      midi.write((byte)0x00);
      delay(300);

    }
  }


  if (digitalRead(track4btn) == HIGH && toggle9 == 0){
    toggle9 = 1;
    if(mode == 0){
      midi.write(0x90);
      midi.write(0x40);
      midi.write(0x01);
      // delay(300);
    }
    if(mode == 1){
      midi.write(0x90);
      midi.write(0x66);
      midi.write(0x01);
      //  delay(300);
    }
  }

  if (digitalRead(track4btn) == LOW && toggle9 == 1){
    toggle9 = 0;
    if(mode == 0){
      midi.write(0x90);
      midi.write(0x40);
      midi.write((byte)0x00);
      delay(300);
    }
    if(mode == 1){
      midi.write(0x90);
      midi.write(0x66);
      midi.write((byte)0x00);
      delay(300);
    }
  }


  if (digitalRead(modebtn) == HIGH && toggle8 == 0){
    toggle8 = 1;
    if(mode == 0){


      midi.write(0x90);
      midi.write(0x17);
      midi.write(0x01);
      // delay(300);
    }

    if(mode == 1){


      midi.write(0x90);
      midi.write(0x30);
      midi.write(0x01);
      //  delay(300);
    }


  }

  if (digitalRead(modebtn) == LOW && toggle8 == 1){
    toggle8 = 0;
    if(mode == 0){
      mode = 1;
      midi.write(0x90);
      midi.write(0x17);
      midi.write((byte)0x00); 
      digitalWrite(led, HIGH);
      delay(300);
    }
    else if(mode == 1){
      mode = 0;
      midi.write(0x90);
      midi.write(0x30);
      midi.write((byte)0x00); 
      digitalWrite(led, LOW);
      delay(300);}

  }
}


I would really appreciate it if someone could help me finish this project, plus I think people are getting tired of hearing me on here. I will pay by hour or full when project is finished. I don't know what the going rate is but I'm sure something can be sorted

thanks

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy