Original URL: http://www.javaonthebrain.com/java/bluenotes.html

Blue Notes

By Karl Hörnell, May 1 1996
Last modified May 19

This is a very crude Java melody editor. It can only handle single-part notes, which sort of reflects the inability of Java to play more than one sound at a time. I was hoping to at least find a way to construct audio clips from scratch inside the applet, but noooo! Java doesn't allow that sort of low-level sound manipulation. (It does, however, allow for the construction of a related sound object called AudioDataStream, which later became the basis for another melody editor, Rainbow Notes.)

All sounds have to be prepared in advance and downloaded over the net. That's why it will take a while for the applet to get going (and on some platforms there is a noticeable pause the first time a note is played). Each note you can use corresponds to an individual audio file and the applet needs 29 of them.

The controls are relatively easy. You only work with the notes. The applet takes care of putting in the appropriate pause symbols and keeping track of where the melody ends.

  • Move to different parts of the sheet by dragging the scroll bar square, or by repeatedly clicking on the left/right arrows.
  • To place a new note somewhere, make sure there is logical room for it in the bar. Place the cursor where you want it to turn up and press one of the 1, 2, 3, 4, 6 and 8 keys specifying the note length in 1/8 units. If you hold down the mouse button while doing this, the note will be raised half a step if possible (marked with a #).
  • You can also drag notes up or down.
  • To delete a note, place the cursor over its central point and press d.
  • Listen to what a note will sound like at the current cursor position by pressing p. If you also hold down the mouse button the note will be raised half a step.
  • The PLAY and STOP buttons start and stop the music. It will also stop by itself at the end of a melody.
  • Set the appropriate speed (before playing) by dragging the speed control marker sideways. The more to the right, the faster the music will play.
  • You can toggle the pace between 3/4 and 4/4 when the sheet is cleared from notes.