Hello,
I'm using a Java library called jMusic to create some sounds. I'm just trying it out for now so I've made this simple program. When I try to run it, I get the following exception:
run: Midi System Unavailable:javax.sound.midi.MidiUnavailableException: MIDI OUT transmitter not available BUILD SUCCESSFUL (total time: 2 seconds)
I guess I need a transmitter which, in turn, sets a receiver (right?) but, being very new to the whole sound in Java experience, I'm not really sure where to go from here.
Here is my little program:
package soundtesting;
import jm.JMC;
import jm.music.data.*;
import jm.midi.*;
import jm.util.*;
import javax.sound.midi.*;
public class SoundTesting implements JMC{
public static void main(String[] args) {
Note note = new Note(C4, CROTCHET, MF);
Phrase phrase = new Phrase();
phrase.addNote(note);
Part part = new Part();
part.addPhrase(phrase);
Score score = new Score(part);
Play.midi(score);
}
}
Any help outputting some sound?
Thanks in advance,
Matt