Hello,
I'm looking for some kind of a different code for my Accordion MIDI Controller Project. The software that I bought and try to use, misses half of the notes when, I hook up the Sound Module to Accordion MIDI Output. When I changed this initialization statement:
for (X=1; x<=4; x++){
digital Write (LedPin, High ) };
delay (300);
with replacing this x<=8; instead of x <+4; I got already fewer deaf notes coming form the Sound Module. So there must be wrong line in that sketch that doesn't know how to keep all switches in proper sequence.
The Matrix that I built consist of 8 data lines (represented by pins:2,3,4,5,6,7,8 and 9) and 9 (nine output lines represented by pins: 10,11,12, 14, 15, 16, 17, 18 and 19). Led Pin 13 is used to send the messages, I guess.
Incoming data starts coming from the first sector of the Matrix Grid
Starting at Switch 0, by pressing F that is connected to Pin 2, then Switch 1 – F# to pin 3, Sw. 2 – G to pin 4, Sw 3- G# to pin 5, Sw 4 – A to pin 6, Sw. 5 - A to pin 7, Sw 6- A# to pin 6, Sw. 7 – B to pin 8, and Sw. 8 – C to pin 9,
from the second octave on the accordion keyboard. Then second sector of a grid starts at C#, D, D#, E, F, F#, G, G# and so on till the treble sides gets to switch 40 at pin 2 or A6 or 93 or 5D h.
Every switch has a note assigned to it from first F3 which is 53 or 35 h, and the whole sequence of keys chromatically go up to note A6 note Nr. 93, 59 all divided on sectors of eight or less with disregarding the placement of notes in octaves. This was a plan fro that Matrix.
The ideal Matrix would be be a grid separated by notes in every octave, making 4 +2 x 12 Matrix grid, but since this is not a case in this project, I have to go according to the plan that I purchased, but the sketch as a part of this plan doesn't work at all, since it looses too many notes in counting and sending signals to the Sound Module. It works in a sense that the sketch can be compiled and send and recorded in the EEProm.
I cannot write here a code of this program, since I feel that it belongs to the supplier and it's too long and is too complicated. In this situation, I'm grateful that the supplier released the code for me. Probably, he knew in advance that this would not work.
Don't tell me to look for connections, wiring mistakes, etc. All of that was checked and rechecked every step the wires were soldered, and after all the PC Board works but not the way it suppose to. Basically, it's dysfunctional. It's a shame, that such nice looking Arduino clone and the best instructions, you can find on internet doesn't work.
I'm looking for much simpler solution written in a simpler sketch.
that would send the desired note when I push the key, stop sending the signal when I release the key and at the same time count the notes and do not mix signals or make those notes deaf.
Is there any sketch that would answer my problem.
I'm looking for a sample of a code that is written for Arduino regardless for a Matrix or the MIDI grid structure. It could be for accordion, piano or the guitar.
.I want to see how other people with the same interest like me figured out counting of notes, and sending those notes to proper switches, play them by the Sound Module without loosing the signals from the pressed keys.
Any idea that could be tried or implemented is graciously welcome. Yesterday, I thought that I solved the problem of counting the notes, but today are at the same spot, resigned and ready to quit this adventure. I spend on it a few weeks of hard work, dreaming and thinking about it even while sleeping. No help from the supplier as yet.
Any idea? I do not know C/C++ programming. Just barely understand it when I started to use Arduino PC Board - clone for this project. I'm willing and ready to learn.
Best Regards,
AccVlad