Deluge Firmware 1.3.0
Build date: 2025.06.05
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 = 0
 
int32_t _grainSize = 13230
 
int32_t _grainRate = 1260
 
int32_t _grainShift = 13230
 
int32_t _grainFeedbackVol = 161061273
 
int32_t _grainVol = 0
 
int32_t _grainDryVol = std::numeric_limits<int32_t>::max()
 
int32_t _pitchRandomness = 0
 
bool grainLastTickCountIsZero = true
 
bool grainInitialized = false
 
std::array< Grain, 8 > grains = {0}
 
int32_t wrapsToShutdown = 0
 
GrainBuffergrainBuffer = nullptr
 
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: