checkpoint

This commit is contained in:
2026-02-07 16:54:18 -06:00
parent 3f335343e3
commit 8b4a09fc39
2 changed files with 11 additions and 0 deletions

View File

@@ -16,6 +16,14 @@ WavetableController::WavetableController() {
void WavetableController::init() {
// find number of wavetable files
std::vector<std::filesystem::path> wavetableFiles;
for(std::filesystem::directory_entry entry : std::filesystem::directory_iterator(wavetablesRoot_)) {
if(std::filesystem::is_regular_file(entry.status())) {
wavetableFiles.push_back(entry.path());
}
}
wavetables_.resize(4); // resize for however many files we find
// wavetable file structure is best explained in scripts/generate_wavetable.py

View File

@@ -4,6 +4,7 @@
#include <array>
#include <vector>
#include <cstdint>
#include <filesystem>
#define SYNTH_WAVETABLE_SIZE 2048
#ifndef M_PI // I hate my stupid chungus life
@@ -30,6 +31,8 @@ private:
std::vector<Wavetable> wavetables_;
const std::filesystem::path wavetablesRoot_ = "./config/wavetables";
};