diff --git a/public/index.php b/public/index.php index 1db38d9..f059152 100644 --- a/public/index.php +++ b/public/index.php @@ -2,17 +2,14 @@ const FORM_METHOD = 'GET'; // or 'POST' const FALLBACK_DRIVER_IMPEDANCE = 4.; const TWO_PI = 2. * 3.1415926535; -const FREQ_MIN = 250.; -const FREQ_MAX = 18000.; - -$form_source = FORM_METHOD === 'POST' ? $_POST : $_GET; -$woofer_impedance = FALLBACK_DRIVER_IMPEDANCE; -$tweeter_impedance = FALLBACK_DRIVER_IMPEDANCE; - -$form_submitted = !empty($form_source); +const FREQ_MIN = 500.; +const FREQ_MAX = 16000.; +$form = FORM_METHOD === 'POST' ? $_POST : $_GET; +$form_submitted = !empty($form); +$tweeter_impedance = $woofer_impedance = FALLBACK_DRIVER_IMPEDANCE; if ($form_submitted) { - $woofer_impedance = @(float)($form_source['w']) ?: FALLBACK_DRIVER_IMPEDANCE; - $tweeter_impedance = @(float)($form_source['t']) ?: FALLBACK_DRIVER_IMPEDANCE; + $tweeter_impedance = @(float)($form['tweeter_impedance']) ?: FALLBACK_DRIVER_IMPEDANCE; + $woofer_impedance = @(float)($form['woofer_impedance']) ?: FALLBACK_DRIVER_IMPEDANCE; } ?> @@ -37,7 +34,7 @@ if ($form_submitted) { .off-the-wall { margin-left: 3em; } - .has-breathing-room { + .with-breating-room { margin: 1.5em 1em; } .right-aligned { @@ -80,58 +77,76 @@ if ($form_submitted) { -
- This is a simple component calculator for a first-order crossover. Component values are calculated with the following formulae: -
+
+ This is a simple component calculator for a first-order crossover. + Component values are calculated with the following formulae: +
C = 1 / (2 * π * f * R)
L = R / (2 * π * f)
- -
- First-order filters have a 20 dB/decade (or 6 dB/octave) slope. All first-order filters have a Butterworth filter characteristic. [...] - First-order filters are considered by many audiophiles to be ideal for crossovers. This is because this filter type is 'transient perfect', meaning it passes both amplitude and phase unchanged across the range of interest. [...] - In practice, speaker systems with true first-order acoustic slopes are difficult to design because they require large overlapping driver bandwidth, and the shallow slopes mean that non-coincident drivers interfere over a wide frequency range and cause large response shifts off-axis.
-
From Wikipedia: Audio Crossover
+
+ First-order filters have a 20 dB/decade (or 6 dB/octave) slope. + All first-order filters have a Butterworth filter characteristic. + [...] + First-order filters are considered by many audiophiles to be ideal for crossovers. + This is because this filter type is 'transient perfect', + meaning it passes both amplitude and phase unchanged across the range of interest. + [...] + In practice, speaker systems with true first-order acoustic slopes are difficult to design + because they require large overlapping driver bandwidth, + and the shallow slopes mean that non-coincident drivers interfere + over a wide frequency range and cause large response shifts off-axis. +
+
+ From Wikipedia: Audio Crossover +
- -
+
- + - - + -
Tweeter impedance (Ω): + +
Woofer impedance (Ω): + +
- - - - - - + + +
- Component table for tweeter and woofer + Component table for tweeter + and woofer
Crossover Frequency (Hz) Tweeter Capacitor (μF) Woofer Inductor (mH)
+ + + + + +