|
TracktionEngine
|
#include <tracktion_MidiInputDevice.h>
Classes | |
| struct | MidiKeyChangeDispatcher |
| Gets notified (lazily, not in real-time) when any MidiInputDevice's key's state changes. More... | |
| struct | NoteFilterRange |
Public Types | |
| enum class | MergeMode { always , never , optional } |
Public Types inherited from 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 Member Functions | |
| MidiInputDevice (Engine &, juce::String name, juce::String deviceID) | |
| ~MidiInputDevice () override | |
| virtual juce::String | openDevice ()=0 |
| virtual void | closeDevice ()=0 |
| 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 *) |
| virtual void | loadProps ()=0 |
| Clip * | addMidiAsTransaction (Edit &, EditItemID targetID, Clip *takeClip, juce::MidiMessageSequence, TimeRange markedRange, MergeMode, MidiChannel) |
| void | handleIncomingMidiMessage (juce::MidiInput *, const juce::MidiMessage &) override |
| virtual void | handleIncomingMidiMessage (const juce::MidiMessage &, MPESourceID)=0 |
| 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 engine::InputDevice | |
| InputDevice (Engine &, juce::String name, juce::String deviceID) | |
| ~InputDevice () override | |
| virtual DeviceType | getDeviceType () const =0 |
| bool | isTrackDevice () const override |
| virtual bool | isAvailableToEdit () const |
| bool | isMidi () const override |
| MonitorMode | getMonitorMode () const |
| void | setMonitorMode (MonitorMode) |
| virtual InputDeviceInstance * | createInstance (EditPlaybackContext &)=0 |
| Creates an instance to use for a given playback context. | |
| virtual void | saveProps ()=0 |
Public Attributes | |
| bool | mergeRecordings = true |
| bool | recordingEnabled = true |
| bool | replaceExistingClips = false |
| bool | recordToNoteAutomation = false |
| QuantisationType | quantisation |
| juce::MidiKeyboardState | keyboardState |
Public Attributes inherited from engine::InputDevice | |
| LevelMeasurer | levelMeasurer |
Protected Member Functions | |
| 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 | |
| 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< MidiKeyChangeDispatcher > | midiKeyChangeDispatcher |
| juce::CriticalSection | instanceLock |
| juce::Array< MidiInputDeviceInstanceBase * > | instances |
| std::unique_ptr< RetrospectiveMidiBuffer > | retrospectiveBuffer |
Protected Attributes inherited from engine::InputDevice | |
| MonitorMode | monitorMode = MonitorMode::automatic |
| MonitorMode | defaultMonitorMode = MonitorMode::automatic |
| bool | retrospectiveRecordLock = false |
Additional Inherited Members | |
Static Public Member Functions inherited from engine::InputDevice | |
| static void | setRetrospectiveLock (Engine &, const juce::Array< InputDeviceInstance * > &, bool lock) |
|
strong |
| engine::MidiInputDevice::MidiInputDevice | ( | Engine & | , |
| juce::String | name, | ||
| juce::String | deviceID | ||
| ) |
|
override |
|
pure virtual |
Implemented in engine::PhysicalMidiInputDevice.
|
pure virtual |
Implemented in engine::PhysicalMidiInputDevice.
|
override |
|
override |
|
noexcept |
| void engine::MidiInputDevice::setChannelToUse | ( | int | ) |
|
noexcept |
| void engine::MidiInputDevice::setProgramToUse | ( | int | ) |
| void engine::MidiInputDevice::setBankToUse | ( | int | ) |
| int engine::MidiInputDevice::getBankToUse | ( | ) | const |
| void engine::MidiInputDevice::setChannelAllowed | ( | int | midiChannel, |
| bool | |||
| ) |
| bool engine::MidiInputDevice::isChannelAllowed | ( | int | midiChannel | ) | const |
| void engine::MidiInputDevice::setNoteFilterRange | ( | NoteFilterRange | ) |
| NoteFilterRange engine::MidiInputDevice::getNoteFilterRange | ( | ) | const |
| void engine::MidiInputDevice::setOverridingNoteVelocities | ( | bool | ) |
| bool engine::MidiInputDevice::isOverridingNoteVelocities | ( | ) | const |
| void engine::MidiInputDevice::setManualAdjustmentMs | ( | double | ) |
| double engine::MidiInputDevice::getManualAdjustmentMs | ( | ) | const |
| void engine::MidiInputDevice::setMinimumLengthMs | ( | double | ) |
| double engine::MidiInputDevice::getMinimumLengthMs | ( | ) | const |
| bool engine::MidiInputDevice::isMPEDevice | ( | ) | const |
Returns true if the given device is an MPE device and so should always record incoming MIDI to Note Expression.
|
overridevirtual |
This is a bit of a hack but allows the time for MIDI devices to be set through the base class interface.
Implements engine::InputDevice.
| void engine::MidiInputDevice::connectionStateChanged | ( | ) |
| bool engine::MidiInputDevice::handleIncomingMessage | ( | juce::MidiMessage & | ) |
Updates the timestamp of the message and handles sending it out to listeners.
false if the given message has been filtered out by channel or number.
| void engine::MidiInputDevice::addInstance | ( | MidiInputDeviceInstanceBase * | ) |
| void engine::MidiInputDevice::removeInstance | ( | MidiInputDeviceInstanceBase * | ) |
|
pure virtual |
Implemented in engine::PhysicalMidiInputDevice, and engine::VirtualMidiInputDevice.
| Clip * engine::MidiInputDevice::addMidiAsTransaction | ( | Edit & | , |
| EditItemID | targetID, | ||
| Clip * | takeClip, | ||
| juce::MidiMessageSequence | , | ||
| TimeRange | markedRange, | ||
| MergeMode | , | ||
| MidiChannel | |||
| ) |
|
override |
|
pure virtual |
| RetrospectiveMidiBuffer * engine::MidiInputDevice::getRetrospectiveMidiBuffer | ( | ) | const |
|
overridevirtual |
Implements engine::InputDevice.
| double engine::MidiInputDevice::getAdjustSecs | ( | ) | const |
| juce::Array< AudioTrack * > engine::MidiInputDevice::getDestinationTracks | ( | ) |
| MidiChannel engine::MidiInputDevice::getMidiChannelFor | ( | int | rawChannelNumber | ) | const |
| MPESourceID engine::MidiInputDevice::getMPESourceID | ( | ) | const |
|
overrideprotected |
|
overrideprotected |
|
overrideprotected |
|
protected |
|
protected |
|
protected |
|
protected |
| bool engine::MidiInputDevice::mergeRecordings = true |
| bool engine::MidiInputDevice::recordingEnabled = true |
| bool engine::MidiInputDevice::replaceExistingClips = false |
| bool engine::MidiInputDevice::recordToNoteAutomation = false |
| QuantisationType engine::MidiInputDevice::quantisation |
| juce::MidiKeyboardState engine::MidiInputDevice::keyboardState |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |