This week's book giveaway is in the Programmer Certification forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 21 Developer Study Guide: Exam 1Z0-830 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

question about MidiSystem.getTransmitter()

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 15732
368
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 15732
368
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, sorry I was a little confused. I'm glad you managed to get it to work
 
Sheriff
Posts: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you knute.
 
Knute Snortum
Sheriff
Posts: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 15732
368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Oh. Hi guys! Look at this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic