Hey people,
If you grab the Enhanced Audio Plugin (ver1.55) from this thread, you'll then be able to double check my problem with me.
http://forum.thegamecreators.com/?m=forum_view&t=84732
Now, the fun part, here's my code which demonstrates the bug;
Set Dir Get dir$() + "\Midi"
Print "Active Directory"; Get dir$()
`Find the first midi file in subfolder .\Midi\ , load it, then play it using EAP155 DBPro plugin
Gosub Sub_Load_Midi
sync on
Do
CLS
Set Cursor 0,0
Print "Up/down for pause/unpause, left/right rewind/skip, space to reload"
Print "Please check for an audio bug, where the loaded instruments reset into piano"
Print "FPS: " ; Screen FPS()
Print "Now Playing: " ; Get File Name$()
Current_Audio_Pos = AUDIO MIDI POSITION(1)
Print "Track Time (SWAG): " ; Current_Audio_Pos
if upkey()
Pause Midi Audio 1
endif
if downkey()
Resume midi audio 1
endif
if leftkey()
Print "Rewind 2 secs"
sync
AUDIO SET MIDI POSITION 1, Current_Audio_Pos - 2
endif
if rightkey()
Print "Skip 2 secs (YOLO)"
sync
AUDIO SET MIDI POSITION 1, Current_Audio_Pos + 2
endif
if spacekey()
Print "... Loading"
sync
Gosub Sub_Load_Midi
endif
sync
loop
end
Sub_Load_Midi:
Find First: Repeat: find next : until Right$(get file name$(),4) =".mid"
Print "Song Found: " ; Get File Name$()
Print "Loading..." : Load Midi Audio 1, get file name$()
Print "Playing..." : Play Midi Audio 1
return
So what's the problem? There's a couple of minor issues, but the main one is that upon employing either;
- Resume Midi Audio
- Audio Set Midi Position
The instrument data seems to reset, resulting in a default piano sound.
Can you reproduce this bug? Any suggestions on how to program midi playback with DBPro?
For extra points, try comparing EAP155 to default DBPro mid load file commands, and let me know if the EAP155 loading takes 10x longer than the default DBPro midi load command (which is almost instant). In my testing, loading midi via EAP155 takes almost 10 seconds per song. Doesn't seem... right.
Cheers in advance, and happy new year everyone! Oh, if you lack a midi file, I've added one as an attachment.
EDIT: Extra EXTRA bonus-bonus points if you can pick the midi file and where it's from.