Author Topic: Play speech while digital sound effect is also playing  (Read 13408 times)

0 Members and 1 Guest are viewing this topic.

Offline troflip

Play speech while digital sound effect is also playing
« on: October 08, 2015, 04:09:30 PM »
Is this possible?

It appears to work in ScummVM. Like, if I have a background digital sound effect playing (not midi), the speech is played along with it.

But if I run the same game in DOSBox, the digital sound effect stops playing when the speech starts.

Maybe it depends on the aud driver that's used?


Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Collector

Re: Play speech while digital sound effect is also playing
« Reply #1 on: October 08, 2015, 08:35:34 PM »
Give me a bit to go through a few of my games. There is a similar thread on VOGONS involving Goblin's Quest 3, which is after the point that Sierra started having influence over Cocktel's code. The CDA music cuts out for speech on a real DOS PC, but both play in ScummVM. http://www.vogons.org/viewtopic.php?f=7&t=45145
KQII Remake Pic

Offline troflip

Re: Play speech while digital sound effect is also playing
« Reply #2 on: October 08, 2015, 09:01:16 PM »
Interesting. Not sure it's related though, because that's CD audio.

In KQ6, in the opening scene by the beach, the digital audio cuts out, but then comes back once the speech is complete. I'd happy if I could even get that to work.

I don't see any code in KQ6's Talker script to make whatever was playing before the speech resume. It *does* lower the master volume before the speech starts and then restores it afterward. So even if KQ6 did support speech at the same time as digital audio, you wouldn't hear it. Maybe I can modify the KQ6 scripts a bit and see if I can get them playing simultaneously - that would at least show that it's possible with some SCI1.1 interpreters.

[edit:] ok, never mind, the ocean sound is actually a MIDI resource, not digital audio. So it's irrelevant...
« Last Edit: October 08, 2015, 09:05:49 PM by troflip »
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Collector

Re: Play speech while digital sound effect is also playing
« Reply #3 on: October 08, 2015, 10:48:50 PM »
I was not suggesting that it was exactly the same or even be of any help, just that it was such a similar issue that I was reminded of the Gob3 thread. Coktel used digital audio for all three Gobliiins games. Gob3 is the first one with synchronized speech. The speech audio is in a file, not the CDA track. While it uses the Gob engine, Coktel could have used shared Sierra code from what Sierra had built on from the Bright Star acquisition for synchronized speech.

Yeah, KQ6 does do a lot of MIDI SFX, like birds.
KQII Remake Pic

Offline MusicallyInspired

Re: Play speech while digital sound effect is also playing
« Reply #4 on: October 08, 2015, 11:09:29 PM »
Even simple sounds like knocking on a door, etc. I guess the trick is to use as many MIDI sfx as possible.
Brass Lantern Prop Competition

Offline troflip

Re: Play speech while digital sound effect is also playing
« Reply #5 on: October 09, 2015, 12:39:42 AM »
I wonder if the "only one digital audio track" limitation is enforced in the interpreter or is a limitation of the audio drivers. Are there any alternative audio drivers (e.g. for more modern soundcards) that people have implemented for sierra games?

Must have been a real art to make sound fx with MIDI. Does anyone know of a repository/source for such fx?
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline MusicallyInspired

Re: Play speech while digital sound effect is also playing
« Reply #6 on: October 09, 2015, 01:16:46 AM »
Sort of. Quest Studios has a vast database of MT-32 patches from all over, including Sierra games (which includes sound effects along with instruments). Like hundreds. But that's MT-32 only. I suppose the best thing to do would be to go through Sierra sound resources and pick out all the sounds and make a library out of those.
« Last Edit: October 09, 2015, 01:49:36 AM by MusicallyInspired »
Brass Lantern Prop Competition

Offline Collector

Re: Play speech while digital sound effect is also playing
« Reply #7 on: October 09, 2015, 01:17:11 AM »
I wonder if the "only one digital audio track" limitation is enforced in the interpreter or is a limitation of the audio drivers. Are there any alternative audio drivers (e.g. for more modern soundcards) that people have implemented for sierra games?
If by driver I would imagine that one from an SCI32 game would be capable, but doubt that any would be compatible with the new template game. Then again, this is exactly the kind of thing that NRS does all of the time.

