I've had trouble with midi's too. I found I could load and play a midi in DB1.20, but when the midi stopped playing the whole program frozefor a moment or two. Loop Midi was a nightmare, every time the midi went back to the beginning it made the program freeze.
If you really want to use Midi files, try this function written by Latch. It plays the midi file you specify by opening it through windows directly, rather than through DarkBasic (but don't worry if you can't understand it)
rem use winapi to load and play midi
rem by latch
rem august 2007
Sync On
Sync Rate 0
winmm=1
filename$=chr$(34)+"C:Program FilesDark Basic SoftwareDark BasicmediamusicFantasyCrystal.mid"+chr$(34)
open_midi(winmm,filename$)
Do
Text 50, 50, Str$(Screen FPS())
Sync
Loop
end
function open_midi(dllnum,filename$)
if dll exist(dllnum)=0
load dll "winmm.dll",dllnum
endif
if dll call exist(dllnum,"mciSendStringA")=0
break "dllnum may exist - or call not exist"
endif
rem open device command
lpszCommand$="open "+filename$+" type sequencer alias m1"
result=call dll(dllnum,"mciSendStringA",lpszCommand$,0,0,0)
call dll dllnum,"mciGetErrorStringA",result,error$,200
print error$
rem load file into sequencer
result=call dll(dllnum,"mciSendStringA","play m1 from 0",0,0,0)
call dll dllnum,"mciGetErrorStringA",result,error$,200
print error$
endfunction
Your best bit really is to track down a mid to mp3 converter - let me know if you find one, I could sure use it!
"I wish I was a spaceman, the fastest guy alive. I'd fly you round the universe, in Fireball XL5..."