This week's giveaway is in the JDBC forum.
We're giving away four copies of Java Database Connections & Transactions (e-book only) and have Marco Behler on-line!
See this thread for details.
Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC 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:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

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: 10251
216
  • 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: 10251
216
  • 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
 
Marshal
Posts: 5999
156
Chrome Eclipse IDE Java Postgres Database Ubuntu 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
Marshal
Posts: 5999
156
Chrome Eclipse IDE Java Postgres Database Ubuntu 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: 10251
216
  • 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!
 
Beauty is in the eye of the tiny ad.
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!