<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Wed, 19 May 2004 12:07:01 +0100
From   : Richard Gellman <splodge@...>
Subject: Re: Sound wave representation

Charles Ripperton wrote:

>Hi Beeb fans,
>
>I've got some queries about BBC Micro sound / playing samples.
>My understanding is that the SN76489 is capable of 4-bit sound
>sample playback, and that the nybbles used are unsigned. In
>other terms, the value 15 means the highest positive wave
>amplitude, the value 0 means the lowest negative wave amplitude
>and somewhere between the values 8 and 7 is the
>'zero displacement'. 
>
>Is this accurate? If I'm incorrect, then please explain what
>the true situation is. Cheers.
>
>Charles.
>
>  
>
Yep, thats correct. You will need to generate your waves in machine code 
programming the VIA direct, as OS calls/SOUND are too slow. You will 
need to set the pitch to its highest value, which is so ridiculously 
high that nobody can actually hear it. This causes a "half position" on 
the speaker cone, which can then be varied by adjusting the attentuation 
values (the chip works inversely, having 0 as "full volume" and 15 as 
"infinite attentuation").

For extra resolution you can use some devious channel-combining. Since 
the amplitudes of each channel are combined to give a final output, you 
can use the relative amplitudes of the channels to increase the 
resolution. Superior Software used this technique for its audio samples. 
I believe you can get a 6 bit resolution this way.

-- Richard Gellman

>===================================================================
>SEE THAT BELOW THERE IS NO ABSOLUTE WAY TO PINPOINT A ZERO-CROSSING.
>THE CLOSEST ONE GETS TO IT IS BY USING '7' OR '8'.
>===================================================================
>
> 15 (Maximum volume on 'positive' side of wave)
> 
> .
> .
> .
>
> 9           *
> 
> 
>        
> 8     *           *
>   
>--------------------------------------------------------------------
>   
> 7                   *           *
> 
>  
> 
> 6                         *
> 
> .
> . 
> . 
> 
> 0 (Maximum volume on 'negative' side of wave)
>
>
>--
>
>
>
>   
>           
>__________________________________
>Do you Yahoo!?
>SBC Yahoo! - Internet access at a great low price.
>http://promo.yahoo.com/sbc/
>
>  
>
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>