Re: Band-limited AY emulation




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 :))

.



Relevant Pages

  • Re: Band-limited AY emulation
    ... a buffer containing the state of the "wave", either high or low, and another buffer containing the volume levels. ... Then output the bandlimited step response modulated ... electronics - would the filter essentially be a capacitor arrangement? ... AY module, say AYOUT. ...
    (comp.sys.sinclair)
  • Re: Why Redraw of the whole page when paginating?
    ... I don't think there will have much difference between the FireFox or IE's ... behavie on handling buffered web page response. ... data and enable output buffer, both firefox and IE will provide blank ... So far I can't get some other options for the buffered web pages, however, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: GET webpage pix into image control via ITC (VB6)
    ... Hi, J French, and thanks for the response! ... How do I tell where the end of the file data really is at in the buffer, ... get the binary file in just one gulp, the resultant picture file could not ... > Do While Not bDone ...
    (microsoft.public.vb.general.discussion)
  • Re: Do Events
    ... The default setting in>= IIS 5.0 is the buffer all the response text, ... meaning that no response is sent to the client until all the server-side ... > generated which are displayed within the browser and saved to a database. ... > the entire script. ...
    (microsoft.public.inetserver.asp.general)
  • [PATCH] Documentation update for relay interface
    ... Here's updated documentation for the relay interface, ... +efficiently log and transfer large quantities of data from the kernel ... +A 'relay channel' is a kernel->user data relay mechanism implemented ... +buffer data. ...
    (Linux-Kernel)