mirror of
https://codeberg.org/armin/trommelkiste.git
synced 2026-09-01 12:20:46 +02:00
recent
This commit is contained in:
parent
2e5fe1750f
commit
044e3b7a52
7 changed files with 618 additions and 47 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue