Deluge Firmware 1.3.0
Build date: 2026.10.08
Loading...
Searching...
No Matches
CVInstrument Class Referencefinal
Inheritance diagram for CVInstrument:
Collaboration diagram for CVInstrument:

Public Member Functions

void noteOnPostArp (int32_t noteCodePostArp, ArpNote *arpNote, int32_t noteIndex) override
void noteOffPostArp (int32_t noteCode, int32_t oldMIDIChannel, int32_t velocity, int32_t noteIndex) override
void polyphonicExpressionEventPostArpeggiator (int32_t newValue, int32_t noteCodeAfterArpeggiation, int32_t expressionDmiension, ArpNote *arpNote, int32_t noteIndex) override
bool writeDataToFile (Serializer &writer, Clip *clipForSavingOutputOnly, Song *song) override
bool readTagFromFile (Deserializer &reader, const char *tagName) override
void monophonicExpressionEvent (int32_t newValue, int32_t expressionDmiension) override
bool setActiveClip (ModelStackWithTimelineCounter *modelStack, PgmChangeSend maySendMIDIPGMs) override
void setupWithoutActiveClip (ModelStack *modelStack) override
bool matchesPreset (OutputType otherType, int32_t otherChannel, int32_t channelSuffix, char const *otherName, char const *otherPath) override
char const * getXMLTag () override
void setChannel (int channel) override
CVMode getCV2Mode ()
void setCV2Mode (CVMode mode)
Public Member Functions inherited from NonAudioInstrument
 NonAudioInstrument (OutputType newType)
void renderOutput (ModelStack *modelStack, std::span< StereoSample > buffer, int32_t *reverbBuffer, int32_t reverbAmountAdjust, int32_t sideChainHitPending, bool shouldLimitDelayFeedback, bool isClipActive) override
void sendNote (ModelStackWithThreeMainThings *modelStack, bool isOn, int32_t noteCode, int16_t const *mpeValues, int32_t fromMIDIChannel=16, uint8_t velocity=64, uint32_t sampleSyncLength=0, int32_t ticksLate=0, uint32_t samplesLate=0) override
int32_t doTickForwardForArp (ModelStack *modelStack, int32_t currentPos) final
ParamManager * getParamManager (Song *song) final
void polyphonicExpressionEventOnChannelOrNote (int32_t newValue, int32_t expressionDimension, int32_t channelOrNote, MIDICharacteristic whichCharacteristic) final
void beenEdited (bool shouldMoveToEmptySlot) override
char const * getSlotXMLTag () override
char const * getSubSlotXMLTag () override
bool readTagFromFile (Deserializer &reader, char const *tagName) override
ModControllable * toModControllable () override
int32_t getChannel () const
bool needsEarlyPlayback () const override
Public Member Functions inherited from MelodicInstrument
 MelodicInstrument (OutputType newType)
