MIDI file as performance

Here are some more details about how I went about producing the piano pieces included here.

I begin the job with the piano score as written by the composer, transcribed as a list of piano note events, in what is called a MIDI file. What follows is the first part of the MIDI file for the Sonata K87 by Scarlatti (which can be found at various places on the internet), displayed here as text:

   1 1       Meter 3 4
   1 1       Tempo 90 bpm
   1 1     F#3  80  0 1
   1 1     B2   80  1 0
   1 1 480 D3   80  0 2
   1 2     G3   80  0 0 480
   1 2 480 F#3  80  0 0 480
   1 2 480 A2   80  0 0 480
   1 3     B3   80  0 2
   1 3     G2   80  0 1
   1 3 480 E3   80  0 0 480
   1 3 480 C#3  80  0 0 480
   ...

To translate: The meter is first set to 3/4 (three quarter notes per bar), and the tempo is set to 90 beats (or quarter notes) per minute. Everything after this has to do with the piano notes. At beat 1 of bar 1, two notes are struck at the same time: an F sharp and a B. The number after the F# indicates the octave, so F#3 is one octave higher than F#2. The next column indicates the velocity of the note, that is, how hard the note is to be struck on a scale from 0 to 127. All the notes in this file have been given a fixed velocity of 80 (fine for an organ or a harpsichord, Scarlatti's original instrument), but usually there is much more variability. The final numbers indicate how long the note is to be held: the F#3 is to be held for zero bars and one beat, and the B2 is to be held for one bar and zero beats (so three beats in all). The next note, a D3, which has a duration of two beats, is struck halfway between the first and second beats of bar 1. (Conceptually, a beat here is divided into 960 ticks, and the 480 here indicates the midway point.) The next note, the G3 struck at bar 1 beat 2, is held for 480 ticks, or one half of a beat. (That is, this G3 is an eighth note.)

If a computer is asked to play this MIDI file on a synthesized piano, the performance will have all the right notes at the right places, but sound very flat and rigid. First of all, the notes are all struck with the same velocity. But more importantly, with a fixed tempo, all the notes start and stop like clockwork, with no variation at all. Each bar, for example, will end at precisely 2k seconds from the beginning of the piece, where k is the number of the bar. (90 bpm in 3/4 time means 30 bars per minute, and so exactly 2 seconds per bar.) Call this MIDI file the "quantized" performance.

My job in interpreting a piece like this is to breathe some life into it. I use a program called a MIDI sequencer which displays a MIDI file graphically and allows each note event to be edited. I start with the quantized performance as above, but when I am done, I have produced a new MIDI file that is similar to the original, but with a very large number of small variations. A computer can then play the new MIDI file, and if I have done my job well, it will be much more interesting to listen to.

Here is what the first bar of my version (track 4 of the collection) ended up looking like:

   1 1       Meter 3 4
   1 1       Tempo 40 bpm
   1 1     F#3  52  0 1
   1 1     B2   31  1 0
   1 1 480   Tempo 49 bpm
   1 1 480 D3   33  0 2
   1 2       Tempo 71 bpm
   1 2     G3   52  0 0 480
   1 2       Tempo 70 bpm
   1 2 480 F#3  56  0 0 480
   1 2 480 A2   36  0 0 480
   1 3       Tempo 63 bpm
   1 3     B3   64  0 2
   1 3     G2   41  0 1
   1 3 480   Tempo 59 bpm
   1 3 480 E3   18  0 0 480
   1 3 480 C#3  19  0 0 480
   ...
(You can find the text for my version of the entire sonata as an example file in the MVT package here.) Two things to notice. First, the velocities of the notes have changed. This is because I wanted to emphasize some of the notes and deemphasize others. (Some will emerge as the main melody, some as harmony, and some as a distant accompaniment.) Second, although all the notes are struck at the same song position as in the quantized performance (for example, the G2 at bar 1, beat 3) and for the same duration as before (exactly 1 beat), the actual starting and stopping times of the notes is quite different because I am constantly changing the tempo. (I could have achieved the same effect by leaving the tempo unchanged at 90bpm and moving the starts and ends of the notes themselves to somewhere in the 960 positions between beats, but it was more convenient to adjust the tempos instead.)

All that is left is for a computer to convert the resulting MIDI file to a sound file using a synthesized piano. I use one called the Pianoteq Stage module. To my ears, it has an excellent sound, not necessarily indistinguishable from a recording of a real piano, but good enough that you can end up concentrating on the music, not on the sound.

So this is how I "performed" the piano pieces included here. In the end, every performance of every piece of piano music reduces to a series of decisions about what notes to play, when, how hard, and for how long (pedals aside). My way of making those decisions on a computer is painstaking, to say the least, compared to making them in real time, fingers on a piano keyboard. I think it has more in common with building a ship inside a bottle than jamming with the lads at the local pub! If I could have played a piano well enough to get the interpretations I wanted, I certainly would have.

Return to the main text.