Author Topic: SQ3: Where is "Where am I?"?  (Read 355 times)

0 Members and 1 Guest are viewing this topic.

Offline ZvikaZ

SQ3: Where is "Where am I?"?
« on: September 30, 2020, 08:59:37 AM »
Hi.

In SQ3 intro, Roger says "Where am I?".
(Which *was*, or *wasn't* heard by the Soundblasters of the Dos era, I don't know - I have seen some different reports of this; I had only PC speaker at the time, anyway...)

It's in room 155. Seems to be sound resource 100:
Code: [Select]
(instance whereSound of Sound
(properties
number 100
priority 5
)
)
ScummVM debugger also reports that it's number 100.

However, I can't play it in SCICompanion.
It seems to treat it just like (an empty) regular MIDI resource, without digital sample.

Citing from http://sci.sierrahelp.com/Documentation/SCISpecifications/19-SoundSubsystem.html#AEN2490:
Quote
SCI0 Sound resources can also contain digital samples, although an SCI remake of KQ1 is the only DOS game I know of that includes them. These files still contain MIDI data, but the wave data is appended at the end. The MIDI data is an approximation of the sound effect for hardware that can't play digital sound.

So, is it possible that SCICompanion just ignores the wave data at the end?
Or is there some way to access it?



Offline MusicallyInspired

Re: SQ3: Where is "Where am I?"?
« Reply #1 on: September 30, 2020, 09:24:07 AM »
It worked if you had the right driver but SQ3 was never bundled with that driver. It's available on Sierra Help Pages though.

Usually you have to select the "Digital" patch in the SCI Synth dropdown menu on the Sound Resource (above the play button and transport), but "Digital" isn't an option it seems. SCI Viewer can play it just fine, though.

Digital samples in SCI0 were simply appended to the end of a sound resource, from what NewRisingSun told me. He wrote a program to add sound to an SCI0 sound resource but it had to be 11025 hz 8-bit mono and the resulting sound file could be no larger than a certain byte size (I forget. 65535 I think?).
« Last Edit: September 30, 2020, 09:31:19 AM by MusicallyInspired »
Brass Lantern Prop Competition

Offline ZvikaZ

Re: SQ3: Where is "Where am I?"?
« Reply #2 on: September 30, 2020, 09:35:22 AM »
Well, that's interesting info.
Because what I really want, is to modify the sound resource.

So, if SCICompanion can't do it (@Kawa, maybe it can be fixed?), I'd need other tool.
Do you know where can I find NRS tool?
Any other recommendations?

Offline MusicallyInspired

Re: SQ3: Where is "Where am I?"?
« Reply #3 on: September 30, 2020, 10:04:51 AM »
http://sciprogramming.com/community/index.php?topic=592.0

What you're looking for is the AddWAV.exe program.
Brass Lantern Prop Competition

Offline Kawa

Re: SQ3: Where is "Where am I?"?
« Reply #4 on: September 30, 2020, 10:19:40 AM »
From what I can see, SCI Companion does acknowledge there is a digital sample in there. I open sound.100 and I see one row marked "D". This being a MIDI-oriented editor, it doesn't bother trying to draw the waveform like it does the note events, nor does it try to play anything. Exporting the resource and opening it in Audacity as an unsigned 8-bit 11000 Hz raw PCM, playing that gives me a click of the header, and a perfectly fine "where am I?".

Digital samples in SCI0 were simply appended to the end of a sound resource, from what NewRisingSun told me.

All that being a match, you could make do with a hex editor and some smarts. I'd point out some official tool but I can't seem to find any.

Quote from: Ravi Iyengar
The digital sample header is 44 bytes long. Offset 14 in the header contains the frequency as a short integer. Offset 32 contains the sample length, also as a short integer.
But since we're talking about a digital-only sound, without any MIDI in it, we can ignore all that. Looking at the raw sound.100 in a hex editor, I see frequency 11000 (0x2AF8) at offset 0x33 and the sample length 7415 (0x1CF7) at offset 0x45. Selecting everything from 0x51 (a 0x7A) to the end is a span 7415 bytes in size, so that's our sound All else being equal, one should be able to just remove everything from 0x51 on, record a new sound of the proper format, append it in place of the original, and adjust the size field accordingly.

Attached is a proof of concept where I did exactly that, to make Roger sound like a confused Dutchman.

Offline gumby

Re: SQ3: Where is "Where am I?"?
« Reply #5 on: September 30, 2020, 08:06:35 PM »
Collector and I collaborated a (long) while back and created a sound editor tool for SCI0 sounds.  I can't seem to put my finger on it, but I want to say that it was able to read and create SCI0 sound resources that had both MIDI and WAV data inside them.
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline Collector

Re: SQ3: Where is "Where am I?"?
« Reply #6 on: September 30, 2020, 08:32:44 PM »
That ended up in a collection of a number of SCI sound utilities with a GUI. Haven't even looked at it in a long time. http://sciwiki.sierrahelp.com//index.php?title=SCI_Sound_Utilities
KQII Remake Pic

Offline ZvikaZ

Re: SQ3: Where is "Where am I?"?
« Reply #7 on: October 01, 2020, 10:27:37 AM »
Thanks guys. Sounds great ;-)
I'll check it.

Offline ZvikaZ

Re: SQ3: Where is "Where am I?"?
« Reply #8 on: October 04, 2020, 11:37:00 AM »
It took me time to check, but it works great!
Thanks.

I'd just note, that the GUI has problem with Hebrew file names. I had to change my .wav file to English for it to work (at least, with Windows 10).
I assume that you won't fix it (it's not really worth the bother...), but maybe it should be documented somewhere.
(or maybe add a simple `if` to warn in case of a non-regular-ascii filenames, and suggest renaming)


SMF 2.0.14 | SMF © 2017, Simple Machines
Simple Audio Video Embedder

Page created in 0.113 seconds with 24 queries.