VOGONS

Common searches


Extract game music files.

Topic actions

First post, by marooned_on_mars

User metadata
Rank Member
Rank
Member

Not really a problem in itself but wasn't sure where else to ask. Is there any way to extract resource files from Sierra games? I've tried using SCI Viewer and it worked flawlessly, but I could only extract files one at a time and that can be quite tedious. I also tried SCIResDump but it doesn't seem to open any resource files I'm pointing it at. Thanks in advance ^^

Last edited by marooned_on_mars on 2013-08-14, 21:29. Edited 1 time in total.

Reply 1 of 40, by collector

User metadata
Rank l33t
Rank
l33t

The Sierra Resource Viewer also has command line tools. Resource.exe will dump all resources from a Sierra RESOURCE.* archive file. http://sciwiki.sierrahelp.com/index.php?title … Resource_Viewer

The Sierra Help Pages -- New Sierra Game Installers -- Sierra Game Patches -- New Non-Sierra Game Installers

Reply 2 of 40, by marooned_on_mars

User metadata
Rank Member
Rank
Member

Thanks for the reply!
Seems it extracted a lot of files of various extensions. I tried extracting the music with music.exe but I'm not sure which file I should open exactly. Opening resource.000 from LSL6 doesn't work apparently. I would want to extract the music and be able to render it outside the game (on various sound settings, or patches in this case)

Reply 3 of 40, by collector

User metadata
Rank l33t
Rank
l33t

Resource.exe will dump all raw SCI formats. There may be some small utility that can convert from SND to mid, but I am unaware of any. If there were a command line tool to do so for SCI1 and later, you it would be easy to write a bat file to batch process all of the SND files. As it is, all that I can suggest is to use the GUI version of the Sierra Resource viewer to go through one by one to export to MIDI.

If it were an SCI0 game, I wrote a companion utility for Soundbox to deal with audio resources for developers creating SCI games that can batch process SCI0's SOUND.* resources to MIDI, but it would not work with LSL6 resources.

Reply 4 of 40, by marooned_on_mars

User metadata
Rank Member
Rank
Member

Well, when I tried to extract file by file, first I tried to get GeneralMidi files and play them back in a normal player, but they'd turn out wrong. For example, in the Resource viewer, a song was more than 1 minute long, when I extract it out it turns out into a midi containing just one instrument note.

Reply 5 of 40, by collector

User metadata
Rank l33t
Rank
l33t

There are not specific kinds of MIDI files. Each SOUND resource contains tracks for the different kinds of audio hardware on which the game might be played. The resources also contain PATCH files for each of the different kinds of hardware, even for PC speaker. All of this is why the Quest Studios actually records its MIDI files during game play instead of extracting them.

Reply 6 of 40, by marooned_on_mars

User metadata
Rank Member
Rank
Member

So I take it there's absolutely no way of properly diverge the tracks/patches? I would've been interested only to extract the game's GeneralMidi tracks, since recording that in DosBox can be quite an hassle when using an external midi device (software).

Reply 7 of 40, by NewRisingSun

User metadata
Rank Oldbie
Rank
Oldbie

Sure there is. SND2MID.COM is a command-line utility to convert Sierra Music Files (used by SCI, among other Sierra products) to standard MIDI files. Syntax is

snd2mid devices files

Devices is a sequence of letters denoting which devices' tracks you want. "a" is adlib, "m" is Roland MT-32, "h" is General MIDI, "*" is all. For example:

snd2mid hm 1.snd

extracts General MIDI and Roland MT-32 tracks from 1.snd to 1.mid.

snd2mid * *.snd

extracts all tracks from all *.snd resources into *.mid.

If you want to convert Standard MIDI Files to Sierra Music Files, for example to change a game's soundtrack, there's a SCI0 utility coming with SCI studio (I think), and for SCI1, Sierra's original utility (SMF.EXE) is to be found somewhere on the internet.

Attachments

  • Filename
    snd2mid.zip
    File size
    1.56 KiB
    Downloads
    349 downloads
    File license
    Fair use/fair dealing exception

Reply 8 of 40, by collector

User metadata
Rank l33t
Rank
l33t

SND2MID is Ravi Iyengar's utility for SCI0. My utility has an updated (Win32) version of SND2MID for batch processing. However, marooned_on_mars wants to extract from LSL6. Ravi never intended that it could be used fro any other version of SCI. Neither SCI Studio nor SCI Companion have any audio capabilities. Ravi Iyengar did create Soundbox to create and edit SCI0 SOUND resources, but it has to be used as a standalone utility. Soundbox can be invoked from Studio, but not Companion.

The Sierra Help Pages -- New Sierra Game Installers -- Sierra Game Patches -- New Non-Sierra Game Installers

Reply 12 of 40, by collector

User metadata
Rank l33t
Rank
l33t

So it is yours? The main reason that I was wondering about if the source was available is that is that it would be nice to port it to Win32.

