Today we launched the STES weblog.
In the coming weeks we hope this will be a great resource for learning
about the event and the excellent group who will be leading our
sessions.12:42:27 AM |
|
I came across an interesting piece of software today called Cygnet. Writing using the Java Sound API it claims to be a way of enhacing live performance by accompanying musicians as they play. Although it can play an entire piece the idea is that it fills in for missing players (and it followers the performers tempo) or just makes a few people sound like a lot of people. 9:36:46 AM |
|
My thanks to David Knight for the explanation of multiple MIDI NOTE_ON events for the same note.
Which is simple enough until you start trying to convert MIDI into the musical score that it represents. In trying to convert MIDI events into notes I attempt to deduce the length of the note (e.g. a quarter note) from the number of ticks in which it is played. I guess I treat the 2nd NOTE_ON as an implicit NOTE_OFF for the first note. This makes sense I guess if you consider a piano where the same key is struck a 2nd time. But I wonder how it will sound. As an aside David also explains something else that isn't necessarily intuitive when you read about MIDI:
I had already had to deal with this issue when I found that there were no NOTE_OFF messages in the MIDI I was analysing. 9:42:41 AM |
|
If you start playing with Java MIDI and wonder why the hell your computer sounds like a cheap Casio organ then wonder no longer... go get the high quality sound bank. The difference is in sound quality is very pleasing. The default sound bank that ships with the JRE is about 480K for something like 300 instruments whilst the high quality sound bank is 4.92Mb and defines less than 200! 12:04:17 AM |
|
I've written a program using the Java MIDI system that attempts to analyse the contents of a music track and interpret it into notes played. The one technical part of this is understanding the concept of PPQN and how it relates to MIDI ticks. A tick in a MIDI file is a time-marker which is independent of actual time. All you can say is that tick 0 is at the start of the piece and that tick 1 comes after tick 0 and before tick 2. And so on. So how do you know when to play a note? This is related to the PPQN value which specifies, for the piece, how many pulses (known interchangably as ticks) make up one quarter note. So a PPQN value of 4 mean that 4 ticks make a quarter note. MIDI uses a system of events to specify how the music is played so that there is a NOTE_ON event which specifies on which tick a specific note is to begin playing and a NOTE_OFF event which specifies when it should stop, except when it doesn't. This is where things get grisly. A NOTE_ON event specifies which note is to be played along with something called a velocity. The velocity is a measure of how hard the note is struck (MIDI has a bit of a keyboard which I guess is reflected in that most synthesizers were keyboards). Velocity is certainly related to the amplitude (loudness) of the sound but also to the sound envelope. Anyway suffice to say I have discovered that instead of a NOTE_OFF event it is possible to receive a NOTE_ON event with a velocity of 0 instead. Okay so at a certain tick value we get a NOTE_ON with a velocity greater than zero, then at another tick value we either get a NOTE_OFF or a NOTE_ON with a velocity of zero. This means that we know the note lasts for a certain number of ticks. Using the formula:
we can work out the length, in whole notes, of the specified note. I think.... The reason for my lack of confidence is that the sites I have been reading have confidently predicted that most music is played in whole-note, half-note, quarter-note and so on. Yet just analysing three classical pieces:
As well as the regular whole notes (1.0), quarter notes (0.25), and, eighth notes (0.125) I have also come across 0.15364583333333334 notes, 0.20833333333333334 notes, and 0.08333333333333333 notes! Guess I have more learning to do. 11:34:40 PM |
Today we launched the