Re: [hatari-devel] YM2149 Anti-Alias Filter

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


On Sunday 10 June 2012 10:44, Nicolas Pomarède wrote:
> On 24/05/2012 04:43, David Savinkoff wrote:
> > Hi Nicolas,
> >
> > Here is an anti-alias filter for the YM2149.
> >
> > This piecewise selective filter works by filtering the falling
> > edge of a sampled pulse-wave differently from the rising edge.
> >
> > Piecewise selective filtering is effective because harmonics on
> > one part of a wave partially define harmonics on other portions.
> >
> > Piecewise selective filtering can efficiently reduce aliasing
> > with minimal harmonic removal.
> >
> > I disclose this information into the public domain so that it
> > cannot be patented. May 23 2012 David Savinkoff.
> >
> > David
>
> Hello
>
> I'm slowly processing my unanswered mails ...
>
> So, in your PWMaliasFilter, you give :
>
> 	if (x0 >= y0)
> 	/* YM Pull up   */
> 		y0 = x0;
> 	else
> 	/* R8 Pull down */
> 		y0 = (3*(x0 + x1) + (y0<<1)) >> 3;
>
> But in the LowPassFilter we had :
>
>          if (x0 >= y0)
>          /* YM Pull up:   fc = 7586.1 Hz (44.1 KHz), fc = 8257.0 Hz (48
> KHz) */
>                  y0 = (3*(x0 + x1) + (y0<<1)) >> 3;
>          else
>          /* R8 Pull down: fc = 1992.0 Hz (44.1 KHz), fc = 2168.0 Hz (48
> KHz) */
>                  y0 = ((x0 + x1) + (6*y0)) >> 3;
>
>
> Is it normal that the YM pull up behaviour in low pass filter is now
> used in the R8 pull down part for the PWMaliasFilter ?
>

Yes. By-the-way, the low-pass anti-alias cutoff frequency is not
critical as long as it doesn't filter the music, thus, a convenient
and existing filter is used. Note that this filter (and the previously
disabled filter) are an alternative to BLEPs.
https://ccrma.stanford.edu/~juhan/vas.html

This anti-aliasing makes an improvement to the sound. Listen to
P7ACTION (STE) and other tunes in 505's BLUBBER.PRG for
clarity.

The pull-up and pull-down resistance are of significance when making
DSP filters; however, these resistances are usually the same. To
model the YM2149, one must do circuit analysis and go beyond what
is written in DSP textbooks. This exercise got me to 'at least' make
some personal discoveries which others can now ponder over.

>
> Also, what do you mean about patent ? What part of this anti-alias
> filter would be patentable ? The coefficients used ?
>
I never mentioned coefficients because they are purely mathematical.

Quoting what I previously wrote:
/**
 * This piecewise selective filter works by filtering the falling
 * edge of a sampled pulse-wave differently from the rising edge.
 *
 * Piecewise selective filtering is effective because harmonics on
 * one part of a wave partially define harmonics on other portions.
 *
 * Piecewise selective filtering can efficiently reduce aliasing
 * with minimal harmonic removal.
 *
 * I disclose this information into the public domain so that it
 * cannot be patented. May 23 2012 David Savinkoff.
 */

See "Piecewise Functions" on Wikipedia and Google.

As far as patents go; I'm sure anything is patentable if you
have enough money and lawyers.

Note that what I've mentioned may not be patentable, and
that my personal discoveries may be well known.

Now for the double-slit wave-particle duality experiment
connection to piecewise selective filtering. :)

If an amplifier is pinged with a cosmic particle, its frequency
domain is filled with all harmonics afterwards with respect
to the time domain. If the amplifier gets pinged again,
periodicity in harmonics shows up because of the period
between the two pings (which was indeterminable before
the second ping). Which means you can correct the past
harmonics to some extent by supplying a correction.

Thus:
 * Piecewise selective filtering is effective because harmonics on
 * one part of a wave partially define harmonics on other portions.
 
David

>
> Nicolas



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/