This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// compile: clang++ -std=c++20 -lpng 06-la.cpp -o 06-la | |
#define _USE_MATH_DEFINES | |
#include <cmath> | |
#include <vector> | |
#include <random> | |
#include <filesystem> | |
#include "indicators.hpp" | |
#include <png++/png.hpp> | |
#include "AudioFile/AudioFile.h" | |
#include "Envelope.hpp" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// compile: clang++ -std=c++20 -lpng 05-fm.cpp -o 05-fm | |
#define _USE_MATH_DEFINES | |
#include <cmath> | |
#include <vector> | |
#include <random> | |
#include <filesystem> | |
#include "indicators.hpp" | |
#include <png++/png.hpp> | |
#include "AudioFile/AudioFile.h" | |
#include "Envelope.hpp" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// compile: clang++ -std=c++20 -lpng 04-granular.cpp -o 04-granular | |
#define _USE_MATH_DEFINES | |
#include <cmath> | |
#include <vector> | |
#include <random> | |
#include <filesystem> | |
#include "indicators.hpp" | |
#include <png++/png.hpp> | |
#include "AudioFile/AudioFile.h" | |
#include "Envelope.hpp" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// compile: clang++ -std=c++20 -lpng 03-formant.cpp -o 03-formant | |
#define _USE_MATH_DEFINES | |
#include <cmath> | |
#include <vector> | |
#include <random> | |
#include <filesystem> | |
#include "indicators.hpp" | |
#include <png++/png.hpp> | |
#include "AudioFile/AudioFile.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// compile: clang++ -std=c++20 -lpng 02-subtractive.cpp -o 02-subtractive | |
#define _USE_MATH_DEFINES | |
#include <cmath> | |
#include <vector> | |
#include <random> | |
#include <filesystem> | |
#include "indicators.hpp" | |
#include <png++/png.hpp> | |
#include "AudioFile/AudioFile.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// compile: clang++ -std=c++20 -lpng 01-additive.cpp -o 01-additive | |
#define _USE_MATH_DEFINES | |
#include <cmath> | |
#include <vector> | |
#include <random> | |
#include <filesystem> | |
#include "indicators.hpp" | |
#include <png++/png.hpp> | |
#include "AudioFile/AudioFile.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Signal Generators | |
// | |
// Compile: clang++ -std=c++20 -lpng 00-signalgenerators.cpp -o 00-signalgenerators | |
// | |
// If #include <png++/png.hpp> is missing: | |
// > brew install png++ | |
// png++ (header-only) is used to render audio as images to visualize the waveform. | |
// Install with homebrew on macOS or with other package manager. | |
// https://savannah.nongnu.org/projects/pngpp/ | |
// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// From Paper to Code | |
// Summation | |
// Run with: https://www.jdoodle.com/online-compiler-c++17/ | |
// LaTeX: X = \{X_{1},X_{2},...,X_{n} \}; | |
// LaTeX: var(X) = \frac{1}{|x|^2} \sum_{x \epsilon X} \sum_{x \epsilon X} \frac{1}{2} (i - j)^2 | |
// Test LaTeX: https://quicklatex.com/ | |
#include <iostream> | |
#include <vector> | |
#include <cmath> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// From Paper to Code | |
// Summation | |
// Run with: https://www.jdoodle.com/online-compiler-c++17/ | |
// LaTeX: X = \{X_{1},X_{2},...,X_{n} \}; | |
// LaTeX: avg(X) = \frac{1}{|x|} \sum_{x \epsilon X} x | |
// Test LaTeX: https://quicklatex.com/ | |
#include <iostream> | |
#include <vector> | |
double avg(std::vector<double> &X) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// From Paper to Code | |
// Summation | |
// Run with: https://www.jdoodle.com/online-compiler-c++17/ | |
// LaTeX: X = \{X_{1},X_{2},...,X_{n} \}; | |
// LaTeX: avg(X) = \frac{1}{|x|} \sum_{i\epsilon\{1,2..n\}} x_{i} | |
// Test LaTeX: https://quicklatex.com/ | |
#include <iostream> | |
#include <vector> | |
double avg(std::vector<double> &X) |