Git Product home page Git Product logo

keyboardscanner's Introduction

Daniel Moura

linkedin Gmail Badge

Senior Technical Software Manager at CESAR

keyboardscanner's People

Contributors

oxesoft avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

keyboardscanner's Issues

It's just not working

Hi am using a Roland juno di keybed and a mega but Im Not getting anything out.. neither on the serial monitor or the midi. idk what am doing wrong. Please help

Notas midi involuntárias

Boa noite.
Reproduzi esse projeto e todas as teclas estão funcionando com seus respectivos midi mas tem um problema.
Sempre que coloco um acorde de Sol MAIOR (T, 3ª e 5ª) meu teclado fica enviando notas midi involuntárias.
E a nota involuntária sempre é a de Dó sustenido.
Você tem ideia do que pode ser?
Desde já agradeço por sua atenção.

Esse é o código que estou usando:

#include <DIO2.h> // install the library DIO2
#define KEYS_NUMBER 61
#define KEY_OFF 0
#define KEY_START 1
#define KEY_ON 2
#define KEY_RELEASED 3

#define PEDAL_SUS 21

//POTENCIOMETROS
const int N_POTS = 3; //* número total de pots (slide e rotativo)
const int POT_ARDUINO_PIN[N_POTS] = {A0, A1, A2}; //* pinos de cada pot conectado diretamente ao Arduino
int potCState[N_POTS] = {0}; // estado atual da porta analogica
int potPState[N_POTS] = {0}; // estado previo da porta analogica
int potVar = 0; // variacao entre o valor do estado previo e o atual da porta analogica
int midiCState[N_POTS] = {0}; // Estado atual do valor midi
int midiPState[N_POTS] = {0}; // Estado anterior do valor midi
const int TIMEOUT = 300; //* quantidade de tempo em que o potenciometro sera lido apos ultrapassar o varThreshold
const int varThreshold = 100; //* threshold para a variacao no sinal do potenciometro
boolean potMoving = true; // se o potenciometro esta se movendo
unsigned long PTime[N_POTS] = {0}; // tempo armazenado anteriormente
unsigned long timer[N_POTS] = {0}; // armazena o tempo que passou desde que o timer foi zerado
boolean pit =false;
boolean mod=false;

byte cc = 1; //* O mais baixo MIDI CC a ser usado
void potentiometers() {

/* //Debug somente
for (int i = 0; i < N_POTS; i++) {
//Serial.print(potCState[i]); Serial.print(" ");
Serial.print(midiCState[i]); Serial.print(" ");
}
Serial.println();
*/

for (int i = 0; i < N_POTS; i++) { // Faz o loop de todos os potenciômetros

potCState[i] = analogRead(POT_ARDUINO_PIN[i]);

if(i==0){
midiCState[i] = map(potCState[i], 450, 880, 0, 127); // Mapeia a leitura do potCState para um valor utilizável em midi
}
if(i==1){
midiCState[i] = map(potCState[i], 215, 795, 0, 127);  
}
if(i==2){ 
midiCState[i] = map(potCState[i], 0, 1023, 0, 127); 
}

potVar = abs(potCState[i] - potPState[i]); // Calcula o valor absoluto entre a diferença entre o estado atual e o anterior do pot

if (potVar > varThreshold) { // Abre o portão se a variação do potenciômetro for maior que o limite (varThreshold)
  PTime[i] = millis(); // Armazena o tempo anterior
}

timer[i] = millis() - PTime[i]; // Reseta o timer 11000 - 11000 = 0ms

if (timer[i] < TIMEOUT) { // Se o timer for menor que o tempo máximo permitido, significa que o potenciômetro ainda está se movendo
  potMoving = true;
}
else {
  potMoving = false;
}

if (potMoving == true) { // Se o potenciômetro ainda estiver em movimento, envie control change
  if (midiPState[i] != midiCState[i]) {
     if(i==0){// reservado para modulation wheel  
     send_midi_eventcc(0xB0, cc+ i, midiCState[i]);
     mod=false;
     }
     if(i==1){//reservado para pitchbend
     send_midi_eventcc(0xE0, cc+ i, midiCState[i]);
     pit=false;
     }
     if(i==2){
      
     send_midi_eventcc(0xB0, 7, midiCState[i]); 
     }
    potPState[i] = potCState[i]; // Armazena a leitura atual do potenciômetro para comparar com a próxima
    midiPState[i] = midiCState[i];
  }
}
if(potMoving==false){
  if(midiCState[1]>55  && midiCState[1]<66 && pit==false){
  midiCState[1]=64;
  send_midi_eventcc(0xE0, 1, midiCState[1]);
  pit=true;
}
if(midiCState[0]<10 && mod ==false){
  midiCState[0]=0;
  send_midi_eventcc(0xB0, 1, midiCState[0]);
  mod=true;
}
}    

}
}

