Re: Band-limited AY emulation
- From: A936@xxxxxxxxxxx
- Date: 22 Dec 2005 14:45:34 -0800
W Marsh wrote:
> * The AY emulator itself generates two outputs for each sound channel -
> a buffer containing the state of the "wave", either high or low, and
> another buffer containing the volume levels. The sound is then rendered
> into an output buffer using band-limited steps at change points in the
> high/low buffer, and modulated with the volume level buffer. I think
> this is essentially the approach used with this library:
> http://www.slack.net/~ant/libs/#Blip_Buffer. A nasty problem with this
> occurs when the channel volume registers are manipulated at a high
> speed, as then THOSE frequencies become high enough to cause aliasing.
> Perhaps this could be corrected by also using a band-limited step for
> the volume envelopes, and making sure not to create a terrible aliasing
> monster when everything is modulated together (less bandwidth for each
> output 'signal', perhaps).
I agree with the direction you're headed in. The right kind
of signal shaping should mimic what the hardware does.
I would suggest computing the total output as a result of all
wave/volume effects on all channels and add them up to get
the total volume the ay chip is actually outputting. Have the
new value stored in NEWVAL, say, and the previous value in
PREVAL. Then output the bandlimited step response modulated
by the difference (NEWVAL-PREVAL).
The bandlimited step response should mimic the Spectrum's
audio output circuitry. The output circuitry is probably
effectively a cascade of two low pass filters (one for the
RC components and one for the speaker). Compute
a unit step response for such a cascade filter and this
should be the bandlimited step response you can use.
Have a "steady state output value" for the output of the
AY module, say AYOUT. When a changed volume occurs,
the AY module indexes through the bandlimited step
response at the sample rate, adding the step response
to AYOUT to get the resulting output waveform. At
the end of the step resonse, the transient bandlimited
step response will have settled at its final value. Add that
final value to AYOUT and terminate the bandlimited step
response for the volume change that occurred some time
earlier. Your sample rate and frequency of AY chip volume
changes will determine how many indices are travelling
through the recorded bandlimited step response at any
one time.
I think you should still be oversampling and applying an
output low pass filter well away from the 11khz or so
bw that the Spectrum hw has.
Mainly a vote of confidence in your idea as this is pretty
much what you suggested :))
.
- Follow-Ups:
- Re: Band-limited AY emulation
- From: W Marsh
- Re: Band-limited AY emulation
- References:
- Band-limited AY emulation
- From: W Marsh
- Band-limited AY emulation
- Prev by Date: Re: Westbang
- Next by Date: Re: Trying to locate ramsoft mgt +D disk archive
- Previous by thread: Re: Band-limited AY emulation
- Next by thread: Re: Band-limited AY emulation
- Index(es):
Relevant Pages
|