MIDI keyboards for producing music, what they are and how they work

The Boss

PC

MIDI keyboards for producing music, what they are and how they work

keyboards, MIDI, Music, producing, work

One of the most famous stages in electronics was the advent of the transistor radio, which completely eliminated old cabinet radios from the market. A process that occurred with the advent of MIDI keyboards in the early 1980s. Since it was no longer necessary to have a huge piano at home, these compact pianos based on pure, hard electronics could emulate any type of sound and make magic that they are not possible on a conventional piano.

It is one of the most exciting peripherals of all and almost three decades later it is still used to produce music, for which it continues to perform as it did on day one. But what is its internal architecture?

First of all, we are talking about a keyboard

MIDI keyboards note frequency

A MIDI keyboard, no matter how many keys it has, is treated as a keyboard’s name suggests, and if you’ll forgive us the truism it’s important because the MIDI standard assigns 128 different values. to each of the keys of the piano keyboard, which results in 11 octaves of 12 different notes. In which each octave gathers the following notes: C, C sharp, D, D sharp, E, F, F sharp, G, G sharp, A, the sharp and yes.

MIDI Keyboard Notes Table

The only exception to this rule is the eleventh octave where the G, G Sharp, A, A Sharp, and B notes are not included. At each octave, the frequency value of the different notes is doubled if we go up one octave and therefore to the right of the MIDI keyboard. In the event that we are going in the opposite direction then the frequency of each note is halved. In other words, the further to the left the keyboard, the lower the notes, and the further to the right, the higher the pitch.

How do MIDI keyboards pick up notes?

Multiplexer

The operation of a MIDI keyboard is similar to that of a keyboard, but with the difference that it has the ability to capture the pressure of multiple keys at the same time. This is called polyphony on a MIDI keyboard. This is essential, since in real life, you can sound several piano keys at the same time to generate musical chords.

Because each note has a value of 7 bits, playing multiple notes at the same time requires multiple input bits in the processor in charge of synthesizing the sound, this chip is the same type of chip that exists in sound cards. , but with the difference, they do not receive the playing notes of a program created by the CPU, but rather by the keys pressed by the users.

PSG sound chip

One trick to keeping costs down is to use a shift register, which is a type of memory that, when it receives new data, outputs the oldest data through its output port. Thus, the new data replaces the previous ones. In this way, the different notes played are stored in memory, but their data is transmitted one by one to the synthesizer, which interprets each of the notes according to the channel used.

The number of channels will depend on the sound chip used in the MIDI keyboard, as long as we hold down a key, the channel or voice corresponding to that key will remain active and will not be occupied by any other note unless we lift our finger. Moment when another wave that reaches it will take its place.

The importance of rhythm

Metronome

Since a MIDI keyboard communicates with other devices, either with its own speakers to generate music from the keyboard itself, or to a MIDI input, it must not only have the ability to transmit every note, but when each is played and the duration of the same.

On an alphanumeric keyboard, when we press a key, what we send is a signal of that key, so that if we hold down the “a” key, we will see “aaaaaa” written on the screen, which will be interpreted as several consecutive strikes, in music apart from the different notes, we also have the duration of each of the notes, which is the tempo or what we call the measure, that is to say the time that a quarter note lasts on the staff, deriving the rest of the notes from the moment of a quarter note.

Notes on duration

Thus an eighth note lasts half the period of a quarter note, a sixteenth note lasts half of an eighth note and therefore a quarter note, etc. There are also longer notes like the quarter note which lasts twice as long as the quarter note and even rests. Reality? The entire beat of a song is marked by the period that a quarter note lasts.

To count time, you have to know the difference between absolute time and relative time. When we talk about absolute time, we are talking about exact durations that we have agreed to communicate time between us, so we are not talking about seconds, minutes and hours. Relative time, on the other hand, is different and we can say that each piece of music has its own relative time, not only at the level of the score, but also at the level of the interpretation made by each musician.

Measuring time on MIDI keyboards

MIDI clock

MIDI keyboards can interpret time in two different ways, one relative and one absolute. When we talk about relative time, the MIDI keyboard sends a message lasting 24 times for the duration of each quarter note.

Relative time is also known as MIDI clock and was originally used for drum machines and sequencers. It has evolved to be integrated into all systems. Its existence allows you to do things like adjust the speed of loops, synchronize tracks and sequencers. It therefore allows you to synchronize multiple devices.

Absolute time, on the other hand, is marked by the SMPTE television standard, which I believe is used to synchronize music with images for television. Especially so that the melodies match the images. To date this is not used, as we have software that does this without the need for this system, but originally it was needed for live TV.

Leave a Comment