public class JavaMusic
extends java.lang.Object
Constructor | Description |
---|---|
JavaMusic() |
Modifier and Type | Method | Description |
---|---|---|
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.
|
public static void open()
public static void close()
public static void cleanUp()
public static javax.sound.midi.MidiChannel getChannel()
public static void playNote(int note, int duration, int intensity)
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.public static void playNote(int note, int duration)
note
- the note (a number > 0) you want to be played.duration
- the duration you want the note to be played in milliseconds.public static void main(java.lang.String[] argv)