#define MIN_TIME_MS 3000
#define MAX_TIME_MS 30000
//20000 até 80000 entre foi melhor até agora3000 40000
#define MAX_TIME_MS_N (MAX_TIME_MS - MIN_TIME_MS)

//find out the pins using a multimeter, starting from the first key
//see the picture key_scheme.png to understand how to map the inputs and outputs

//the following configuration is specific for PSR530
//thanks Leandro Meucchi, from Argentina, by the PDF
//take a look at the scheme detailed in PSR530.pdf and modify the following mapping according to the wiring of your keyboard
//===============================================================================================================================================
//===============================================================================================================================================

//Grupo de 6 teclas/notas - 2 pinos por tecla, sendo um para tom e outro para velocity

#define PIN_A1 44 //44 //6
#define PIN_A2 42 //42 //6

#define PIN_A3 40 //40 //4
#define PIN_A4 38 //38 //4

#define PIN_A5 36 //36 //2
#define PIN_A6 34 //34 //2

#define PIN_A7 32 //32 //3
#define PIN_A8 30 //30 //3

#define PIN_A9 28 //28 //1
#define PIN_A10 26 //26 //1

#define PIN_A11 24 //24 //5
#define PIN_A12 22 //22 //5

//===============================================================================================================================================
//===============================================================================================================================================

//Grupo de 6 fios/pinos, onde a cada 1 pino é responsável por uma oitava
#define PIN_B1 35
#define PIN_B2 33

#define PIN_B3 31
#define PIN_B4 29

#define PIN_B5 27
#define PIN_B6 25

#define PIN_B7 23

#define PIN_C1 45 //Essa desativei pois no esquema elétrico do meu teclado não precisou
#define PIN_C2 43

#define PIN_C3 41
#define PIN_C4 39

#define PIN_C5 37

