Deluge Firmware
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
MIDIInstrument Class Referencefinal

#include <MIDIInstrument.h>

Inheritance diagram for MIDIInstrument:
Inheritance graph
Collaboration diagram for MIDIInstrument:
Collaboration graph

Public Member Functions

 MIDIInstrument ()
 
void ccReceivedFromInputMIDIChannel (int cc, int value, ModelStackWithTimelineCounter *modelStack)
 
void allNotesOff ()
 
bool setActiveClip (ModelStackWithTimelineCounter *modelStack, int maySendMIDIPGMs)
 
bool writeDataToFile (Clip *clipForSavingOutputOnly, Song *song)
 
bool readTagFromFile (char const *tagName)
 
int readModKnobAssignmentsFromFile (int32_t readAutomationUpToPos, ParamManagerForTimeline *paramManager=NULL)
 
void sendMIDIPGM ()
 
int changeControlNumberForModKnob (int offset, int whichModEncoder, int modKnobMode)
 
int getFirstUnusedCC (ModelStackWithThreeMainThings *modelStack, int direction, int startAt, int stopAt)
 
int moveAutomationToDifferentCC (int oldCC, int newCC, ModelStackWithThreeMainThings *modelStack)
 
int moveAutomationToDifferentCC (int offset, int whichModEncoder, int modKnobMode, ModelStackWithThreeMainThings *modelStack)
 
void offerReceivedNote (ModelStackWithTimelineCounter *modelStackWithTimelineCounter, MIDIDevice *fromDevice, bool on, int channel, int note, int velocity, bool shouldRecordNotes, bool *doingMidiThru)
 
bool modEncoderButtonAction (uint8_t whichModEncoder, bool on, ModelStackWithThreeMainThings *modelStack)
 
void modButtonAction (uint8_t whichModButton, bool on, ParamManagerForTimeline *paramManager)
 
ModelStackWithAutoParamgetParamFromModEncoder (int whichModEncoder, ModelStackWithThreeMainThings *modelStack, bool allowCreation=true)
 
uint8_t * getModKnobMode ()
 
int getKnobPosForNonExistentParam (int whichModEncoder, ModelStackWithAutoParam *modelStack)
 
ModelStackWithAutoParamgetParamToControlFromInputMIDIChannel (int cc, ModelStackWithThreeMainThings *modelStack)
 
bool doesAutomationExistOnMIDIParam (ModelStackWithThreeMainThings *modelStack, int cc)
 
int getOutputMasterChannel ()
 
bool sendsToMPE ()
 
char const * getXMLTag ()
 
char const * getSlotXMLTag ()
 
char const * getSubSlotXMLTag ()
 
- Public Member Functions inherited from NonAudioInstrument
 NonAudioInstrument (int newType)
 
void renderOutput (ModelStack *modelStack, StereoSample *startPos, StereoSample *endPos, int numSamples, int32_t *reverbBuffer, int32_t reverbAmountAdjust, int32_t sideChainHitPending, bool shouldLimitDelayFeedback, bool isClipActive)
 
void sendNote (ModelStackWithThreeMainThings *modelStack, bool isOn, int noteCode, int16_t const *mpeValues, int fromMIDIChannel=16, uint8_t velocity=64, uint32_t sampleSyncLength=0, int32_t ticksLate=0, uint32_t samplesLate=0)
 
int32_t doTickForwardForArp (ModelStack *modelStack, int32_t currentPos) final
 
ParamManagergetParamManager (Song *song) final
 
void polyphonicExpressionEventOnChannelOrNote (int newValue, int whichExpressionDimension, int channelOrNote, int whichCharacteristic) final
 
void beenEdited (bool shouldMoveToEmptySlot)
 
char const * getSlotXMLTag ()
 
char const * getSubSlotXMLTag ()
 
virtual void noteOnPostArp (int noteCodePostArp, ArpNote *arpNote)=0
 
virtual void noteOffPostArp (int noteCodePostArp, int oldMIDIChannel, int velocity)=0
 
bool readTagFromFile (char const *tagName)
 
ModControllabletoModControllable ()
 
- Public Member Functions inherited from MelodicInstrument
 MelodicInstrument (int newType)
 
virtual void sendNote (ModelStackWithThreeMainThings *modelStack, bool isOn, int noteCode, int16_t const *mpeValues, int fromMIDIChannel=MIDI_CHANNEL_NONE, uint8_t velocity=64, uint32_t sampleSyncLength=0, int32_t ticksLate=0, uint32_t samplesLate=0)=0
 
