08-28-2024, 06:34 PM
First of all, a great explanation, I like it.
And their example player (MIDIPlayer64) is simply brilliantly made.
I've been playing around with _MIDISOUNDBANK and I noticed something that wasn't said here or in the WIKI.
That works quite well.
But if you want to switch from one soundfont to another in your program, for whatever reason, you always have to first
Load the sound font and then the sound. All previously loaded sounds will not be played with the new sound font.
That wasn't explicitly stated here.
I also noticed that in such a case there is a pause of 1 second between load Soundfont and load Sound and Play
You have to insert it, otherwise it won't work either.
I made a little demo to quickly hear how different sound fonts sound with one sound.
I noticed this.
Take all _DELAY 1 out and it won't work anymore
Unfortunately I can't upload the sound font, despite 7z it's still 249 MB, which won't be accepted here.
And their example player (MIDIPlayer64) is simply brilliantly made.
I've been playing around with _MIDISOUNDBANK and I noticed something that wasn't said here or in the WIKI.
Code: (Select All)
_MIDISOUNDBANK "4mgmgsmt.sf2"
handle = _SNDOPEN("onestop.mid")
_SNDPLAY handle
That works quite well.
But if you want to switch from one soundfont to another in your program, for whatever reason, you always have to first
Load the sound font and then the sound. All previously loaded sounds will not be played with the new sound font.
That wasn't explicitly stated here.
I also noticed that in such a case there is a pause of 1 second between load Soundfont and load Sound and Play
You have to insert it, otherwise it won't work either.
I made a little demo to quickly hear how different sound fonts sound with one sound.
I noticed this.
Take all _DELAY 1 out and it won't work anymore
Unfortunately I can't upload the sound font, despite 7z it's still 249 MB, which won't be accepted here.
Code: (Select All)
Screen _NewImage(600, 400, 32)
'_MIDISoundBank ".\Nice-Strings-PlusOrchestra-v1.6.sf2"
Song& = _SndOpen(".\Survivor - Rocky III - Eye of the Tiger.mid")
_SndPlay Song&
Print " 1 Normal"
Print " 2 DooM"
Print " 3 Nokia"
Print " 4 Orchester"
Print " 5 Aspirin"
Print " 6 Airfont"
Print " 7 Mega Sound"
Print
Print " ESC EXIT"
Do
k = _KeyHit
Select Case k
Case 27 ' esc
Exit Do
Case 50
_SndStop Song&
_SndClose Song&
_MIDISoundBank ".\gzdoom.sf2"
_Delay 1
Song& = _SndOpen(".\Survivor - Rocky III - Eye of the Tiger.mid")
_SndPlay Song&
Case 51
_SndStop Song&
_SndClose Song&
_MIDISoundBank ".\Nokia_S30.sf2"
_Delay 1
Song& = _SndOpen(".\Survivor - Rocky III - Eye of the Tiger.mid")
_SndPlay Song&
Case 52
_SndStop Song&
_SndClose Song&
_MIDISoundBank ".\Nice-Strings-PlusOrchestra-v1.6.sf2"
_Delay 1
Song& = _SndOpen(".\Survivor - Rocky III - Eye of the Tiger.mid")
_SndPlay Song&
Case 53
_SndStop Song&
_SndClose Song&
_MIDISoundBank ".\Aspirin_160_GMGS_2015.sf2"
_Delay 1
Song& = _SndOpen(".\Survivor - Rocky III - Eye of the Tiger.mid")
_SndPlay Song&
Case 54
_SndStop Song&
_SndClose Song&
_MIDISoundBank ".\airfont_320_neo.sf2"
_Delay 1
Song& = _SndOpen(".\Survivor - Rocky III - Eye of the Tiger.mid")
_SndPlay Song&
Case 55
_SndStop Song&
_SndClose Song&
_MIDISoundBank ".\24.1mg_mega_sound_v2.0_bank.sf2"
_Delay 1
Song& = _SndOpen(".\Survivor - Rocky III - Eye of the Tiger.mid")
_SndPlay Song&
End Select
_Limit 10
Loop
System