Post by JohnG on Oct 27, 2015 17:21:07 GMT
Article 2. Understanding MIDI.
Welcome to the second of a series of articles on techie topics phrased in a way that novices can understand. Those with a deep technical knowledge may criticise them as an oversimplification, but that's the purpose, in order for those new to the subject to 'get a feeling' of what it's all about. i.e. clarity before precision (to quote a former colleague).
The purpose of this first article is to understand what a MIDI file is. Then I’ll go on to explain wav and mp3 files later. Suggestions for future articles are welcome. e.g. MIDI data, sysex, GS, XG.
1.MIDI
So what is a MIDI file (filename.mid) you may well ask? Put as simply as I can, it is a series of instructions that an electronic keyboard, sound module or computer can understand.
The file contains a series of messages that conform to the MIDI standard.
When one of these devices follows the sequence of instructions in the file it will perform the music using its inbuilt 'voices'. By a “voice” I mean e.g. piano, guitar, trumpet, flute, drums or sound effect etc. that is (or can be) stored within the instrument. So I'll hear music just like a piano with a piano roll player or, more simply, like a music box, except possibly with lots of 'voices' simultaneously.
Let me paint a little scenario. A musician sits down at a piano keyboard. In front of him/her he places a 'piece of music'. He plays the music on the piano and it sounds good. I ask him how did you know which keys to press and he explains that the dots and their different shapes tell him which keys to press and for how long. There are other things on the sheet that explain how loud, how fast, and whether he should be playing black instead of white notes. It’ll also frequently tell him when to get louder or softer, faster or slower and so on.
Some time later I hear him play the same piece but this time on a church organ. It sounds the same but completely different. (Eh!) When I look he's using the same piece of music. So the notes that are being played are the same it’s just the sounds that are different. A little later he invites me over to listen to his 'keyboard' at home. (He's worked out that I'm very interested but completely stupid when it comes to music.) He plays the piece in several different ways and in between each repetition does some obviously very clever things with buttons and switches that change the sound coming out of the electronic keyboard instrument.
Then he presses a button, stands up and walks away from the instrument. Blow me if it doesn't play all that he did, exactly as he did, with all the different instrument sounds playing together, drums, piano, guitar, bass and so on. It even sounds as if he's playing in a large hall. Inevitably I ask him "how?"
"Well the keyboard has something called a sequencer inside it. This sequencer takes all the information I put into it like the voice, for example piano, effects like reverberation, and each note I play, loud or soft etc., and it stores all this information in its memory".
"If I buy a keyboard can I play that music?" I ask. He puts a floppy disk into a slot in his keyboard, presses a button, types in some characters, there's a whirring sound which stops after a few seconds, he takes the floppy out and gives it to me and tells me that all he did is now stored on it in MIDI format. He tells me too that it won't necessarily sound exactly the same, unless I buy the same keyboard as he has, but there will definitely be drums, piano, guitar etc. all played in exactly the same way, probably sounding as though it was played in a large hall.
"Ah! So you've converted the sheet music exactly the way you played it into computer data?" I ask. "Yep! But with all the voice information and effects too."
"So may I just check my understanding with you?" - "Uh Huh."
Q. A MIDI file records all of the notes you play into your keyboard exactly as you play them, not necessarily how they're written on the music sheet?
A. Yes, all your mistakes are faithfully recorded but, and it's a big BUT, you can go back and change them, if they're wrong, just as you can when you make a spelling mistake in a word processed document.
Q. Can I make big changes too?
A. If you want to change the instrumentation, the key it's played in, add another instrumental part, even the whole interpretation. It can all be done. How much depends, to a large extent, upon the capabilities of the keyboard or the computer software you're using and, of course, your knowledge.
Q. It can record other things too?
A. You can tell the sequencer what key you're playing in say "C major". What rhythm for example waltz time 3:4, the song title, what effects to use, for example reverberation, and how much reverb to use for each track. Loads of other things too, even the song lyrics can be typed in.
Q. Sorry, what's a track?
A. Think of a MIDI file as being a bit like a multi-track tape recorder where you can record a different musical instrument or person’s voice on a separate track then mix all the tracks together at different levels to make the final recording. A MIDI file allows you to do the same, so each track has the instrument type, note data, effects etc. for a different instrument. As a minimum, these days there will be 16 tracks, one of which (track 10) is almost always the drum track.
Q. Can I record a real instrument like a trumpet with the MIDI data?
A. No. Not within a standard MIDI file. But there are other file formats that allow a pointer to another kind of file that could have been recorded at the same time via a microphone. The trumpet sound is captured separately and held (digitally) in a file called a wave file (filename.wav). More of this later.
Q. So there is no sound recorded within a MIDI file?
A. No, just a series of instructions (data) telling the instrument what and how to play.
Q. Is there anything else I should know about MIDI.
A. Yea! Lots! But as a beginner probably just the following
1. MIDI stands for Musical Instrument Digital Interface.
2. There is an organisation called the MIDI Manufacturers Association, the MMA, and together with the MIDI Standards Committee they set rules for MIDI.
3. MIDI not only defines the format of a MIDI file but also the messages that go inside it and the electrical plug and socket as well as the electronics that allow us to connect our instruments and computers together.
Perhaps more on this subject later.
The next article will look at wave (.wav) files, what they contain and how they're different from a MIDI file.
© John L. Garside, 2007.
Welcome to the second of a series of articles on techie topics phrased in a way that novices can understand. Those with a deep technical knowledge may criticise them as an oversimplification, but that's the purpose, in order for those new to the subject to 'get a feeling' of what it's all about. i.e. clarity before precision (to quote a former colleague).
The purpose of this first article is to understand what a MIDI file is. Then I’ll go on to explain wav and mp3 files later. Suggestions for future articles are welcome. e.g. MIDI data, sysex, GS, XG.
1.MIDI
So what is a MIDI file (filename.mid) you may well ask? Put as simply as I can, it is a series of instructions that an electronic keyboard, sound module or computer can understand.
The file contains a series of messages that conform to the MIDI standard.
When one of these devices follows the sequence of instructions in the file it will perform the music using its inbuilt 'voices'. By a “voice” I mean e.g. piano, guitar, trumpet, flute, drums or sound effect etc. that is (or can be) stored within the instrument. So I'll hear music just like a piano with a piano roll player or, more simply, like a music box, except possibly with lots of 'voices' simultaneously.
Let me paint a little scenario. A musician sits down at a piano keyboard. In front of him/her he places a 'piece of music'. He plays the music on the piano and it sounds good. I ask him how did you know which keys to press and he explains that the dots and their different shapes tell him which keys to press and for how long. There are other things on the sheet that explain how loud, how fast, and whether he should be playing black instead of white notes. It’ll also frequently tell him when to get louder or softer, faster or slower and so on.
Some time later I hear him play the same piece but this time on a church organ. It sounds the same but completely different. (Eh!) When I look he's using the same piece of music. So the notes that are being played are the same it’s just the sounds that are different. A little later he invites me over to listen to his 'keyboard' at home. (He's worked out that I'm very interested but completely stupid when it comes to music.) He plays the piece in several different ways and in between each repetition does some obviously very clever things with buttons and switches that change the sound coming out of the electronic keyboard instrument.
Then he presses a button, stands up and walks away from the instrument. Blow me if it doesn't play all that he did, exactly as he did, with all the different instrument sounds playing together, drums, piano, guitar, bass and so on. It even sounds as if he's playing in a large hall. Inevitably I ask him "how?"
"Well the keyboard has something called a sequencer inside it. This sequencer takes all the information I put into it like the voice, for example piano, effects like reverberation, and each note I play, loud or soft etc., and it stores all this information in its memory".
"If I buy a keyboard can I play that music?" I ask. He puts a floppy disk into a slot in his keyboard, presses a button, types in some characters, there's a whirring sound which stops after a few seconds, he takes the floppy out and gives it to me and tells me that all he did is now stored on it in MIDI format. He tells me too that it won't necessarily sound exactly the same, unless I buy the same keyboard as he has, but there will definitely be drums, piano, guitar etc. all played in exactly the same way, probably sounding as though it was played in a large hall.
"Ah! So you've converted the sheet music exactly the way you played it into computer data?" I ask. "Yep! But with all the voice information and effects too."
"So may I just check my understanding with you?" - "Uh Huh."
Q. A MIDI file records all of the notes you play into your keyboard exactly as you play them, not necessarily how they're written on the music sheet?
A. Yes, all your mistakes are faithfully recorded but, and it's a big BUT, you can go back and change them, if they're wrong, just as you can when you make a spelling mistake in a word processed document.
Q. Can I make big changes too?
A. If you want to change the instrumentation, the key it's played in, add another instrumental part, even the whole interpretation. It can all be done. How much depends, to a large extent, upon the capabilities of the keyboard or the computer software you're using and, of course, your knowledge.
Q. It can record other things too?
A. You can tell the sequencer what key you're playing in say "C major". What rhythm for example waltz time 3:4, the song title, what effects to use, for example reverberation, and how much reverb to use for each track. Loads of other things too, even the song lyrics can be typed in.
Q. Sorry, what's a track?
A. Think of a MIDI file as being a bit like a multi-track tape recorder where you can record a different musical instrument or person’s voice on a separate track then mix all the tracks together at different levels to make the final recording. A MIDI file allows you to do the same, so each track has the instrument type, note data, effects etc. for a different instrument. As a minimum, these days there will be 16 tracks, one of which (track 10) is almost always the drum track.
Q. Can I record a real instrument like a trumpet with the MIDI data?
A. No. Not within a standard MIDI file. But there are other file formats that allow a pointer to another kind of file that could have been recorded at the same time via a microphone. The trumpet sound is captured separately and held (digitally) in a file called a wave file (filename.wav). More of this later.
Q. So there is no sound recorded within a MIDI file?
A. No, just a series of instructions (data) telling the instrument what and how to play.
Q. Is there anything else I should know about MIDI.
A. Yea! Lots! But as a beginner probably just the following
1. MIDI stands for Musical Instrument Digital Interface.
2. There is an organisation called the MIDI Manufacturers Association, the MMA, and together with the MIDI Standards Committee they set rules for MIDI.
3. MIDI not only defines the format of a MIDI file but also the messages that go inside it and the electrical plug and socket as well as the electronics that allow us to connect our instruments and computers together.
Perhaps more on this subject later.
The next article will look at wave (.wav) files, what they contain and how they're different from a MIDI file.
© John L. Garside, 2007.