permalink.gif 2003-08-24

permalink.gif The importance of the sound bank

Sun Aug 24 23:04:17 BST 2003  Permalink 

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!

permalink.gif Hot Water Music

Sun Aug 24 22:36:33 BST 2003  Permalink 

Most people who read this blog probably aren't interested in my ramblings about music so i've started a separate blog for them in a new category called Hot Water Music.

permalink.gif How long does this note last?

Sun Aug 24 22:34:40 BST 2003  Permalink 

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:

  • tick_duration / ( 4 * PPQN )

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:

  • A section of Beethovens pastoral symphony
  • Philip Glass - Metamorphosis#1
  • Philip Glass - Mad Rush

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.

permalink.gif MIDI question

Sun Aug 24 22:20:10 BST 2003  Permalink 

On the off-chance that someone reading this understands MIDI here is a question I need to answer:

Q: When you recieve two successive NOTE_ON events for a particular note, followed by a NOTE_OFF.  Which NOTE_ON is being cancelled?

More about:

permalink.gif The structure of music

Sun Aug 24 20:24:55 BST 2003  Permalink 

I would be grateful for any pointers that anyone can give me on analysing the structure of music.  I've become fascinated by the subject and trying to teach myself a little musical theory with which to try and better understand it.

B4G4B5G5E5E4E4G4B5B4E5G5E4G4B4E5G5B5B5G4B4E4G5E5D4G4B4D5G5B5B5G4B4
D4G5D5D4G4B4D5G5B5B5G4B4D4G5D5G5B5B4G4C4C5C5B5B4G5C4G4C4G5G4B4B5C5
C5G5G4C4B5B4A#4A#5E4C4E5C5C5A#5E4A#4E5C4C4E4A#4C5E5A#5A#5E4A#4C4E5
C5G4E4G4B4B4G4G4B4B4G4G4B4B4G4G4B4B4G4G4B4B4G4G4B4B4G4G4B4B4G4G4B4
B4E4E2E3G4E4G4B4B4G4G4B4B4G4G4B4B4G4G4B4B4G4G4B4B4G4G4B4B4G4G4B4B4
G4G4B4B4E4E3E2B4G4B5G5E5E4E4G4B5B4E5G5E4G4B4E5G5B5B5G4B4E4G5E5D4G4
B4D5G5B5B5G4B4D4G5D5D4G4B4D5G5B5B5G4B4D4G5D5G5B5B4G4C4C5C5B5B4G5C4
G4C4G5G4B4B5C5C5G5G4C4B5B4A#4A#5E4C4E5C5C5A#5E4A#4E5C4C4E4A#4C5E5
A#5A#5E4A#4C4E5C5G4E4G4B4B4G4G4B4B4G4G4B4B4G4G4B4B4G4G4B4B4G4G4B4
B4G4G4B4B4G4G4B4B4E4E2E3G4E4G4B4B4G4G4B4B4G4G4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5B5G4B4D4G5D5D4G4B4D5G5B5B5G4B4D4G5D5G5B5B4G4
C4C5C5B5B4G5C4G4C4G5G4B4B5C5C5G5G4C4B5B4A#4A#5E4C4E5C5C5A#5E4A#4E5
C4C4E4A#4C5E5A#5A#5E4A#4C4E5C5C4F#4A#4A#5F#5C5C5F#4A#4C4F#5A#5C4F#4
A#4C5F#5A#5A#5F#4A#4C4F#5C5B4G4B5G5E5E4E4G4B5B4E5G5E4G4B4E5G5B5B5
G4B4E4G5E5D4G4B4D5G5B5B5G4B4D4G5D5D4G4B4D5G5B5B5G4B4D4G5D5G5B5B4G4
C4C5C5B5B4G5C4G4C4G5G4B4B5C5C5G5G4C4B5B4A#4A#5E4C4E5C5C5A#5E4A#4E5
C4C4E4A#4C5E5A#5A#5E4A#4C4E5C5C4F#4A#4A#5F#5C5C5F#4A#4C4F#5A#5C4F#4
A#4C5F#5A#5A#5F#4A#4C4F#5C5G4E4G4B4B4G4G4B4B4G4G4B4B4G4G4B4B4G4G4
B4B4G4G4B4B4G4G4B4B4G4G4B4B4E4E2E3G4E4G4B4B4G4G4B4B4G4G4B4B4G4G4B4
B4G4G4B4B4G4G4B4B4G4G4B4B4G4G4B4B4E4E3E2G4E4G4B4B4G4G4B4B4G4G4B4B4
G4G4B4B4G4G4B4B4G4G4B4B4G4G4B4B4G4G4B4B4E4E2E3G4E4G4B4B4G4G4B4B4G4

It's like some kind of weird DNA.  Maybe you can play DNA too?

More about:

permalink.gif Gimme gimme

Sun Aug 24 19:57:38 BST 2003  Permalink 

BBC: "Greg Dyke, director general of the BBC, has announced plans to give the public full access to all the corporation's programme archives." [Scripting News]

This would be amazing.  There are so many treasures here that will never be a certain commercial proposition and, so, never justify being released on video or DVD.  I also feel it will also go some way to silencing criticism about the value of the BBC license fee.

permalink.gif Bush in bed with FirstEnergy CEO

Sun Aug 24 19:44:59 BST 2003  Permalink 

Sunday: FirstEnergy, Deregulation and the Bush Administration. A good article on the energy policy and campaign contributions behind the scenes of the blackout of 2003: Bush Turns ... [istori/log]

Well there's a surprise.

permalink.gif Why I *really* hate Symantec

Sun Aug 24 19:35:13 BST 2003  Permalink 

I posted a quick rant earlier about Symantec, here is another more level headed one:

They really, really, suck.

A couple of weeks ago my virus subscription for Norton Anti-Virus 2002 ran out.  I tried renewing it but had little success, bouncing from one page to another.  Finally I ended up in the Symantec store where lengthy attempts to upgrade NAV2002 to NAV2003 (supposedly £29.95) always resulted in my being offered Norton Internet Security for £39.95.  No sale.

No customer service either.

I gave up and used NAV's constant whining as a reminder that I need to find another anti-virus vendor. So far I haven't figured out which one to go for (any recommendation?)  Then today my machine begins to misbehave a little.  Maybe it's Trillian 2 beta 2 again but it was just enough to make me wonder about a virus.  My resolve to steer clear of Symantec began to crumble and, despite all I have said, I decided to have another go, give them money and hope it chokes someone at corporate HQ.

This time I pretend to be American and go to the US store where my serial number buys me access to the upgrade centre and I can see the upgrade I want as a download for $29.95.  Ok, fine.  But what's this?  On the confirmation page there is $6.99 for something called Extended Download Service.  It turns out that they want me to pay another $6.99 for the privilege of downloading the software again in the future.  Presumably the fear of a system crash leading me to have to pay another thirty bucks is supposed to make me give them seven more now.  No goddamn sale!

If the product is $36.94 then price it as such, don't try and con me with crap like this.

Symantec you suck.  May all your customers desert you for better vendors (lord let there be one!)

permalink.gif New German language blogging directory

Sun Aug 24 16:26:31 BST 2003  Permalink 

Nico Lumma just pinged me to tell me about his companies new blog listing site BLOGG.de.  The site is building a categorized directory of German language blogs and they are using a combination of trackback and ENT 1.0 to do it.

Very cool.

More about: