Name: rmT116609 Date: 08/07/2003
FULL PRODUCT VERSION :
java version "1.4.1_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_02-b06)
Java HotSpot(TM) Client VM (build 1.4.1_02-b06, mixed mode)
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
FULL OPERATING SYSTEM VERSION :
Microsoft Windows 2000 [Version 5.00.2195]
A DESCRIPTION OF THE PROBLEM :
If I connect to the internal Sequencer some Receiver
objects (they are connected to some Sequencer's
Transmitters), these Receiver objects receive nothing.
Sequencer sends data only to the internal Synthesizer
(though I have not explicitly connected it). Furthermore I
can't get this synthesizer disconnected from the sequencer.
I think this problem will be corrected when problem
4773012 (implement a new stand-alone sequencer) will
be solved. I've read it is planned for Java sdk 1.5.
When is this release planned ?
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Sequencer seq = MidiSystem.getSequencer();
3. MyReceiver rec = new MyReceiver(); // implements Receiver
5 ... // Load the sequencer with a Midi sequence
EXPECTED VERSUS ACTUAL BEHAVIOR :
The rec receiver receives nothing, but you can hear the
Midi sequencer played on the internal synth.
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
* Show the problem that the internal Sequencer never calls registered
* It only and always calls the internal Synthesizer instead.
public class TestSequencer
public static void main(String args)
// Prepare internal sequencer
Sequencer sqr = MidiSystem.getSequencer();
// Prepare some music to play
Sequence seq = new Sequence(Sequence.PPQ, 96);
Track tck = seq.createTrack();
ShortMessage note1 = new ShortMessage();
ShortMessage note2 = new ShortMessage();
ShortMessage note3 = new ShortMessage();
note1.setMessage(ShortMessage.NOTE_ON, 1, 64, 100); // channel=1,
note2.setMessage(ShortMessage.NOTE_ON, 1, 66, 100);
note3.setMessage(ShortMessage.NOTE_ON, 1, 70, 100);
tck.add(new MidiEvent(note1, 0));
tck.add(new MidiEvent(note2, 100));
tck.add(new MidiEvent(note3, 200));
// Connect my receiver
MyReceiver rcv = new MyReceiver();
// Start the song : synth will play but MyReceiver never called.
catch (Exception e)
// My receiver that print a line when something is receiver.
class MyReceiver implements Receiver
public void send(MidiMessage msg, long timestamp)
System.out.println("MyReceiver received something !");
public void close()
---------- END SOURCE ----------
CUSTOMER WORKAROUND :
Use another Sequencer implementation...
(Incident Review ID: 178675)