Hello all,
my name is Holger, located in Germany. Doing woodworking and electronics for hobby I'm combining both in building a crank organ that will be (beside of the traditional punched paper strip) controlled by MIDI.
Currently I'm building a controller, based on a MEGA with 4x20LCD and rot-encoder that reads a midi file from SD card and sends the timed events to a MIDI cable.
On the other end there will be a receiving controller based on UNO that interprets the incoming events and switched the valves to the 20 organ pipes accordingly. (Btw, the output driver will be a 32bit IIC port extender, 2x MCP23017, that's just under construction)
But step by step...
The controller is set up, LCD, encoder and SD working, I'm using the MD_MIDI lib by MajicDesigns.
Based on the included example MD_MIDIfile_play I'n debugging now.
Here comes a lack of knowledge of mine regarding midi: I do not quite understand the output in the serial monitor, that reads like this:
19:57:30.046 -> 3402 M T3: Ch 2 Data C0 37
19:57:30.046 -> 3404 M T3: Ch 2 Data B0 7 40
19:57:30.046 -> 3438 M T2: Ch 10 Data 80 26 40
19:57:30.093 -> 3439 M T2: Ch 10 Data 80 30 40
19:57:30.233 -> 3601 M T1: Ch 1 Data 90 24 7F
19:57:30.233 -> 3603 M T2: Ch 10 Data 90 26 3F
19:57:30.327 -> 3692 M T2: Ch 10 Data 80 26 40
19:57:30.467 -> 3855 M T1: Ch 1 Data 80 24 0
What I don't get in detail is the "T": As far as I understood the structure of a MIDI file (SMF), it consists of several tracks in sequence. In each track several events are described with their timing data and actions. But tracks are sequential on the file. So how comes that here appear events of track T3 followerd by such of T2 and T1, that are earlier in the file?
It can't be that the whole file is cached in the processor, is it? It is interpreted in a serial way...
Can anyone explain this to me, please? (I thing the Channels are more clear, one is e.g. for a drum, other for violine, next for a melody, is it? Sorry, I'm completely non-musician...)
Thanks so much for enlighting me...
Best regards and take care
Holger
(English or German, please.)