Skip to content

Instantly share code, notes, and snippets.

@geraintluff
Created February 1, 2025 19:15
Show Gist options
  • Save geraintluff/288080d44aaa7487de811887c8c6c499 to your computer and use it in GitHub Desktop.
Save geraintluff/288080d44aaa7487de811887c8c6c499 to your computer and use it in GitHub Desktop.
Test code and output plots comparing two very-close BLAMPs vs a single BLEP, with single-precision float
#include "elliptic-blep.h"
#include "plot.h"
#include "simple-fft.h"
#include <vector>
void generateWaveform(float freq, float shape, std::vector<float> &result, bool sawtooth) {
float phase = 0;
float gradUp = freq*2/shape;
float gradDown = freq*-2/(1 - shape);
float corner1 = 0.5*shape, corner2 = 1 - corner1;
signalsmith::blep::EllipticBlep<float> blepper;
// Initial gradient change to kick us off
blepper.add(gradUp, 2);
for (auto &v : result) {
// Move the oscillator forwards
float prevPhase = phase;
phase += freq;
// And the blepper
blepper.step();
if (sawtooth) {
if (phase >= corner1 && prevPhase < corner1) {
float samplesInPast = (phase - corner1)/freq;
// -2 step jump
blepper.add(-2, 1, samplesInPast);
}
if (phase >= 1) {
phase -= 1;
}
} else {
if (phase >= corner2 && prevPhase < corner2) {
float samplesInPast = (phase - corner2)/freq;
blepper.add(gradUp - gradDown, 2, samplesInPast);
}
if (phase >= 1) {
phase -= 1;
prevPhase -= 1;
}
// Discontinuities
if (phase >= corner1 && prevPhase < corner1) {
float samplesInPast = (phase - corner1)/freq;
blepper.add(gradDown - gradUp, 2, samplesInPast);
}
}
// Naive waveform
if (phase < corner1) {
v = 2*phase/shape;
} else if (phase < corner2) {
v = (2*phase - 1)/(shape - 1);
} else {
v = 2*(phase - 1)/shape;
}
// Add BLEP
v += blepper.get();
}
}
int main() {
size_t length = 16384;
float freq = 0.02373020996; // C6 at 44.1kHz
signalsmith::plot::Figure figure;
auto &timePlot = figure(0, 0).plot(600, 150);
timePlot.x.linear(9.9/freq, 14.6/freq);
timePlot.y.major(0).linear(-1.1, 1.1).minors(-1, 1);
auto &freqPlot = figure(0, 1).plot(600, 200);
freqPlot.x.linear(0, 0.5).major(0).minor(0.5, "Nyquist").label("frequency");
freqPlot.y.linear(-130, 0).major(0).minors(-30, -60, -90, -120).label("dB");
auto &timeLine = timePlot.line();
auto &freqLine = freqPlot.line();
std::vector<float> signal(length);
signalsmith::linear::SimpleFFT<float> fft(length);
using Complex = std::complex<float>;
std::vector<Complex> fftTime(length), fftFreq(length);
auto plotWaveform = [&](float shape, bool sawtooth){
generateWaveform(freq, shape, signal, sawtooth);
// Spectrum analysis
for (size_t i = 0; i < length; ++i) {
float r = (i + 0.5f)/length;
fftTime[i] = signal[i]*(1 - std::cos(2*M_PI*r));
}
fft.fft(length, fftTime.data(), fftFreq.data());
// Plot waveform and spectrum
for (size_t i = 0; i < length; ++i) {
timeLine.add(i, signal[i]);
float db = 10*std::log10(std::norm(fftFreq[i]/float(length)) + 1e-30f);
freqLine.add(i/float(length), db);
}
};
for (double r = 0; r <= 1; r += 0.01) {
float shape = 0.5 + 0.499*std::sin(r*2*M_PI);
plotWaveform(shape, false);
figure.toFrame(r*10);
}
figure.loopFrame(10);
figure.write("animation.svg");
figure.toFrame(0);
figure.clearFrames();
timePlot.title("shape = 0.5");
plotWaveform(0.5, false);
figure.write("shape-5.svg");
figure.toFrame(0);
figure.clearFrames();
timePlot.title("shape = 0.9");
plotWaveform(0.9, false);
figure.write("shape-9.svg");
figure.toFrame(0);
figure.clearFrames();
timePlot.title("shape = 0.999");
plotWaveform(0.999, false);
figure.write("shape-999.svg");
figure.toFrame(0);
figure.clearFrames();
timePlot.title("shape = 0.9999");
plotWaveform(0.9999, false);
figure.write("shape-9999.svg");
figure.toFrame(0);
figure.clearFrames();
timePlot.title("shape = 0.99999");
plotWaveform(0.99999, false);
figure.write("shape-99999.svg");
figure.toFrame(0);
figure.clearFrames();
timePlot.title("shape = sawtooth");
plotWaveform(1, true);
figure.write("shape-sawtooth.svg");
}
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" class="svg-plot" xmlns="http://www.w3.org/2000/svg" width="680.8pt" height="428pt" viewBox="-10 -10 680.8 428" preserveAspectRatio="xMidYMid"><rect x="-10" y="-10" width="680.8" height="428" class="svg-plot-bg"/><g transform="translate(42.7 4)"><g class="svg-plot-group"><rect x="0" y="0" width="600" height="150" class="svg-plot-axis"/><line x1="0" x2="600" y1="75" y2="75" class="svg-plot-major"/><line x1="0" x2="600" y1="143.182" y2="143.182" class="svg-plot-minor"/><line x1="0" x2="600" y1="6.81818" y2="6.81818" class="svg-plot-minor"/><clipPath id="clip0"><rect x="-0.75" y="-0.75" width="601.5" height="151.5"/></clipPath><g clip-path="url(#clip0)"><path class="svg-plot-line svg-plot-s0 svg-plot-d0" d="M -1263.83 74.98 -1263.83 74.98 -3.6 95.4 -0.57 95 2.45 90.7 5.48 86.77 8.51 85.5 11.54 79.19 14.57 79.56 17.6 72.39 20.63 72.88 23.66 66.21 26.69 65.73 29.72 60.34 32.75 58.43 35.78 54.49 38.81 51.2 41.84 48.5 44.87 44.17 47.9 42.28 50.92 37.39 53.95 35.81 56.98 30.85 60.01 29.12 63.04 24.5 66.07 22.28 69.1 18.26 72.13 15.38 75.16 12.59 78.19 17.68 81.22 68.51 81.22 68.51 84.25 153.48 84.25 153.48 87.28 151.04 90.31 115.23 93.34 142.15 96.37 121.3 99.39 123.49 102.42 124.42 105.45 112.23 108.48 120.16 111.51 105.36 114.54 112.12 117.57 101.22 120.6 102.91 123.63 97.11 126.66 94.22 129.69 92.31 132.72 86.26 135.75 86.71 138.78 79.17 141.81 80.24 144.84 72.86 147.87 73.13 150.89 67.04 153.92 65.72 156.95 61.32 159.98 58.36 163.01 55.46 166.04 51.21 169.07 49.34 172.1 44.35 175.13 42.92 178.16 37.77 181.19 36.26 184.22 31.4 187.25 29.42 190.28 25.17 193.31 22.49 196.34 18.98 199.36 15.58 202.39 13.09 205.42 15.18 208.45 57.54 211.48 144.09 211.48 144.09 214.51 157.97 214.51 157.97 217.54 115.17 220.57 139.69 223.6 125.71 226.63 120.31 229.66 127.41 232.69 111.26 235.72 121.02 238.75 106.28 241.78 111.53 244.81 103.05 247.84 101.92 250.86 98.96 253.89 93.45 256.92 93.76 259.95 86 262.98 87.59 266.01 79.49 269.04 80.59 272.07 73.65 275.1 73.11 278.13 68.06 281.16 65.58 284.19 62.37 287.22 58.28 290.25 56.38 293.28 51.31 296.31 50.05 299.33 44.67 302.36 43.41 305.39 38.29 308.42 36.57 311.45 32.08 314.48 29.62 317.51 25.91 320.54 22.66 323.57 19.71 326.6 15.8 329.63 13.6 332.66 13.48 335.69 47.77 338.72 133.01 338.72 133.01 341.75 163.38 341.75 163.38 344.78 117.23 347.8 135.86 350.83 130.51 353.86 117.5 356.89 129.59 359.92 111.25 362.95 120.95 365.98 107.99 369.01 110.37 372.04 105.2 375.07 100.82 378.1 100.74 381.13 92.9 384.16 94.91 387.19 86.11 390.22 88.1 393.25 80.18 396.28 80.61 399.3 74.7 402.33 72.9 405.36 69.21 408.39 65.4 411.42 63.4 414.45 58.28 417.48 57.18 420.51 51.56 423.54 50.59 426.57 45.16 429.6 43.75 432.63 38.96 435.66 36.77 438.69 32.84 444.75 26.68 447.77 22.85 450.8 20.4 453.83 16.08 456.86 14.05 459.89 12.46 462.92 39.3 465.95 120.74 465.95 120.74 468.98 166.73 468.98 166.73 472.01 121.35 475.04 131.11 478.07 135.16 481.1 115.52 484.13 130.68 487.16 112.3 490.19 119.99 493.22 110.33 499.27 107.42 502.3 99.86 505.33 102.23 508.36 92.72 511.39 95.63 514.42 86.65 517.45 88.19 520.48 81.21 523.51 80.36 526.54 75.93 529.57 72.61 532.6 70.36 535.63 65.28 538.66 64.3 541.69 58.44 544.72 57.79 547.74 52 550.77 50.95 553.8 45.82 556.83 43.94 559.86 39.74 562.89 36.89 565.92 33.64 568.95 29.91 571.98 27.42 575.01 23.09 578.04 21.02 581.07 16.45 584.1 14.44 587.13 11.98 590.16 32.16 593.19 107.84 593.19 107.84 596.21 167.63 596.21 167.63 599.24 127.23 599.24 127.23 602.27 126.06"/></g></g></g><g transform="translate(42.7 173)"><g class="svg-plot-group"><rect x="0" y="0" width="600" height="200" class="svg-plot-axis"/><line x1="0" x2="0" y1="0" y2="200" class="svg-plot-major"/><line x1="600" x2="600" y1="0" y2="200" class="svg-plot-minor"/><line x1="0" x2="600" y1="0" y2="0" class="svg-plot-major"/><line x1="0" x2="600" y1="46.1538" y2="46.1538" class="svg-plot-minor"/><line x1="0" x2="600" y1="92.3077" y2="92.3077" class="svg-plot-minor"/><line x1="0" x2="600" y1="138.462" y2="138.462" class="svg-plot-minor"/><line x1="0" x2="600" y1="184.615" y2="184.615" class="svg-plot-minor"/><clipPath id="clip1"><rect x="-0.75" y="-0.75" width="601.5" height="201.5"/></clipPath><g clip-path="url(#clip1)"><path class="svg-plot-line svg-plot-s0 svg-plot-d0" d="M 0 163.12 0.07 160.18 0.15 165.78 0.22 180.28 0.37 153.66 0.44 146.95 0.51 150.58 0.66 175.11 0.73 177.89 0.81 167.91 0.88 166.06 1.03 176.96 1.1 182.71 1.1 182.71 1.17 202.35 1.17 202.35 1.25 178.36 1.32 177.22 1.39 181.37 1.46 181.29 1.54 174.58 1.61 175.5 1.68 194.55 1.76 183.62 1.83 188.32 1.9 199.69 2.05 182.88 2.12 188.98 2.27 184.94 2.34 192.05 2.34 192.05 2.42 205.78 2.42 205.78 2.49 201.37 2.56 182.78 2.64 186.47 2.78 199.81 2.78 199.81 2.86 224.62 2.86 224.62 2.93 191.36 3 181.86 3.08 193.84 3.15 198.59 3.22 199.44 3.3 192.47 3.37 187.29 3.44 184.36 3.52 184.51 3.52 184.51 3.59 206.97 3.59 206.97 3.66 189.99 3.74 196.44 3.81 202.41 3.81 202.41 3.88 184.56 3.96 161.03 4.03 159.99 4.1 179.8 4.17 203.23 4.25 211.33 4.32 196.09 4.32 196.09 4.39 205.32 4.39 205.32 4.47 191.85 4.54 202.1 4.61 200.84 4.69 190.03 4.76 194.77 4.83 198.18 4.91 172.58 4.98 176.06 5.05 201.6 5.05 201.6 5.13 204.09 5.42 212.64 5.49 201.31 5.57 200.26 5.57 200.26 5.64 206.72 5.64 206.72 5.71 196.64 5.71 196.64 5.79 207.88 5.93 203.87 6.01 199.24 6.08 202.13 6.15 195.63 6.23 200.84 6.3 195.04 6.37 194.79 6.45 197.56 6.45 197.56 6.52 206.78 6.96 206.23 7.03 200.47 7.03 200.47 7.1 204.6 7.25 214.59 7.32 199.44 7.4 200.86 7.4 200.86 7.47 204.92 7.84 223.83 7.91 191.49 7.98 180.09 8.06 187.58 8.06 187.58 8.13 205.75 8.35 210.27 8.5 193.59 8.5 193.59 8.57 214.4 8.64 202.91 8.72 201.8 8.79 198.04 8.79 198.04 8.86 205.25 9.38 205.03 9.45 202.22 9.45 202.22 9.52 203.73 9.74 202.65 9.81 193.54 9.89 190.64 9.96 198.55 10.03 196.52 10.11 201.07 10.11 201.07 10.18 207.71 11.43 209.66 11.5 197.18 11.5 197.18 11.57 204.18 11.65 207.76 11.72 199.17 11.72 199.17 11.79 205.61 11.87 213.43 11.94 195.7 12.01 190.83 12.01 190.83 12.08 206.16 12.23 218.68 12.3 199.5 12.3 199.5 12.38 220.47 12.38 220.47 12.45 194.34 12.52 192.45 12.6 201.02 12.67 210.77 16.33 220.94 16.41 199.89 16.48 187.38 16.55 194.16 16.55 194.16 16.63 218.45 18.46 207.86 18.6 188.93 18.68 196.34 18.68 196.34 18.75 212.71 20.36 206.16 20.43 179.78 20.51 177.56 20.58 194.68 20.58 194.68 20.65 218.39 23.36 203.57 23.51 170.5 23.58 171.34 23.66 195.91 23.66 195.91 23.73 213.6 23.73 213.6 23.8 197.95 23.8 197.95 23.88 204.1 23.95 212.75 24.02 196.89 24.1 201.18 24.1 201.18 24.17 203.88 24.17 203.88 24.24 201.51 24.24 201.51 24.32 207.53 24.32 207.53 24.39 176.58 24.46 159.38 24.54 166.44 24.61 187.26 24.68 197.19 24.76 191.56 24.83 194.77 24.9 193.2 24.98 192.14 25.05 189.1 25.12 192.44 25.2 188.76 25.27 189.73 25.34 187.04 25.42 187.88 25.49 184.89 25.56 185.71 25.63 183.6 25.71 182.68 25.78 182.52 25.85 180.29 25.93 179.81 26 178.18 26.07 177.22 26.15 175.74 26.29 173.7 26.37 171.8 26.44 170.62 26.66 166.12 26.81 162.47 26.88 161.05 26.95 158.72 27.03 157.05 27.25 150.33 27.47 142.45 27.69 132.56 27.83 124.28 27.98 113.84 28.13 99.55 28.2 89.81 28.27 76.68 28.34 55.81 28.42 20.83 28.49 15.49 28.56 29.11 28.64 65.9 28.71 82.61 28.86 102.91 29 116.19 29.15 126.12 29.3 134.04 29.52 143.59 29.74 151.37 30.03 159.85 30.18 163.32 30.25 165.2 30.4 168.25 30.47 169.42 30.54 171.52 30.62 172.59 30.69 173.4 30.76 175.61 30.83 176.3 30.91 177.69 30.98 178.65 31.05 180.62 31.13 180.99 31.2 181.79 31.27 183.67 31.35 184.4 31.42 184.38 31.49 188.18 31.57 186.67 31.71 189.36 31.86 190.74 31.93 189.4 32.01 195.96 32.08 193.02 32.15 192.14 32.23 193.21 32.3 192.89 32.45 160.13 32.52 161.07 32.59 193.98 32.59 193.98 32.67 203.96 32.67 203.96 32.74 201.38 32.81 202.21 32.81 202.21 32.89 206.81 32.89 206.81 32.96 195.15 32.96 195.15 33.03 208.78 33.25 202.87 33.4 169.31 33.47 176.2 33.54 201.31 33.54 201.31 33.62 208.69 36.33 225.61 36.4 185.12 36.47 177.93 36.55 187.98 36.55 187.98 36.62 214.39 36.91 207.22 36.99 200.59 36.99 200.59 37.06 221.3 38.23 212.29 38.31 191.26 38.38 191.6 38.38 191.6 38.45 205.7 40.36 211.94 40.43 191.18 40.5 190.72 40.5 190.72 40.58 212.48 40.87 216.23 40.94 195.67 41.02 199.56 41.02 199.56 41.09 215.51 44.38 211.28 44.46 198.78 44.46 198.78 44.53 203.6 44.82 234.51 44.9 195.93 44.97 188.08 45.04 199.96 45.04 199.96 45.12 235.27 46.95 221.2 47.02 194.54 47.09 189.51 47.17 200.15 47.17 200.15 47.24 233.6 48.78 216.91 48.93 179.04 49 179.99 49 179.99 49.07 204.15 51.86 207.19 51.93 182.1 52 169.71 52.08 174.25 52.08 174.25 52.15 206.81 52.44 209.26 52.51 200.43 52.51 200.43 52.59 202.99 52.81 203.35 52.88 171.09 52.95 159.73 53.03 170.4 53.1 195.98 53.1 195.98 53.17 202.32 53.17 202.32 53.25 196.19 53.32 196.96 53.39 194.78 53.47 198.15 53.54 192.07 53.61 194.55 53.69 191.92 53.76 192.38 53.83 190.16 53.91 190.13 53.98 188.3 54.05 188.25 54.13 186.47 54.2 185.6 54.27 185.12 54.35 183.04 54.42 182.76 54.49 181.06 54.57 180 54.64 178.47 54.71 177.56 54.79 176.32 54.86 174.54 54.93 173.46 55.15 168.74 55.37 163.59 55.52 159.66 55.74 152.89 55.96 144.89 56.18 134.82 56.32 126.37 56.47 115.63 56.62 100.79 56.69 90.51 56.76 76.35 56.91 27.56 56.98 25.92 57.06 44.68 57.13 73.04 57.2 88.28 57.35 107.53 57.5 120.36 57.64 130.04 57.79 137.8 58.01 147.2 58.23 154.87 58.52 163.2 58.74 168.51 58.89 171.62 58.96 172.74 59.03 174.78 59.11 175.95 59.18 176.75 59.25 178.96 59.33 179.57 59.4 181.02 59.47 181.84 59.55 183.88 59.62 184.27 59.69 185.2 59.77 186.83 59.84 187.7 59.91 187.59 59.99 191.05 60.06 190.41 60.13 190.9 60.21 192.87 60.28 192.98 60.35 194.65 60.42 193.14 60.5 197.07 60.57 196.78 60.64 196.6 60.72 195.48 60.79 197.3 60.86 169.68 60.94 158.19 61.01 163.46 61.01 163.46 61.08 204.32 61.38 211.55 61.45 197.48 61.45 197.48 61.52 209.7 61.74 205.9 61.82 178.68 61.89 169.02 61.96 179.63 61.96 179.63 62.04 208.25 64.82 217.61 64.89 181.41 64.97 177.93 65.04 192.28 65.04 192.28 65.11 215.38 66.72 206.77 66.8 190.01 66.87 193.55 66.87 193.55 66.94 213.12 68.85 204.79 68.92 189 68.99 192.6 68.99 192.6 69.07 221.22 69.36 207.71 69.43 195.71 69.43 195.71 69.51 203.25 72.88 204.49 72.95 197.17 72.95 197.17 73.02 206.85 73.32 220.16 73.39 192.81 73.46 189.11 73.46 189.11 73.54 205.92 75.44 215.58 75.51 192.09 75.59 190.46 75.59 190.46 75.66 205.5 77.27 220.75 77.34 192.1 77.42 178.32 77.49 182.8 77.49 182.8 77.56 218.48 80.35 216.22 80.42 178.14 80.49 169.41 80.57 178.02 80.57 178.02 80.64 215.4 81.23 205.18 81.3 197.53 81.37 167.28 81.45 160.87 81.52 175.17 81.52 175.17 81.59 204.23 81.81 202.69 81.88 198.86 81.88 198.86 81.96 206.96 81.96 206.96 82.03 197.48 82.1 199.9 82.18 197.55 82.25 198 82.32 195.84 82.4 195.62 82.47 193.81 82.54 193.88 82.62 191.98 82.69 191.1 82.76 190.8 82.84 188.34 82.91 188.45 82.98 186.67 83.06 185.55 83.13 183.89 83.2 183.09 83.28 181.84 83.35 179.96 83.42 179.01 83.64 174.13 83.86 168.95 84.01 165.02 84.3 155.64 84.52 146.87 84.67 139.81 84.81 131.18 84.96 120.13 85.11 104.68 85.18 93.8 85.25 78.42 85.33 49.45 85.4 31.27 85.47 33.27 85.62 82.49 85.69 96.53 85.84 114.83 85.99 127.23 86.13 136.69 86.35 147.65 86.57 156.22 86.79 163.29 87.01 169.35 87.23 174.61 87.38 177.74 87.45 178.75 87.52 180.85 87.6 182.1 87.67 182.62 87.74 185.19 87.82 185.55 87.89 187.14 87.96 187.71 88.04 190 88.11 190.27 88.18 191.19 88.26 192.83 88.33 193.88 88.4 193.16 88.48 197.06 88.55 196.86 88.62 196.58 88.7 199.12 88.77 198.58 88.84 200.64 88.92 199.95 88.99 201.38 89.06 203.02 89.14 204.27 89.21 200.23 89.21 200.23 89.28 210.69 89.28 210.69 89.36 165.25 89.43 157.04 89.5 166.84 89.5 166.84 89.58 206.3 89.87 214.55 89.94 201.48 89.94 201.48 90.01 213.08 90.23 203.1 90.31 174.91 90.38 169.51 90.45 184.26 90.45 184.26 90.53 214.45 93.31 202.75 93.38 178.79 93.46 178.75 93.53 198.71 93.6 218.1 95.14 240.43 95.21 201.46 95.29 189.44 95.36 196.4 95.36 196.4 95.43 223.09 97.27 232.93 97.34 199.15 97.41 187.87 97.49 195.44 97.49 195.44 97.56 234.96 97.85 203.05 97.92 196.02 97.92 196.02 98 207.33 101.29 238.26 101.37 200.25 101.44 196.94 101.44 196.94 101.51 211.49 101.81 210.84 101.88 190.62 101.95 190.88 101.95 190.88 102.03 213.78 103.93 208.17 104 190.46 104.08 192.03 104.08 192.03 104.15 212.55 105.76 236.62 105.83 187.72 105.91 178.12 105.98 186.56 105.98 186.56 106.05 242.05 108.84 210.59 108.91 174.92 108.98 169.74 109.06 182.96 109.06 182.96 109.13 218.26 109.72 209.02 109.86 164.8 109.94 162.7 110.01 181.2 110.01 181.2 110.08 208.44 111.11 202.7 111.18 201.78 111.18 201.78 111.25 202.45 111.25 202.45 111.33 198.45 111.4 199.76 111.47 197.66 111.55 196.52 111.62 194.39 111.69 194.04 111.77 192.87 111.84 190.61 111.91 189.99 111.99 187.96 112.21 183.34 112.35 179.69 112.5 175.75 112.79 166.24 113.01 157.3 113.16 150.14 113.31 141.32 113.45 129.95 113.6 113.83 113.67 102.27 113.75 85.4 113.82 47.26 113.89 34.12 113.96 39.85 114.04 76.35 114.11 96.95 114.18 109.98 114.33 127.41 114.48 139.42 114.62 148.67 114.84 159.45 115.06 167.88 115.28 174.93 115.43 179.03 115.65 184.12 115.8 187.63 115.87 189.21 115.94 189.94 116.02 192.37 116.09 193.87 116.16 193.28 116.24 197.31 116.31 196.7 116.38 198.78 116.46 198.64 116.53 201.86 116.6 201.53 116.6 201.53 116.67 202.43 117.7 203.61 117.77 194.26 117.85 161.37 117.92 156.72 117.99 171.32 117.99 171.32 118.07 204.54 118.65 217.41 118.8 172.16 118.87 170.7 118.95 190.26 118.95 190.26 119.02 219.34 121.73 226.17 121.8 193.86 121.88 176.97 121.95 180.35 121.95 180.35 122.02 208.55 123.63 232.77 123.71 197.31 123.78 189.5 123.85 200.19 123.85 200.19 123.93 238.07 125.76 228.6 125.83 194.64 125.9 187.51 125.98 199.2 125.98 199.2 126.05 260.24 126.27 233.45 126.34 199.85 126.42 196.65 126.42 196.65 126.49 212.27 129.79 219.47 129.86 197.25 129.93 197.69 129.93 197.69 130 217.66 130.3 204.11 130.37 189.27 130.44 193.41 130.44 193.41 130.52 225.21 132.42 202.39 132.5 189.44 132.57 194.35 132.57 194.35 132.64 222.7 133.81 211.34 133.89 202.03 133.89 202.03 133.96 210.28 134.25 221.46 134.33 184.45 134.4 178.56 134.47 191.54 134.47 191.54 134.55 227.38 137.26 221.94 137.4 172.42 137.48 170.74 137.55 189.5 137.55 189.5 137.62 221.86 138.21 210.13 138.28 182.14 138.35 163.42 138.43 165.14 138.5 189.64 138.57 214.71 141.14 202.51 141.28 196.74 141.36 195.32 141.43 190.26 141.5 188.63 141.65 180.75 141.87 166.47 142.02 152.39 142.09 143.08 142.16 130.74 142.24 112.01 142.31 45.64 142.38 36.79 142.46 46.47 142.53 113.02 142.6 131.34 142.68 143.5 142.82 160.4 142.97 172.08 143.19 184.65 143.26 188.41 143.33 190.96 143.41 194.45 143.55 199.47 143.55 199.47 143.63 202.96 146.12 226.09 146.34 158.15 146.41 157.23 146.48 177.16 146.48 177.16 146.56 203.41 147.14 220.11 147.22 187.78 147.29 170.27 147.36 172.61 147.44 198.28 147.51 223.17 150.22 228.97 150.29 187.59 150.37 175.86 150.44 182.83 150.44 182.83 150.51 228.3 150.81 209.51 150.88 201.83 150.88 201.83 150.95 212.98 152.12 222.69 152.2 194.13 152.27 190.19 152.27 190.19 152.34 205.22 154.25 218.29 154.32 191.19 154.39 187.94 154.39 187.94 154.47 204.09 154.76 218.96 154.83 197.65 154.91 197.79 154.91 197.79 154.98 218.94 158.28 210.58 158.35 195.25 158.42 199.47 158.42 199.47 158.5 225.16 158.72 240.03 158.79 199.03 158.86 188.73 158.94 196.88 158.94 196.88 159.01 251.21 160.84 233.41 160.91 197.96 160.99 189.07 161.06 197.53 161.06 197.53 161.13 242.26 162.3 206.97 162.38 202.06 162.38 202.06 162.45 213.17 162.74 207.01 162.82 182.05 162.89 179.73 162.96 198.14 162.96 198.14 163.04 227.53 165.75 215.81 165.82 188.47 165.89 170.64 165.97 172.49 166.04 198.66 166.11 224.42 166.7 209.81 166.77 176.27 166.85 162.96 166.92 168.22 166.92 168.22 166.99 203.15 168.31 203.84 168.38 200.97 168.53 198.65 168.6 198.26 168.68 196.17 168.75 194.7 168.82 193.62 168.97 190.56 169.12 187.43 169.26 183.55 169.41 179.89 169.63 173.29 169.85 165.49 170.07 155.4 170.21 147.15 170.36 136.67 170.51 122.33 170.58 112.54 170.65 99.31 170.73 78.16 170.8 44.58 170.87 39.62 170.95 53.71 171.02 89.3 171.09 105.84 171.24 126.04 171.39 139.21 171.53 149.18 171.75 160.56 171.97 169.34 172.19 176.62 172.34 180.88 172.49 184.63 172.71 189.73 172.78 190.83 172.85 192.92 173 195.49 173.07 196.07 173.14 199.93 173.22 198.33 173.29 201.25 173.36 201.47 173.36 201.47 173.44 203.51 174.61 215.45 174.68 201.6 174.76 173.35 174.83 155.68 174.9 158.57 174.98 185.08 174.98 185.08 175.05 204.5 175.63 225.01 175.71 182.01 175.78 169.19 175.85 175.36 175.85 175.36 175.93 210.12 178.71 232.18 178.78 182.95 178.86 175.41 178.93 186.39 178.93 186.39 179 228.42 179.3 206.37 179.37 202.02 179.37 202.02 179.44 219.63 180.62 214.14 180.69 191.85 180.76 191.58 180.76 191.58 180.83 211.91 182.74 209.3 182.81 188.63 182.89 189.07 182.89 189.07 182.96 210.65 183.25 211.17 183.33 196.16 183.4 199.53 183.4 199.53 183.47 228.19 186.77 204.61 186.84 194.11 186.91 202.21 186.91 202.21 186.99 234.66 187.21 232.26 187.28 195.18 187.35 188.97 187.43 201.26 187.43 201.26 187.5 239 189.33 225.99 189.4 194.62 189.48 189.34 189.55 201.96 189.55 201.96 189.62 239.53 191.16 225.31 191.24 198.77 191.31 180.42 191.38 181.7 191.38 181.7 191.46 207.06 194.24 217.29 194.31 182.43 194.38 169.61 194.46 175.16 194.46 175.16 194.53 213.5 195.19 219.15 195.26 171.97 195.34 163.26 195.41 172.14 195.41 172.14 195.48 208.3 196.58 202.26 196.66 201.48 196.73 199.27 196.8 199.51 196.88 197.69 197.02 195.06 197.09 194.37 197.17 192.55 197.39 188.35 197.53 185.08 197.68 181.84 197.75 179.79 197.83 178.25 198.05 171.69 198.19 166.88 198.34 161.48 198.56 151.27 198.71 142.83 198.85 132.04 199 117.15 199.07 106.82 199.15 92.54 199.29 44.12 199.37 42.86 199.44 62.2 199.51 89.98 199.58 105.09 199.73 124.24 199.88 136.99 200.02 146.69 200.24 157.85 200.46 166.52 200.68 173.71 200.98 181.63 201.2 186.76 201.27 187.71 201.34 190.04 201.42 190.95 201.49 192.51 201.56 193.13 201.64 196.23 201.71 195.64 201.78 197.99 201.86 198.54 201.93 199.96 202 200.63 202 200.63 202.08 202.42 203.17 208.11 203.25 166.73 203.32 153.98 203.39 160.74 203.47 197.84 203.47 197.84 203.54 209.77 204.13 220.04 204.2 177.56 204.27 168.94 204.35 179.14 204.35 179.14 204.42 228.49 207.2 209.52 207.28 179.43 207.35 175.64 207.42 191.31 207.42 191.31 207.5 221.82 209.11 207.37 209.18 190.4 209.25 193.78 209.25 193.78 209.33 221.08 211.23 202.35 211.3 186.93 211.38 191.01 211.38 191.01 211.45 220.08 211.74 205.92 211.82 195.34 211.89 202.22 211.89 202.22 211.96 241.79 215.19 237.61 215.26 200.28 215.33 193.86 215.33 193.86 215.41 205.96 215.7 218.31 215.77 192.39 215.84 189.97 215.84 189.97 215.92 206.8 217.82 217.62 217.9 192.1 217.97 190.39 217.97 190.39 218.04 207.99 219.21 220.88 219.29 202.01 219.29 202.01 219.36 203.5 219.65 228.79 219.73 193.03 219.8 179.54 219.87 184.59 219.87 184.59 219.95 220.45 222.73 231.95 222.8 177.99 222.88 169.37 222.95 178.89 222.95 178.89 223.02 226.88 223.68 208.17 223.75 169 223.83 164.19 223.9 177.3 223.9 177.3 223.97 202.73 225.15 204 225.22 201.88 225.29 201.58 225.51 197.51 225.59 196.81 225.66 194.84 225.73 193.91 225.81 192.05 225.95 189.26 226.1 185.99 226.25 182.04 226.32 180.69 226.46 176.34 226.68 169.09 226.83 163.61 227.05 153.21 227.2 144.57 227.34 133.46 227.49 117.98 227.56 107.04 227.64 91.52 227.71 61.9 227.78 44.28 227.86 46.66 228 96.34 228.08 110.28 228.22 128.48 228.37 140.83 228.52 150.28 228.74 161.25 228.96 169.78 229.17 176.87 229.47 184.73 229.61 187.93 229.69 189.9 229.76 190.49 229.83 193.41 229.91 193.84 229.98 195.55 230.05 196.05 230.13 199.18 230.2 198.64 230.27 201 230.35 201.74 230.42 202.62 231.67 211.15 231.74 161.41 231.81 153.05 231.88 163.81 231.88 163.81 231.96 227.58 232.62 204.61 232.69 174.23 232.76 169.53 232.84 184.19 232.84 184.19 232.91 221.13 235.62 223.07 235.77 176.8 235.84 176.59 235.91 198.13 235.99 223.38 236.21 217.17 236.28 202.19 236.28 202.19 236.35 205.27 237.52 246.45 237.6 202.03 237.67 189.75 237.74 196.78 237.74 196.78 237.82 234.36 239.65 250.56 239.72 196.91 239.79 185.98 239.87 193.81 239.87 193.81 239.94 237.59 240.16 255.8 240.23 202.04 240.31 195.25 240.31 195.25 240.38 205.98 243.68 223.37 243.75 197.18 243.82 194.45 243.82 194.45 243.9 210.84 244.19 209.52 244.26 190.54 244.34 191.76 244.34 191.76 244.41 214.96 246.31 209.85 246.39 190.41 246.46 192.22 246.46 192.22 246.53 216.59 247.71 213.56 247.78 200.67 247.78 200.67 247.85 205.43 248.14 246.67 248.22 188.73 248.29 179.41 248.36 188.46 248.36 188.46 248.44 248.33 251.22 208.34 251.29 174.71 251.37 169.87 251.44 183.89 251.44 183.89 251.51 217.67 252.1 220.96 252.25 167.08 252.32 165.75 252.39 184.45 252.47 203.45 254.22 204.26 254.3 201.44 254.37 200.62 254.52 197.07 254.66 194.06 254.74 191.25 254.81 190.76 254.88 187.65 254.96 185.97 255.18 178.63 255.32 173.09 255.54 162.42 255.69 153.57 255.83 142.13 255.98 126.02 256.05 114.39 256.13 97.35 256.2 57.69 256.27 45.01 256.35 51.13 256.42 89.33 256.49 109.68 256.57 122.61 256.71 139.97 256.86 151.95 257.01 161.17 257.23 171.98 257.45 180.35 257.74 189.47 257.96 195.09 258.03 196.95 258.11 198.08 258.18 200.67 258.25 199.79 258.25 199.79 258.33 204.9 260.08 202.37 260.16 188.4 260.23 157.19 260.3 152.85 260.38 168.02 260.38 168.02 260.45 202.4 261.04 216.72 261.18 171.84 261.25 170.92 261.33 190.93 261.33 190.93 261.4 219.2 264.11 222.01 264.18 190.89 264.26 174.94 264.33 178.38 264.33 178.38 264.4 208.03 264.7 212.1 264.77 201.41 264.77 201.41 264.84 208.6 266.02 242.96 266.09 197.87 266.16 189.8 266.24 200.6 266.24 200.6 266.31 248.42 268.14 230.31 268.21 192.68 268.29 185.79 268.36 197.69 268.36 197.69 268.43 243.6 268.65 228.36 268.73 199.27 268.8 196 268.8 196 268.87 211.16 272.17 214.85 272.24 195.07 272.31 195.88 272.31 195.88 272.39 217.13 272.68 203.32 272.75 189.57 272.83 194.42 272.83 194.42 272.9 226.45 274.8 203.53 274.88 189.41 274.95 194.88 274.95 194.88 275.02 230.6 276.2 208.89 276.27 199.98 276.27 199.98 276.34 208.62 276.64 219.46 276.71 185.5 276.78 180.06 276.86 193.48 276.86 193.48 276.93 229.87 279.64 220.31 279.79 172.34 279.86 171.08 279.93 190.51 279.93 190.51 280 217.93 280.59 212.42 280.66 183.98 280.74 165.98 280.81 168.02 280.88 195.15 280.88 195.15 280.96 208.54 283.45 204.28 283.59 199.79 283.67 196.83 283.74 195.18 283.81 191 283.96 184.58 284.11 176.53 284.18 172.04 284.33 160.19 284.47 143.07 284.55 130.66 284.62 111.71 284.69 54.7 284.77 46.26 284.84 56.36 284.91 113.74 284.99 131.86 285.13 153.13 285.28 166.86 285.42 176.9 285.57 185.11 285.72 191.25 285.79 195.27 285.86 197.23 285.94 199.82 286.01 202.38 288.5 216.09 288.57 200.39 288.72 153.93 288.79 153.36 288.94 200.2 288.94 200.2 289.01 215.83 289.53 217.16 289.6 187.2 289.67 170.23 289.75 173.1 289.82 200.32 289.89 222.7 292.6 231.9 292.68 185.21 292.75 173.81 292.82 181.1 292.82 181.1 292.9 227.02 293.19 208.2 293.26 201.59 293.26 201.59 293.33 212.91 294.51 226.63 294.58 194.6 294.65 190.44 294.65 190.44 294.73 205.22 296.63 216.83 296.7 189.49 296.78 186.33 296.78 186.33 296.85 202.98 297.14 217.9 297.22 197.41 297.29 197.6 297.29 197.6 297.36 218.28 300.66 208.62 300.73 193.75 300.81 198.12 300.81 198.12 300.88 225.42 301.1 243.75 301.17 198.76 301.25 189.37 301.32 197.99 301.32 197.99 301.39 258.68 303.22 232.79 303.3 198.49 303.37 189.03 303.44 198.5 303.44 198.5 303.52 249.51 304.69 205.57 304.76 199.93 304.76 199.93 304.83 213.34 305.13 207.89 305.2 183.2 305.27 181.49 305.35 199.84 305.35 199.84 305.42 227.6 308.13 216.51 308.2 188.03 308.28 170.68 308.35 172.95 308.42 199.66 308.5 222.05 309.08 213.25 309.16 178.36 309.23 165.54 309.3 171.18 309.3 171.18 309.38 213.07 311.13 203.17 311.21 200.18 311.28 199.56 311.5 194.46 311.65 190.83 311.72 189.77 311.79 186.64 311.87 185.22 312.16 175.36 312.3 169.55 312.52 158.77 312.67 149.55 312.82 137.36 312.96 119.63 313.04 106.31 313.11 84.86 313.18 52.56 313.26 47.99 313.33 62.57 313.4 97.06 313.48 113.44 313.62 133.53 313.77 146.78 313.92 156.58 314.06 164.5 314.28 174.09 314.5 181.65 314.65 186.25 314.87 191.85 314.94 193.9 315.01 194.99 315.09 197.31 315.16 197.87 315.23 201.7 315.31 200.38 315.31 200.38 315.38 203.01 316.99 208.87 317.07 200.19 317.14 168.16 317.21 151.53 317.29 154.61 317.36 182.56 317.43 204.51 318.02 223.67 318.09 181.57 318.16 169.32 318.24 176.09 318.24 176.09 318.31 216.14 321.09 223.81 321.17 180.8 321.24 173.43 321.31 184.9 321.31 184.9 321.39 230.35 323 215.36 323.07 192.13 323.14 191.65 323.14 191.65 323.22 210.99 325.12 207.62 325.2 187.19 325.27 187.64 325.27 187.64 325.34 210.32 325.63 211.43 325.71 196.47 325.78 200.38 325.78 200.38 325.85 227.96 329.15 203.93 329.22 193.27 329.3 201.21 329.3 201.21 329.37 236.87 329.59 228.04 329.66 195.47 329.74 189.91 329.74 189.91 329.81 202.75 331.71 242.19 331.79 194.57 331.86 189.32 331.86 189.32 331.93 203.25 333.18 203.14 333.25 200.74 333.25 200.74 333.33 220.22 333.54 234.85 333.62 200.28 333.69 181.73 333.76 183.72 333.76 183.72 333.84 208.24 336.62 219.34 336.69 182.25 336.77 169.72 336.84 175.63 336.84 175.63 336.91 214.48 337.57 224.81 337.65 174.45 337.72 165.72 337.79 175.47 337.79 175.47 337.87 211.85 339.33 203.75 339.4 202.21 339.48 201.25 339.55 199.29 339.62 198.94 339.7 196.66 339.77 195.5 339.92 192.4 340.06 188.89 340.14 186.97 340.21 185.53 340.28 182.89 340.43 178.87 340.65 171.29 340.87 161.97 341.02 154.34 341.16 144.88 341.31 132.29 341.46 113.7 341.53 99.31 341.67 51.21 341.75 50.31 341.82 70.27 341.89 97.49 341.97 112.48 342.11 131.53 342.26 144.34 342.41 153.89 342.55 161.64 342.77 171.03 342.99 178.56 343.14 183.08 343.29 186.92 343.43 190.71 343.51 191.86 343.58 193.95 343.65 194.94 343.73 197.54 343.8 197.67 343.87 199.57 343.95 200.81 343.95 200.81 344.02 202.45 345.56 207.2 345.63 161.65 345.7 149.89 345.78 156.68 345.85 199.22 345.85 199.22 345.92 218.17 346.51 224.61 346.58 177.15 346.66 169.15 346.73 180.12 346.73 180.12 346.8 230.2 349.58 205.96 349.66 177.39 349.73 173.81 349.8 190.04 349.8 190.04 349.88 221.8 351.49 207.41 351.56 190.54 351.64 193.58 351.64 193.58 351.71 218.36 353.54 235.43 353.61 200.8 353.69 185.71 353.76 189.77 353.76 189.77 353.83 221.48 354.13 206.84 354.2 196.44 354.2 196.44 354.27 204.41 357.57 241.44 357.64 200.31 357.71 193.49 357.71 193.49 357.79 205.32 358.08 217.16 358.15 193.17 358.23 191.21 358.23 191.21 358.3 209.04 360.21 218.26 360.28 191.77 360.35 190.4 360.35 190.4 360.42 209.68 361.6 219.11 361.67 201.29 361.67 201.29 361.74 202.53 362.04 237.89 362.11 194.55 362.18 181.06 362.26 186.73 362.26 186.73 362.33 221.24 365.11 244.13 365.19 177.97 365.26 169.55 365.33 179.36 365.33 179.36 365.41 227.95 366.06 204.03 366.14 171.63 366.21 166.57 366.28 181.02 366.28 181.02 366.36 210.68 367.97 203.57 368.04 201.6 368.12 200.99 368.33 196.01 368.41 194.75 368.48 192.62 368.7 187.5 368.92 180.96 369.14 173.35 369.36 163.79 369.51 156 369.65 146.28 369.8 133.28 369.95 113.71 370.02 98.05 370.09 67.73 370.17 50.66 370.24 53.41 370.39 103.63 370.46 117.45 370.61 135.59 370.75 147.98 370.9 157.28 371.04 164.88 371.26 174.11 371.48 181.59 371.63 186.02 371.78 189.9 371.85 191.39 371.92 193.65 372 194.74 372.07 196.66 372.22 199.82 372.29 200.89 372.29 200.89 372.36 202.41 374.05 203.11 374.12 156.54 374.19 148.94 374.27 159.74 374.27 159.74 374.34 206.35 375 204.4 375.07 173.96 375.15 169.84 375.22 185.51 375.22 185.51 375.29 218.33 378 222.01 378.15 174.87 378.22 174.98 378.3 197.02 378.37 222.29 379.91 246.23 379.98 201.6 380.05 189.79 380.13 196.47 380.13 196.47 380.2 229.73 382.03 244.41 382.1 195.6 382.18 184.97 382.25 192.86 382.25 192.86 382.32 247.59 382.62 203.54 382.69 197.32 382.69 197.32 382.76 209.85 386.06 227.5 386.13 197.44 386.21 194.4 386.21 194.4 386.28 210.68 386.57 209.84 386.65 191.68 386.72 193.22 386.72 193.22 386.79 217.65 388.7 207.87 388.77 190.01 388.84 192.4 388.84 192.4 388.92 218.86 390.09 213.72 390.16 200.09 390.16 200.09 390.23 205.24 390.53 247.56 390.6 190.19 390.67 181.11 390.75 190.63 390.75 190.63 390.82 275.23 393.6 208.42 393.68 174.85 393.75 170.15 393.82 184.38 393.82 184.38 393.9 218.25 394.48 215.98 394.63 169.57 394.7 168.23 394.78 187.74 394.78 187.74 394.85 217.51 396.97 202.82 397.12 199.84 397.19 197.41 397.27 195.61 397.41 191.21 397.63 183.76 397.71 180.07 397.85 173.74 398 165.81 398.14 155.74 398.29 142.37 398.44 121.71 398.51 104.49 398.58 63.1 398.66 50.87 398.73 57.38 398.8 97.51 398.88 117.59 398.95 130.44 399.1 147.77 399.24 159.76 399.46 172.81 399.68 182.76 399.9 190.6 400.05 194.69 400.27 201.1 400.34 202.19 400.34 202.19 400.42 204.88 402.47 213.89 402.61 152.51 402.69 148.67 402.76 164.1 402.83 196.28 402.83 196.28 402.91 211.46 403.42 218.13 403.56 171.69 403.64 171.29 403.71 192.57 403.78 219.11 406.49 221.53 406.57 188.76 406.64 173.15 406.71 176.96 406.71 176.96 406.79 207.35 408.4 241.47 408.47 197.31 408.54 189.82 408.62 200.53 408.62 200.53 408.69 243.71 410.52 232.86 410.6 191.58 410.67 184.93 410.74 197.04 410.74 197.04 410.82 238.64 411.04 228.07 411.11 201.35 411.18 198.99 411.18 198.99 411.25 216.86 414.55 216.62 414.62 195.27 414.7 195.89 414.7 195.89 414.77 217.94 415.06 204.34 415.14 190.89 415.21 196.06 415.21 196.06 415.28 230.38 417.11 236.38 417.19 201.43 417.26 189.09 417.33 195.19 417.33 195.19 417.41 234.18 418.58 209.36 418.65 199.67 418.65 199.67 418.73 208.64 419.02 221.09 419.09 186.99 419.17 181.8 419.24 195.66 419.24 195.66 419.31 232.04 422.02 220.17 422.17 172.49 422.24 171.37 422.31 191.02 422.31 191.02 422.39 219.1 422.97 216.25 423.05 185.94 423.12 168.22 423.19 170.73 423.27 195.52 423.27 195.52 423.34 231.48 425.83 204.8 425.98 199.94 426.05 197.25 426.12 193.39 426.2 191.9 426.42 180.66 426.64 166.55 426.78 152.23 426.86 142.82 426.93 130.32 427 111.15 427.08 59.65 427.15 51.62 427.22 62.15 427.29 114.2 427.37 132.13 427.51 153.25 427.66 166.97 427.88 181.31 428.1 192.12 428.17 194.19 428.32 200.32 428.39 202.12 428.39 202.12 428.47 204.68 430.88 207.8 430.96 198.09 431.1 149.31 431.18 149.09 431.32 196.66 431.32 196.66 431.4 212.04 431.91 217.34 431.98 186.47 432.06 170.04 432.13 173.31 432.2 201.91 432.28 224.8 434.99 230.93 435.06 183.15 435.13 172.18 435.21 179.8 435.21 179.8 435.28 229.56 436.89 222.57 436.96 193.98 437.04 190.5 437.04 190.5 437.11 206.13 439.01 216.15 439.09 188.48 439.16 185.6 439.16 185.6 439.23 202.5 439.53 218.95 439.6 199.75 439.67 201.18 439.67 201.18 439.75 225.69 443.04 208.46 443.12 193.61 443.19 198.09 443.19 198.09 443.26 228.62 443.48 266.98 443.55 200.07 443.63 190.71 443.7 199.89 443.7 199.89 443.77 266.11 445.61 233.24 445.68 196.82 445.75 188.77 445.83 198.74 445.83 198.74 445.9 251.94 447.07 205.42 447.14 200 447.14 200 447.22 212.6 447.51 208.86 447.58 184.69 447.66 183.13 447.66 183.13 447.73 202.34 450.51 216.41 450.59 187.99 450.66 170.7 450.73 173.21 450.81 200.39 450.88 226 451.46 222.45 451.54 180.54 451.61 167.68 451.68 174.01 451.68 174.01 451.76 205.86 453.66 203.06 453.74 201.88 453.96 196.83 454.03 195.06 454.1 192.58 454.17 191.62 454.25 188.85 454.39 184.48 454.54 179.41 454.76 170.22 454.91 162.66 455.05 153.26 455.2 141.14 455.35 123.4 455.42 109.98 455.49 88.23 455.57 57.12 455.64 52.93 455.71 68 455.79 101.49 455.86 117.72 456.01 137.69 456.15 150.77 456.3 160.68 456.45 168.53 456.59 175.22 456.81 183.42 457.03 190.03 457.1 192.37 457.25 196.01 457.32 197.56 457.4 199.68 457.47 200.81 457.47 200.81 457.54 203.17 459.38 208.75 459.45 193.66 459.52 162.92 459.59 146.83 459.67 150.26 459.81 201.71 459.81 201.71 459.89 216.2 460.4 225.19 460.47 180.87 460.55 169.06 460.62 176.04 460.62 176.04 460.69 216.48 463.48 221.99 463.55 178.77 463.62 171.9 463.7 183.64 463.7 183.64 463.77 224.64 465.38 212.82 465.45 191.76 465.53 192.09 465.53 192.09 465.6 214.83 467.5 206.41 467.58 186.13 467.65 186.94 467.65 186.94 467.72 209.62 468.02 212.58 468.09 198.46 468.09 198.46 468.16 203.25 471.53 202.28 471.61 192.5 471.68 201.16 471.68 201.16 471.75 247.61 471.97 231.06 472.05 196.61 472.12 191.18 472.12 191.18 472.19 204.66 474.1 221.83 474.17 193.73 474.24 189.28 474.24 189.28 474.32 203.47 475.49 225.81 475.56 202.24 475.63 200.79 475.63 200.79 475.71 217.64 475.93 229.42 476 200.85 476.07 183.15 476.15 185.17 476.15 185.17 476.22 211.56 479 220.18 479.08 182.05 479.15 169.84 479.22 176.17 479.22 176.17 479.3 217.46 479.96 230.45 480.03 176.28 480.1 168 480.18 178.04 480.18 178.04 480.25 214.05 482.01 202.46 482.08 201.53 482.23 198.6 482.3 196.72 482.37 195.4 482.59 189.54 482.67 187.94 482.96 178.51 483.11 173.09 483.33 162.85 483.47 154.37 483.62 143.56 483.76 128.5 483.84 118.05 483.91 103.54 484.06 55.72 484.13 55.19 484.28 102.48 484.35 117.34 484.5 136.27 484.64 148.91 484.79 158.6 485.01 169.71 485.23 178.32 485.45 185.6 485.6 189.77 485.67 191.37 485.74 193.56 485.82 194.84 485.89 197.08 486.04 199.73 486.11 201.32 486.18 203.03 487.87 219.16 487.94 199.57 488.01 156.49 488.09 145.01 488.16 152.29 488.23 196.18 488.23 196.18 488.31 212.96 488.89 219.65 488.96 176.76 489.04 169.04 489.11 180.01 489.11 180.01 489.18 233.18 491.97 203.68 492.04 175.37 492.11 172.25 492.19 188.76 492.19 188.76 492.26 218.69 493.87 206.42 493.95 190.66 494.02 194.8 494.02 194.8 494.09 229.71 495.92 237.31 496 199.28 496.07 184.47 496.14 188.97 496.14 188.97 496.22 219.92 496.51 207.24 496.58 197.41 496.58 197.41 496.66 205.36 499.95 232.29 500.02 197.85 500.1 192.23 500.1 192.23 500.17 205.3 500.46 218.09 500.54 193.98 500.61 192.32 500.61 192.32 500.68 210.85 502.59 215.48 502.66 191.54 502.73 190.43 502.73 190.43 502.81 209.73 503.98 218.24 504.05 200.14 504.13 202 504.13 202 504.2 225.93 504.42 234.95 504.49 195.2 504.57 182.32 504.64 188.15 504.64 188.15 504.71 225.35 507.5 228.99 507.57 177.45 507.64 169.57 507.71 180.02 507.71 180.02 507.79 227.02 508.45 207.7 508.52 173.3 508.59 169.05 508.67 183.41 508.67 183.41 508.74 207 510.64 202.46 510.72 201.12 510.79 198.88 510.86 197.85 511.01 193.58 511.08 192.47 511.16 189.9 511.3 185.62 511.45 180.73 511.6 175.34 511.82 164.78 511.96 156.1 512.11 144.89 512.26 129.32 512.33 118.25 512.4 102.44 512.48 71.38 512.55 54.85 512.62 57.97 512.77 108.78 512.84 122.49 512.99 140.51 513.13 152.79 513.28 162.2 513.5 173.13 513.72 181.65 513.94 188.79 514.09 192.86 514.23 196.6 514.31 198.03 514.45 201.79 514.53 201.54 514.53 201.54 514.6 206.15 516.36 205 516.43 196.51 516.5 151.27 516.58 143.92 516.65 155.32 516.72 202.06 516.72 202.06 516.8 224.63 517.38 202.5 517.46 173.44 517.53 169.59 517.6 185.29 517.6 185.29 517.68 219.24 520.39 220.24 520.53 172.81 520.61 173.27 520.68 195.85 520.75 221.27 522.29 245.4 522.36 201.43 522.44 190.08 522.51 197.66 522.51 197.66 522.58 239.2 524.41 252.07 524.49 193.83 524.56 183.56 524.63 191.86 524.63 191.86 524.71 244.01 525 203.41 525.07 197.2 525.07 197.2 525.15 208.92 528.44 221.27 528.52 195.36 528.59 193.12 528.59 193.12 528.66 210.71 528.96 209.9 529.03 192.35 529.1 194.33 529.1 194.33 529.17 219.44 531.08 209 531.15 189.94 531.23 192.36 531.23 192.36 531.3 218.95 532.47 211.52 532.54 198.88 532.54 198.88 532.62 204.29 532.91 243.97 532.98 191.09 533.06 182.38 533.13 192.26 533.13 192.26 533.2 257.56 535.99 205.6 536.06 174.41 536.13 170.26 536.21 185.15 536.21 185.15 536.28 217.87 536.87 219.25 537.01 171.55 537.08 170.68 537.16 191.09 537.23 210.07 539.58 204.51 539.65 201.01 539.79 197.09 540.01 189.47 540.16 183.2 540.38 171.69 540.53 161.85 540.67 148.16 540.82 127.38 540.89 109.98 540.97 66.56 541.04 54.79 541.11 61.69 541.19 104.03 541.26 123.87 541.33 136.62 541.48 153.92 541.63 165.91 541.85 178.8 542.07 188.7 542.36 198.96 542.43 200.52 542.43 200.52 542.5 203.22 544.85 203.02 545 146.92 545.07 143.42 545.14 159.42 545.21 191.15 545.21 191.15 545.29 206.98 545.8 217.54 545.95 171.78 546.02 171.79 546.09 193.83 546.17 219.32 548.88 219.92 548.95 186.27 549.02 171.15 549.1 175.28 549.1 175.28 549.17 206.52 550.78 241.57 550.85 200.29 550.93 193.35 550.93 193.35 551 204.2 552.91 229.22 552.98 189.94 553.05 183.66 553.13 196.1 553.13 196.1 553.2 238.32 553.42 227.49 553.49 201.77 553.56 199.9 553.56 199.9 553.64 217.87 556.93 213.14 557.01 193.71 557.08 194.97 557.08 194.97 557.15 218.44 557.45 205.17 557.52 191.79 557.59 197.43 557.59 197.43 557.67 233.44 560.96 207.61 561.04 198.71 561.04 198.71 561.11 207.97 561.4 220.41 561.47 187.92 561.55 183.12 561.62 197.43 561.62 197.43 561.69 233.47 564.48 218.94 564.55 194.82 564.62 193.69 564.62 193.69 564.7 213.83 565.36 217.5 565.43 187.37 565.5 170.3 565.58 173.11 565.65 200.15 565.72 227.23 568.87 204.98 568.95 197.65 569.02 199.44 569.09 186.76 569.17 180.66 569.24 171.24 569.31 158.62 569.38 139.22 569.46 91.66 569.53 84.03 569.6 94.99 569.68 143.3 569.75 161.04 569.9 181.95 569.97 190.81 570.04 192.87 570.04 192.87 570.12 202.41 573.19 211.14 573.27 202.06 573.34 186.83 573.49 139.49 573.56 139.64 573.71 187.21 573.78 202.09 573.78 202.09 573.85 211.48 577.37 233.2 577.44 180.73 577.51 170.15 577.59 178.15 577.59 178.15 577.66 230.5 581.4 213.5 581.47 186.81 581.54 184.29 581.62 201.61 581.62 201.61 581.69 233.38 581.91 218.77 581.98 199.74 582.06 201.1 582.06 201.1 582.13 224.51 585.42 206.16 585.5 192.18 585.57 197.18 585.57 197.18 585.64 229.16 585.86 250.69 585.94 200.45 586.01 191.6 586.08 201.16 586.08 201.16 586.16 264.09 589.45 203.82 589.53 198.83 589.53 198.83 589.6 212.51 589.89 209.13 589.97 185.69 590.04 184.57 590.04 184.57 590.11 204.19 593.85 222.99 593.92 182.07 593.99 169.87 594.07 176.42 594.07 176.42 594.14 216.59 597.51 209.37 597.66 196.11 597.73 186.39 597.8 172.78 597.88 150.74 597.95 120.73 598.02 116.91 598.1 132.49 598.17 165.06 598.24 181.17 598.32 192.09 598.39 200.09 598.39 200.09 598.46 221.4 601.54 221.4 601.61 200.09 601.68 192.09 601.76 181.17 601.83 165.06 601.9 132.49 601.98 116.91 602.05 120.73 602.12 150.74 602.2 172.78 602.2 172.78 602.27 186.39"/></g></g></g><g transform="translate(42.7 4)"><g class="svg-plot-group"><line x1="0" x2="-4" y1="75" y2="75" class="svg-plot-tick"/><line x1="0" x2="-4" y1="143.182" y2="143.182" class="svg-plot-tick"/><line x1="0" x2="-4" y1="6.81818" y2="6.81818" class="svg-plot-tick"/><text class="svg-plot-value" style="text-anchor:end" x="-9" y="5.81818">1</text><text class="svg-plot-value" style="text-anchor:end" x="-9" y="142.182">-1</text><text class="svg-plot-value" style="text-anchor:end" x="-9" y="74">0</text></g></g><g transform="translate(42.7 173)"><g class="svg-plot-group"><line x1="0" x2="0" y1="200" y2="204" class="svg-plot-tick"/><line x1="600" x2="600" y1="200" y2="204" class="svg-plot-tick"/><line x1="0" x2="-4" y1="0" y2="0" class="svg-plot-tick"/><line x1="0" x2="-4" y1="46.1538" y2="46.1538" class="svg-plot-tick"/><line x1="0" x2="-4" y1="92.3077" y2="92.3077" class="svg-plot-tick"/><line x1="0" x2="-4" y1="138.462" y2="138.462" class="svg-plot-tick"/><line x1="0" x2="-4" y1="184.615" y2="184.615" class="svg-plot-tick"/><text class="svg-plot-label svg-plot-t" x="0" y="0" transform="rotate(-90) translate(-99 -37.7)">dB</text><text class="svg-plot-value" style="text-anchor:end" x="-9" y="183.615">-120</text><text class="svg-plot-value" style="text-anchor:end" x="-9" y="137.462">-90</text><text class="svg-plot-value" style="text-anchor:end" x="-9" y="91.3077">-60</text><text class="svg-plot-value" style="text-anchor:end" x="-9" y="45.1538">-30</text><text class="svg-plot-value" style="text-anchor:end" x="-9" y="-1">0</text><text class="svg-plot-label svg-plot-t" x="300" y="229">frequency</text><text class="svg-plot-value" x="600" y="213">Nyquist</text><text class="svg-plot-value" x="0" y="213">0</text></g></g><defs><g id="svg-plot-marker0" class="svg-plot-marker"><circle cx="0" cy="0" r="1" stroke="none"/></g><g id="svg-plot-marker1" class="svg-plot-marker"><path d="M0 0.9 -0.9 0 0 -0.9 0.9 0Z" fill="#FFFA" stroke-linejoin="miter" stroke-width="0.5"/></g><g id="svg-plot-marker2" class="svg-plot-marker"><path fill="none" d="M0 -1.2 0 1.2 M -1.2 0 1.2 0" stroke-width="0.6"/></g><g id="svg-plot-marker3" class="svg-plot-marker"><circle cx="0" cy="0" fill="#FFFA" r="0.82" stroke-width="0.55"/></g><g id="svg-plot-marker4" class="svg-plot-marker"><path stroke="none" d="M0 -1.25 1.25 0.9 -1.25 0.9Z"/></g><mask id="svg-plot-hatch1"><rect x="-935" y="-935" width="1870" height="1870" fill="url(#svg-plot-hatch1-pattern)" style="transform:rotate(-50deg)"/></mask><pattern patternUnits="userSpaceOnUse" id="svg-plot-hatch1-pattern" class="svg-plot-hatch" x="0" y="0" width="10" height="3"><line x1="-1" x2="11" y1="1.5" y2="1.5" stroke="#FFF" fill="none"/><rect x="-1" y="-1" width="12" height="12" fill="#FFF2" stroke="none"/></pattern><mask id="svg-plot-hatch2"><rect x="-935" y="-935" width="1870" height="1870" fill="url(#svg-plot-hatch2-pattern)" style="transform:rotate(30deg)"/></mask><pattern patternUnits="userSpaceOnUse" id="svg-plot-hatch2-pattern" class="svg-plot-hatch" x="0" y="0" width="10" height="2.4"><line x1="-1" x2="11" y1="1.2" y2="1.2" stroke="#FFF" fill="none"/><rect x="-1" y="-1" width="12" height="12" fill="#FFF2" stroke="none"/></pattern><mask id="svg-plot-hatch3"><rect x="-935" y="-935" width="1870" height="1870" fill="url(#svg-plot-hatch3-pattern)" style="transform:rotate(8deg)"/><rect x="-935" y="-935" width="1870" height="1870" fill="url(#svg-plot-hatch3-pattern)" style="transform:rotate(93deg)"/></mask><pattern patternUnits="userSpaceOnUse" id="svg-plot-hatch3-pattern" class="svg-plot-hatch" x="0" y="0" width="10" height="3"><line x1="-1" x2="11" y1="1.5" y2="1.5" stroke="#FFF" fill="none"/><rect x="-1" y="-1" width="12" height="12" fill="#FFF2" stroke="none"/></pattern></defs><style>.svg-plot{stroke-linecap:butt;stroke-linejoin:round;}.svg-plot-bg{fill:#FFF;stroke:none;}.svg-plot-axis{stroke:none;fill:#FFFFFFD9;}.svg-plot-legend{stroke:none;fill:#FFFFFFE4;}.svg-plot-line{stroke:blue;fill:none;stroke-width:1.5px;stroke-linejoin:round;}.svg-plot-fill{stroke:none;opacity:0.35;}.svg-plot-major{stroke:#000;stroke-width:1px;stroke-linecap:square;fill:none;}.svg-plot-minor{stroke:#0000004D;stroke-width:0.5px;stroke-dasharray:0.5 1.5;stroke-linecap:round;fill:none;}.svg-plot-tick{stroke:#000;fill:none;stroke-width:1px;stroke-linecap:butt;}.svg-plot-value,.svg-plot-label,.svg-plot-title{font-family:Arial,sans-serif;fill:#000;stroke:#FFFFFF48;stroke-width:2.5px;paint-order:stroke fill;text-anchor:middle;dominant-baseline:central;alignment-baseline:baseline;}.svg-plot-label{font-size:12px;}.svg-plot-value{font-size:10px;}.svg-plot-title{font-size:13px;}.svg-plot-hatch{stroke:#FFF;stroke-width:1px;}.svg-plot-marker{transform:scale(3.25);}.svg-plot-s{stroke:#000;}.svg-plot-f,.svg-plot-t{fill:#000;}.svg-plot-s0{stroke:#007AB0}.svg-plot-f0,.svg-plot-t0{fill:#007AB0}.svg-plot-s1{stroke:#BB102B}.svg-plot-f1,.svg-plot-t1{fill:#BB102B}.svg-plot-s2{stroke:#44A730}.svg-plot-f2,.svg-plot-t2{fill:#44A730}.svg-plot-s3{stroke:#87694F}.svg-plot-f3,.svg-plot-t3{fill:#87694F}.svg-plot-s4{stroke:#EDA720}.svg-plot-f4,.svg-plot-t4{fill:#EDA720}.svg-plot-s5{stroke:#A64D99}.svg-plot-f5,.svg-plot-t5{fill:#A64D99}.svg-plot-d0{stroke-width:1.35px}.svg-plot-d1{stroke-dasharray:1.8 1.8}.svg-plot-d2{stroke-dasharray:4.2 2.4}.svg-plot-d3{stroke-dasharray:7.5 6}.svg-plot-d4{stroke-dasharray:6 1.5 1.5 1.5 1.5 1.5}.svg-plot-d5{stroke-dasharray:15 4.5}.svg-plot-d6{stroke-dasharray:6 3 1.5 3}.svg-plot-h0{opacity:0.175}.svg-plot-h1{mask:url(#svg-plot-hatch1)}.svg-plot-h2{mask:url(#svg-plot-hatch2)}.svg-plot-h3{mask:url(#svg-plot-hatch3)}#svg-plot-hatch2-pattern{stroke-width:0.9px}#svg-plot-hatch3-pattern{stroke-width:0.7px}</style><style>@import"/style/svg-plot/style.css";svg{font-family:"Transport New",Arial,sans-serif;font-weight:300;}.svg-plot-label,.svg-plot-value{font-family:inherit;}.svg-plot-title{font-size:14px;font-family:"PT Sans";opacity:0.65;}.svg-plot-fill:hover{opacity:55%;}.svg-plot-h0{opacity:15%;}.svg-plot-fill.svg-plot-h0:hover{opacity:20%;}.svg-plot-fill.svg-plot-f0{fill:#005AB0;}text.svg-plot-f0{fill:#006AA0;}.svg-plot-fill.svg-plot-f4{fill:#EDB410;}</style><script href="/style/svg-plot/style.js"/></svg>
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#ifndef SIGNALSMITH_DSP_LINEAR_SIMPLEFFT_H
#define SIGNALSMITH_DSP_LINEAR_SIMPLEFFT_H
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
#include <complex>
#include <vector>
namespace signalsmith { namespace linear {
/// A self-contained, reasonably fast power-of-2 FFT template
template<typename Sample>
struct SimpleFFT {
using Complex = std::complex<Sample>;
SimpleFFT(int maxSize=0) {
resize(maxSize);
}
void resize(int maxSize) {
twiddles.resize(maxSize/2);
for (int i = 0; i < maxSize/2; ++i) {
double twiddlePhase = -2*M_PI*i/maxSize;
twiddles[i] = {
Sample(std::cos(twiddlePhase)),
Sample(std::sin(twiddlePhase))
};
}
working.resize(maxSize);
}
void fft(int size, const Complex *time, Complex *freq) {
if (size <= 1) {
*freq = *time;
return;
}
fftPass<false>(size, 1, time, freq, working.data());
}
void ifft(int size, const Complex *freq, Complex *time) {
if (size <= 1) {
*time = *freq;
return;
}
fftPass<true>(size, 1, freq, time, working.data());
}
private:
std::vector<Complex> twiddles;
std::vector<Complex> working;
// Calculate a [size]-point FFT, where each element is a block of [stride] values
template<bool inverse>
void fftPass(int size, int stride, const Complex *input, Complex *output, Complex *working) const {
if (size > 2) {
// Calculate the two half-size FFTs (odd and even) by doubling the stride
fftPass<inverse>(size/2, stride*2, input, working, output);
combine2<inverse>(size, stride, working, output);
} else {
// The input can already be considered a 1-point FFT
combine2<inverse>(size, stride, input, output);
}
}
// Combine interleaved even/odd results into a single spectrum
template<bool inverse>
void combine2(int size, int stride, const Complex *input, Complex *output) const {
auto twiddleStep = twiddles.size()*2/size;
for (int i = 0; i < size/2; ++i) {
Complex twiddle = twiddles[i*twiddleStep];
const Complex *inputA = input + 2*i*stride;
const Complex *inputB = input + (2*i + 1)*stride;
Complex *outputA = output + i*stride;
Complex *outputB = output + (i + size/2)*stride;
for (int s = 0; s < stride; ++s) {
Complex a = inputA[s];
Complex b = inputB[s]*(inverse ? std::conj(twiddle) : twiddle);
outputA[s] = a + b;
outputB[s] = a - b;
}
}
}
};
}} // namespace
#endif // include guard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment