31 bool wantsDevice (
const MidiID& m);
33 bool needsMidiChannel()
const {
return needsChannel; }
34 bool needsMidiBackChannel()
const {
return needsBackChannel; }
39 bool needsOSCSocket()
const {
return needsOSC; }
41 int getNumDevices()
const;
42 void setNumDevices (
int);
44 int getMainDevice()
const;
45 void setMainDevice (
int);
48 void setMidiInputDevice (
int idx,
const juce::String& nameOfMidiInput);
51 void setBackChannelDevice (
int idx,
const juce::String& nameOfMidiOutput);
54 int getOSCInputPort() {
return oscInputPort; }
55 void setOSCInputPort (
int port);
56 int getOSCOutputPort() {
return oscOutputPort; }
57 void setOSCOutputPort (
int port);
58 juce::String getOSCOutputAddress() {
return oscOutputAddr; }
61 bool isEnabled()
const;
62 void setEnabled (
bool);
64 bool isDeletable()
const {
return deletable; }
65 void deleteController();
67 bool wantsMidiClock()
const {
return wantsClock; }
69 void currentEditChanged (
Edit*);
76 void moveFader (
int channelNum,
float newSliderPos);
77 void moveMasterFader (
float newPos);
78 void movePanPot (
int channelNum,
float newPan);
79 void moveMasterPanPot (
float newPos);
81 void soloCountChanged (
bool);
82 void playStateChanged (
bool isPlaying);
84 void automationModeChanged (
bool isReading,
bool isWriting);
85 void snapChanged (
bool isOn);
86 void loopChanged (
bool isOn);
87 void clickChanged (
bool isOn);
88 void channelLevelChanged (
int channel,
float l,
float r);
89 void masterLevelsChanged (
float leftLevel,
float rightLevel);
90 void timecodeChanged (
int barsOrHours,
int beatsOrMinutes,
int ticksOrSeconds,
int millisecs,
bool isBarsBeats,
bool isFrames);
91 void trackSelected (
int channel,
bool isSelected);
92 void selectOtherObject (SelectableClass::Relationship,
bool moveFromCurrentPlugin);
93 void muteOrUnmutePlugin();
94 void muteOrUnmutePluginsInTrack();
95 void changePluginPreset (
int delta);
96 void soloPluginTrack();
97 void auxSendLevelsChanged();
99 void updateDeviceState();
100 void updateParameters();
101 void updateMarkers();
102 void selectedPluginChanged();
103 void selectableObjectChanged (
Selectable*)
override;
104 void selectableObjectAboutToBeDeleted (
Selectable*)
override;
107 void updateTrackSelectLights();
108 void updateTrackRecordLights();
109 void updatePunchLights();
110 void updateScrollLights();
111 void updateUndoLights();
112 void updatePadColours();
113 void clearPadColours();
115 int getNumFaderChannels()
const noexcept;
116 int getFaderIndexInActiveRegion (
int num)
const noexcept;
119 int getNumParameterControls()
const noexcept;
122 void midiInOutDevicesChanged();
123 void oscSettingsChanged();
126 void handleAsyncUpdate()
override;
129 bool eatsAllMessages()
const;
130 bool canSetEatsAllMessages();
131 void setEatsAllMessages (
bool eatAll);
134 juce::Colour getSelectionColour()
const {
return selectionColour; }
135 bool getShowTrackSelectionColour()
const {
return showTrackSelection; }
136 bool getShowClipSlotSelectionColour()
const {
return showClipSlotSelection; }
138 void setShowTrackSelectionColour (
bool);
139 void setShowClipSlotSelectionColour (
bool);
141 bool shouldTrackBeColoured (
int channelNum);
145 bool shouldPluginBeColoured (
Plugin*);
147 void repaintParamSource();
150 ControlSurface& getControlSurface()
const noexcept {
return *controlSurface; }
151 template <
typename Type>
152 Type* getControlSurfaceIfType()
const noexcept {
return dynamic_cast<Type*
> (controlSurface.get()); }
154 ExternalControllerManager& getExternalControllerManager()
const noexcept {
return controlSurface->externalControllerManager; }
156 Edit* getEdit()
const {
return getControlSurface().getEdit(); }
157 TransportControl* getTransport()
const noexcept {
return getControlSurface().getTransport(); }
161 juce::String getInputDeviceName (
int idx)
const {
return inputDeviceNames[idx]; }
162 juce::String getOutputDeviceName (
int idx)
const {
return outputDeviceNames[idx]; }
172 void timerCallback()
override;
175 static constexpr int maxDevices = 4;
178 friend class MackieC4;
179 friend class MackieMCU;
186 int oscInputPort, oscOutputPort;
191 int maxTrackNameChars;
192 int channelStart = 0;
194 int startParamNumber = 0;
195 bool needsBackChannel =
false;
196 bool needsChannel =
false;
197 bool needsOSC =
false;
198 bool usesSettings =
false;
199 bool deletable =
false;
200 bool allowBankingOffEnd =
false;
203 bool showTrackSelection =
false;
204 bool showClipSlotSelection =
true;
206 int startMarkerNumber = 0;
208 bool followsTrackSelection;
209 bool processMidi =
false, updateParams =
false;
217 int getMarkerBankOffset()
const {
return startMarkerNumber; }
218 int getFaderBankOffset()
const {
return channelStart; }
219 int getAuxBankOffset()
const {
return auxBank; }
220 int getParamBankOffset()
const {
return startParamNumber; }
221 int getClipSlotOffset()
const {
return padStart; }
223 void changeFaderBank (
int delta,
bool moveSelection);
224 void changePadBank (
int delta);
225 void changeParamBank (
int delta);
226 void updateParamList();
227 void changeMarkerBank (
int delta);
228 void changeAuxBank (
int delta);
229 void setAuxBank (
int num);
231 void userMovedParameterControl (
int paramNumber,
float newValue,
bool delta);
232 void userPressedParameterControl (
int paramNumber);
233 void userPressedGoToMarker (
int marker);
235 Plugin* getCurrentPlugin()
const;