nukeykt / NRedneck

Redneck Rampage & Duke Nukem 3D port based on EDuke32
https://github.com/nukeykt/NBlood
44 stars 6 forks source link

Add music/soundtrack support #13

Open PaddyMac opened 5 years ago

PaddyMac commented 5 years ago

I'm not sure how this would work with other versions, but I have the GoG release of the Redneck Rampage Collection (I also own a CD copy of the original Redneck Rampage release, so I would be willing to test that too). The GoG release has the soundtrack as REDNECK.gog and RRRAGAIN.gog. It would be nice to implement some playback support so that the original game soundtrack can play during the game.

andrew-mcmahon commented 5 years ago

Music is already supported via Vorbis or FLAC tracks although a bit of work is needed to get the music off the disc image that GOG provide. NBlood and Quakespasm work in the same way.

After extracting the GOG installer with innoextract, Linux and OSX systems can use bchunk like so:

bchunk -w REDNECK.gog REDNECK.inst track bchunk -w RRRAGAIN.gog RRRAGAIN.inst track

Once you've got several WAVE tracks you can convert to Vorbis or FLAC through the command line using flac or vorbis-tools i.e:

flac --best --delete-input-file *.wav oggenc *.wav -q6 (192 kb/s)

Or with GUI programs such as (Gnome) Sound Converter.

Apparently there's bchunk for Windows too but I've never used it. Windows users will probably have to use something like Daemon Tools to mount the image and rip the audio from the virtual drive using a program like dBpoweramp - that's how I used to do it anyway.

However you go about it - you want to end up with a subdirectory named music containing:

I find it's best to keep the two games separate as GOG have.

This bash script I wrote automates the whole process - it just needs the current GOG installer, flac, innoextract and bchunk installed to do it's magic: https://gist.github.com/andrew-mcmahon/4fe4b1c1892fd6a372b11dc7d1eec1d0

Have a read of it, perhaps even adapt it for Windows or OSX if you wish.