Deluge Firmware 1.3.0
Build date: 2026.02.14
Loading...
Searching...
No Matches
GranularProcessor Class Reference

#include <GranularProcessor.h>

Collaboration diagram for GranularProcessor:

Public Member Functions

 GranularProcessor (const GranularProcessor &other)
int32_t getSamplesToShutdown () const
void startSkippingRendering ()
 allows the buffer to be stolen
void processGrainFX (std::span< StereoSample > buffer, int32_t grainRate, int32_t grainMix, int32_t grainDensity, int32_t pitchRandomness, int32_t *postFXVolume, bool anySoundComingIn, float tempoBPM, q31_t reverbAmount)
 preset is currently converted from a param to a 0-4 preset inside the grain, which is probably not great
void clearGrainFXBuffer ()
void grainBufferStolen ()

Private Member Functions

void setupGrainFX (int32_t grainRate, int32_t grainMix, int32_t grainDensity, int32_t pitchRandomness, int32_t *postFXVolume, float timePerInternalTick)
StereoSample processOneGrainSample (StereoSample currentSample)
void getBuffer ()
void setWrapsToShutdown ()
void setupGrainsIfNeeded (int32_t writeIndex)

Private Attributes

uint32_t bufferWriteIndex
int32_t _grainSize
int32_t _grainRate
int32_t _grainShift
int32_t _grainFeedbackVol
int32_t _grainVol
int32_t _grainDryVol
int32_t _pitchRandomness
bool grainLastTickCountIsZero
bool grainInitialized
Grain grains [8]
int32_t wrapsToShutdown
GrainBuffergrainBuffer
int32_t _densityKnobPos {0}
int32_t _rateKnobPos {0}
int32_t _mixKnobPos {0}
deluge::dsp::filter::BasicFilterComponent lpf_l {}
deluge::dsp::filter::BasicFilterComponent lpf_r {}
bool tempoSync {true}
bool bufferFull {false}

Detailed Description

The granular processor is the config and the grain states. It will seperately manage a 4mb stealable buffer for its memory


The documentation for this class was generated from the following files: