Subject: Re: [stella] One Bit Sound? From: Lord Spambraticus of Borg <lord-of-hell@xxxxxxxxxxxxxxxx> Date: Wed, 10 Feb 1999 16:29:22 +1000 |
On Wed, 10 Feb 1999 00:26:09 -0500 schwerin@xxxxxxxx (Schwerin) wrote: >Is there anyway to create hi-lo 1 bit squarewave audio ouput >with CPU control over the duration of the hi and lo states? > >for example, to generate a squarewave: > > __________ >______A| B|___________C|... > >where A, B, and C are non-equal time intervals. >[snip] Heheh, this is called Pulse Width Modulation (PWM), and yes, it can be used to very crudely playback digital samples. You'd have to figure a way you could clamp the "level" high and low under precise cpu control, however. My understanding of the sound chip is that it has free-running oscillators.... if you can control the phase of a pair of oscillators, you could do 3 voices of PWM by putting two oscillators at 180 degrees phase difference (at a moderately low frequency) for a "0" level, and 0 degrees phase difference for a "1". 3 voices you ask? Well, there are 4 oscillators in the VCS, right? If you use oscillator 0 as the "reference" tone, and just vary the phase of the other 3, you can switch any of the three from "0 sum" or "1 sum" at will. Of course.... "drifting" phase variations will require occasional "resynchs". This is a very dirty and clumsy method though. But yes, you basically described a method like that later in your e-mail.... >The other option would be to "model by clay" a custom audio ouput through >various register stores to the audio registers (a linear piecewise >synthesis). This, however, is mind bogglingly complex, and doesn't >guarantee any specific level of fidelity to the original waveform. Well, assuming you have 4 sine wave oscillators, yes.... you have at your disposal essentially a 4-parametre resynthesis module. (Varying the frequency and power of each oscillator quickly in time). 4 parametre resynthesis is probably not that good... though it has the nifty advantage of being able to adjust pitch w/o altering the "speed" of the sample [such as the high-end synths like the Synclavier could do]. You'd need to make a tool that took a sample and came up with the pitch values of each generator through time, and hope the oscillators don't do anything too nasty when its frequency is changed. (The tool would convolve the time domain sample data into frequency domain.) This topic is intriguing enough to me to be tempted to muck around with Stella and DASM and try out some tests. [I haven't had a real VCS in ages] =Rob= -- Archives (includes files) at http://www.biglist.com/lists/stella/archives/ Unsub & more at http://www.biglist.com/lists/stella/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[stella] One Bit Sound?, Schwerin | Thread | Re: [stella] One Bit Sound?, Glenn Saunders |
[stella] One Bit Sound?, Schwerin | Date | Re: [stella] Poll: Developer Wishli, Erik Mooney |
Month |