virtual void ccReceivedFromInputMIDIChannel (int cc, int value, ModelStackWithTimelineCounter *modelStack)
 
bool writeMelodicInstrumentAttributesToFile (Clip *clipForSavingOutputOnly, Song *song)
 
void writeMelodicInstrumentTagsToFile (Clip *clipForSavingOutputOnly, Song *song)
 
bool readTagFromFile (char const *tagName)
 
void offerReceivedNote (ModelStackWithTimelineCounter *modelStackWithTimelineCounter, MIDIDevice *fromDevice, bool on, int channel, int note, int velocity, bool shouldRecordNotes, bool *doingMidiThru)
 
void offerReceivedPitchBend (ModelStackWithTimelineCounter *modelStackWithTimelineCounter, MIDIDevice *fromDevice, uint8_t channel, uint8_t data1, uint8_t data2, bool *doingMidiThru)
 
void offerReceivedCC (ModelStackWithTimelineCounter *modelStackWithTimelineCounter, MIDIDevice *fromDevice, uint8_t channel, uint8_t ccNumber, uint8_t value, bool *doingMidiThru)
 
void offerReceivedAftertouch (ModelStackWithTimelineCounter *modelStackWithTimelineCounter, MIDIDevice *fromDevice, int channel, int value, int noteCode, bool *doingMidiThru)
 
bool setActiveClip (ModelStackWithTimelineCounter *modelStack, int maySendMIDIPGMs)
 
bool isNoteRowStillAuditioningAsLinearRecordingEnded (NoteRow *noteRow) final
 
void stopAnyAuditioning (ModelStack *modelStack) final
 
bool isNoteAuditioning (int noteCode)
 
bool isAnyAuditioningHappening () final
 
void beginAuditioningForNote (ModelStack *modelStack, int note, int velocity, int16_t const *mpeValues, int fromMIDIChannel=MIDI_CHANNEL_NONE, uint32_t sampleSyncLength=0)
 
void endAuditioningForNote (ModelStack *modelStack, int note, int velocity=DEFAULT_LIFT_VALUE)
 
virtual ModelStackWithAutoParamgetParamToControlFromInputMIDIChannel (int cc, ModelStackWithThreeMainThings *modelStack)
 
void processParamFromInputMIDIChannel (int cc, int32_t newValue, ModelStackWithTimelineCounter *modelStack)
 
void polyphonicExpressionEventPossiblyToRecord (ModelStackWithTimelineCounter *modelStack, int32_t newValue, int whichExpressionDimension, int channelOrNoteNumber, int whichCharacteristic)
 
ArpeggiatorSettingsgetArpSettings (InstrumentClip *clip=NULL)
 
virtual void polyphonicExpressionEventOnChannelOrNote (int newValue, int whichExpressionDimension, int channelOrNoteNumber, int whichCharacteristic)=0
 
void offerBendRangeUpdate (ModelStack *modelStack, MIDIDevice *device, int channelOrZone, int whichBendRange, int bendSemitones)
 
- Public Member Functions inherited from Instrument
 Instrument (int newType)
 
virtual char const * getFilePrefix ()
 
virtual bool doAnySoundsUseCC (uint8_t channel, uint8_t ccNumber, uint8_t value)
 
virtual void beenEdited (bool shouldMoveToEmptySlot=true)
 
virtual void setupPatching (ModelStackWithTimelineCounter *modelStack)
 
void deleteAnyInstancesOfClip (InstrumentClip *clip)
 
bool writeDataToFile (Clip *clipForSavingOutputOnly, Song *song)
 
bool readTagFromFile (char const *tagName)
 
virtual void compensateInstrumentVolumeForResonance (ModelStackWithThreeMainThings *modelStack)
 
virtual bool isNoteRowStillAuditioningAsLinearRecordingEnded (NoteRow *noteRow)=0
 
char const * getNameXMLTag ()
 
virtual char const * getSlotXMLTag ()
 
virtual char const * getSubSlotXMLTag ()
 
virtual bool isAnyAuditioningHappening ()=0
 
- Public Member Functions inherited from Output
 Output (int newType)
 
virtual ~Output ()
 
virtual void renderOutput (ModelStack *modelStack, StereoSample *startPos, StereoSample *endPos, int numSamples, int32_t *reverbBuffer, int32_t reverbAmountAdjust, int32_t sideChainHitPending, bool shouldLimitDelayFeedback, bool isClipActive)=0
 
virtual void setupWithoutActiveClip (ModelStack *modelStack)
 
virtual bool setActiveClip (ModelStackWithTimelineCounter *modelStack, int maySendMIDIPGMs=PGM_CHANGE_SEND_ONCE)
 