virtual void ccReceivedFromInputMIDIChannel (int32_t cc, int32_t value, ModelStackWithTimelineCounter *modelStack)
bool writeMelodicInstrumentAttributesToFile (Serializer &writer, Clip *clipForSavingOutputOnly, Song *song)
void writeMelodicInstrumentTagsToFile (Serializer &writer, Clip *clipForSavingOutputOnly, Song *song)
void offerReceivedNote (ModelStackWithTimelineCounter *modelStackWithTimelineCounter, MIDICable &cable, bool on, int32_t channel, int32_t note, int32_t velocity, bool shouldRecordNotes, bool *doingMidiThru) override
void receivedNote (ModelStackWithTimelineCounter *modelStack, MIDICable &cable, bool on, int32_t midiChannel, MIDIMatchType match, int32_t note, int32_t velocity, bool shouldRecordNotes, bool *doingMidiThru)
void offerReceivedPitchBend (ModelStackWithTimelineCounter *modelStackWithTimelineCounter, MIDICable &cable, uint8_t channel, uint8_t data1, uint8_t data2, bool *doingMidiThru) override
void receivedPitchBend (ModelStackWithTimelineCounter *modelStackWithTimelineCounter, MIDICable &cable, MIDIMatchType match, uint8_t channel, uint8_t data1, uint8_t data2, bool *doingMidiThru)
void offerReceivedCC (ModelStackWithTimelineCounter *modelStackWithTimelineCounter, MIDICable &cable, uint8_t channel, uint8_t ccNumber, uint8_t value, bool *doingMidiThru) override
void receivedCC (ModelStackWithTimelineCounter *modelStackWithTimelineCounter, MIDICable &cable, MIDIMatchType match, uint8_t channel, uint8_t ccNumber, uint8_t value, bool *doingMidiThru)
void offerReceivedAftertouch (ModelStackWithTimelineCounter *modelStackWithTimelineCounter, MIDICable &cable, int32_t channel, int32_t value, int32_t noteCode, bool *doingMidiThru) override
void receivedAftertouch (ModelStackWithTimelineCounter *modelStackWithTimelineCounter, MIDICable &cable, MIDIMatchType match, int32_t channel, int32_t value, int32_t noteCode, bool *doingMidiThru)
bool setActiveClip (ModelStackWithTimelineCounter *modelStack, PgmChangeSend maySendMIDIPGMs) override
bool isNoteRowStillAuditioningAsLinearRecordingEnded (NoteRow *noteRow) final
void stopAnyAuditioning (ModelStack *modelStack) final
bool isNoteAuditioning (int32_t noteCode)
bool isAnyAuditioningHappening () final
void beginAuditioningForNote (ModelStack *modelStack, int32_t note, int32_t velocity, int16_t const *mpeValues, int32_t fromMIDIChannel=MIDI_CHANNEL_NONE, uint32_t sampleSyncLength=0)
void endAuditioningForNote (ModelStack *modelStack, int32_t note, int32_t velocity=kDefaultLiftValue)
virtual ModelStackWithAutoParam * getParamToControlFromInputMIDIChannel (int32_t cc, ModelStackWithThreeMainThings *modelStack)
void processParamFromInputMIDIChannel (int32_t cc, int32_t newValue, ModelStackWithTimelineCounter *modelStack) override
void polyphonicExpressionEventPossiblyToRecord (ModelStackWithTimelineCounter *modelStack, int32_t newValue, int32_t expressionDimension, int32_t channelOrNoteNumber, MIDICharacteristic whichCharacteristic)
ArpeggiatorSettings * getArpSettings (InstrumentClip *clip=nullptr)
void offerBendRangeUpdate (ModelStack *modelStack, MIDICable &cable, int32_t channelOrZone, int32_t whichBendRange, int32_t bendSemitones) override
ModelStackWithAutoParam * getModelStackWithParam (ModelStackWithTimelineCounter *modelStack, Clip *clip, int32_t paramID, deluge::modulation::params::Kind paramKind, bool affectEntire, bool useMenuStack) override
Public Member Functions inherited from Instrument
 Instrument (OutputType newType)
bool matchesPreset (OutputType otherType, int32_t channel, int32_t channelSuffix, char const *otherName, char const *otherPath) override
virtual bool doAnySoundsUseCC (uint8_t channel, uint8_t ccNumber, uint8_t value)
virtual void setupPatching (ModelStackWithTimelineCounter *modelStack)
bool writeDataToFile (Serializer &writer, Clip *clipForSavingOutputOnly, Song *song) override
virtual void compensateInstrumentVolumeForResonance (ModelStackWithThreeMainThings *modelStack)
char const * getNameXMLTag () override
Public Member Functions inherited from Output
 Output (OutputType newType)
Clip * getActiveClip () const
void pickAnActiveClipForArrangementPos (ModelStack *modelStack, int32_t arrangementPos, PgmChangeSend maySendMIDIPGMs)
void pickAnActiveClipIfPossible (ModelStack *modelStack, bool searchSessionClipsIfNeeded=true, PgmChangeSend maySendMIDIPGMs=PgmChangeSend::ONCE, bool setupWithoutActiveClipIfNeeded=true)
void detachActiveClip (Song *currentSong)
virtual bool isSkippingRendering ()
bool clipHasInstance (Clip *clip)
void deleteAnyInstancesOfClip (Clip *clip)
bool isEmpty (bool displayPopup=true)
void clipLengthChanged (Clip *clip, int32_t oldLength)
virtual void cutAllSound ()
virtual void getThingWithMostReverb (Sound **soundWithMostReverb, ParamManager **paramManagerWithMostReverb, GlobalEffectableForClip **globalEffectableWithMostReverb, int32_t *highestReverbAmountFound)
Clip * getClipFromName (std::string_view name)
 If there's a clip matching the name on this output, returns it.
