![]() |
Deluge Firmware 1.3.0
Build date: 2026.07.15
|
Public Member Functions | |
| void | writeDefaultsToFile () |
| void | readDefaultsFromFile () |
| read defaults from XML | |
| ModelStackWithAutoParam * | getModelStackWithParam (ModelStackWithTimelineCounter *modelStackWithTimelineCounter, Clip *clip, int32_t soundParamId, int32_t globalParamId, bool displayError=true) |
| void | noteMessageReceived (MIDICable &cable, bool on, int32_t channel, int32_t note, int32_t velocity, bool *doingMidiThru, bool shouldRecordNotesNowNow, ModelStack *modelStack) |
| Output * | sendNoteToClip (MIDICable &cable, Clip *clip, MIDIMatchType match, bool on, int32_t channel, int32_t note, int32_t velocity, bool *doingMidiThru, bool shouldRecordNotesNowNow, ModelStack *modelStack, bool updateClipForLastNoteReceived=true) |
| void | midiCCReceived (MIDICable &cable, uint8_t channel, uint8_t ccNumber, uint8_t ccValue, bool *doingMidiThru, ModelStack *modelStack) |
| void | pitchBendReceived (MIDICable &cable, uint8_t channel, uint8_t data1, uint8_t data2, bool *doingMidiThru, ModelStack *modelStack) |
| void | aftertouchReceived (MIDICable &cable, int32_t channel, int32_t value, int32_t noteCode, bool *doingMidiThru, ModelStack *modelStack) |
| void | clearStoredClips () |
| void | removeClip (Clip *clip) |
| int32_t | getCCFromParam (deluge::modulation::params::Kind paramKind, int32_t paramID) |
| bool | isGlobalEffectableContext () |
| MIDIFollowChannelType | getChannelTypeForFeedback () |
| void | sendCCWithoutModelStackForMidiFollowFeedback (int32_t channel, bool isAutomation=false) |
| void | sendCCForMidiFollowFeedback (int32_t channel, int32_t ccNumber, int32_t knobPos) |
| called when updating parameter values using mod (gold) encoders or the select encoder in the soundEditor menu | |
| void | handleReceivedCC (MIDICable &cable, ModelStackWithTimelineCounter &modelStack, Clip *clip, int32_t ccNumber, int32_t ccValue) |
Public Attributes | |
| std::array< uint8_t, kMaxMIDIValue+1 > | ccToSoundParam |
| std::array< uint8_t, kMaxMIDIValue+1 > | ccToGlobalParam |
| std::array< uint8_t, params::UNPATCHED_START+params::UNPATCHED_SOUND_MAX_NUM > | soundParamToCC |
| std::array< uint8_t, params::UNPATCHED_GLOBAL_MAX_NUM > | globalParamToCC |
| int32_t | previousKnobPos [kMaxMIDIValue+1] |
| uint32_t | timeLastCCSent [kMaxMIDIValue+1] |
| uint32_t | timeAutomationFeedbackLastSent |
Private Member Functions | |
| void | init () |
| void | initState () |
| void | clearMappings () |
| void | initDefaultMappings () |
| Output * | noteMessageReceivedForSelectedOrActiveClip (MIDICable &cable, bool on, int32_t channel, int32_t note, int32_t velocity, bool *doingMidiThru, bool shouldRecordNotesNowNow, ModelStack *modelStack) |
| void | noteMessageReceivedForSpecificTrack (MIDICable &cable, bool on, int32_t channel, int32_t note, int32_t velocity, bool *doingMidiThru, bool shouldRecordNotesNowNow, ModelStack *modelStack, Output *specific_track, int32_t specific_track_index) |
| Output * | midiCCReceivedForSelectedOrActiveClip (MIDICable &cable, uint8_t channel, uint8_t ccNumber, uint8_t ccValue, bool *doingMidiThru, ModelStack *modelStack) |
| void | midiCCReceivedForSpecificTrack (MIDICable &cable, uint8_t channel, uint8_t ccNumber, uint8_t ccValue, bool *doingMidiThru, ModelStack *modelStack, Output *specific_track, int32_t specific_track_index) |
| Output * | pitchBendReceivedForSelectedOrActiveClip (MIDICable &cable, uint8_t channel, uint8_t data1, uint8_t data2, bool *doingMidiThru, ModelStack *modelStack) |
| void | pitchBendReceivedForSpecificTrack (MIDICable &cable, uint8_t channel, uint8_t data1, uint8_t data2, bool *doingMidiThru, ModelStack *modelStack, Output *specific_track, int32_t specific_track_index) |
| Output * | aftertouchReceivedForSelectedOrActiveClip (MIDICable &cable, int32_t channel, int32_t value, int32_t noteCode, bool *doingMidiThru, ModelStack *modelStack) |
| void | aftertouchReceivedForSpecificTrack (MIDICable &cable, int32_t channel, int32_t value, int32_t noteCode, bool *doingMidiThru, ModelStack *modelStack, Output *specific_track, int32_t specific_track_index) |
| Clip * | getSelectedOrActiveClip () |
| Clip * | getSelectedClip () |
| Clip * | getActiveClip (ModelStack *modelStack) |
| const size_t | getTrackCount () const |
| used to forward midi messages to specific tracks | |
| Output * | getTrackFromIndex (uint32_t trackIndex, uint32_t maxTrack) |
| used to forward midi messages to specific tracks | |
| ModelStackWithAutoParam * | getModelStackWithParamForSong (ModelStackWithThreeMainThings *modelStackWithThreeMainThings, int32_t soundParamId, int32_t globalParamId) |
| ModelStackWithAutoParam * | getModelStackWithParamForClip (ModelStackWithTimelineCounter *modelStackWithTimelineCounter, Clip *clip, int32_t soundParamId, int32_t globalParamId) |
| ModelStackWithAutoParam * | getModelStackWithParamForSynthClip (ModelStackWithTimelineCounter *modelStackWithTimelineCounter, Clip *clip, int32_t soundParamId, int32_t globalParamId) |
| ModelStackWithAutoParam * | getModelStackWithParamForKitClip (ModelStackWithTimelineCounter *modelStackWithTimelineCounter, Clip *clip, int32_t soundParamId, int32_t globalParamId) |
| ModelStackWithAutoParam * | getModelStackWithParamForAudioClip (ModelStackWithTimelineCounter *modelStackWithTimelineCounter, Clip *clip, int32_t soundParamId, int32_t globalParamId) |
| void | displayParamControlError (int32_t soundParamId, int32_t globalParamId) |
| MIDIMatchType | checkMidiFollowMatch (MIDICable &cable, uint8_t channel) |
| MIDIMatchType | checkMidiFollowMatchForSpecificTrack (MIDICable &cable, uint8_t channel, int32_t specific_track_index) |
| bool | isFeedbackEnabled () |
| void | writeDefaultMappingsToFile (Serializer &writer) |
| convert paramID to a paramName to write to XML | |
| void | writeDefaultSettingsToFile (Serializer &writer) |
| write default settings (channels, kit root note, feedback, display param) to XML | |
| void | writeChannelSettingsToFile (Serializer &writer) |
| Write Channel settings to XML. | |
| void | writeSpecificChannelSettingsToFile (Serializer &writer, MIDIFollowChannelType type) |
| Write Specific Channel settings to XML. | |
| void | writeKitRootNoteSettingToFile (Serializer &writer) |
| Write Kit Root Note setting to XML. | |
| void | writeFeedbackSettingsToFile (Serializer &writer) |
| Write Feedback settings to XML. | |
| void | writeDisplayParamSettingToFile (Serializer &writer) |
| Write Display Param setting to XML. | |
| void | readDefaultMappingsFromFile (Deserializer &reader) |
| void | readDefaultSettingsFromFile (Deserializer &reader) |
| read default settings (channels, kit root note, feedback, display param) from XML | |
| void | readChannelSettingsFromFile (Deserializer &reader) |
| Read Channel settings from XML. | |
| void | readSpecificChannelSettingsFromFile (Deserializer &reader, MIDIFollowChannelType type) |
| Read Specific Channel settings from XML. | |
| void | readKitRootNoteSettingFromFile (Deserializer &reader) |
| Read Kit Root Note setting from XML. | |
| void | readFeedbackSettingsFromFile (Deserializer &reader) |
| Read Feedback settings from XML. | |
| void | readDisplayParamSettingFromFile (Deserializer &reader) |
| Read Display Param setting from XML. | |
| char const * | getNameFromChannelType (MIDIFollowChannelType type) |
| enum / string lookup functions | |
| MIDIFollowChannelType | getChannelTypeFromName (char const *name) |
| char const * | getNameFromFeedbackAutomationMode (MIDIFollowFeedbackAutomationMode mode) |
| MIDIFollowFeedbackAutomationMode | getFeedbackAutomationModeFromName (char const *name) |
| char const * | getNameFromBool (bool value) |
| bool | getBoolFromName (char const *name) |
Private Attributes | |
| bool | successfullyReadDefaultsFromFile |
| void MidiFollow::aftertouchReceived | ( | MIDICable & | cable, |
| int32_t | channel, | ||
| int32_t | value, | ||
| int32_t | noteCode, | ||
| bool * | doingMidiThru, | ||
| ModelStack * | modelStack ) |
called from playback handler determines whether aftertouch received is midi follow relevant and should be routed to the active context or a specific track for further processing
|
private |
determines whether aftertouch received is midi follow relevant and should be routed to the active context for further processing
|
private |
determines whether aftertouch received is midi follow relevant and should be routed to a specific track for further processing
|
private |
obtain match to check if device is compatible with the midi follow channel a valid match is passed through to the instruments for further evaluation used with regular midi follow channels A/B/C
|
private |
obtain match to check if device is compatible with the midi follow channel a valid match is passed through to the instruments for further evaluation used with midi follow channels for specific tracks 1-16
| void MidiFollow::clearStoredClips | ( | ) |
initializes the clipForLastNoteReceived array called when swapping songs to make sure that you aren't using clips from the old song
|
private |
returns activeClip for the selected output special case for note and performance data where you want to let notes, midi modulation sources (e.g. mod wheel), and MPE through to the active clip
| int32_t MidiFollow::getCCFromParam | ( | deluge::modulation::params::Kind | paramKind, |
| int32_t | paramID ) |
a parameter can be learned to one cc at a time for a given parameter, find and return the cc that has been learned (if any) for the current midi follow controllable context if no cc is found, then MIDI_CC_NONE (255) is returned
| ModelStackWithAutoParam * MidiFollow::getModelStackWithParam | ( | ModelStackWithTimelineCounter * | modelStackWithTimelineCounter, |
| Clip * | clip, | ||
| int32_t | soundParamId, | ||
| int32_t | globalParamId, | ||
| bool | displayError = true ) |
based on the current context, as determined by clip returned from the getSelectedClip function obtain the modelStackWithParam for that context and return it so it can be used by midi follow
|
private |
see if you are pressing and holding a clip in arranger view, song row view, song grid view see if you are pressing and holding audition pad in arranger view, arranger perf view, or arranger automation view if you're in a clip, this will return that clip
|
private |
checks to see if there is an active clip for the current context cases where there is an active clip: 1) pressing and holding a clip pad in arranger view, song row view, song grid view 2) pressing and holding the audition pad of a row in arranger view and in arranger performance view, arranger automation view 3) entering a clip or previousy held a clip
| void MidiFollow::handleReceivedCC | ( | MIDICable & | cable, |
| ModelStackWithTimelineCounter & | modelStackWithTimelineCounter, | ||
| Clip * | clip, | ||
| int32_t | ccNumber, | ||
| int32_t | ccValue ) |
checks if the ccNumber received has been learned to any parameters in midi learning view if the cc has been learned, it sets the new value for that parameter this function works by first checking the active context to see if there is an active clip to determine if the cc intends to control a song level or clip level parameter
| bool MidiFollow::isGlobalEffectableContext | ( | ) |
Check if midi follow is controlling the global effectable context if so, we should only be controlling the global effectable parameters
| void MidiFollow::midiCCReceived | ( | MIDICable & | cable, |
| uint8_t | channel, | ||
| uint8_t | ccNumber, | ||
| uint8_t | ccValue, | ||
| bool * | doingMidiThru, | ||
| ModelStack * | modelStack ) |
called from playback handler determines whether a midi cc received is midi follow relevant and should be routed to the active context or a specific track for further processing
|
private |
determines whether a midi cc received is midi follow relevant and should be routed to the active context for further processing
|
private |
determines whether a midi cc received is midi follow relevant and should be routed to a specific track for further processing
| void MidiFollow::noteMessageReceived | ( | MIDICable & | cable, |
| bool | on, | ||
| int32_t | channel, | ||
| int32_t | note, | ||
| int32_t | velocity, | ||
| bool * | doingMidiThru, | ||
| bool | shouldRecordNotesNowNow, | ||
| ModelStack * | modelStack ) |
called from playback handler determines whether a note message received is midi follow relevant and should be routed to the active context or a specific track for further processing
|
private |
determines whether a midi note received is midi follow relevant and should be routed to the active context for further processing
|
private |
determines whether a midi note received is midi follow relevant and should be routed to a specific track for further processing
| void MidiFollow::pitchBendReceived | ( | MIDICable & | cable, |
| uint8_t | channel, | ||
| uint8_t | data1, | ||
| uint8_t | data2, | ||
| bool * | doingMidiThru, | ||
| ModelStack * | modelStack ) |
called from playback handler determines whether a pitch bend received is midi follow relevant and should be routed to the active context or a specific track for further processing
|
private |
determines whether a pitch bend received is midi follow relevant and should be routed to the active context for further processing
|
private |
determines whether a pitch bend received is midi follow relevant and should be routed to a specific track for further processing
|
private |
compares param name tag to the list of params available are midi controllable if param is found, it loads the CC mapping info for that param into the view
| void MidiFollow::removeClip | ( | Clip * | clip | ) |
removes a specific clip pointer from the clipForLastNoteReceived array if a clip is deleted, it should be removed from this array to ensure note off's don't get sent to delete clips
| void MidiFollow::sendCCWithoutModelStackForMidiFollowFeedback | ( | int32_t | channel, |
| bool | isAutomation = false ) |
called when updating the context, e.g. switching from song to clip, changing instruments presets, peeking a clip in song view this function: 1) checks the active context 2) sets up the model stack for that context 3) checks what parameters have been learned and obtains the model stack for those params 4) sends midi feedback of the current parameter value to the cc numbers learned to those parameters
| void MidiFollow::writeDefaultsToFile | ( | ) |
create default XML file and write defaults I should check if file exists before creating one