20#include "definitions_cxx.hpp"
21#include "model/global_effectable/global_effectable.h"
22#include "modulation/params/param.h"
23#include "storage/storage_manager.h"
24#include "util/containers.h"
35enum class MIDIMatchType;
39class MidiFollow final {
45 Clip* clip, int32_t soundParamId, int32_t globalParamId,
46 bool displayError =
true);
48 bool* doingMidiThru,
bool shouldRecordNotesNowNow,
ModelStack* modelStack);
49 void sendNoteToClip(
MIDICable& cable,
Clip* clip, MIDIMatchType match,
bool on, int32_t channel, int32_t note,
50 int32_t velocity,
bool* doingMidiThru,
bool shouldRecordNotesNowNow,
ModelStack* modelStack);
63 bool isGlobalEffectableContext();
65 std::array<uint8_t, kMaxMIDIValue + 1> ccToSoundParam;
66 std::array<uint8_t, kMaxMIDIValue + 1> ccToGlobalParam;
67 std::array<uint8_t, params::UNPATCHED_START + params::UNPATCHED_SOUND_MAX_NUM> soundParamToCC;
68 std::array<uint8_t, params::UNPATCHED_GLOBAL_MAX_NUM> globalParamToCC;
70 int32_t previousKnobPos[kMaxMIDIValue + 1];
71 uint32_t timeLastCCSent[kMaxMIDIValue + 1];
72 uint32_t timeAutomationFeedbackLastSent;
85 void initDefaultMappings();
93 int32_t soundParamId, int32_t globalParamId);
95 Clip* clip, int32_t soundParamId, int32_t globalParamId);
98 int32_t soundParamId, int32_t globalParamId);
101 int32_t soundParamId, int32_t globalParamId);
104 int32_t soundParamId, int32_t globalParamId);
105 void displayParamControlError(int32_t soundParamId, int32_t globalParamId);
108 bool isFeedbackEnabled();
115 bool successfullyReadDefaultsFromFile;
Definition audio_clip.h:35
Definition storage_manager.h:185
Definition instrument_clip.h:48
A MIDI cable connection. Stores all state specific to a given cable and its contained ports and chann...
Definition midi_device.h:94
Definition midi_follow.h:39
Clip * getSelectedClip()
Definition midi_follow.cpp:343
void writeDefaultsToFile()
Definition midi_follow.cpp:1032
int32_t getCCFromParam(deluge::modulation::params::Kind paramKind, int32_t paramID)
Definition midi_follow.cpp:562
MIDIMatchType checkMidiFollowMatch(MIDICable &cable, uint8_t channel)
Definition midi_follow.cpp:1007
Clip * getSelectedOrActiveClip()
Definition midi_follow.cpp:319
void removeClip(Clip *clip)
Definition midi_follow.cpp:617
void readDefaultsFromFile()
read defaults from XML
Definition midi_follow.cpp:1095
void handleReceivedCC(ModelStackWithTimelineCounter &modelStack, Clip *clip, int32_t ccNumber, int32_t ccValue)
Definition midi_follow.cpp:762
ModelStackWithAutoParam * getModelStackWithParam(ModelStackWithTimelineCounter *modelStackWithTimelineCounter, Clip *clip, int32_t soundParamId, int32_t globalParamId, bool displayError=true)
Definition midi_follow.cpp:400
void pitchBendReceived(MIDICable &cable, uint8_t channel, uint8_t data1, uint8_t data2, bool *doingMidiThru, ModelStack *modelStack)
Definition midi_follow.cpp:952
void sendCCWithoutModelStackForMidiFollowFeedback(int32_t channel, bool isAutomation=false)
Definition midi_follow.cpp:859
void midiCCReceived(MIDICable &cable, uint8_t channel, uint8_t ccNumber, uint8_t ccValue, bool *doingMidiThru, ModelStack *modelStack)
Definition midi_follow.cpp:695
void noteMessageReceived(MIDICable &cable, bool on, int32_t channel, int32_t note, int32_t velocity, bool *doingMidiThru, bool shouldRecordNotesNowNow, ModelStack *modelStack)
Definition midi_follow.cpp:628
void readDefaultMappingsFromFile(Deserializer &reader)
Definition midi_follow.cpp:1152
void clearStoredClips()
Definition midi_follow.cpp:608
void aftertouchReceived(MIDICable &cable, int32_t channel, int32_t value, int32_t noteCode, bool *doingMidiThru, ModelStack *modelStack)
Definition midi_follow.cpp:980
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 soundEdi...
Definition midi_follow.cpp:932
void writeDefaultMappingsToFile()
convert paramID to a paramName to write to XML
Definition midi_follow.cpp:1057
Definition model_stack.h:269
Definition model_stack.h:231
Definition model_stack.h:129
Definition model_stack.h:123
Kind
Definition param.h:42