Class JavaMusic

java.lang.Object
  extended by JavaMusic

public class JavaMusic
extends java.lang.Object

A class with wrapper methods for JavaMusic (specifically playNote)


Constructor Summary
JavaMusic()
           
 
Method Summary
static void cleanUp()
          Obtains the MIDI channel to use from the default synthesizer.
static void close()
          Closes the default synthesizer.
static javax.sound.midi.MidiChannel getChannel()
          Returns the MIDI channel to use from the default synthesizer.
static void main(java.lang.String[] argv)
           
static void open()
          Obtains the MIDI channel to use from the default synthesizer.
static void playNote(int note, int duration)
          Plays a note with the passed note, duration, and the default intensity (64).
static void playNote(int note, int duration, int intensity)
          Plays a note with the passed note, duration, and intensity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaMusic

public JavaMusic()
Method Detail

open

public static void open()
Obtains the MIDI channel to use from the default synthesizer.


close

public static void close()
Closes the default synthesizer.


cleanUp

public static void cleanUp()
Obtains the MIDI channel to use from the default synthesizer.


getChannel

public static javax.sound.midi.MidiChannel getChannel()
Returns the MIDI channel to use from the default synthesizer.

Returns:
the MIDI channel

playNote

public static void playNote(int note,
                            int duration,
                            int intensity)
Plays a note with the passed note, duration, and intensity.

Parameters:
note - the note (a number > 0) you want to be played.
duration - the duration you want the note to be played in milliseconds.
intensity - the intensity (a number between 0 and 127) you want the note to be played.

playNote

public static void playNote(int note,
                            int duration)
Plays a note with the passed note, duration, and the default intensity (64).

Parameters:
note - the note (a number > 0) you want to be played.
duration - the duration you want the note to be played in milliseconds.

main

public static void main(java.lang.String[] argv)