This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

question about MidiSystem.getTransmitter()  RSS feed

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello everyone.
i`m new to java. i have a problem about getting default transmitter from MidiSystem class.
this is the error that has popped up on my console.
{ javax.sound.midi.MidiUnavailableException
at javax.sound.midi.MidiSystem.getDefaultDeviceWrapper(Unknown Source)
at javax.sound.midi.MidiSystem.getTransmitter(Unknown Source)
}
or "requested device not installed"!
i want to develop a program which gets midi message from midi io ports of computer, and for that purpose  i think it is necessary to have a transmitter which transmits midi message from external device through midi io ports of PC and those ports must be somehow integrated with default transmitter. am i right?
if it is true, please help me for getting "default transmitter".
should i download it from somewhere (like oracle, unfortunately i did not find any thing)?
and if i must download the api from somewhere , how should i install it?
or should i create a transmitter class that implements   "Transmitter Interface"? if so, how should i connect objects of that class to midi io ports?
(p.s: accept my apologies for bad English)
 
Saloon Keeper
Posts: 9231
177
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you read the class description, it says that getTransmitter() will return a device if it implements neither Sequencer nor Synthesizer. So maybe you should try getSequencer() instead?
 
meisam hasanianfar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you for replying stephan.
i want exactly a transmitter ,not a sequencer! sequencer does what it has to,(to sequence midi event to midi message or to record midi message to midi event).
a transmitter (input to the application) does transmit midi message (not midi message) to the app.
i have found a solution i think. i did not install virtual MIDI port driver(like loopb1), after installing the driver i can obtain a transmitter with MidiSystem.getTransmitter().
 
meisam hasanianfar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"a transmitter (input to the application) does transmit midi message (not midi event) to the app"
sorry for this mistake
 
Stephan van Hulst
Saloon Keeper
Posts: 9231
177
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, sorry I was a little confused. I'm glad you managed to get it to work
 
Sheriff
Posts: 5121
138
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wow.  This topic took me on a journey of discovering a lot about Java and MIDI.  If anyone is interested in what I did, click on

https://github.com/ksnortum/midi-examples
 
meisam hasanianfar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you knute.
 
Knute Snortum
Sheriff
Posts: 5121
138
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I updated my midi-examples to display the full range of MIDI messages.

https://github.com/ksnortum/midi-examples
 
Stephan van Hulst
Saloon Keeper
Posts: 9231
177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Very cool. When I was looking at Midi a few weeks ago, I couldn't be bothered to check out what the opcodes for all the messages were. Have a cow!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!