Opened 22 years ago

Closed 11 years ago

Last modified 6 years ago

#7230 closed feature request

AUDIO: Support custom music instrumentation for Mac

Reported by: SF/superqult Owned by: lordhoto
Priority: low Component: Engine: SCUMM
Version: Keywords:
Cc: Game:


It would be very nice if ScummVM could read the iMuse Setups file contained in lucasarts games for mac. It holds all the music instrument samples, as well as sound effect/voice samples used in the game. The music sounds so much better using these samples instead of the standard MIDI sounds.

Ticket imported from: #587807. Ticket imported from: feature-requests/46.

Change History (19)

comment:1 by SF/jamieson630, 21 years ago

We'll address this alongside support for native MT-32 devices. I have some MAC tracks I'm looking through now.

comment:2 by SF/jamieson630, 21 years ago

Owner: set to SF/jamieson630
Priority: normallow

comment:3 by SF/jamieson630, 21 years ago

Summary: Using iMuse Setups file instead of MIDI.Support custom music instrumentation for Mac

comment:4 by SF/jamieson630, 21 years ago

Markus, you provided the information basis for our Mac0 conversion routine (FR #781797). How does this FR relate to that? Are there supposed to be instrument defs for the 4- character instrument references in the Mac0? Or does this FR relate to GM-based games?

I looked at this FR and realized that the request is extremely vague; hence the questions. What games, exactly, are supposed to include custom instrument samples?

(All I have for Mac games are game data files. If instruement samples are in the music driver files, I won't have seen them.)

comment:5 by SF/superqult, 21 years ago

OK, I'll try to explain this a bit more. The mac versions Monkey Island 1 and 2, and Fate of Atlantis (maybe others too) uses an extra file containing custom samples. This file is called "iMuse Setups". The samples in this file are in mac standard 'snd' resource format (raw format). No other information is contained in the file, which means that the handling of these samples must've been done entirely by the interpreter itself. I could of course send you one of these files for analyze, but I'm not sure that it's legal to do so. Anyway, feel free to ask more questions, and I'll gladly supply all information I'm able to. I really want to see this implemented.

comment:6 by SF/superqult, 21 years ago

Oh, I found some info on the 'snd '-resource as well:

comment:7 by SF/jamieson630, 21 years ago

Thanks for the URL, that helps to an extent. One thing I'm not clear on (moreso since I *don't* have a copy of this "iMuse Setups" file lying around) is this:

In MI1-Mac, the music is in SOUN/Mac0 resources, and is in a format that includes 4-character instrument names for each channel.

In MI2-Mac, the music is in SOUN/SOU/MAC resources, and is SMF-formatted with numeric program changes.

So my question is -- how does one get from the 4-character instrument name or numeric program number to an index into the "iMuse Setups" file and the correct sample? I suppose if I were looking at the guts of the file, the answer might turn out to be pretty self-evident.

Markus, do you ever stop by the IRC channel?

comment:8 by SF/jamieson630, 21 years ago

Latest word from Fingolfin (now pretty old, but I'm just now getting around to posting it):

The 'snd ' resources in the earlier Mac games are designed to be used with the now-deprecated Sound Manager. CoreAudio and QuickTime are the standard music layers for modern Mac systems, and since 'snd ' resources include command codes/parameters that were interpreted by Sound Manager, it's safe to say that they are not supported by CoreAudio or QuickTime.

Consequently, emulation is probably the only viable option for making this happen. We might be able to wrap the Player_MOD capabilities in a MidiDriver designed to work with the custom sampled sounds. Furthermore, the implementation would require that the 'snd ' resources be extracted from the resource fork of the "iMuse Setups" file (or equivalent; according to Fingolfin at least one game has the sampled sounds embedded in the resource fork of the main executable) into separate files to be used by ScummVM. This is necessary because only a Mac can read resource forks, and the Mac data files could be used on other systems (with ScummVM).

This may yet be a while in coming. I once again find myself with very little time to even look at my TODO list, let alone the code.

comment:9 by SF/lechimp, 21 years ago

A small comment on the location of sound resources : Mac versions of Monkey 1 and Loom both have the sound resources embedded in the main application. Monkey 2 and Indy 4 have them in the "iMuse Setups" file. Indy 3 does not have any 'snd ' resources.

I guess three things will be needed to run the sampled Mac sounds : (1) a tool to create a .rsrc file from the application or iMuse Setups file. macfork does something similar from .bin files and I seem to recall it as being open source. But no matter what, users will still need a Mac to convert the file to .bin format.

(2) Routines to locate and load the 'snd ' resources from the .rsrc file.

(3) an interpreter or converter for a small subset of the SoundManager routines, supposedly just very few of the commands - it seems the resources are either in the ancient Hypercard format and use command 80 (sound) or the newer Sound Manager format using command 81 (buffer).

By the way, Sound Manager routines are very much available on modern Mac systems (like MacOS X), through the Carbon libraries. Most Sound Manager routines are also available with Quicktime for Windows. So writing a routine that plays 'snd ' resources though Quicktime does not seem all too difficult. But it obviously would not work for platforms without Quicktime support. And we don't know how long Apple will support Carbon routines anymore.

comment:10 by SF/superqult, 21 years ago

comment:11 by fingolfin, 20 years ago

Summary: Support custom music instrumentation for MacAUDIO: Support custom music instrumentation for Mac

comment:12 by sev-, 19 years ago

Back to the pool.

comment:13 by sev-, 19 years ago

Owner: SF/jamieson630 removed

comment:14 by SF/raptor007, 18 years ago

I agree! I was about to post this feature request when I saw it was already here. This would be REALLY nice, those instruments worked very well and they're up the nostalgia value even more. :¬)

comment:15 by SF/raptor007, 18 years ago

On a more constructive note, we could extract the 'snd ' resources to .wav files and use them as instrument samples. It's fairly easy (on a Mac) to take each 'snd ' resource and convert it to a wave file.

comment:16 by SF/lechimp, 18 years ago

I like the idea of converting them, but I think it creates another problem..... If we convert the sounds and make them available for download, we'd probably infringe copyright. But I admit I'm no expert on these matters, maybe LucasArts will ignore this for so old games.

And yes it's easy for _some_ people to convert the sounds, but it still takes some tweaking to do it right, naming them correctly and so on. Your average non-programmer would not find it easy, I believe.

Also, remember that ResEdit runs in Classic only (therefore not on intel Macs or newer standard OS X installations), and Resorcerer is not free. Most available free resource editors are quite unstable IMHO, and not being worked on.

comment:17 by lordhoto, 11 years ago

We recently implemented support for the original Loom, Monkey Island 1, Monkey Island 2 and Indiana Jones and the Fate of Atlantis sound resources of the m68k versions. Thus I am closing this one.

Support for Loom and Monkey Island 1 was merged with 97d7bf9b9aaa1aac4939d2a690f65fde7e844b63 Support for Monkey Island 2 was merged with 4522d182d44134d48ed0de86863f21a128f5f593 Support for the m68k version of Indiana Jones and the Fate of Atlantis was added in fc6ab89b504e15ea14208301acd727893d113381

comment:18 by lordhoto, 11 years ago

Owner: set to lordhoto
Status: newclosed

comment:19 by digitall, 6 years ago

Component: Engine: SCUMM
Note: See TracTickets for help on using tickets.