すごい参考になる資料 https://www.slideshare.net/tadfmac/arduinomidi MOCOの焼き方が書かれている
http://arduinomidilib.sourceforge.net/a00001.html#ac34d163205bb01ac5e03df7e64facebe
なぜかMIDI.send***は使い物にならない ↓を参考に http://forum.arduino.cc/index.php?topic=293460.0
#include <MIDI.h>
#include <midi_Defs.h>
#include <midi_Message.h>
#include <midi_Namespace.h>
#include <midi_Settings.h>
//http://forum.arduino.cc/index.php?topic=293460.0
MIDI_CREATE_DEFAULT_INSTANCE();
void setup() {
MIDI.begin();
}
void loop() {
for(int i=0; i<128; i++){
for(int j=0; j<128; j++){
for(int c=1; c<17; c++){
MIDI.send(midi::ControlChange, i, j, c);
}
}
}
}
Ch: 1 (固定) Controller : potにより変更 Value : pot 0-127, (btn 0 or 127)
#define LED_PIN 13
void setup() {
pinMode(LED_PIN, OUTPUT);
}
void loop() {
digitalWrite(LED_PIN, HIGH);
delay(3000);
digitalWrite(LED_PIN, LOW);
delay(3000);
}