For midis in DBC try this (you may have to include the full path to the midi file if it is not in your working directory; and make sure you include the Chr$(34) before and after. The filename$ needs to have the quotes included with it.):
rem use winapi to load and play midi
rem by latch
rem august 2007
winmm=1
filename$=chr$(34)+"Opponent.mid"+chr$(34)
open_midi(winmm,filename$)
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$
`lpszCommand$="close sequencer"
`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
Enjoy your day.