As to a repository of MIDI SFX many could be ripped from existing SCI games. Wouldn't have to convert to SND, either. It would just be a bunch of busy work to go through them

Anyway, here are some MIDI SFX from the Freddy Disk version. If memory serves the SQ games used a lot of MIDI SFX.
KQII Remake Pic

Offline troflip

Re: Play speech while digital sound effect is also playing
« Reply #8 on: October 09, 2015, 01:45:02 PM »
Oh, it's not too much trouble to go through them with SCI Companion and pick out good ones. Ideally I was looking for something that doesn't rip Sierra resources though. I think you would want them in snd format though, since that contains different MIDI tracks for different sound cards.

As for "supporting" speech during looping digital audio background noises, it wouldn't be too hard to fade out a sound completely, and then restart and fade it in after the speech is done. It's not ideal, but it's a workaround.

KQ6 (and I'm sure other games, but not the SQ5-based template game) actually has code to fade out any other sounds to a low level (volume level 4) before speech starts, and then fade them back in. It doesn't work in DOSBox or ScummVM though (and I doubt it works natively) because it isn't based on the game timer. It just uses a for-loop to lower the volume every 1000 iterations, which is probably ends being like a microsecond on a modern computer.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Cloudee1

Re: Play speech while digital sound effect is also playing
« Reply #9 on: October 10, 2015, 11:14:35 AM »

In KQ6, in the opening scene by the beach, the digital audio cuts out, but then comes back once the speech is complete. I'd happy if I could even get that to work.


Yeah, that would be nice. For instance in my SQ2, if you are in the underground caverns, there is the water background sound. If you blow the whistle it stops the water and plays the whistle... and the water sound doesn't come back. It would be nice to figure out how to make that happen.
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline troflip

Re: Play speech while digital sound effect is also playing
« Reply #10 on: October 10, 2015, 01:51:45 PM »
Yeah, that would be nice. For instance in my SQ2, if you are in the underground caverns, there is the water background sound. If you blow the whistle it stops the water and plays the whistle... and the water sound doesn't come back. It would be nice to figure out how to make that happen.

Well, that's AGI, so that's a different beast.

In SCI, playing a second midi sound won't cause another to stop (though maybe it does with some drivers? I dunno. Maybe if you're using the PC-speaker).

My thought for SCI speech was to have a class that extends from Sound, say AtmosphericSound. The assumption would be that this is a looping digital sound. Then the Messager or Talker class would find instances of these (well, there should be just one), and fade them to zero over a short time, before starting the speech audio. Then after the speech is finished, it would restart them and fade them back up.


Interestingly, a bug in ScummVM (I claim): In Sierra's interpreter, DoAudio(audSTOP) will stop all digital sounds, even if they were started by DoSound. In ScummVM, DoAudio(audSTOP) only stops sounds that were started by DoAudio (which arguably makes more sense, but is still different than Sierra).
« Last Edit: October 10, 2015, 02:06:42 PM by troflip »
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline MusicallyInspired

Re: Play speech while digital sound effect is also playing
« Reply #11 on: October 10, 2015, 03:12:54 PM »
I think he's referring to the SQ2 project he's working on in SCI.
Brass Lantern Prop Competition

Offline Collector

Re: Play speech while digital sound effect is also playing
« Reply #12 on: October 10, 2015, 03:28:00 PM »
Maybe if you're using the PC-speaker).

That reminds me that the Gob games used the PC speaker for some sound FX like footsteps simultaneously with digital sounds on SB.
KQII Remake Pic

Offline Kawa

Re: Play speech while digital sound effect is also playing
« Reply #13 on: October 10, 2015, 04:08:47 PM »
That reminds me that the Gob games used the PC speaker for some sound FX like footsteps simultaneously with digital sounds on SB.
Imagine playing one of those with headphones on.

Offline Collector

Re: Play speech while digital sound effect is also playing
« Reply #14 on: October 10, 2015, 10:13:06 PM »
The only way that I can think that you could do that with an SCI would be to append an SB or AdLib driver with the STD driver the way someone did with the SB and GM drivers.
KQII Remake Pic


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.065 seconds with 24 queries.