|
tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications
« « « Anklang Documentation |
Base class for things that can be assigned to external control surfaces, not plugin paramters. More...
#include "tracktion_MidiLearn.h"
Classes | |
| struct | Assignment |
Public Member Functions | |
| MidiAssignable (Engine &) | |
| void | addAssignent (Assignment) |
| Adds an assignment to the list. | |
| juce::Array< Assignment > & | getAssignments () |
| This should return any assignments that should be shown by the pop-up component. | |
| bool | isSingleAssignment () const noexcept |
| Should return true if only one action can be assigned from this control. | |
| void | buildMenu (juce::PopupMenu &) |
| Builds a menu of actions that can be assigned by this control. | |
| void | handleMenuResult (int menuResult) |
| If you've shown a custom menu this will be called with the result which you should handle appropriately. | |
| int | getFaderIndex () |
| Returns the fader index which varies depending on the track num and selected bank etc. | |
| virtual bool | isAssignable ()=0 |
| Should return true if the control is currently assignable. | |
| virtual juce::String | getDescription ()=0 |
| Should return a brief description such as "Track 1 Aux Send" or "Track 4 Record Arm". | |
| virtual Track::Ptr | getControlledTrack () |
| Should return the track that this control represents or nullptr if it is track independant. | |
Public Attributes | |
| Engine & | engine |
Base class for things that can be assigned to external control surfaces, not plugin paramters.
Components can check the base class methods to see if they are currently assignable as this will depend on factors such as selected track ranges etc. If they are assignable they should provide some information as to what action they will be assigned to.
Definition at line 79 of file tracktion_MidiLearn.h.
| tracktion::engine::MidiAssignable::MidiAssignable | ( | Engine & | e | ) |
Definition at line 49 of file tracktion_MidiLearn.cpp.
|
virtual |
Definition at line 94 of file tracktion_MidiLearn.h.
| void tracktion::engine::MidiAssignable::addAssignent | ( | Assignment | newAssignment | ) |
Adds an assignment to the list.
Definition at line 51 of file tracktion_MidiLearn.cpp.
| void tracktion::engine::MidiAssignable::buildMenu | ( | juce::PopupMenu & | m | ) |
Builds a menu of actions that can be assigned by this control.
The menu IDs should be the CustomControlSurface::ActionID they represent for easy assignment triggering.
Definition at line 60 of file tracktion_MidiLearn.cpp.
| juce::Array< Assignment > & tracktion::engine::MidiAssignable::getAssignments | ( | ) |
This should return any assignments that should be shown by the pop-up component.
Definition at line 100 of file tracktion_MidiLearn.h.
|
virtual |
Should return the track that this control represents or nullptr if it is track independant.
Definition at line 129 of file tracktion_MidiLearn.h.
| int tracktion::engine::MidiAssignable::getFaderIndex | ( | ) |
Returns the fader index which varies depending on the track num and selected bank etc.
This is added on to track specific actions automatically when they are assigned.
Definition at line 248 of file tracktion_MidiLearn.cpp.
| void tracktion::engine::MidiAssignable::handleMenuResult | ( | int | menuResult | ) |
If you've shown a custom menu this will be called with the result which you should handle appropriately.
This uses the result number as a CustomControlSurface action Id and adds it to the currently focused edit's change handler.
Definition at line 236 of file tracktion_MidiLearn.cpp.
|
noexcept |
Should return true if only one action can be assigned from this control.
Definition at line 103 of file tracktion_MidiLearn.h.
| Engine& tracktion::engine::MidiAssignable::engine |
Definition at line 131 of file tracktion_MidiLearn.h.