virtual bool offerReceivedPitchBendToLearnedParams (MIDICable &cable, uint8_t channel, uint8_t data1, uint8_t data2, ModelStackWithTimelineCounter *modelStack)
 Pitch bend is available in the mod matrix as X and shouldn't be learned to params anymore (post 4.0).
virtual void offerReceivedCCToLearnedParams (MIDICable &cable, uint8_t channel, uint8_t ccNumber, uint8_t value, ModelStackWithTimelineCounter *modelStack)
void endAnyArrangementRecording (Song *song, int32_t actualEndPos, uint32_t timeRemainder)
virtual bool wantsToBeginArrangementRecording ()
virtual Error readFromFile (Deserializer &reader, Song *song, Clip *clip, int32_t readAutomationUpToPos)
void writeToFile (Clip *clipForSavingOutputOnly, Song *song)
virtual Error loadAllAudioFiles (bool mayActuallyReadFiles)
virtual void loadCrucialAudioFilesOnly ()
virtual void resyncLFOs ()
virtual void sendMIDIPGM ()
virtual void deleteBackedUpParamManagers (Song *song)
virtual void prepareForHibernationOrDeletion ()
Error possiblyBeginArrangementRecording (Song *song, int32_t newPos)
void endArrangementPlayback (Song *song, int32_t actualEndPos, uint32_t timeRemainder)
bool hasRecorder ()
bool shouldRenderInSong ()
void setRenderingToAudioOutput (bool monitoring, Output *output)
 disable rendering to the song buffer if this clip is the input to an audio output that's monitoring
bool addRecorder (SampleRecorder *newRecorder)
bool removeRecorder ()
Output * getOutputRecordingThis ()
virtual void clearRecordingFrom ()
virtual Output * getOutputRecordingFrom ()
 Which output this one records from, or nullptr. Only audio outputs ever record from another output.
Public Member Functions inherited from ModControllable
virtual bool modEncoderButtonAction (uint8_t whichModEncoder, bool on, ModelStackWithThreeMainThings *modelStack)
virtual void modButtonAction (uint8_t whichModButton, bool on, ParamManagerForTimeline *paramManager)
virtual ModelStackWithAutoParam * getParamFromModEncoder (int32_t whichModEncoder, ModelStackWithThreeMainThings *modelStack, bool allowCreation=true)
virtual ModelStackWithAutoParam * getParamFromMIDIKnob (MIDIKnob &knob, ModelStackWithThreeMainThings *modelStack)
 Check that autoParam isn't NULL, after calling this.
virtual uint8_t * getModKnobMode ()
virtual bool isKit ()
virtual bool isSong ()
virtual bool isEditingComp ()
virtual bool valueChangedEnoughToMatter (int32_t old_value, int32_t new_value, deluge::modulation::params::Kind kind, uint32_t paramID)
virtual int32_t getKnobPosForNonExistentParam (int32_t whichModEncoder, ModelStackWithAutoParam *modelStack)
virtual ActionResult modEncoderActionForNonExistentParam (int32_t offset, int32_t whichModEncoder, ModelStackWithAutoParam *modelStack)
virtual bool allowNoteTails (ModelStackWithSoundFlags *modelStack, bool disregardSampleLoop=false)

Static Public Member Functions

static int32_t navigateChannels (int oldChannel, int offset)

Public Attributes

