[hatari-devel] LMC1992 and Microwire emulation
Laurent Sallafranque
laurent.sallafranque at free.fr
Tue Mar 9 08:46:57 CET 2010
Hello David,
First, thanks for the help.
Filters and sound theory are not really what I understand the best.
I'm a bit lost with this.
Would you enjoy to help us and give it a try by yourself ?
You could add the Falcon and Ste filters for volume and Bass/Treble (Ste).
All the componet emulation is coded, there's just the filters to add.
This would help and would be done much better than if I do it myself.
At least, if you can't, would you describe me the algorithm to implement ?
(I would translate it to C language).
Best regards,
Laurent
David Savinkoff a écrit :
> Hi laurent,
>
> I'm reasonably sure that the Falcon codec would use a second order,
> infinite impulse response ( IIR ) shelving filter because that is what is
> used on other codecs with tone controls. What I wrote earlier implied
> that the moving average filter is what the codec uses. The moving
> average filter is a simplified finite impulse response ( FIR ) filter.
>
> Volume is usually done after filtering so that you can cut and boost
> the bass and treble and mix in unfiltered sound.
>
> By the way, as a first approximation for the number of samples to
> use in the filter try:
> Sampling frequency / Cutoff frequency = Averaging length
> eg.
> 44100Hz / 630Hz = 71 averaged samples (or 65 for 2^n)
> It is Imperative that an Odd number of samples be used.
>
>
> Mar 8, 2010 02:33:59 PM, laurent.sallafranque at free.fr
> <mailto:laurent.sallafranque at free.fr> wrote:
>
> Another question :
>
> Is there an order for effects computing ?
>
> Should I compute volume before and IIR after, or IIr before and sound
> after ?
>
> Regards
>
> Laurent
>
>
>
> David Savinkoff a écrit :
> > Hi,
> >
> > A FFT is not the solution, an IIR filter is required. See:
> > http://www.dspguide.com/
> > for a freely downloadable book.
> > My recommendation is to use a running average filter.
> > This is similar to a FIFO, but where you add samples into
> > a variable and subtract an old sample out every time you
> > add a new one in. How many samples are averaged depends
> > on the cut off frequency desired (this is a low pass filter) and
> > the sampling frequency. To make a treble filter, subtract an
> > averaged value from an input value. Note that the delay of
> > the filter is considered to be half of the averaging length.
> >
> >
> > Mar 7, 2010 09:18:03 AM, laurent.sallafranque at free.fr
> <mailto:laurent.sallafranque at free.fr>
> > laurent.sallafranque at free.fr
> <mailto:laurent.sallafranque at free.fr>> wrote:
> >
> > Hello,
> >
> > I've added LMC1992 and Microwire emulation to hatari.
> >
> > For now, Master volume, left volume and right volume are emulated.
> > Still to do : Bass and Treble.
> > Does it need a FFT and FFT -1 transformation or are there specifics
> > algorythms for bass and treble ?
> >
> > I've done my tests with protracker Ste.
> >
> > I think there's a problem anyway for both falcon volume table
> and ste
> > volume table :
> >
> > I've used a linear volume table to calculate values from the min
> > to the max.
> > I think values should be calculated with a logarythmic algo.
> > (There's only values in the volume_table to change, nothing else)
> >
> > Do you agree ?
> >
> > Could somebody compare volume in protracker in hatari and on a
> > real ste ?
> >
> > Regards
> >
> > Laurent
> >
> > _______________________________________________
> > hatari-devel mailing list
> > hatari-devel at lists.berlios.de
> <mailto:hatari-devel at lists.berlios.de>
> hatari-devel at lists.berlios.de <mailto:hatari-devel at lists.berlios.de>>
> > https://lists.berlios.de/mailman/listinfo/hatari-devel
> >
>
More information about the hatari-devel
mailing list