#include <midiinputcomponent.h>
Public Member Functions | |
MidiInputComponentInstance (EntityInstance &entity, Component &resource) | |
bool | init (utility::ErrorState &errorState) override |
virtual | ~MidiInputComponentInstance () |
nap::Signal< const MidiEvent & > * | getMessageReceived () |
![]() | |
ComponentInstance (EntityInstance &entity, Component &resource) | |
virtual void | update (double deltaTime) |
nap::EntityInstance * | getEntityInstance () const |
nap::Component * | getComponent () const |
template<typename T > | |
T * | getComponent () const |
virtual bool | init (utility::ErrorState &errorState) |
![]() | |
Object () | |
virtual | ~Object () |
virtual void | onDestroy () |
Object (Object &)=delete | |
Object & | operator= (const Object &)=delete |
Object (Object &&)=delete | |
Object & | operator= (Object &&)=delete |
Public Attributes | |
nap::Signal< const MidiEvent & > | messageReceived |
std::vector< std::string > | mPorts |
std::vector< MidiValue > | mChannels |
std::vector< MidiValue > | mNumbers |
std::vector< MidiEvent::Type > | mTypes |
![]() | |
std::string | mID |
Property: 'mID' unique name of the object. Used as an identifier by the system. More... | |
Protected Member Functions | |
void | trigger (const MidiEvent &event) |
Additional Inherited Members | |
![]() | |
static bool | isIDProperty (rtti::Instance &object, const rtti::Property &property) |
Instance of component that filters incoming midi messages and makes them available for other components by emitting a signal.
MidiInputComponentInstance | ( | EntityInstance & | entity, |
Component & | resource | ||
) |
|
virtual |
nap::Signal<const MidiEvent&>* getMessageReceived | ( | ) |
|
overridevirtual |
Initializes this component based on it's resource.
errorState | contains the error when initialization fails. |
Reimplemented from ComponentInstance.
|
protected |
This is triggered by the service when a new midi message is received
std::vector<MidiValue> mChannels |
Filter specifying what midi channels to listen to. Empty means all channels.
nap::Signal<const MidiEvent&> messageReceived |
Signal emitted when a midi message is received that passes the filter settings
std::vector<MidiValue> mNumbers |
Filter specifying what number bytes (like cc numbers) to listen to. Empty means all numbers.
std::vector<std::string> mPorts |
Filter specifying input ports that will be listened to. Empty means all ports.
std::vector<MidiEvent::Type> mTypes |
Filter specifying what event types to listen to. Empty means all types.