byte output_pins [] = {
PIN_B7, //C0
PIN_B7,

PIN_B6,
PIN_B6,
PIN_B6,
PIN_B6,
PIN_B6,
PIN_B6,
PIN_B6,
PIN_B6,
PIN_B6,
PIN_B6,
PIN_B6,
PIN_B6,

PIN_B5,
PIN_B5,
PIN_B5,
PIN_B5,
PIN_B5,
PIN_B5,
PIN_B5,
PIN_B5,
PIN_B5,
PIN_B5,
PIN_B5, //C1
PIN_B5,

PIN_B4,
PIN_B4,
PIN_B4,
PIN_B4,
PIN_B4,
PIN_B4,
PIN_B4,
PIN_B4,
PIN_B4,
PIN_B4,
PIN_B4,
PIN_B4,
 
PIN_B3, //
PIN_B3, //
PIN_B3, //
PIN_B3, //
PIN_B3, //
PIN_B3, //
PIN_B3, //
PIN_B3, //
PIN_B3, //
PIN_B3, //
PIN_B3, //C
PIN_B3, //C

PIN_B2, //C#
PIN_B2, //C#
PIN_B2, //D
PIN_B2, //D
PIN_B2, //D#
PIN_B2, //D#
PIN_B2, //E
PIN_B2, //E
PIN_B2, //F
PIN_B2, //F
PIN_B2, //F#
PIN_B2, //F#

PIN_B1, //G
PIN_B1, //G
PIN_B1, //G#
PIN_B1, //G#
PIN_B1, //A
PIN_B1, //A
PIN_B1, //A#
PIN_B1, //A#
PIN_B1, //B
PIN_B1, //B

// PIN_B1,
// PIN_B1,
// PIN_B1,
// PIN_B1,
// PIN_B1,
// PIN_B1,

// PIN_C1,
// PIN_C1,
// PIN_C1,
// PIN_C1,

PIN_C1, //C5
PIN_C1, //C5

PIN_C2, //C#5
PIN_C2, //C#5
PIN_C2, //D5
PIN_C2, //D5 
PIN_C2, //D#5
PIN_C2, //D#5
PIN_C2, //E5
PIN_C2, //E5
PIN_C2, //F5
PIN_C2, //F5
PIN_C2, //F#5
PIN_C2, //F#5

PIN_C3, //G5
PIN_C3, //G5
PIN_C3, //G#5
PIN_C3, //G#5
PIN_C3, //A5
PIN_C3, //A5
PIN_C3, //A#5
PIN_C3, //A#5
PIN_C3, //B5 
PIN_C3, //B5
PIN_C3, //C76  
PIN_C3, //C76

PIN_C4, //C#6
PIN_C4, //C#6
PIN_C4, //D6
PIN_C4, //D6 
PIN_C4, //D#6
PIN_C4, //D#6
PIN_C4, //E6
PIN_C4, //E6
PIN_C4, //F6
PIN_C4, //F6
PIN_C4, //F#6
PIN_C4, //F#6

PIN_C5, //G6
PIN_C5, //G6
PIN_C5, //G#6 
PIN_C5, //G#6
PIN_C5, //A6 93
PIN_C5, //A6
PIN_C5, //A#6 94
PIN_C5, //A#6
PIN_C5, //B6  95
PIN_C5, //B6 
PIN_C5, //C7  96 
PIN_C5  //C7

};
byte input_pins [] = {

//***************************************************************************************************************************************
//1º / 12º grupo de 1 tecla/nota - // #define PIN_B ??????????
PIN_A6, //C - 36
PIN_A5, //C

//***************************************************************************************************************************************
//2º / 11º grupo de 6 teclas/notas - // #define PIN_B ????????
PIN_A7, //C#2 - 37
PIN_A8, //C#2

PIN_A10,   //D2  - 38
PIN_A9,    //D2

PIN_A11,   //D#2 - 39
PIN_A12,   //D#2

PIN_A2,    //E2  - 40
PIN_A1,    //E2

PIN_A3,    //F2  - 41
PIN_A4,    //F2

PIN_A6,    //F#2 - 42
PIN_A5,    //F#2

//***************************************************************************************************************************************
//3º / 10º grupo de 6 teclas/notas - // #define PIN_B ????????
PIN_A7, //G2 - 43
PIN_A8, //G2

PIN_A10,   //Ab2 - 44
PIN_A9,    //Ab2

PIN_A11,   //A2  - 45
PIN_A12,   //A2

PIN_A2,    //Bb2 - 46
PIN_A1,    //Bb2

PIN_A3,    //B2  - 47
PIN_A4,    //B2

PIN_A6,    //C3  - 48
PIN_A5,    //C3

//***************************************************************************************************************************************
//4º / 9º grupo de 6 teclas/notas - // #define PIN_B ????????
PIN_A7, //C#3 - 49
PIN_A8, //C#3

PIN_A10,   //D3  - 50
PIN_A9,    //D3

PIN_A11,   //D#3 - 51
PIN_A12,   //D#3

PIN_A2,    //E3  - 52
PIN_A1,    //E3

PIN_A3,    //F3  - 53
PIN_A4,    //F3

PIN_A6,    //F#3 - 54
PIN_A5,    //F#3

//***************************************************************************************************************************************
//5º / 8º grupo de 6 teclas/notas - // #define PIN_B ????????
PIN_A7, //G3 - 55
PIN_A8, //G3

PIN_A10,   //Ab3 - 56
PIN_A9,    //Ab3

PIN_A11,   //A3  - 57
PIN_A12,   //A3

PIN_A2,    //Bb3 - 58
PIN_A1,    //Bb3

PIN_A3,    //B3  - 59
PIN_A4,    //B3

PIN_A6,    //C4  - 60
PIN_A5,    //C4

//***************************************************************************************************************************************
//6º / 7º grupo de 6 teclas/notas - // #define PIN_B ????????
PIN_A7, //C#4 - 61
PIN_A8, //C#4

PIN_A10,   //D4  - 62
PIN_A9,    //D4

PIN_A11,   //D#4 - 63
PIN_A12,   //D#4

PIN_A2,    //E54  - 64
PIN_A1,    //E54

PIN_A3,    //F54  - 65
PIN_A4,    //F54

PIN_A6,    //F#4 - 66
PIN_A5,    //F#4

//***************************************************************************************************************************************
//7º / 6º grupo de 5 teclas/notas - // #define PIN_B ????????
PIN_A7, //G4 - 67
PIN_A8, //G4

PIN_A10,   //Ab4 - 68
PIN_A9,    //Ab4

PIN_A11,   //A4  - 69
PIN_A12,   //A4

PIN_A2,    //Bb4 - 70       Faltam a 70 e 71
PIN_A1,    //Bb4

PIN_A3,    //B4  - 71       Faltam a 70 e 71
PIN_A4,    //B4

/=================================== Ref. aos pinos: PIN_C1, PIN_C2, PIN_C3... ==================================================/
//***************************************************************************************************************************************
//8º / 5º grupo de 1 tecla/nota - // #define PIN_C1 // OBS: Somente uma tecla
PIN_A6, //C5 - 72
PIN_A5, //C5

//****************************************************************************************************************************************
//9º / 4º grupo de 6 teclas/notas - // #define PIN_C2
PIN_A7, //C#5 - 73
PIN_A8, //C#5

PIN_A10,   //D5  - 74
PIN_A9,    //D5

PIN_A11,   //D#5 - 75
PIN_A12,   //D#5

PIN_A2,    //E5  - 76
PIN_A1,    //E5

PIN_A3,    //F5  - 77
PIN_A4,    //F5

PIN_A6,    //F#5 - 78
PIN_A5,    //F#5

//****************************************************************************************************************************************
//10º / 3º grupo de 6 teclas/notas - // #define PIN_C3
PIN_A7, //G5 - 79
PIN_A8, //G5

PIN_A10,   //Ab5 - 80
PIN_A9,    //Ab5

PIN_A11,   //A5  - 81
PIN_A12,   //A5

PIN_A2,    //Bb5 - 82
PIN_A1,    //Bb5

PIN_A3,    //B5  - 83
PIN_A4,    //B5

PIN_A6,    //C6  - 84
PIN_A5,    //C6

//****************************************************************************************************************************************
//11º / 2º grupo de 6 teclas/notas - // #define PIN_C4
PIN_A7, //C#6 - 85
PIN_A8, //C#6

PIN_A10,   //D6  - 86
PIN_A9,    //D6

PIN_A11,   //D#6 - 87
PIN_A12,   //D#6

PIN_A2,    //E6  - 88
PIN_A1,    //E6

PIN_A3,    //F6  - 89
PIN_A4,    //F6

PIN_A6,    //F#6 - 90
PIN_A5,    //F#6

//****************************************************************************************************************************************
//12º / 1º grupo de 6 teclas/notas - // #define PIN_C5
PIN_A7, //G6 - 91
PIN_A8, //G6

PIN_A10,   //Ab6 - 92
PIN_A9,    //Ab6

PIN_A11,   //A6  - 93
PIN_A12,   //A6

PIN_A2,    //Bb6 - 94
PIN_A1,    //Bb6

PIN_A3,    //B6  - 95
PIN_A4,    //B6

PIN_A6,    //C7  - 96
PIN_A5     //C7

//***************************************************************************************************************************************
/=================================== Ref. aos pinos: PIN_C1, PIN_C2, PIN_C3... ==================================================/

};

