Please join us at the new JavaWorld Q&A Forums. Your existing login will work there. The discussions here are now read-only.


JavaWorld Talkback >> 960282

Pages: 1
Anonymous
Unregistered




Javano
      #28331 - 03/02/06 02:23 AM

Wonderful article

Post Extras: Print Post   Remind Me!   Notify Moderator  
Jeff Friesen
Unregistered




Re: Javano [Re: Anonymous]
      #30867 - 04/13/06 01:03 PM

Thanks. I'm glad you enjoyed it.

Jeff


Post Extras: Print Post   Remind Me!   Notify Moderator  
Anonymous
Unregistered




Re: Javano [Re: Jeff Friesen]
      #33146 - 06/15/06 09:31 AM

Hi,

I found your Javano article while trying to figure out how to show a list of Midi instruments. While I know how it's supposed to work, my synth's default soundbank is always null and the synth's Loaded and Available instrument arrays are always empty (yes, I open the synth first).

I tried your entire javano app just to see if maybe there was some trick that I kept missing, but even your code throws an NPE when loading all instruments (because the default soundbank is null).

Do you know of any way to get the instrument list when the default soundbank is null? BTW, I can play midi events just fine (I use a midi sequencer in my app).

Thanks,
-Rick


Post Extras: Print Post   Remind Me!   Notify Moderator  
Jeff Friesen
Unregistered




Re: Javano [Re: Anonymous]
      #33576 - 06/23/06 03:33 AM

Hi Rick,

Unless you've already done this, you might want to invoke javax.sound.midi.Synthesizer's public Soundbank getDefaultSoundbank() method, which returns null if there is no default sound bank. If null returns, I would assume that there is something seriously wrong with your MIDI system.

According to the getDefaultSoundbank() documentation, "If a synthesizer doesn't have a default soundbank, instruments must be loaded explicitly from an external soundbank." I found a Website with the source code to a program that loads a soundbank from an external file -- if you can find such a file on the Net, perhaps this can help you. The program source file is LoadSoundBank.java, and it is available from http://www.jsresources.org/examples/LoadSoundbank.html.

Hope this helps.

Jeff


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 1 anonymous users are browsing this forum.

Moderator:   

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 6083

Rate this topic

Jump to

Contact us JavaWorld

Powered by UBB.threads™ 6.5.5