Deluge Firmware 1.3.0
Build date: 2025.04.16
Loading...
Searching...
No Matches
ArpeggiatorBase Class Referenceabstract
Inheritance diagram for ArpeggiatorBase:

Public Member Functions

virtual void noteOn (ArpeggiatorSettings *settings, int32_t noteCode, int32_t velocity, ArpReturnInstruction *instruction, int32_t fromMIDIChannel, int16_t const *mpeValues)=0
 
virtual void noteOff (ArpeggiatorSettings *settings, int32_t noteCodePreArp, ArpReturnInstruction *instruction)=0
 
void render (ArpeggiatorSettings *settings, ArpReturnInstruction *instruction, int32_t numSamples, uint32_t gateThreshold, uint32_t phaseIncrement)
 
int32_t doTickForward (ArpeggiatorSettings *settings, ArpReturnInstruction *instruction, uint32_t ClipCurrentPos, bool currentlyPlayingReversed)
 
void calculateRandomizerAmounts (ArpeggiatorSettings *settings)
 
virtual bool hasAnyInputNotesActive ()=0
 
virtual void reset ()=0
 
virtual ArpType getArpType ()=0
 

Public Attributes

bool gateCurrentlyActive = false
 
uint32_t gatePos = 0
 
bool playedFirstArpeggiatedNoteYet = false
 
uint8_t lastVelocity = 0
 
std::array< int16_t, ARP_MAX_INSTRUCTION_NOTES > noteCodeCurrentlyOnPostArp
 
std::array< uint8_t, ARP_MAX_INSTRUCTION_NOTES > outputMIDIChannelForNoteCurrentlyOnPostArp
 
uint32_t notesPlayedFromSequence = 0
 
uint32_t randomNotesPlayedFromOctave = 0
 
int16_t whichNoteCurrentlyOnPostArp
 
int8_t currentOctave = 0
 
int8_t currentDirection = 1
 
int8_t currentOctaveDirection = 1
 
uint32_t notesPlayedFromRhythm = 0
 
uint32_t lastNormalNotePlayedFromRhythm = 0
 
uint32_t notesPlayedFromLockedRandomizer = 0
 
bool lastNormalNotePlayedFromNoteProbability = true
 
bool lastNormalNotePlayedFromBassProbability = false
 
bool lastNormalNotePlayedFromReverseProbability = false
 
bool lastNormalNotePlayedFromChordProbability = false
 
int32_t stepRepeatIndex = 0
 
uint32_t ratchetNotesIndex = 0
 
uint32_t ratchetNotesMultiplier = 0
 
uint32_t ratchetNotesCount = 0
 
bool isRatcheting = false
 
uint32_t chordNotesCount = 0
 
bool isPlayNoteForCurrentStep = true
 
bool isPlayBassForCurrentStep = false
 
bool isPlayReverseForCurrentStep = false
 
bool isPlayChordForCurrentStep = false
 
bool isPlayRatchetForCurrentStep = false
 
int32_t spreadVelocityForCurrentStep = 0
 
int32_t spreadGateForCurrentStep = 0
 
int32_t spreadOctaveForCurrentStep = 0
 
bool resetLockedRandomizerValuesNextTime = false
 

Protected Member Functions

void calculateNextNoteAndOrOctave (ArpeggiatorSettings *settings, uint8_t numActiveNotes)
 
void setInitialNoteAndOctave (ArpeggiatorSettings *settings, uint8_t numActiveNotes)
 
void resetBase ()
 
void resetRatchet ()
 
void executeArpStep (ArpeggiatorSettings *settings, uint8_t numActiveNotes, bool isRatchet, uint32_t maxSequenceLength, uint32_t rhythm, bool *shouldCarryOnRhythmNote, bool *shouldPlayNote, bool *shouldPlayBassNote, bool *shouldPlayReverseNote, bool *shouldPlayChordNote)
 
void increasePatternIndexes (uint8_t numStepRepeats)
 
void increaseSequenceIndexes (uint32_t maxSequenceLength, uint32_t rhythm)
 
void maybeSetupNewRatchet (ArpeggiatorSettings *settings)
 
bool evaluateRhythm (uint32_t rhythm, bool isRatchet)
 
bool evaluateNoteProbability (bool isRatchet)
 
bool evaluateBassProbability (bool isRatchet)
 
bool evaluateReverseProbability (bool isRatchet)
 
bool evaluateChordProbability (bool isRatchet)
 
uint32_t calculateSpreadVelocity (uint8_t velocity, int32_t spreadVelocityForCurrentStep)
 
int32_t getOctaveDirection (ArpeggiatorSettings *settings)
 
virtual void switchNoteOn (ArpeggiatorSettings *settings, ArpReturnInstruction *instruction, bool isRatchet)=0
 
void switchAnyNoteOff (ArpReturnInstruction *instruction)
 
bool getRandomProbabilityResult (uint32_t value)
 
int8_t getRandomBipolarProbabilityAmount (uint32_t value)
 
int8_t getRandomWeighted2BitsAmount (uint32_t value)
 

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