Blitz MIDI help?

BlitzPlus Forums/BlitzPlus Programming/Blitz MIDI help?

liqih(Posted 2006) [#1]
Hello,

I'm trying to get MIDI out working in a BlitzPlus simple appl,

does anyone have a working example?

the MidiLib.bb give me array error in BlitzPlus,

thanks


Matty(Posted 2006) [#2]
Hi liqih - midi is fairly simple to use in Blitzplus.

If you want to play a midi then a simple test application would be:

graphics 800,600,32,2 
musicchannel=playmusic("your midi file here (make sure path is correct)") ; the variable musicchannel stores a handle to the music playing which you must use if you wish to stop/pause/change volume of the sound/music playing
if musicchannel=0 then runtimeerror("Something is either wrong with your midi file or the path you have specified")
waitkey
if channelplaying(musicchannel)<>0 then stopchannel(musicchannel)
end