Re: Universal Sound Board?

From: Zonn <zonn_at_concentric.net>
Date: Thu May 01 1997 - 21:33:00 EDT

At 05:20 PM 5/1/97 -0800, you wrote:
>Zonn writes:

>>I was thinking a neat approach would be to use a PIC processor for every
>>analog sound or two. The 16x6x series has a built in PCM output that with a
>>capacitor used for filtering, you can get up to 10 bits of resolution. That
>>would be 4 8bit sound samples (emulations?) with no loss. 8 bit samples
>>should be able to match the signal to noise ratio of the original sound
>>cards. They didn't use a lot of dynamic range, and those amplifiers were
>>not "low noise".
>
>I kicked this around a couple times too, but it came down to the fact that
>the PICs are great as long as you're doing stuff that will fit in the
>internal ROM. However, as soon as you get in a situation where you want to
>get at more memory all your nice PIC I/O gets sucked up trying to be an
>address and data bus. :-(
>
>As long as the waveforms are pretty simple (well, anything that could be a
>*small* table or some easy algorithmically generated thing like a square
>wave or pulse or triangle or something) the PIC could handle it OK, but the
>PICs lack any real worthwhile addressing modes for table lookups, and the
>internal memory is a little skimpy for any sort of real "samples".
>
>However, I bet some pretty convincing approximations of the sounds could be
>made. Do any of you have some .WAV or .AIFF sound files of what the
>Eliminator and Space Fury sounds are like?
>
>One thing the PIC does have on it's side is a a BUNCH of cycles per second.
>So a summation of four synthesized 8 bit voices would probably be doable.
>The state machine might get a little screwy to write in the PIC
>architecture though. Hmmmm.

When trying to come up with ideas for a Cinematronics Universal Sound card I
ran into the same problem. There's really no room to place samples in the
memory of a PIC, and even if you could the Harvard architecture makes it
difficult to access them...
>
>We could also do this-- digitize all the sound effects we want. Put all of
>them into a big EPROM and run the outputs of the EPROM to a simple little
>R2R output ladder. (A cheapo D/A). Then, send the output of the D/A to a
>mux than can be switched to N (8?) sample/hold caps. Have the PIC watch
>the sound "trigger" registers for what needs to be played. The PIC then
>runs the address lines of the EPROM, and the selector lines of the analog
>mux and uses the internal RAM to keep track of what sample is being played
>and the current "address pointer" for each sample.

But I hated to give up the "cheapness" of the PWM output of the PIC in
exchange for an external D/A and all the muxing involved, so I thought
another possibility would still be to use the PIC as the output device,
controlled by a master CPU.
The PIC could either look at a parallel port, and when I receives the data
adjust it's PWM counter's accordingly. Or it could use one of those
dedicated serial ports (data/clock) which can be run *really* fast, as it's
input. Since the PIC doesn't have to convert serial to parallel in
software, this can be just as fast. Either method would allow the PICs to
be nothing but dedicated D/A's with the possibility of 4 channels per PIC
and very little external hardware.

I also tossed around another idea that allowed the PIC to remain fully in
control of the sounds...

If you use one of the 33 I/O (40 pin) PICs, you can dedicate 8 lines to
inputs, and the rest (minus the PWM, and sound trigger lines) to outputs.
You can then connect the PICs outputs to the address lines of an external
EPROM, and the PICs inputs to the EPROMs data lines. This allows for a
*very* tight PIC loop, you set the outputs to the EPROM address, read the
EPROMs data, adjust the PWM timer, lather, rinse, repeat. This can be done
faster than if the data were actually in the PIC's ROM area!

A slightly more complicated loop would allow jumping between four different
waves in the EPROM before adjusting the PWM register, still allowing for 4
voices per PIC. Enough time might be left over to allow for volume
enveloping, though you'd probably have to give up a channel or two, but who
knows when it comes to just moving some data around those PICs are FAST!

A variation of this idea would be to have four loadable counters as the
address pointers, with the PIC controlling the enable lines of the
tri-statable counters. This way one write of the PIC could select between
the four addresses of the four voices, which could then be incremented
simultaneously. You could also use a smaller PIC. Each of the counters
could also go to different EPROMS, in which case all the EPROM's data lines
would be run in parallel and the EPROMs enable lines would be used as the
data selection lines.

I still might try this when I have some *spare* time (like that's ever going
to happen!)

<snip>

>I was thinking of those little 3 wire guys that Radio Shack used to
>sell. I think they were genuine white noise sources. (I don't know if the
>XOR method would really give you "white" or not, I'd suspect it would be
>pink noise of some variation...) It looks like the universal sound boards
>have 'em on them...

The ones that I bought a couple of, at Radio Shack, a while back were based
on the shift register approach, they included a schematic of their guts.
But that doesn't mean a thing, since most of what Radio Shack sells, they
found in someone else's garbage, there is no telling what has been on the
shelves of the "Shack" through the years. And it seems like I remember some
noise IC based on a leaky (zener) diode.

The shift registers are definitely lacking in low end noise. Just compare
the rumbling explosions used in Space War where a leaky transistor was used
as the noise source and the hollow tinny explosions of Star Castle, where
the shift register approach was used. The Space War is much nicer.

-Zonn
Received on Thu May 1 18:34:50 1997

This archive was generated by hypermail 2.1.8 : Fri Aug 01 2003 - 00:32:03 EDT