void pickAnActiveClipForArrangementPos (ModelStack *modelStack, int arrangementPos, int maySendMIDIPGMs)
 
void pickAnActiveClipIfPossible (ModelStack *modelStack, bool searchSessionClipsIfNeeded=true, int maySendMIDIPGMs=PGM_CHANGE_SEND_ONCE, bool setupWithoutActiveClipIfNeeded=true)
 
void detachActiveClip (Song *currentSong)
 
virtual ModControllabletoModControllable ()
 
virtual bool isSkippingRendering ()
 
bool clipHasInstance (Clip *clip)
 
void clipLengthChanged (Clip *clip, int32_t oldLength)
 
virtual void cutAllSound ()
 
virtual void getThingWithMostReverb (Sound **soundWithMostReverb, ParamManager **paramManagerWithMostReverb, GlobalEffectableForClip **globalEffectableWithMostReverb, int32_t *highestReverbAmountFound)
 
virtual bool offerReceivedPitchBendToLearnedParams (MIDIDevice *fromDevice, uint8_t channel, uint8_t data1, uint8_t data2, ModelStackWithTimelineCounter *modelStack)
 
virtual void offerReceivedCCToLearnedParams (MIDIDevice *fromDevice, uint8_t channel, uint8_t ccNumber, uint8_t value, ModelStackWithTimelineCounter *modelStack)
 
virtual int32_t doTickForwardForArp (ModelStack *modelStack, int32_t currentPos)
 
void endAnyArrangementRecording (Song *song, int32_t actualEndPos, uint32_t timeRemainder)
 
virtual bool wantsToBeginArrangementRecording ()
 
virtual int readFromFile (Song *song, Clip *clip, int32_t readAutomationUpToPos)
 
virtual bool readTagFromFile (char const *tagName)
 
void writeToFile (Clip *clipForSavingOutputOnly, Song *song)
 
virtual bool writeDataToFile (Clip *clipForSavingOutputOnly, Song *song)
 
virtual int loadAllAudioFiles (bool mayActuallyReadFiles)
 
virtual void loadCrucialAudioFilesOnly ()
 
virtual void resyncLFOs ()
 
virtual void sendMIDIPGM ()
 
virtual void deleteBackedUpParamManagers (Song *song)
 
virtual void prepareForHibernationOrDeletion ()
 
virtual char const * getXMLTag ()=0
 
virtual ParamManagergetParamManager (Song *song)
 
virtual char const * getNameXMLTag ()
 
virtual void offerReceivedNote (ModelStackWithTimelineCounter *modelStackWithTimelineCounter, MIDIDevice *fromDevice, bool on, int channel, int note, int velocity, bool shouldRecordNotes, bool *doingMidiThru)
 
virtual void offerReceivedPitchBend (ModelStackWithTimelineCounter *modelStackWithTimelineCounter, MIDIDevice *fromDevice, uint8_t channel, uint8_t data1, uint8_t data2, bool *doingMidiThru)
 
virtual void offerReceivedCC (ModelStackWithTimelineCounter *modelStackWithTimelineCounter, MIDIDevice *fromDevice, uint8_t channel, uint8_t ccNumber, uint8_t value, bool *doingMidiThru)
 
virtual void offerReceivedAftertouch (ModelStackWithTimelineCounter *modelStackWithTimelineCounter, MIDIDevice *fromDevice, int channel, int value, int noteCode, bool *doingMidiThru)
 
virtual void stopAnyAuditioning (ModelStack *modelStack)
 
virtual void offerBendRangeUpdate (ModelStack *modelStack, MIDIDevice *device, int channelOrZone, int whichBendRange, int bendSemitones)
 
int possiblyBeginArrangementRecording (Song *song, int newPos)
 
void endArrangementPlayback (Song *song, int32_t actualEndPos, uint32_t timeRemainder)
 
- Public Member Functions inherited from ModControllable
 ModControllable ()
 
virtual bool modEncoderButtonAction (uint8_t whichModEncoder, bool on, ModelStackWithThreeMainThings *modelStack)
 
virtual void modButtonAction (uint8_t whichModButton, bool on, ParamManagerForTimeline *paramManager)
 
virtual ModelStackWithAutoParamgetParamFromModEncoder (int whichModEncoder, ModelStackWithThreeMainThings *modelStack, bool allowCreation=true)
 
virtual ModelStackWithAutoParamgetParamFromMIDIKnob (MIDIKnob *knob, ModelStackWithThreeMainThings *modelStack)
 