int32_t monophonicPitchBendValue
int32_t polyPitchBendValue
Public Attributes inherited from NonAudioInstrument
uint8_t cachedBendRanges [2]
Public Attributes inherited from MelodicInstrument
Arpeggiator arpeggiator
deluge::fast_map< int16_t, EarlyNoteInfo > earlyNotes
deluge::fast_map< int16_t, EarlyNoteInfo > notesAuditioned
Public Attributes inherited from Instrument
String dirPath
bool editedByUser = false
bool mightExistOnCard = false
bool shouldHibernate {true}
uint8_t defaultVelocity = FlashStorage::defaultVelocity
LearnedMIDI midiInput
Public Attributes inherited from Output
ClipInstanceVector clipInstances
String name
Output * next
const OutputType type
bool mutedInArrangementMode
bool mutedInArrangementModeBeforeStemExport
bool exportStem
bool soloingInArrangementMode
bool inValidState
bool wasCreatedForAutoOverdub
bool armedForRecording
int16_t colour {0}
uint8_t modKnobMode
bool alreadyGotItsNewClip
bool isGettingSoloingClip
bool nextClipFoundShouldGetArmed
bool recordingInArrangement

Private Member Functions

void updatePitchBendOutput (bool outputToo=true)
int32_t getPitchChannel ()
void setMode (CVInstrumentMode channel)
void clearModes ()
void sendMonophonicExpressionEvent (int32_t dimension)

Private Attributes

GateMode gateMode [2] {GateMode::off, GateMode::off}
CVMode cvmode [2] {CVMode::off, CVMode::off}

Additional Inherited Members

Protected Member Functions inherited from Instrument
Clip * createNewClipForArrangementRecording (ModelStack *modelStack) final
Error setupDefaultAudioFileDir ()
Protected Attributes inherited from NonAudioInstrument
int32_t lastMonoExpression [3] {0}
int32_t lastCombinedPolyExpression [3] {0}
int16_t lastOutputMonoExpression [3] {0}
Protected Attributes inherited from Output
bool recorderIsEchoing {false}
Output * outputRecordingThisOutput {nullptr}
Clip * activeClip {nullptr}
SampleRecorder * recorder {nullptr}
Protected Attributes inherited from ModControllable
deluge::modulation::params::Kind unpatchedParamKind_

Member Function Documentation

◆ getXMLTag()

char const * CVInstrument::getXMLTag ( )
inlineoverridevirtual

Implements Output.

◆ matchesPreset()

bool CVInstrument::matchesPreset ( OutputType otherType,
int32_t otherChannel,
int32_t channelSuffix,
char const * otherName,
char const * otherPath )
inlineoverridevirtual

Implements Output.

◆ monophonicExpressionEvent()

void CVInstrument::monophonicExpressionEvent ( int32_t newValue,
int32_t expressionDmiension )
overridevirtual

Reimplemented from ModControllable.

◆ noteOffPostArp()

void CVInstrument::noteOffPostArp ( int32_t noteCode,
int32_t oldMIDIChannel,
int32_t velocity,
int32_t noteIndex )
overridevirtual

Implements NonAudioInstrument.

◆ noteOnPostArp()

void CVInstrument::noteOnPostArp ( int32_t noteCodePostArp,
ArpNote * arpNote,
int32_t noteIndex )
overridevirtual

Implements NonAudioInstrument.

◆ polyphonicExpressionEventPostArpeggiator()

void CVInstrument::polyphonicExpressionEventPostArpeggiator ( int32_t newValue,
int32_t noteCodeAfterArpeggiation,
int32_t expressionDmiension,
ArpNote * arpNote,
int32_t noteIndex )
overridevirtual

Implements NonAudioInstrument.

◆ readTagFromFile()

bool CVInstrument::readTagFromFile ( Deserializer & reader,
const char * tagName )
overridevirtual

Reimplemented from Output.

◆ setActiveClip()

bool CVInstrument::setActiveClip ( ModelStackWithTimelineCounter * modelStack,
PgmChangeSend maySendMIDIPGMs )
overridevirtual

Reimplemented from Output.

◆ setChannel()

void CVInstrument::setChannel ( int channel)
inlineoverridevirtual

Reimplemented from NonAudioInstrument.

◆ setupWithoutActiveClip()

void CVInstrument::setupWithoutActiveClip ( ModelStack * modelStack)
overridevirtual

Reimplemented from Output.

◆ writeDataToFile()

bool CVInstrument::writeDataToFile ( Serializer & writer,
Clip * clipForSavingOutputOnly,
Song * song )
overridevirtual

Reimplemented from Output.


The documentation for this class was generated from the following files:
  • src/deluge/model/instrument/cv_instrument.h
  • src/deluge/model/instrument/cv_instrument.cpp