// teclados baratos geralmente têm as teclas pretas mais suaves ou mais duras do que as brancas
// descomente a próxima linha para permitir uma correção suave
// #define BLACK_KEYS_CORRECTION

#ifdef BLACK_KEYS_CORRECTION
#define MULTIPLIER 192 // 127 is the central value (corresponding to 1.0)
byte black_keys[] = {
0,1,0,1,0,0,1,0,1,0,1,0,
0,1,0,1,0,0,1,0,1,0,1,0,
0,1,0,1,0,0,1,0,1,0,1,0,
0,1,0,1,0,0,1,0,1,0,1,0,
0,1,0,1,0,0,1,0,1,0,1,0,
0
};
#endif

//uncomment the next line to inspect the number of scans per seconds
//#define DEBUG_SCANS_PER_SECOND

/*
426 cyles per second (2,35ms per cycle) using standard digitalWrite/digitalRead
896 cyles per second (1,11ms per cycle) using DIO2 digitalWrite2/digitalRead2
*/

//uncoment the next line to get text midi message at output
//#define DEBUG_MIDI_MESSAGE

byte keys_state[KEYS_NUMBER];
unsigned long keys_time[KEYS_NUMBER];
boolean signals[KEYS_NUMBER * 2];
boolean pedal_enabled;
boolean is_sus;

void setup() {

Serial.begin(115200);
int i;
for (i = 0; i < KEYS_NUMBER; i++)
{
keys_state[i] = KEY_OFF;
keys_time[i] = 0;
}
for (byte pin = 0; pin < sizeof(output_pins); pin++)
{
pinMode(output_pins[pin], OUTPUT);
}
for (byte pin = 0; pin < sizeof(input_pins); pin++)
{
pinMode(input_pins[pin], INPUT_PULLUP);
}
pinMode(PEDAL_SUS, INPUT_PULLUP);
is_sus = false;
}

