Big Bird's Hide and Speak sample compression

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems. See the NESdev wiki for more information.

Moderator: Moderators

User avatar
Dwedit
Posts: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Post by Dwedit »

Sonic the Hedgehog for Game Gear uses 4-bit PCM audio for the SEGA sound.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru »

Dwedit wrote:Sonic the Hedgehog for Game Gear uses 4-bit PCM audio for the SEGA sound.
But it's played back using the square wave channels, right?
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

rainwarrior wrote:The ghostbusters thing doesn't sound like fixed bit compression to me. If I had to guess what's going on there, I'd say it cuts the sound into short segments and replaces each segment with a single cycling waveform that is a close match.
That's how the Digitalker family of codecs works, by treating voice as periodic over the short term. But in addition to periodism and 2-bit delta coding, it employs two other non-obvious (at the time) techniques. It changes the phase of each period sample to all cosines so that it can use a ping-pong loop (2x saving), and it silences the half of that sample that has the least energy (another 2x saving). That's how games using MX squeeze voice into 4 kbps or smaller at the expense of a bit of "robot voice". The developers of BBH&S probably didn't want the "robot voice" and were willing to spend a lot of bits to eliminate it.
tokumaru wrote:
Dwedit wrote:Sonic the Hedgehog for Game Gear uses 4-bit PCM audio for the SEGA sound.
But it's played back using the square wave channels, right?
Yes, and the PCM sample had to be stored logarithmically because of this.
NEStegg
Posts: 10
Joined: Fri Jul 29, 2011 12:31 pm
Location: Seattle

Post by NEStegg »

Now I am getting a bit of a better understanding of how these PCM-based speech engines work. I've got the jist of how the sample playback works, but it is animating the character's mouth that I am wondering about.

Of course, accurate lip synching is not an overall necessity, considering that the sample playback requires 100% CPU attention. I mean, in Sesame Street Countdown, when the Count says, "'Ah, 'ah, 'ah! Find [number]," his mouth only opens three times. I'd love to find out how Hide & Speak manages to keep Big Bird's mouth moving during smaple playback.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

Moving the beak during sample playback is as easy as updating a couple entries in a display list, waiting for vblank, and then blasting the display list to the PPU through $4014. This probably happened at the breaks between concatenated waves, seeing as all the voiceless consonants are stored as separate waves.
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru »

NEStegg wrote:I'd love to find out how Hide & Speak manages to keep Big Bird's mouth moving during smaple playback.
The rate at which the graphics have to be animated is pretty low. I'm sure there's some time between the output of consecutive samples to update some sprites and/or background tiles. In a mapper like the MMC3, that can bankswitch small portions of CHR-ROM, it would be even easier.
Drag
Posts: 1615
Joined: Mon Sep 27, 2004 2:57 pm
Contact:

Post by Drag »

They probably sneak the mouth movements into the tiny tiny pauses during speech.
User avatar
Dwedit
Posts: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Post by Dwedit »

The most ridiculous attempt at PCM I've ever seen was Ultimate Stuntman. They used PCM sound for drums even during gameplay sequences. Quality often sucks. DMC would have sounded much better.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Post by rainwarrior »

Most of the samples are broken up in such a way that facilitate animation. Here's an alternative dump with a pop between every individual sample.

http://rainwarrior.ca/projects/nes/Sesa ... %20div.wav

Notice, for instance, that "hide and" are together as a single sample, and as you might expect, he does not close his mouth between them in-game. Not sure why the alphabet letters are so broken up; I don't think there's any animation during them, really.

Also, this game is MMC1, if anyone's wondering. No special timing hardware was involved, it's pretty much all just cycle counting.

Dwedit, are you sure about Ultimate Stuntman? The NSF version is constantly playing DPCM samples in every track.
Last edited by rainwarrior on Mon Sep 07, 2015 8:34 am, edited 1 time in total.
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Post by thefox »

rainwarrior wrote:Dwedit, are you sure about Ultimate Stuntman? The NSF version is constantly playing DPCM samples in every track.
Yes, Ultimate Stuntman definitely uses raw PCM during gameplay as well.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
Bananmos
Posts: 552
Joined: Wed Mar 09, 2005 9:08 am
Contact:

Post by Bananmos »

Dwedit, are you sure about Ultimate Stuntman? The NSF version is constantly playing DPCM samples in every track.
That's because Kevtris (the man behind th NSF format) converted the samples from PCM to DPCM when he ripped that NSF back in the good old early days of NSF ripping :)
ccovell
Posts: 1045
Joined: Sun Mar 19, 2006 9:44 pm
Location: Japan
Contact:

Post by ccovell »

rainwarrior wrote:Not sure why the alphabet letters are so broken up; I don't think there's any animation during them, really.
Probably because about 10 of the consonants end in the "ee" sound so it can be re-used.
User avatar
Doommaster1994
Posts: 162
Joined: Mon Jun 21, 2010 10:23 pm
Location: Seattle, WA
Contact:

Post by Doommaster1994 »

I know Michael Riedel over the net if you guys want me to ask him anything. Though he never replies to my messages anymore, but I can try. I remember mentioning this game to him and he didn't have a lot to say about it. I also know one of the programmers if you're interested, though again, he didn't have a lot to say about the game either.
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Post by rainwarrior »

I dunno, at this point I know everything I ever wanted to know about Big Bird's Hide and Speak. I can't think of anything I'd want to ask.
User avatar
B00daW
Posts: 586
Joined: Thu Jan 03, 2008 1:48 pm

Re: Big Bird's Hide and Speak sample compression

Post by B00daW »

http://www.glitterberri.com/developer-i ... f-sunsoft/

Apparently Mozer ESS was used in Mito Koumon 1 and 2 for the Famicom as well.
Post Reply