Deluge Firmware 1.3.0
Build date: 2026.11.28
Loading...
Searching...
No Matches
CVEngine Class Reference
Collaboration diagram for CVEngine:

Public Member Functions

void init ()
void sendNote (bool on, uint8_t channel, int16_t note=-32768)
void setGateType (uint8_t whichGate, GateType value)
void setCVVoltsPerOctave (uint8_t channel, uint8_t value)
void setCVTranspose (uint8_t channel, int32_t semitones, int32_t cents)
void setCVPitchBend (uint8_t channel, int32_t value, bool outputToo=true)
int32_t calculateVoltage (int32_t note, uint8_t channel)
void physicallySwitchGate (int32_t channel)
void cvOutUpdated (uint8_t channel, const InterruptsDisabled &)
void analogOutTick ()
void playbackBegun ()
void playbackEnded ()
void updateClockOutput ()
 toggles clock, does not physically update until updateGateOutputs called
void updateRunOutput ()
bool isTriggerClockOutputEnabled ()
void updateGateOutputs ()
 physically send all pending gate outs right now
GateOutputs takePendingGateOutputs (bool includeAsap)
void outputGates (const GateOutputs &outputs, const InterruptsDisabled &)
 physically output a snapshot of gates
bool isAnythingButRunPending () const
bool isAnythingPending () const
void sendVoltageOut (uint8_t channel, uint16_t voltage)
bool isNoteOn (int32_t channel, int32_t note)

Public Attributes

GateChannel gateChannels [NUM_GATE_CHANNELS]
CVChannel cvChannels [NUM_PHYSICAL_CV_CHANNELS]
uint8_t minGateOffTime
bool clockState
uint32_t mostRecentSwitchOffTimeOfPendingNoteOn

Private Member Functions

void recalculateCVChannelVoltage (uint8_t channel)
void switchGateOff (int32_t channel)
void switchGateOn (int32_t channel, int32_t doInstantlyIfPossible=false)
void switchGateNow (int32_t channel)
 physically switch a gate right now, superseding any pending or scheduled output for it
uint8_t gateLevel (int32_t channel) const

Private Attributes

uint8_t cv_out_pending_ {0}
 physical CV channels with a voltage update still pending
uint8_t pendingGates {0}
 bitmask of gate channels which have changed but haven't been taken for output yet
uint8_t pendingAsapGates {0}
 subset of pendingGates which should go asap (run signal), respecting minGateOffTime
uint8_t pendingNoteOnGates {0}
 subset of pendingGates which are deferred note-ons (must wait for CV and respect minGateOffTime)
uint8_t gatesAwaitingCV {0}
 gates whose scheduled time has passed but are being held until their cv is output
uint8_t levelsAwaitingCV {0}

Member Function Documentation

◆ takePendingGateOutputs()

GateOutputs CVEngine::takePendingGateOutputs ( bool includeAsap)

take all gate changes made since the last call, so they can be scheduled to go out at a specific time. asap (run) gates are only included if includeAsap is set, since they need to respect minGateOffTime


The documentation for this class was generated from the following files:
  • src/deluge/processing/engines/cv_engine.h
  • src/deluge/processing/engines/cv_engine.cpp