TracktionEngine
Loading...
Searching...
No Matches
Classes | Public Member Functions | Public Attributes | List of all members
tracktion::engine::PhysicalMidiInputDevice Class Reference

#include <tracktion_PhysicalMidiInputDevice.h>

Inheritance diagram for tracktion::engine::PhysicalMidiInputDevice:

Classes

class  Listener
 

Public Member Functions

 PhysicalMidiInputDevice (Engine &, juce::MidiDeviceInfo)
 
 ~PhysicalMidiInputDevice () override
 
InputDeviceInstancecreateInstance (EditPlaybackContext &) override
 Creates an instance to use for a given playback context.
 
void setReadingMidiTimecode (bool)
 
void setIgnoresHours (bool)
 
bool isIgnoringHours () const noexcept
 
void setAcceptingMMC (bool)
 
void setReadingControllerMessages (bool)
 
bool isAvailableToEdit () const override
 
void setExternalController (ExternalController *)
 sets the external controller to send the messages to.
 
void removeExternalController (ExternalController *)
 
bool isUsedForExternalControl () const
 
void handleIncomingMidiMessage (const juce::MidiMessage &, MPESourceID) override
 
void loadProps () override
 
void saveProps () override
 
DeviceType getDeviceType () const override
 
void addListener (Listener *l)
 
void removeListener (Listener *l)
 
juce::String openDevice () override
 
void closeDevice () override
 
void handleIncomingMidiMessage (juce::MidiInput *, const juce::MidiMessage &) override
 
virtual void handleIncomingMidiMessage (const juce::MidiMessage &, MPESourceID)=0
 
- Public Member Functions inherited from tracktion::engine::MidiInputDevice
 MidiInputDevice (Engine &, juce::String type, juce::String name, juce::String deviceID)
 
 ~MidiInputDevice () override
 
void setEnabled (bool) override
 
bool isMidi () const override
 
MidiChannel getChannelToUse () const noexcept
 
void setChannelToUse (int)
 
int getProgramToUse () const noexcept
 
void setProgramToUse (int)
 
void setBankToUse (int)
 
int getBankToUse () const
 
void setChannelAllowed (int midiChannel, bool)
 
bool isChannelAllowed (int midiChannel) const
 
void setNoteFilterRange (NoteFilterRange)
 
NoteFilterRange getNoteFilterRange () const
 
void setOverridingNoteVelocities (bool)
 
bool isOverridingNoteVelocities () const
 
void setManualAdjustmentMs (double)
 
double getManualAdjustmentMs () const
 
void setMinimumLengthMs (double)
 
double getMinimumLengthMs () const
 
bool isMPEDevice () const
 Returns true if the given device is an MPE device and so should always record incoming MIDI to Note Expression.
 
void masterTimeUpdate (double time) override
 This is a bit of a hack but allows the time for MIDI devices to be set through the base class interface.
 
void connectionStateChanged ()
 
bool handleIncomingMessage (juce::MidiMessage &)
 Updates the timestamp of the message and handles sending it out to listeners.
 
void addInstance (MidiInputDeviceInstanceBase *)
 
void removeInstance (MidiInputDeviceInstanceBase *)
 
ClipaddMidiAsTransaction (Edit &, EditItemID targetID, Clip *takeClip, juce::MidiMessageSequence, TimeRange markedRange, MergeMode, MidiChannel)
 
void handleIncomingMidiMessage (juce::MidiInput *, const juce::MidiMessage &) override
 
RetrospectiveMidiBuffer * getRetrospectiveMidiBuffer () const
 
void updateRetrospectiveBufferLength (double length) override
 
double getAdjustSecs () const
 
juce::Array< AudioTrack * > getDestinationTracks ()
 
MidiChannel getMidiChannelFor (int rawChannelNumber) const
 
MPESourceID getMPESourceID () const
 
- Public Member Functions inherited from tracktion::engine::InputDevice
 InputDevice (Engine &, juce::String type, juce::String name, juce::String deviceID)
 
 ~InputDevice () override
 
const juce::String & getName () const
 
const juce::String & getType () const
 
juce::String getDeviceID () const
 
bool isTrackDevice () const
 
juce::String getAlias () const
 the alias is the name shown in the draggable input device components
 
