0

Hello,
I build an applet that plays midi files from a server. The problem is when I start playing the file (MidiSystem.getSequencer()).. it gives me this error in the java console and nothing plays:

SEVERE: null
javax.sound.midi.MidiUnavailableException: MIDI OUT transmitter not available
	at com.sun.media.sound.AbstractMidiDevice.createTransmitter(Unknown Source)
	at com.sun.media.sound.AbstractMidiDevice.getTransmitter(Unknown Source)
	at javax.sound.midi.MidiSystem.getSequencer(Unknown Source)
	at javax.sound.midi.MidiSystem.getSequencer(Unknown Source)
	at pdcPanel.play(pdcPanel.java:130)
	at pdcPanel.jButton1ActionPerformed(pdcPanel.java:245)
	at pdcPanel.access$000(pdcPanel.java:32)
	at pdcPanel$2.actionPerformed(pdcPanel.java:185)
	at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
	at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
	at java.awt.Component.processMouseEvent(Unknown Source)
	at javax.swing.JComponent.processMouseEvent(Unknown Source)
	at java.awt.Component.processEvent(Unknown Source)
	at java.awt.Container.processEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)

Here is the code to play the file from URL:

if(sequencer!=null)   sequencer.stop();

        sequence = MidiSystem.getSequence(new URL(songURL));

        // Create a sequencer for the sequence - here I get the Exception
        sequencer = MidiSystem.getSequencer(true);

        sequencer.open();
        sequencer.setSequence(sequence);

        sequencer.start();

How can be mid out transmitter not available? Is there a way to make this work?
Thanks.

Edited by Clawsy: n/a

1
Contributor
1
Reply
2
Views
7 Years
Discussion Span
Last Post by Clawsy
0

Hi, I figured this out by signing the JAR file. Now the problem is I play the midi file but hear nothing. What now? No error in the console, all seems ok but I have no sound.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.