tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
tracktion::engine::PhysicalMidiInputDeviceInstance Struct Reference
Inheritance diagram for tracktion::engine::PhysicalMidiInputDeviceInstance:
tracktion::engine::MidiInputDeviceInstanceBase tracktion::engine::InputDeviceInstance juce::ValueTree::Listener

Public Member Functions

 PhysicalMidiInputDeviceInstance (PhysicalMidiInputDevice &d, EditPlaybackContext &c)
 
void handleMMCMessage (const juce::MidiMessage &message) override
 
bool handleTimecodeMessage (const juce::MidiMessage &message) override
 
std::vector< tl::expected< std::unique_ptr< RecordingContext >, juce::String > > prepareToRecord (RecordingParameters params) override
 Prepares a recording operation.
 
PhysicalMidiInputDevicegetPhysicalMidiInput () const
 
- Public Member Functions inherited from tracktion::engine::MidiInputDeviceInstanceBase
 MidiInputDeviceInstanceBase (MidiInputDevice &d, EditPlaybackContext &c)
 
bool isRecordingActive () const override
 Returns true if recording is enabled and the input is connected to any target.
 
bool isRecordingActive (EditItemID targetID) const override
 Returns true if recording is enabled and the input is connected the given target.
 
bool isRecordingQueuedToStop (EditItemID targetID) override
 Returns true if the async stopRecording function has been used and this target is waiting to stop.
 
bool shouldTrackContentsBeMuted (const Track &t) override
 Should return true if this input is currently actively recording into a track and it wants the existing track contents to be muted.
 
std::shared_ptr< choc::fifo::SingleReaderSingleWriterFIFO< juce::MidiMessage > > getRecordingNotes (EditItemID targetID) const override
 Returns a fifo of recorded MIDInotes that can be used for drawing UI components.
 
std::vector< std::unique_ptr< RecordingContext > > startRecording (std::vector< std::unique_ptr< RecordingContext > > newContexts) override
 Starts a recording.
 
tl::expected< Clip::Array, juce::StringstopRecording (StopRecordingParameters params) override
 Stops a recording.
 
void stopRecording (StopRecordingParameters params, std::function< void(tl::expected< Clip::Array, juce::String >)> callback) override
 Stops a recording asyncronously.
 
TimePosition getPunchInTime (EditItemID targetID) override
 Returns the time that a given target started recording.
 
bool isRecording (EditItemID targetID) override
 Returns true if there are any active recordings for this device.
 
bool isRecording () override
 Returns true if there are any active recordings for this device.
 
bool handleIncomingMidiMessage (const juce::MidiMessage &message)
 
MidiChannel applyChannel (juce::MidiMessageSequence &sequence, MidiChannel channelToApply)
 
Clip::Array applyRecording (std::unique_ptr< MidiRecordingContext > recContext, TimePosition unloopedEndTime, bool isLooping, TimeRange loopRange, bool discardRecordings)
 
juce::Array< Clip * > applyRetrospectiveRecord (bool armedOnly) override
 Takes the retrospective buffer and creates clips from it, as if recording had been triggered in the past and stopped at the time of calling this function.
 
void masterTimeUpdate (double time)
 
MidiInputDevicegetMidiInput () const
 
- Public Member Functions inherited from tracktion::engine::InputDeviceInstance
 InputDeviceInstance (InputDevice &, EditPlaybackContext &)
 
 ~InputDeviceInstance () override
 Destructor.
 
InputDevicegetInputDevice () noexcept
 Returns the InputDevice this instance belongs to.
 
juce::Array< EditItemIDgetTargets () const
 Returns the targets this instance is assigned to.
 
tl::expected< Destination *, juce::StringsetTarget (EditItemID targetID, bool moveToTrack, juce::UndoManager *, std::optional< int > index=std::nullopt)
 Assigns this input to either an AudioTrack or a ClipSlot.
 
juce::Result removeTarget (EditItemID targetID, juce::UndoManager *)
 Removes the destination with the given targetID.
 
virtual bool isLivePlayEnabled (const Track &) const
 Whether the track should monitor the input or not.
 