void setAlias (const juce::String &newAlias)
 
bool isEnabled () const
 
MonitorMode getMonitorMode () const
 
void setMonitorMode (MonitorMode)
 
juce::String getSelectableDescription () override
 Subclasses must return a description of what they are.
 
- Public Member Functions inherited from tracktion::engine::Selectable
 Selectable ()
 
virtual ~Selectable ()
 
virtual void selectionStatusChanged (bool isNowSelected)
 Can be overridden to tell this object that it has just been selected or deselected.
 
virtual void changed ()
 This should be called to send a change notification to any SelectableListeners that are registered with this object.
 
virtual void selectableAboutToBeDeleted ()
 Called just before the selectable is about to be deleted so any subclasses should still be valid at this point.
 
void addListener (SelectableListener *)
 
void removeListener (SelectableListener *)
 
void addSelectableListener (SelectableListener *)
 
void removeSelectableListener (SelectableListener *)
 
void cancelAnyPendingUpdates ()
 If changed() has been called, this will cancel any pending async change notificaions.
 
void deselect ()
 
void propertiesChanged ()
 
void notifyListenersOfDeletion ()
 
WeakRef getWeakRef ()
 

Public Attributes

bool isTakingControllerMessages = true
 
- Public Attributes inherited from tracktion::engine::MidiInputDevice
bool mergeRecordings = true
 
bool recordingEnabled = true
 
bool replaceExistingClips = false
 
bool recordToNoteAutomation = false
 
QuantisationType quantisation
 
juce::MidiKeyboardState keyboardState
 
- Public Attributes inherited from tracktion::engine::InputDevice
Engineengine
 
LevelMeasurer levelMeasurer
 
- Public Attributes inherited from tracktion::engine::Selectable
WeakRef::Master masterReference
 

Additional Inherited Members

- Public Types inherited from tracktion::engine::MidiInputDevice
enum class  MergeMode { always , never , optional }
 
- Public Types inherited from tracktion::engine::InputDevice
enum  DeviceType {
  waveDevice , trackWaveDevice , physicalMidiDevice , virtualMidiDevice ,
  trackMidiDevice
}
 enum to allow quick querying of the device type. More...
 
enum class  MonitorMode { off , automatic , on }
 Enum to describe monitor modes. More...
 
- Public Types inherited from tracktion::engine::Selectable
using WeakRef = juce::WeakReference< Selectable >
 
- Static Public Member Functions inherited from tracktion::engine::InputDevice
static void setRetrospectiveLock (Engine &, const juce::Array< InputDeviceInstance * > &, bool lock)
 
- Static Public Member Functions inherited from tracktion::engine::Selectable
static void initialise ()
 
static bool isSelectableValid (const Selectable *) noexcept
 checks whether this object has been deleted.
 
- Protected Member Functions inherited from tracktion::engine::MidiInputDevice
void handleNoteOn (juce::MidiKeyboardState *, int midiChannel, int midiNoteNumber, float velocity) override
 
void handleNoteOff (juce::MidiKeyboardState *, int midiChannel, int midiNoteNumber, float velocity) override
 
void timerCallback () override
 
void sendNoteOnToMidiKeyListeners (juce::MidiMessage &)
 
void loadMidiProps (const juce::XmlElement *)
 
void saveMidiProps (juce::XmlElement &)
 
void sendMessageToInstances (const juce::MidiMessage &, MPESourceID)
 
- Protected Attributes inherited from tracktion::engine::MidiInputDevice
std::atomic< double > adjustSecs { 0 }
 
double manualAdjustMs = 0
 
double minimumLengthMs = 0
 
bool overrideNoteVels = false
 
bool eventReceivedFromDevice = false
 
juce::BigInteger disallowedChannels
 
MidiChannel channelToUse
 
int programToUse = 0
 
int bankToUse = 0
 
NoteFilterRange noteFilterRange
 
MPESourceID midiSourceID = createUniqueMPESourceID()
 
std::unique_ptr< NoteDispatcher > noteDispatcher
 
std::vector< double > lastNoteOns
 
juce::CriticalSection noteLock
 
bool keysDown [128]
 
bool keysUp [128]
 
uint8_t keyDownVelocities [128]
 
