11namespace tracktion {
inline namespace engine
33 int getAudioTrackNumber() const noexcept;
37 juce::String getName() const override;
62 AuxSendPlugin* getAuxSendPlugin (
int bus = -1, AuxPosition ap = AuxPosition::byBus)
const;
73 int getIdForBank (
int bank)
const;
74 bool areMidiPatchesZeroBased()
const;
77 WaveInputDevice& getWaveInputDevice() const noexcept {
jassert (waveInputDevice);
return *waveInputDevice; }
78 MidiInputDevice& getMidiInputDevice() const noexcept {
jassert (midiInputDevice);
return *midiInputDevice; }
80 TrackOutput& getOutput() const noexcept {
return *output; }
82 int getMaxNumOfInputs() const noexcept {
return maxInputs; }
83 void setMaxNumOfInputs (
int newMaxNumber);
88 bool canPlayMidi()
const;
97 void insertFreezePointAfterPlugin (
const Plugin::Ptr&);
98 void removeFreezePoint();
99 void freezeTrackAsync()
const;
102 bool hasAnyLiveInputs();
103 bool hasAnyTracksFeedingIn();
108 void injectLiveMidiMessage (
const MidiMessageArray::MidiMessageWithSource&);
109 void injectLiveMidiMessage (
const juce::MidiMessage&, MidiMessageArray::MPESourceID);
112 bool isMuted (
bool includeMutingByDestination)
const override;
113 bool isSolo (
bool includeIndirectSolo)
const override;
114 bool isSoloIsolate (
bool includeIndirectSolo)
const override;
123 double getMidiVerticalOffset()
const;
124 void setMidiVerticalPos (
double visibleProp,
double offset);
125 void scaleVerticallyToFitMidi();
126 void setVerticalScaleToDefault();
128 void setTrackToGhost (AudioTrack*,
bool shouldGhost);
132 int getCompGroup() const noexcept {
return compGroup.
get(); }
133 void setCompGroup (
int groupIndex) { compGroup = groupIndex; }
136 bool hasMidiNoteNames() {
return midiNoteMapCache.
size() > 0; }
137 void clearMidiNoteNames() { midiNoteMap =
juce::String(); }
138 void loadMidiNoteNames (
const juce::String namesFile) { midiNoteMap = namesFile; }
148 void playGuideNote (
int note, MidiChannel midiChannel,
int velocity,
149 bool stopOtherFirst =
true,
bool forceNote =
false,
bool autorelease =
false);
151 void playGuideNotes (
const juce::Array<int>& notes, MidiChannel midiChannel,
153 bool stopOthersFirst =
true);
155 void turnOffGuideNotes();
156 void turnOffGuideNotes (MidiChannel);
203 void timerCallback()
override { turnOffGuideNotes(); }
208 struct FreezeUpdater;
209 friend struct TrackMuter;
221 int freezePointRemovalInhibitor = 0;
234 enum { updateAutoCrossfadesFlag = 1 };
235 AsyncFunctionCaller asyncCaller;
240 double defaultMidiVisibleProportion = 0, defaultMidiVerticalOffset = 0;
244 bool insertFreezePointIfRequired();
245 int getIndexOfDefaultFreezePoint();
246 int getIndexOfFreezePoint();
248 void unFreezeTrack();
251 void updateTracksToGhost();
252 bool isSidechainSource()
const;
254 void updateMidiNoteMapCache();
Type get() const noexcept
ClipSlotList & getClipSlotList()
Returns the ClipSlotList for this track.
bool canContainPlugin(Plugin *) const override
Returns true if this track can contain a specific Plugin.
bool mergeInMidiSequence(juce::MidiMessageSequence, TimePosition startTime, MidiClip *, MidiList::NoteAutomationType)
try to add this MIDI sequence to any MIDI clips that are already in the track.
bool canPlayAudio() const
checks whether audio clips can be played - i.e.
juce::CachedValue< AtomicWrapper< bool > > playSlotClips
Determines if the track's arrange clips or clip slots should be audible.
juce::String getNameForMidiNoteNumber(int note, int midiChannel, bool preferSharp=true) const
looks for a name for a midi note by trying all the plugins, and returning a default on failure.
bool processAudioNodesWhileMuted() const override
Subclasses can override this to ensure track contents are still played even when the track is muted.
bool isSolo(bool includeIndirectSolo) const override
Returns true if this track is soloed.
void initialise() override
Initialises the Track.
juce::ListenerList< Listener > & getListeners()
Returns the listener list so Nodes can manually call them.
void sanityCheckName() override
checks whether the name is 'track n' and if so, makes sure the number is right
bool isTrackAudible(bool areAnyTracksSolo) const override
Returns whether this Track should be audible.
juce::String getTrackPlayabilityWarning() const
returns a warning message about this track not being playable, or "" if it's ok
bool isFrozen(FreezeType) const override
Returns true if this track is frozen using the given type.
void setSolo(bool) override
Subclasses should implement this to solo themselves.
void removeListener(Listener *)
Removes a Listener.
void addListener(Listener *)
Adds a Listener.
bool isMuted(bool includeMutingByDestination) const override
Returns true if this track is muted.
void setFrozen(bool, FreezeType) override
Attempts to freeze or unfreeze the track using a given FreezeType.
void setSoloIsolate(bool) override
Subclasses should implement this to solo isolate themselves.
bool isAudioTrack() const override
Returns true if this is an AudioTrack.
void setMute(bool) override
Subclasses should implement this to mute themselves.
bool isSoloIsolate(bool includeIndirectSolo) const override
Returns true if this track is solo isolated.
double getMidiVisibleProportion() const
vertical scales for displaying the midi note editor
juce::String getNameAsTrackNumberWithDescription() const
Returns a name in the form "Track [number] ([track name])" (This is smart enough to not add the paren...
juce::String getSelectableDescription() override
Subclasses must return a description of what they are.
juce::String getNameForProgramNumber(int programNumber, int bank) const
prog number is 0 based.
juce::Array< Track * > getInputTracks() const override
Should return any tracks which feed into this track.
juce::String getNameAsTrackNumber() const
Returns a name in the form "Track [number]".
The Tracktion Edit class!
Engine & engine
A reference to the Engine.
virtual bool shouldProcessMutedTracks()
Should muted tracks processing be disabled to save CPU.
EngineBehaviour & getEngineBehaviour() const
Returns the EngineBehaviour instance.
Base class for elements which can contain macro parameters.
Represents the destination output device(s) for a track.
FreezeType
Determines the type of freeze.
The built-in Tracktion volume/pan plugin.
Prevents the freeze point from being removed during an unfreeze operation.
Listener interface to be notified of recorded MIDI being sent to the plugins.
virtual void injectLiveMidiMessage(AudioTrack &, const MidiMessageArray::MidiMessageWithSource &, bool &wasUsed)=0
Called when a MidiMessage (i.e.
virtual void recordedMidiMessageSentToPlugins(AudioTrack &, const juce::MidiMessage &)=0
Called when a recorded MidiMessage (i.e.