bool isRecordingEnabled (EditItemID) const
 Returns true if recording is enabled for the given target.
 
void setRecordingEnabled (EditItemID, bool)
 Enabled/disables recording for a given target.
 
virtual juce::File getRecordingFile (EditItemID) const
 Returns the File that the given target is currently recording to.
 

Public Attributes

std::unique_ptr< MidiTimecodeReadertimecodeReader
 
- Public Attributes inherited from tracktion::engine::MidiInputDeviceInstanceBase
std::shared_mutex contextLock
 
std::vector< std::unique_ptr< MidiRecordingContext > > recordingContexts
 
- Public Attributes inherited from tracktion::engine::InputDeviceInstance
juce::ValueTree state
 
InputDeviceowner
 The state of this instance.
 
EditPlaybackContextcontext
 The EditPlaybackContext this instance belongs to.
 
Editedit
 The Edit this instance belongs to.
 
DestinationList destinations
 The list of assigned destinations.
 

Additional Inherited Members

- Public Types inherited from tracktion::engine::InputDeviceInstance
using PreparedContext = std::vector< tl::expected< std::unique_ptr< RecordingContext >, juce::String > >
 An array of either valid RecordingContexts or an error message if the recording couldn't be started.
 
- Static Public Member Functions inherited from tracktion::engine::MidiInputDeviceInstanceBase
static void applyTimeAdjustment (juce::MidiMessageSequence &sequence, double adjustmentMs)
 
- Protected Member Functions inherited from tracktion::engine::InputDeviceInstance
void valueTreePropertyChanged (juce::ValueTree &, const juce::Identifier &) override
 
void valueTreeChildAdded (juce::ValueTree &, juce::ValueTree &) override
 
ClipSlotgetFreeSlot (AudioTrack &)
 
- Protected Member Functions inherited from juce::ValueTree::Listener
virtual void valueTreeChildOrderChanged (ValueTree &parentTreeWhoseChildrenHaveMoved, int oldIndex, int newIndex)
 
virtual void valueTreeParentChanged (ValueTree &treeWhoseParentHasChanged)
 
virtual void valueTreeRedirected (ValueTree &treeWhichHasBeenChanged)
 

Detailed Description

Definition at line 251 of file tracktion_PhysicalMidiInputDevice.cpp.

Constructor & Destructor Documentation

◆ PhysicalMidiInputDeviceInstance()

tracktion::engine::PhysicalMidiInputDeviceInstance::PhysicalMidiInputDeviceInstance ( PhysicalMidiInputDevice d,
EditPlaybackContext c 
)

Definition at line 253 of file tracktion_PhysicalMidiInputDevice.cpp.

Member Function Documentation

◆ getPhysicalMidiInput()

PhysicalMidiInputDevice & tracktion::engine::PhysicalMidiInputDeviceInstance::getPhysicalMidiInput ( ) const

Definition at line 284 of file tracktion_PhysicalMidiInputDevice.cpp.

◆ handleMMCMessage()

void tracktion::engine::PhysicalMidiInputDeviceInstance::handleMMCMessage ( const juce::MidiMessage message)
overridevirtual

◆ handleTimecodeMessage()

bool tracktion::engine::PhysicalMidiInputDeviceInstance::handleTimecodeMessage ( const juce::MidiMessage message)
overridevirtual

◆ prepareToRecord()

std::vector< tl::expected< std::unique_ptr< RecordingContext >, juce::String > > tracktion::engine::PhysicalMidiInputDeviceInstance::prepareToRecord ( RecordingParameters  )
overridevirtual

Prepares a recording operation.

Parameters
RecordingParametersDetermines the destinations and punch ranges
Returns
An array of either valid RecordingContexts or error messages

Reimplemented from tracktion::engine::MidiInputDeviceInstanceBase.

Definition at line 274 of file tracktion_PhysicalMidiInputDevice.cpp.

Member Data Documentation

◆ timecodeReader

std::unique_ptr<MidiTimecodeReader> tracktion::engine::PhysicalMidiInputDeviceInstance::timecodeReader

Definition at line 286 of file tracktion_PhysicalMidiInputDevice.cpp.


The documentation for this struct was generated from the following file: