Main MIDI protocol Principle Pickup Frets and strings Power Analog part PIC16x74 COM-port MIDI-port Control and indications Algorithm of note detection |
MIDI protocolMIDI (Musical Instrument Digital Interface) protocol was developed in 80th years. Its main purpose is to provide transfer of control commands from MIDI-controller device (usually it is a keyboard like fortepiano or organ one) to synthesizer device, which generates sound that is to be amplified and played through loudspeakers. In devices commonly called "synthesizers" usually we can see, as a fact, all components mentioned above together: keyboard, synthesizer, amplifier and loudspeakers. But professional rack synthesizers look like a box and have nothing common in view with fortepiano. In this case the synthesizer has some MIDI controllers connected to it with MIDI cables - keyboards, MIDI-drums etc., as well as sequencers - devices for recording, processing and playback of MIDI command sequences. It is possible to find in Internet the following illustrations: Data are transferred in MIDI protocol in asyncronous serial form at rate of 31,250 bps. Commonly MIDI command is a 3-byte packet, therefore maximum data transfer rate is about 1000 commands per second. MIDI cable consists of two wires (+5 V and data) surrounded with grounded shield, data flow is unidirectional - from MIDI-OUT or MIDI-THRU output of transmitter device to MIDI-IN input of the receiver; it is allowed by standard to connect up to four inputs to one output in parallel. MIDI-THRU output simply duplicates MIDI-IN data of the device. Usually MIDI-OUT of keyboards has its own MIDI-commands mixed with MIDI-IN data; this approach allows to connect several keyboards to one synthesizer input "one thru another". Main MIDI commands are Note on and Note off. When musucian presses a key, a command is sent to synthesizer, and channel, pitch and velocity of the played note are encoded in the command. There are 16 logical MIDI channels, different parameters can be set for each channel independently, such as instrument, modulation, reverberation etc. Note pitch is encodede with integer number, 60 corresponds to Do (C) of the first octave. Velocity parameter affects loudness of the note as well as, on good synthesizers, the timbre. When musician releases the key, synthesizer receives the similar packet "channel-pitch-velocity". Many keyboards instead of Note off command send Note on with zero velocity. This trick allows to speed up data transfer by using 2-byte packets in place of 3-byte ones in Running status mode - sequential packets with the same status byte (the first byte) are transferred by 2nd and 3rd bytes, status byte is implied but not transferred, except heading packet which only has status byte. The main objective during MIDI-guitar development is to force it to send Note on and Note off commands correctly depending of guitarist's manipulations with strings. As is known, this task is complicated and it is not solved yet good enough in any known model of MIDI-guitar. |