Push button with led , midi-usb

Status
Not open for further replies.

noiseworker

New member
Hi all!!

I m really new with arduino coding, recently I bought a teensy++ to make my controller .

I want to learn more about coding Midi-usb with teensy but i cant found to much information by internet .

I want to know how I can run a push buttons with a led ...The problem that i hav , is that i dont know how to make that the led follow the instructions of the DAW( Ableton live) .

For example : push one one physical button assigned to rec function of ableton ...then I want that the led go to "ON position".

I used the library bunce

#include <Bounce.h>

const int channel = 1;
const int led = 13;

Bounce button1 = Bounce(1, 5); // 5 = 5 ms debounce time
const int BUTON = 1;
int val = 0;
int old_val = 0;
int state = 0;


void setup() {
pinMode(1, INPUT_PULLUP);

pinMode(led, OUTPUT);
pinMode(BUTON, INPUT);

}

void loop() {
button1.update();
val= digitalRead(BUTON);


if((val==HIGH) && (old_val == LOW)){
state = 1 - state;
delay(10);
}
old_val=val;
if(state ==1) {
digitalWrite(led, HIGH);}else{digitalWrite(led, LOW);}


The problem that I have is that when i push "stop" to ableton live with the mouse ...the led still in "ON position"

Then I have to read the information of the ableton...the led have to work following ableton software and not the
"physical button"

I think that i should use this function callback of the Midi library https://github.com/ColinHarrington/...ensy_MIDI_Callbacks/Teensy_MIDI_Callbacks.pde

But I dont know how to use ...

SORRY for my level of english !!

Thanks for advance !
 
basically I would like to know how i can read the information from ableton live , for after that , say it to arduino

if the light of the buttonA on (ableton live) assigned to Midi channel "x" is ON ..put the led buttonA "ON"
 
Status
Not open for further replies.
Back
Top