void send_midi_event(byte status_byte, byte key_index, unsigned long time)
{
unsigned long t = time;

#ifdef BLACK_KEYS_CORRECTION
if (black_keys[key_index])
{
t = (t * MULTIPLIER) >> 7;
}
#endif
if (t > MAX_TIME_MS)
t = MAX_TIME_MS;
if (t < MIN_TIME_MS)
t = MIN_TIME_MS;
t -= MIN_TIME_MS;

//unsigned long velocity = 127 - (t * 127 / MAX_TIME_MS_N);
//byte vel = (((velocity * velocity) >> 7) * velocity) >> 7;
byte vel = 127 - map(t, 0, MAX_TIME_MS_N, 0, 90);
//byte vel = 127 - map(t, MIN_TIME_MS, MAX_TIME_MS, 1, 90);
//Serial.println(vel);
// 0 ou tempo minimo?
byte key = 36 + key_index;
#ifdef DEBUG_MIDI_MESSAGE
char out[32];
sprintf(out, "%02X %02X %03d %d", status_byte, key, vel, t);
Serial.println(out);
#else
Serial.write(status_byte);
Serial.write(key);
Serial.write(vel);
#endif
}
void send_midi_eventcc(byte status_byte, byte key_index, unsigned long time)
{
unsigned long t = time;
#ifdef DEBUG_MIDI_MESSAGE
char out[32];
sprintf(out, "%02X %02X %03d %d", status_byte, key_index, vel, t);
Serial.println(out);
#else
Serial.write(status_byte);
Serial.write(key_index);
Serial.write(t);
#endif
}

void loop() {
//
potentiometers();

byte a = digitalRead(PEDAL_SUS);
//Serial.println(a);
if(a == 0){
if(is_sus == true){
send_midi_eventcc(0xB0, 64, 127);
is_sus = false;
}
}
else{
if(is_sus == false){
send_midi_eventcc(0xB0, 64, 0);
is_sus = true;
}
}
#ifdef DEBUG_SCANS_PER_SECOND
static unsigned long cycles = 0;
static unsigned long start = 0;
static unsigned long current = 0;
cycles++;
current = millis();
if (current - start >= 1000)
{
Serial.println(cycles);
cycles = 0;
start = current;
}
#endif

boolean *s = signals;
for (byte i = 0; i < KEYS_NUMBER * 2; i++)
{
byte output_pin = output_pins[i];
byte input_pin = input_pins[i];
digitalWrite2(output_pin, LOW);
*(s++) = !digitalRead2(input_pin);
digitalWrite2(output_pin, HIGH);
}

byte *state = keys_state;
unsigned long *ktime = keys_time;
boolean *signal = signals;
for (byte key = 0; key < KEYS_NUMBER; key++)
{
for (byte state_index = 0; state_index < 2; state_index++)
{
switch (*state)
{
case KEY_OFF:
if (state_index == 0 && *signal)
{
*state = KEY_START;
*ktime = micros();
}
break;
case KEY_START:
if (state_index == 0 && !*signal)
{
*state = KEY_OFF;
break;
}
if (state_index == 1 && *signal)
{
*state = KEY_ON;
unsigned long t= micros() - *ktime;
send_midi_event(0x90, key,t);
}
break;
case KEY_ON:
if (state_index == 1 && !*signal)
{
*state = KEY_RELEASED;
*ktime = micros();
}
break;
case KEY_RELEASED:
if (state_index == 0 && !*signal)
{
*state = KEY_OFF;
unsigned long t= micros() - *ktime;
send_midi_event(0x80, key,t);
}
break;
}
signal++;
}
state++;
ktime++;
}
}

Pls help me to add pitchbend and modulation wheel code

Hello,

your code is perfect and helped me to convert a velocity sensitive keyboard from an old casio ctk-691 to midi..The code is awesome and working 100%.
I want to add a pitch bend and a modulation wheel but i dont know the code to do that...
Please help me if you know..thanks in advance...

adicionar novas teclas

olá gostaria de saber como acrescentar botões ou potenciômetros no código para que possa vir a controlar outras funções

file missing?

Hi i think there is a file missing, i am getting the next error, could you help me? im extremely new to arduino. thanks in advance!

Arduino:1.8.9 (Windows 10), Tarjeta:"Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

