This commit is contained in:
Armin 2026-07-19 18:53:17 +02:00
commit 044e3b7a52
7 changed files with 618 additions and 47 deletions

View file

@ -1,6 +1,8 @@
#pragma once
#include <juce_audio_processors/juce_audio_processors.h>
#include <juce_audio_formats/juce_audio_formats.h>
#include <juce_dsp/juce_dsp.h>
#include <random>
static constexpr int NUM_TRACKS = 10;
static constexpr int MAX_VOICES = 32;
@ -92,11 +94,20 @@ private:
float filterStateL = 0.0f;
float filterStateR = 0.0f;
float noteVelocity = 1.0f;
float ringModPhase = 0.0f;
};
Voice voices[MAX_VOICES];
juce::AudioFormatManager formatManager;
double currentSampleRate = 44100.0;
std::mt19937 rng{std::random_device{}()};
// Effects
static constexpr int DELAY_BUFFER_SECONDS = 4;
juce::AudioBuffer<float> delayBuffer;
int delayWritePos = 0;
juce::dsp::Reverb reverb;
juce::dsp::Reverb::Parameters reverbParams;
int findFreeVoice(int trackIndex);
void handleNoteOn(int trackIndex, float velocity);