Improve sound
This mainly:
- Improves sound effects, in particular AdLib, and adds Roland effects.
- Improves music to sound much closer to the originals.
- Uses SoundBlaster samples also for the internal speaker option, as they were originally the same, just with much lower quality.
This replaces sound effects and music instruments by new captures using DOSBox Staging v0.81.2, which uses the NukedOPL emulator and realistic filters.
There is a bug in the DOS Supaplex release where, if the AdLib sound driver is initialized with only sound effects selected, they are played incorrectly; you must first enable and disable the music. The previous sounds were affected by this bug.
More details in the commit message.
I just noticed some of the checks fail: tests, NDS and PS Vita. NDS and Vita just need to make sure all the new files are included and removed files are excluded. For the tests, I'm not sure why there is a problem with SDL⦠I will look into that.
Fixed the tests check, please rebase this on top of master before addressing the mentioned issues. Thank you!
You're welcome! :heart:
I've rebased it and added back the -sample sounds, but captured the same way I did the internal speaker effects. They sound better than the previous ones. Unfortunately I don't currently have at hand an old PC with DOS to hear how they sounded originally on a real PC speaker... if you want I'll restore the previous files.
By the way, in case you're interested, I've also extracted the original samples from both blaster.snd and sample.snd. They sound a bit different than the emulated ones (and between blaster and sample they sound almost identical).
That is absolutely amazing, thank you for sharing those scripts to extract the samples π€― πππ Would you mind adding them to the repo in a scripts folder? I think that would be great for preservation of the game too!
I'm also curious about how did you find out the format and offset of the samples. I remember debugging the original game with DOSBox's debugger and noticing the SND files had x86 assembly code in them and giving up π I absolutely love this!
If you had any other script for the music and want to add it to the repo, that'd be awesome too β€οΈ
Regarding the old vs new -sample files, as you say the new ones are almost identical to the -blaster files π€ I don't have an old PC around either to testβ¦ hopefully I can find one, but I think it makes sense to restore the old ones as it makes sense they sound worse given the hardware used to play them was different? (sound card vs PC speaker)
OK, I've restored the previous "sample" sounds, but in mono (were the sounds in stereo for any particular reason?). Maybe ideally some day they should be recorded from an actual PC speaker, or at least a speaker header :smile: And I've added the scripts to extract the samples, leaving the SND file path as a parameter.
For the SoundBlaster samples, I just saw with a hex editor various suspicious "Creative Voice File" strings in BLASTER.SND, and after a bit of research I concluded that all the samples were .VOC files appended after the code. That format is described http://www.textfiles.com/programming/FORMATS/vocform2.pro. I then convert them to 16-bit 44.1 kHz because otherwise they sound too noisy and bassy on modern hardware. Aftter all the samples there is a "Creative Sound Blaster Card" string (file? no idea what that is).
The PC speaker samples are more complicated, as they seem to have no header, so that was more trial and error... but transcoding the SAMPLE.SND file to WAV as raw files with the same bit depth (8-bit) and sample rate (8333 Hz) as the VOC files they sounded OK. I could not figure exactly the offsets and lengths, so they are not accurate like the SoundBlaster samples.
I have no scripts for the music files. I used the previous xm files as a basis, and to capture the instruments I modified the NukedOPL code in DOSBox Staging to isolate the channels.
What I do have is the original Amiga music, extracted from the floppy disk and converted to the .xm format: supaplex_amiga_music.zip There is also another music file in the disk, but it turns out it is from another game from the same publisher, they must have overwritten those disks with Supaplex :rofl:
Great detective work! π΅οΈ π
Regarding why are they stereo... π€ I'm not 100% sure if there was a reason for that. If there was, I think it had to be that some platform wasn't able to play them or something like that. I will try to test all binaries before the next release (that I've been postponing for a very long time... π ) and if I find a problem that can't easily fix I will go back to the original samples, no problem.
Now I think you have to fix the NDS and Vita builds by adding/renaming/removing files to their build scripts or whatever. For Vita I guess is its CMakeLists.txt and for NDS it's code of some sort.
Great detective work! π΅οΈ π
Thanks!
I've fixed the DS and Vita builds, and added Roland effects for both. I've tested the DS build (the only one which does not use SDL from what I gather) on an emulator and it sounds fine. Except when the music is disabled from the controls, but that is another issue...