In file included from C:\Users\Usuario\Desktop\keyboardscanner-master\keyboardscanner\keyboardscanner.ino:21:0:

C:\Users\Usuario\Documents\Arduino\libraries\DIO2-master\src/arduino2.h:42:27: fatal error: pins2_arduino.h: No such file or directory

compilation terminated.

exit status 1
Error compilando para la tarjeta Arduino/Genuino Mega or Mega 2560.

Sustain pedal

first of all thanks for this project, you saved a keyboard that roland refused to fix.
I can't afford a new keyboard and I'm very happy to finally be able to play again
many many many thanks!!!!

But i have some questions, i can't get sustain pedal to work properly,
i tried change the pin on the code and still no success.
the way it's supposed to work is only short the pedal pin with ground?

Also its possible to use some potentiometer and the pitch bend?
How can i add that to the code?

Im using arduino mega>hairless midi serial>loopMIDI>kontakt

Working with Logic Pro X

Hi there,

Thanks so much for your work on this project. I'm excited to be converting some E-mu Xboards.

I wondered what you need to do to get a Mac to recognise the Arduino as a midi device and to get it working with DAWs like Logic Pro X?

Any advice is greatly appreciated. Thanks!
~Finn

Using with a keyboard that has a different switch type?

I have an older electric piano and its keys use a switch that is like a single pole double throw (SPDT) configuration. Right now, I'm monitoring when the key closes the circuit that is normally open and getting note information that way. I'd like to add velocity since I have the 2 circuits. I'm just not sure how to monitor the states between the normally closed condition and the normally open position and the timing it takes to get there. Any ideas how I could modify this code to fit my situation? Thanks.

SPDT

Ligação dos fios no arduino

Ola Daniel, muito legal seu projeto.
Estou querendo fazer ele com um casio ctk 485 61 teclas que comprei com defeito. Porém não entendi como ligar o cabo das teclas no arduino.
Sou um iniciante na eletrônica, vi que seu código referencia algumas posições no arduino, mas não consegui me localizar.
O cabo do meu teclado possui 16 fios e o seu código mostra alguns a mais.
Outra coisa tenho um arduino mega 2560, posso usar esse mesmo?
Além dessas dúvidas não sei qual software devo instalar no computador para gerenciar os sons e tocar.

"byte output_pins[] = {
38,
40,
42,
44,
46,
23,
25,
27
};
byte input_pins[] = {
22, 24,
26, 28,
30, 32,
34, 36,
29, 31,
33, 35,
37, 39,
41, 43 "

Arduino nano

hi Man, can you give me more information?
i can use your sketch with an arduino nano?
The library DIO2.h runs on ATmega328P?
Do I have to insert pull up resistors? can I do without it or do you advise me to insert them, if yes, would you tell me how?
When everything is ready, do i need to use programs like loopMidi and Hairless-midi or is it ready like this?
Thanks in advance and forgive me for my not perfect english :)

Can I use this without the velocity?

I have a keyboard with 49 keys, and 15 wires, I've found the matrix and everything, but it seems there's no velocity, can I use this anyway? How?

Use the project with yamaha p35 keybed

Hi, i have a yamaha p35 with a broken motherboard and i want to use your project with this keybed.
It is a simple diode matrix but for 88 keys and not for 61, i have found the colums and rows but i never used and arduino so i don't know how to connect the wires to the pins and how to modify your code for 88 keys with velocity and pedal. I read about pull up resistors but i don't know if they are necessary in your scheme, i hope you could give me some advice. Thank you so much

diagram

Please draw a diagram of how you connected the keys and pedal to the arduino. Sorry, but I did not understand the description. Please help me figure it out.

use the project for roland em 20

hello .. i have a broken roland keyboard and i changed it to a midi controller .. i have found the input and output matrix from the keyboard then i programmed it but then i found the error
" In file included from C:\Users\Ahmad Dimyati\Documents\ Arduino\keyboardscanner2\keyboardscanner2.ino:21:0:
C:\Users\Ahmad Dimyati\Documents\Arduino\libraries\DIO2-master\src/arduino2.h:42:10: fatal error: pins2_arduino.h: No such file or directory
#include "pins2_arduino.h"
^~~~~~~~~~~~~~~~~~~
compilation terminated.
exit status 1
Error compiling for Arduino Mega or Mega 2560 board. " then I tried to use another library I was looking for in the library manager but it still doesn't work.. is there any other solution for that problem

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.