virtual uint8_t * getModKnobMode ()
 
virtual bool isKit ()
 
virtual int getKnobPosForNonExistentParam (int whichModEncoder, ModelStackWithAutoParam *modelStack)
 
virtual int modEncoderActionForNonExistentParam (int offset, int whichModEncoder, ModelStackWithAutoParam *modelStack)
 
virtual bool allowNoteTails (ModelStackWithSoundFlags *modelStack, bool disregardSampleLoop=false)
 
virtual void polyphonicExpressionEventOnChannelOrNote (int newValue, int whichExpressionDimension, int channelOrNoteNumber, int whichCharacteristic)
 
virtual void monophonicExpressionEvent (int newValue, int whichExpressionDimension)
 

Public Attributes

int channelSuffix
 
int8_t modKnobCCAssignments [NUM_MOD_BUTTONS *NUM_PHYSICAL_MOD_KNOBS]
 
MPEOutputMemberChannel mpeOutputMemberChannels [15]
 
- Public Attributes inherited from NonAudioInstrument
int channel
 
- Public Attributes inherited from MelodicInstrument
Arpeggiator arpeggiator
 
EarlyNoteArray earlyNotes
 
EarlyNoteArray notesAuditioned
 
LearnedMIDI midiInput
 
- Public Attributes inherited from Instrument
String dirPath
 
bool editedByUser
 
bool existsOnCard
 
uint8_t defaultVelocity
 
- Public Attributes inherited from Output
ClipInstanceVector clipInstances
 
ClipactiveClip
 
String name
 
Outputnext
 
const uint8_t type
 
bool mutedInArrangementMode
 
bool soloingInArrangementMode
 
bool inValidState
 
bool wasCreatedForAutoOverdub
 
bool armedForRecording
 
uint8_t modKnobMode
 
bool alreadyGotItsNewClip
 
bool isGettingSoloingClip
 
bool nextClipFoundShouldGetArmed
 
bool recordingInArrangement
 

Protected Member Functions

void polyphonicExpressionEventPostArpeggiator (int newValue, int noteCodeAfterArpeggiation, int whichExpressionDimension, ArpNote *arpNote)
 
void noteOnPostArp (int noteCodePostArp, ArpNote *arpNote)
 
void noteOffPostArp (int noteCodePostArp, int oldMIDIChannel, int velocity)
 
void monophonicExpressionEvent (int newValue, int whichExpressionDimension)
 
virtual void polyphonicExpressionEventPostArpeggiator (int newValue, int noteCodeAfterArpeggiation, int whichExpressionDimension, ArpNote *arpNote)=0
 
- Protected Member Functions inherited from Instrument
ClipcreateNewClipForArrangementRecording (ModelStack *modelStack) final
 
int setupDefaultAudioFileDir ()
 
virtual ClipcreateNewClipForArrangementRecording (ModelStack *modelStack)=0
 

Constructor & Destructor Documentation

◆ MIDIInstrument()

MIDIInstrument::MIDIInstrument ( )

Member Function Documentation

◆ allNotesOff()

void MIDIInstrument::allNotesOff ( )

◆ ccReceivedFromInputMIDIChannel()

void MIDIInstrument::ccReceivedFromInputMIDIChannel ( int  cc,
int  value,
ModelStackWithTimelineCounter modelStack 
)
virtual

Reimplemented from MelodicInstrument.

◆ changeControlNumberForModKnob()

int MIDIInstrument::changeControlNumberForModKnob ( int  offset,
int  whichModEncoder,
int  modKnobMode 
)

◆ doesAutomationExistOnMIDIParam()

bool MIDIInstrument::doesAutomationExistOnMIDIParam ( ModelStackWithThreeMainThings modelStack,
int  cc 
)

◆ getFirstUnusedCC()

int MIDIInstrument::getFirstUnusedCC ( ModelStackWithThreeMainThings modelStack,
int  direction,
int  startAt,
int  stopAt 
)

◆ getKnobPosForNonExistentParam()

int MIDIInstrument::getKnobPosForNonExistentParam ( int  whichModEncoder,
ModelStackWithAutoParam modelStack 
)
virtual

Reimplemented from ModControllable.

◆ getModKnobMode()

uint8_t * MIDIInstrument::getModKnobMode ( )
inlinevirtual

Reimplemented from ModControllable.

◆ getOutputMasterChannel()

int MIDIInstrument::getOutputMasterChannel ( )

◆ getParamFromModEncoder()