The Sierra Help Pages -- New Sierra Game Installers -- Sierra Game Patches -- New Non-Sierra Game Installers

Reply 13 of 40, by NewRisingSun

User metadata
Rank Oldbie
Rank
Oldbie

I wrote it in the 1990s, so it's an x86 assembly language program... not very portable. I once started rewriting it in portable C, but considered it a waste of time, since the original runs well enough in DOS emulators.

Reply 14 of 40, by marooned_on_mars

User metadata
Rank Member
Rank
Member

Thanks NewRisingSun, I tried your utility and it seems to be getting GM-pertinent midi files, but seemingly it doesn't sound right when I play them. I'll attach a comparison. Also it doesn't seem to loop properly, as it usually starts from the 2nd part of a song's loop. Sorry for the skips and crackles in the DosBox version of the recording, that's the reason why I never record externally from DosBox.
Oh and also forgot to mention that the SierraViewer seems to be playing the GM versions of the songs the same bad way.

Attachments

  • Filename
    GM_extracted_midi.ogg
    File size
    1.85 MiB
    Downloads
    183 downloads
    File license
    Fair use/fair dealing exception
  • Filename
    GM_game_through_dosbox.ogg
    File size
    2.96 MiB
    Downloads
    190 downloads
    File license
    Fair use/fair dealing exception

Reply 15 of 40, by NewRisingSun

User metadata
Rank Oldbie
Rank
Oldbie

That's right --- loop points must be interpreted by the MIDI player. Since SCI uses a very idiosyncratic way of defining loop points (using program change value 127 on channel 16, if I remember correctly), you'll have to either write your own MIDI player to interpret it that way, or edit the Standard MIDI File using a MIDI sequencer program. That's the price you pay when using extracted, as opposed to recorded, MIDI files. (Be glad you're not extracting LucasArts' iMuse files.)

The pitch bends don't sound right because GENMIDI.DRV sends the pitch bend range to 12 (default was 2) upon program start, using information in 4.PAT. So, to get it to sound right, send the following sequence (all hex values) to every channel before playing back the extracted MIDI files:
Bx 65 00
Bx 64 00
Bx 06 0C
With x standing for the MIDI channel number 0 to F.

And of course the beach sound effects come from a different MIDI file, which the game plays simultaneously with the music.

Reply 16 of 40, by marooned_on_mars

User metadata
Rank Member
Rank
Member
NewRisingSun wrote:

That's right --- loop points must be interpreted by the MIDI player. Since SCI uses a very idiosyncratic way of defining loop points (using program change value 127 on channel 16, if I remember correctly), you'll have to either write your own MIDI player to interpret it that way, or edit the Standard MIDI File using a MIDI sequencer program. That's the price you pay when using extracted, as opposed to recorded, MIDI files. (Be glad you're not extracting LucasArts' iMuse files.)

Any suggestions of a MIDI sequencer? And what is the trouble with iMuse when extracting? Would like to know.
Would this problem with the pitch bends be present when recording raw midi commands through DosBox?

NewRisingSun wrote:
The pitch bends don't sound right because GENMIDI.DRV sends the pitch bend range to 12 (default was 2) upon program start, using […]
Show full quote

The pitch bends don't sound right because GENMIDI.DRV sends the pitch bend range to 12 (default was 2) upon program start, using information in 4.PAT. So, to get it to sound right, send the following sequence (all hex values) to every channel before playing back the extracted MIDI files:
Bx 65 00
Bx 64 00
Bx 06 0C
With x standing for the MIDI channel number 0 to F.

I don't really have a clue how to send that sequence or what to hex edit.

NewRisingSun wrote:

And of course the beach sound effects come from a different MIDI file, which the game plays simultaneously with the music

I was already aware of that =3

Reply 17 of 40, by collector

User metadata
Rank l33t
Rank
l33t

I can certainly understand if you just want to see if you can do it yourself, but if all you want is the music, why not just get it from Quest Studios and save yourself the trouble?

The Sierra Help Pages -- New Sierra Game Installers -- Sierra Game Patches -- New Non-Sierra Game Installers

Reply 18 of 40, by marooned_on_mars

User metadata
Rank Member
Rank
Member

The reason why I want to do this on my own is for the fact that Quest Studios don't have complete soundtracks and I would require that. Also helps in case I didn't catch all the music from the game through playing/recording it. If this wasn't the case I would've chosen the easy path already.
Also, Quest Studios tampered with the music in some cases and it doesn't sound like in the game, and I want to make accurate recordings that sound exactly how they were supposed to.

Reply 19 of 40, by leileilol

User metadata
Rank l33t++
Rank
l33t++

indeed, queststudios has annoying long delays before each song and there is seemingly instrumental changes

I know how you feel and such. Space Quest V's intro song for example which never is played in full normally.

apsosig.png
long live PCem