Midi Lag

Hey yall, I’m very new to Java sound and anyways… I’m working on a fullscreen app game for webstart and the drum tracks in my midi files are lagging alittle to much.

Right now, I’m using the MidiPlayer class I found on that Brakeen guy’s site.

I’m not really sure what to do (if there’s even a solution) so any input would be appreciated ???

Bad timing and bad sound are a sure sign for not having a soundbank installed.

http://java.sun.com/products/java-media/sound/soundbanks.html

Yawn, I took a look at the page, maybe its beacuse its 3am but does this mean that user of the game will need to download the soundbank too? I’m not really sure how this works.

Sorry to double post but I looked around I guess I’ll have to include the .gm with the game and (attempt) to load it from the games jar. This really really sucks! Why does Java always have these short comings! >:(

EDIT: ok I got the medium soundbank file and Im running and as expected the instruments sound different. Right now I’m using Anvil Studio to edit/play midi files and it doesnt seem to have a function to load the soundbank.gm so I can edit and hear what it will sound like in my game. Is there a way or any software that will let me load the soundbank?

You can load the sound banks and then tell the synthesizer which one to use.


Soundbank soundbank = MidiSystem.getSoundbank()

synth.loadAllInstruments(soundbank);

synth is a synthesizer declared elsewhere in the app. You can write a quick app to play a midi using any of the three soundbanks available from Sun.

HTH,
Aaron R>