ref: 7a78592b77b3f134f055c2a3deec55db510bff65
parent: bc2399919157dda16f0fb67aa40bc947198c2dab
author: Olav Sørensen <olav.sorensen@live.no>
date: Fri Dec 4 18:58:35 EST 2020
Changed/added a few comments
--- a/src/pt2_audio.c
+++ b/src/pt2_audio.c
@@ -658,8 +658,9 @@
static void calculateFilterCoeffs(void)
{
- /* Amiga 500 filter emulation, by aciddose
+ /* Amiga 500/1200 filter emulation
**
+ ** aciddose:
** First comes a static low-pass 6dB formed by the supply current
** from the Paula's mixture of channels A+B / C+D into the opamp with
** 0.1uF capacitor and 360 ohm resistor feedback in inverting mode biased by
@@ -719,7 +720,7 @@
fc = 1.0 / (2.0 * pi * R * C);
calcRCFilterCoeffs(audio.outputRate, fc, &filterLoA500);
- // A1200 1-pole (6db/oct) static RC low-pass filter:
+ // A1200 1-pole (6dB/oct) static RC low-pass filter:
if (audio.outputRate >= 96000) // cutoff is too high for 44.1kHz/48kHz
{
R = 680.0; // R321 (680 ohm resistor)
@@ -737,13 +738,13 @@
fb = 0.125; // Fb = 0.125 : Q ~= 1/sqrt(2)
calcLEDFilterCoeffs(audio.outputRate, fc, fb, &filterLED);
- // A500 1-pole (6db/oct) static RC high-pass filter:
+ // A500 1-pole (6dB/oct) static RC high-pass filter:
R = 1390.0; // R324 (1K ohm resistor) + R325 (390 ohm resistor)
C = 2.233e-5; // C334 (22uF capacitor) + C335 (0.33�F capacitor)
fc = 1.0 / (2.0 * pi * R * C);
calcRCFilterCoeffs(audio.outputRate, fc, &filterHiA500);
- // A1200 1-pole (6db/oct) static RC high-pass filter:
+ // A1200 1-pole (6dB/oct) static RC high-pass filter:
R = 1390.0; // R324 (1K ohm resistor) + R325 (390 ohm resistor)
C = 2.2e-5; // C334 (22uF capacitor)
fc = 1.0 / (2.0 * pi * R * C);
--- a/src/pt2_downsample2x.c
+++ b/src/pt2_downsample2x.c
@@ -11,6 +11,9 @@
/*
** - all-pass halfband filters (2x downsample) -
+**
+** 8bitbubsy: Not sure who coded these. Possibly aciddose,
+** or maybe he found it on the internet somewhere...
*/
static double f(const double in, double *b, const double c)
--- a/src/pt2_ledfilter.c
+++ b/src/pt2_ledfilter.c
@@ -3,7 +3,8 @@
#include "pt2_rcfilter.h" // DENORMAL_OFFSET definition
#include "pt2_ledfilter.h"
-/* Imperfect Amiga "LED" filter implementation. This may be further improved in the future.
+/* aciddose:
+** Imperfect Amiga "LED" filter implementation. This may be further improved in the future.
** Based upon ideas posted by mystran @ the kvraudio.com forum.
**
** This filter may not function correctly used outside the fixed-cutoff context here!
--- a/src/pt2_rcfilter.c
+++ b/src/pt2_rcfilter.c
@@ -1,3 +1,6 @@
+// 1-pole 6dB/oct RC filters, code by aciddose (I think?)
+
+
#include <stdint.h>
#include <math.h>
#include "pt2_rcfilter.h"