back to Online fun and Games page

Rainbow Notes

By Karl Hörnell, February 10, 1997.
Last modified February 13.

Yes, this is a genuine Java melody editor which, unlike my original Blue Notes, allows you to work with up to seven voices simultaneously. You can draw your own waveforms and envelopes for each voice, you can browse through a set of pre-constructed melodies and you can even save your work for later use.

How to operate this thing

Click on any of the small buttons marked R, O, Y, G, B, I, V (for red, orange, yellow, ... Duh!) or press the corresponding key to select a sound type. Put notes on the sheet by placing the cursor where you want the main "dot" to be and press 1, 2, 3, 4, 6 or 8 for the appropriate length of the note in 1/8 units. Hold down the CTRL key if you want the note to be raised half a step.

All notes can be dragged up or down. They will vanish if you drag them off the sheet, or if you place the cursor over them and press delete. The applet inserts pause marks at appropriate places and makes sure you don't do anything illegal. You are not allowed to play more than one note of the same color at once.

When you want to hear the result, click on the Make button. The applet will then compile the melody (which takes a few seconds -- you should be able to see the progress in the status bar at the bottom of your browser window) and play it from beginning to end. Once it's been compiled, you can play it without having to go through the computational process again if you just click on Play, but whenever you have made some changes (or if you just want to play it at a different speed) you need to click on Make again in order to hear the new version.

I assume I don't need to explain the use of the Load and Clear buttons. To switch to 3/4 or 4/4, you need to clear the sheet first.

Advanced features

The little "Waveform" and "Envelope" areas aren't just there to show what the different voices sound like. You can edit them by clicking and dragging. Want a softer sound? Draw a smoother waveform. Want to tone down the volume? Lower the height of the envelope curve. Experiment! You can always get the original shapes back by clicking Reset.

When you "save" the finished melody, you don't get the result as a file (since that would violate the security restrictions of Java). You get a bunch of odd characters in the "Java Console" window. (Look under "Options" in Netscape.) Copy all of it into whatever text editor you've got and save it from there.

What to do with the stuff you've saved

The resulting text file can be read by a particular melody object I've created, which can be included in applets and used in place of AudioClip objects. The Melody .class file is here and the source code is here.