juce::SharedResourcePointer< MidiKeyChangeDispatchermidiKeyChangeDispatcher
 
juce::CriticalSection instanceLock
 
juce::Array< MidiInputDeviceInstanceBase * > instances
 
std::unique_ptr< RetrospectiveMidiBuffer > retrospectiveBuffer
 
- Protected Attributes inherited from tracktion::engine::InputDevice
std::atomic< bool > enabled { false }
 
MonitorMode monitorMode = MonitorMode::automatic
 
MonitorMode defaultMonitorMode = MonitorMode::automatic
 
bool retrospectiveRecordLock = false
 

Constructor & Destructor Documentation

◆ PhysicalMidiInputDevice()

tracktion::engine::PhysicalMidiInputDevice::PhysicalMidiInputDevice ( Engine ,
juce::MidiDeviceInfo   
)

◆ ~PhysicalMidiInputDevice()

tracktion::engine::PhysicalMidiInputDevice::~PhysicalMidiInputDevice ( )
override

Member Function Documentation

◆ createInstance()

InputDeviceInstance * tracktion::engine::PhysicalMidiInputDevice::createInstance ( EditPlaybackContext )
overridevirtual

Creates an instance to use for a given playback context.

Implements tracktion::engine::InputDevice.

◆ setReadingMidiTimecode()

void tracktion::engine::PhysicalMidiInputDevice::setReadingMidiTimecode ( bool  )

◆ setIgnoresHours()

void tracktion::engine::PhysicalMidiInputDevice::setIgnoresHours ( bool  )

◆ isIgnoringHours()

bool tracktion::engine::PhysicalMidiInputDevice::isIgnoringHours ( ) const
noexcept

◆ setAcceptingMMC()

void tracktion::engine::PhysicalMidiInputDevice::setAcceptingMMC ( bool  )

◆ setReadingControllerMessages()

void tracktion::engine::PhysicalMidiInputDevice::setReadingControllerMessages ( bool  )

◆ isAvailableToEdit()

bool tracktion::engine::PhysicalMidiInputDevice::isAvailableToEdit ( ) const
overridevirtual

Reimplemented from tracktion::engine::InputDevice.

◆ setExternalController()

void tracktion::engine::PhysicalMidiInputDevice::setExternalController ( ExternalController )

sets the external controller to send the messages to.

◆ removeExternalController()

void tracktion::engine::PhysicalMidiInputDevice::removeExternalController ( ExternalController )

◆ isUsedForExternalControl()

bool tracktion::engine::PhysicalMidiInputDevice::isUsedForExternalControl ( ) const

◆ handleIncomingMidiMessage() [1/3]

void tracktion::engine::PhysicalMidiInputDevice::handleIncomingMidiMessage ( const juce::MidiMessage &  ,
MPESourceID   
)
overridevirtual

◆ loadProps()

void tracktion::engine::PhysicalMidiInputDevice::loadProps ( )
overridevirtual

◆ saveProps()

void tracktion::engine::PhysicalMidiInputDevice::saveProps ( )
overridevirtual

◆ getDeviceType()

DeviceType tracktion::engine::PhysicalMidiInputDevice::getDeviceType ( ) const
overridevirtual

◆ addListener()

void tracktion::engine::PhysicalMidiInputDevice::addListener ( Listener l)

◆ removeListener()

void tracktion::engine::PhysicalMidiInputDevice::removeListener ( Listener l)

◆ openDevice()

juce::String tracktion::engine::PhysicalMidiInputDevice::openDevice ( )
overridevirtual

◆ closeDevice()

void tracktion::engine::PhysicalMidiInputDevice::closeDevice ( )
overridevirtual

◆ handleIncomingMidiMessage() [2/3]

void tracktion::engine::MidiInputDevice::handleIncomingMidiMessage ( juce::MidiInput *  ,
const juce::MidiMessage &   
)
override

◆ handleIncomingMidiMessage() [3/3]

virtual void tracktion::engine::MidiInputDevice::handleIncomingMidiMessage ( const juce::MidiMessage &  ,
MPESourceID   
)
virtual

Member Data Documentation

◆ isTakingControllerMessages

bool tracktion::engine::PhysicalMidiInputDevice::isTakingControllerMessages = true

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