tags:

views:

79

answers:

3

I'm looking for a simple way to put up musical "tunes" on a website.

So here's an analogy to explain my question:

Let's say I want to put up a couple of big triangles as a picture on my web page. I can either draw a bitmap and save as GIF/JPG/PNG, put it up somewhere on the internet, and link to it with an element. That works but the larger the picture the more space my image file takes up.

Alternatively, I can use SVG (even though Internet Explorer support is lacking, grr) and use vector graphics which uses very little bandwidth regardless of image size.

In the music world, I can use WAV or MP3 files. Works great -- but if I just want to publish a 1-minute song of simple notes, by knowing the durations & pitches, & don't care that it sounds 100% exactly like a piano or accordion, is there a way to (a) create a file with the song, and (b) put it online in a format that is space-efficient? 1 minute of MP3 usually takes up hundreds of kilobytes.

+1  A: 

Look into playing music files on websites using Flash.

You can control the Flash through JavaScript calls.

This is currently the "recommended" way to play small audio clips in a website.

For larger media files, look into streaming FLV files using a Flash player.

Hope this helps :)

adam
+3  A: 

You could use a MIDI file, this stores durations/pitches etc. as you suggest. You should be able to easily find software to create this type of file. However you will probably find the results sound terrible, as it is very dependent on the synthesiser hardware/software that is available on the end-user's machine.

For what you need this might be reasonable though.

Tom Haigh
A: 

Check out the MIDI format for instruments. http://en.wikipedia.org/wiki/MIDI

Arvind