ModelStackWithAutoParam * MIDIInstrument::getParamFromModEncoder ( int  whichModEncoder,
ModelStackWithThreeMainThings modelStack,
bool  allowCreation = true 
)
virtual

Reimplemented from ModControllable.

◆ getParamToControlFromInputMIDIChannel()

ModelStackWithAutoParam * MIDIInstrument::getParamToControlFromInputMIDIChannel ( int  cc,
ModelStackWithThreeMainThings modelStack 
)
virtual

Reimplemented from MelodicInstrument.

◆ getSlotXMLTag()

char const * MIDIInstrument::getSlotXMLTag ( )
inlinevirtual

Reimplemented from Instrument.

◆ getSubSlotXMLTag()

char const * MIDIInstrument::getSubSlotXMLTag ( )
inlinevirtual

Reimplemented from Instrument.

◆ getXMLTag()

char const * MIDIInstrument::getXMLTag ( )
inlinevirtual

Implements Output.

◆ modButtonAction()

void MIDIInstrument::modButtonAction ( uint8_t  whichModButton,
bool  on,
ParamManagerForTimeline paramManager 
)
virtual

Reimplemented from ModControllable.

◆ modEncoderButtonAction()

bool MIDIInstrument::modEncoderButtonAction ( uint8_t  whichModEncoder,
bool  on,
ModelStackWithThreeMainThings modelStack 
)
virtual

Reimplemented from ModControllable.

◆ monophonicExpressionEvent()

void MIDIInstrument::monophonicExpressionEvent ( int  newValue,
int  whichExpressionDimension 
)
protectedvirtual

Reimplemented from ModControllable.

◆ moveAutomationToDifferentCC() [1/2]

int MIDIInstrument::moveAutomationToDifferentCC ( int  offset,
int  whichModEncoder,
int  modKnobMode,
ModelStackWithThreeMainThings modelStack 
)

◆ moveAutomationToDifferentCC() [2/2]

int MIDIInstrument::moveAutomationToDifferentCC ( int  oldCC,
int  newCC,
ModelStackWithThreeMainThings modelStack 
)

◆ noteOffPostArp()

void MIDIInstrument::noteOffPostArp ( int  noteCodePostArp,
int  oldMIDIChannel,
int  velocity 
)
protectedvirtual

Implements NonAudioInstrument.

◆ noteOnPostArp()

void MIDIInstrument::noteOnPostArp ( int  noteCodePostArp,
ArpNote arpNote 
)
protectedvirtual

Implements NonAudioInstrument.

◆ offerReceivedNote()

void MIDIInstrument::offerReceivedNote ( ModelStackWithTimelineCounter modelStackWithTimelineCounter,
MIDIDevice fromDevice,
bool  on,
int  channel,
int  note,
int  velocity,
bool  shouldRecordNotes,
bool *  doingMidiThru 
)
virtual

Reimplemented from MelodicInstrument.

◆ polyphonicExpressionEventPostArpeggiator()

void MIDIInstrument::polyphonicExpressionEventPostArpeggiator ( int  newValue,
int  noteCodeAfterArpeggiation,
int  whichExpressionDimension,
ArpNote arpNote 
)
protectedvirtual

Implements NonAudioInstrument.

◆ readModKnobAssignmentsFromFile()

int MIDIInstrument::readModKnobAssignmentsFromFile ( int32_t  readAutomationUpToPos,
ParamManagerForTimeline paramManager = NULL 
)

◆ readTagFromFile()

bool MIDIInstrument::readTagFromFile ( char const *  tagName)
virtual

Reimplemented from MelodicInstrument.

◆ sendMIDIPGM()

void MIDIInstrument::sendMIDIPGM ( )
virtual

Reimplemented from Output.

◆ sendsToMPE()

bool MIDIInstrument::sendsToMPE ( )
inline

◆ setActiveClip()

bool MIDIInstrument::setActiveClip ( ModelStackWithTimelineCounter modelStack,
int  maySendMIDIPGMs 
)
virtual

Reimplemented from MelodicInstrument.

◆ writeDataToFile()

bool MIDIInstrument::writeDataToFile ( Clip clipForSavingOutputOnly,
Song song 
)
virtual

Reimplemented from Instrument.

Member Data Documentation

◆ channelSuffix

int MIDIInstrument::channelSuffix

◆ modKnobCCAssignments

int8_t MIDIInstrument::modKnobCCAssignments[NUM_MOD_BUTTONS *NUM_PHYSICAL_MOD_KNOBS]

◆ mpeOutputMemberChannels

MPEOutputMemberChannel MIDIInstrument::mpeOutputMemberChannels[15]

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