In this episode of the MiniDexed Build we will be begining to re-purpose an old M-Audio Oxygen 49 Midi keyboard. The Oxygen is just a keyboard controller and not a full synth. In this instance the unit was faulty so we are going to take it’s electronics and bin it ( mostly ) but re-purpose the keybed and key matrix. In order to turn this into a MIDI keybaord again, we need to understand how it’s wired. So in this video we will be using an arduion 2560 Mega to scan the keyboard and make up a table of the keys.
These works are based on the MiniDexed Project
The scanning was roughly based off this project
Watch the full video on Youtube.
//D14-D21 Output Pins
//A0-A15 (D54-69) Input Pins
int OPP[8] = {14,15,16,17,18,19,20,21};
int INP[16] = {54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69};
int x = 0 ;
int y = 0 ;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
//Set the pins in array OPP as OUTPUT
//
int x = 0;
while ( x < 8 ) {
pinMode(OPP[x], OUTPUT);
digitalWrite(OPP[x], LOW);
Serial.print("Pin Set Output > ");
Serial.println(OPP[x]);
x++;
}
//Set the pins in array IPP as INPUT_PULLUP
x = 0;
while ( x < 16 ) {
pinMode(INP[x], INPUT_PULLUP);
Serial.print("Pin Set INPUT_PULLUP > ");
Serial.println(INP[x]);
x++;
}
}
void loop() {
x = 0;
//Loop through Output Pins 1-8
while ( x < 8 ) {
digitalWrite(OPP[x], LOW);
Serial.print("Pin Set Output > ");
Serial.println(OPP[x]);
y = 0;
while ( y < 16 ) {
// Loop through the input pins 1-16
// If an input pin is Low ( Pressed )
if (digitalRead(INP[y]) == 0 )
{
// Print the X + Y values to the serial monitor
Serial.print("X=");
Serial.print(x);
Serial.print(" Y=");
Serial.print(y);
Serial.print(" Status ");
Serial.println(digitalRead(INP[y]));
delay(2000);
}
//Increment Y
y++;
}
//delay(1000);
digitalWrite(OPP[x], HIGH);
// Increment X
x++;
}
}
Recent Comments