-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"MidiUnavailableException: Transmitter not found" when using val sequencer = MidiSystem.getSequencer() #17
Comments
From looking a bit more, it looks like upon
SequencerImpl doesn't have its own Transmitters, and I think it should. The bits in bold are bugs. There's no way I can see that you could configure a collection of MIDI devices that includes the SequencerImpl to talk to each other in any way other then all of them talking to all of them. You can't finely tune who the SequencerImpl sends events to. For anyone else seeing this issue, I've managed to hack around it for my use-case (Sequencer -> Custom Processing -> Synth) by doing the following (kotlin code):
where your custom processing (between the sequencer and the synth) goes in this class:
|
Thanks a lot. It was really helpful :) |
I'm trying to write code which plays MIDI notes from file.
I want to be able to intercept packets sent by the sequencer, and then process them, before sending them on to the synthesizer.
Sequencer -> Custom processing -> Synthesizer
I don't want the sequencer to send events directly to the Synthesizer!
Based on reading the JavaX docs, I think I should be able to do the following:
However, I'm seeing
jp.kshoji.javax.sound.midi.MidiUnavailableException: Transmitter not found
.From looking at the code, it seems like the Sequencer isn't created with any Transmitters. Bizarrely, it seems to get its transmitters from other devices, using
MidiSystemUtils.getTransmitters()
. This doesn't seem right. It is contrary to the documentation at https://docs.oracle.com/javase/7/docs/api/javax/sound/midi/MidiSystem.html#getSequencer(boolean), which indicates that the Sequencer should have no open transmitters, but that there should still be transmitters that I can get so that I can set their receivers.This issue seems related to #2, but the resolution of that doesn't seem applicable to me, because I want to control which device is connected to which other device, using transmitters/receivers.
The text was updated successfully, but these errors were encountered: