Deluge Firmware 1.3.0
Build date: 2026.08.16
Loading...
Searching...
No Matches
ArpeggiatorBase Class Referenceabstract
Inheritance diagram for ArpeggiatorBase:
Collaboration 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
virtual bool handlePendingNotes (ArpeggiatorSettings *settings, ArpReturnInstruction *instruction)
virtual bool hasPendingNotes (ArpeggiatorSettings *settings)
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

Static Public Member Functions

static bool arpIsOff (ArpeggiatorSettings *settings)

Public Attributes

ArpNote active_note
std::array< int16_t, ARP_MAX_INSTRUCTION_NOTES > glideNoteCodeCurrentlyOnPostArp
std::array< uint8_t, ARP_MAX_INSTRUCTION_NOTES > outputMIDIChannelForGlideNoteCurrentlyOnPostArp
uint32_t gatePos = 0
uint8_t lastVelocity = 0

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 *shouldPlayRandomStep, 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 evaluateSwapProbability (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)

Protected Attributes

bool gateCurrentlyActive = false
bool playedFirstArpeggiatedNoteYet = false
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 lastNormalNotePlayedFromSwapProbability = 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
bool glideOnNextNoteOff = false
bool isPlayNoteForCurrentStep = true
bool isPlayBassForCurrentStep = false
bool isPlayRandomStepForCurrentStep = false
bool isPlayReverseForCurrentStep = false
bool isPlayChordForCurrentStep = false
bool isPlayRatchetForCurrentStep = false
bool isPlayGlideForCurrentStep = false
int32_t spreadVelocityForCurrentStep = 0
int32_t spreadGateForCurrentStep = 0
int32_t spreadOctaveForCurrentStep = 0
bool resetLockedRandomizerValuesNextTime = false

Member Function Documentation

◆ arpIsOff()

bool ArpeggiatorBase::arpIsOff ( ArpeggiatorSettings * settings)
inlinestatic

A null settings means no arpeggiation, same as ArpMode::OFF. Everything that branches on "is the arp on" must agree on this, or notes pend in one place and get looked for in another.

◆ handlePendingNotes()

bool ArpeggiatorBase::handlePendingNotes ( ArpeggiatorSettings * settings,
ArpReturnInstruction * instruction )
virtual

Looks for pending notes and sets arp return to the pending note if found Returns true if it sets the arp return note

Reimplemented in Arpeggiator.

◆ hasPendingNotes()

bool ArpeggiatorBase::hasPendingNotes ( ArpeggiatorSettings * settings)
virtual

Whether a note is waiting to start because it couldn't get a voice yet. handlePendingNotes() only runs from Sound::render(), so a Sound must keep rendering while this is true or the note will never start.

Reimplemented in Arpeggiator.


The documentation for this class was generated from the following files:
  • src/deluge/modulation/arpeggiator.h
  • src/deluge/modulation/arpeggiator.cpp