drumstick 0.5.0
|
Event representing a SMF text event. More...
#include <alsaevent.h>
Public Member Functions | |
TextEvent () | |
Default constructor. | |
TextEvent (snd_seq_event_t *event) | |
Constructor from an ALSA sequencer record. | |
TextEvent (const QString &text, const int textType=1) | |
Constructor from a given string. | |
TextEvent (const TextEvent &other) | |
Copy constructor. | |
TextEvent (const unsigned int datalen, char *dataptr) | |
Constructor from a data pointer and length. | |
QString | getText () const |
Gets the event's text content. | |
int | getTextType () const |
Gets the event's SMF text type. | |
unsigned int | getLength () const |
Gets the data length. | |
const char * | getData () const |
Gets the data pointer. | |
void | setSequencerType (const snd_seq_event_type_t eventType) |
Sets the event's ALSA sequencer type. | |
snd_seq_event_type_t | getSequencerType () const |
Gets the sequencer event type. | |
void | setDestination (const unsigned char client, const unsigned char port) |
Sets the client:port destination of the event. | |
void | setSource (const unsigned char port) |
Sets the event's source port ID. | |
unsigned char | getSourceClient () const |
Gets the source client id. | |
unsigned char | getSourcePort () const |
Gets the source port id. | |
snd_seq_tick_time_t | getTick () const |
Gets the tick time of the event. | |
unsigned int | getRealTimeSecs () const |
Gets the seconds of the event's real time. | |
unsigned int | getRealTimeNanos () const |
Gets the nanoseconds of the event's real time. | |
void | setSubscribers () |
Sets the event's destination to be all the subscribers of the source port. | |
void | setBroadcast () |
Sets the event's destination to be all queues/clients/ports/channels. | |
void | setDirect () |
Sets the event to be immediately delivered, not queued/scheduled. | |
void | scheduleTick (const int queue, const int tick, const bool relative) |
Sets the event to be scheduled in musical time (ticks) units. | |
void | scheduleReal (const int queue, const ulong secs, const ulong nanos, const bool relative) |
Sets the event to be scheduled in real (clock) time units. | |
void | setPriority (const bool high) |
Sets the priority of the event. | |
unsigned char | getTag () const |
Gets the tag of the event. | |
void | setTag (const unsigned char aTag) |
Sets the event's tag. | |
unsigned int | getRaw32 (const unsigned int n) const |
Gets an event's raw 32 bits parameter. | |
void | setRaw32 (const unsigned int n, const unsigned int value) |
Sets an event's raw 32 bits parameter. | |
unsigned char | getRaw8 (const unsigned int n) const |
Gets an event's raw 8 bits parameter. | |
void | setRaw8 (const unsigned int n, const unsigned char value) |
Sets an event's raw 8 bits parameter. | |
snd_seq_event_t * | getHandle () |
Gets the handle of the event. | |
int | getEncodedLength () |
Gets the encoded length of the event record. | |
CLONE_EVENT_DECLARATION (SequencerEvent) | |
Clone this object returning a pointer to the new object. | |
Static Public Member Functions | |
static bool | isSubscription (const SequencerEvent *event) |
Checks if the event's type is a subscription. | |
static bool | isPort (const SequencerEvent *event) |
Checks if the event's type is of type port. | |
static bool | isClient (const SequencerEvent *event) |
Checks if the event's type is of type client. | |
static bool | isConnectionChange (const SequencerEvent *event) |
Checks if the event's type is of type connection change. | |
static bool | isChannel (const SequencerEvent *event) |
Checks if the event's type is a Channel Voice message. | |
Protected Member Functions | |
void | free () __attribute__((deprecated)) |
Releases the event record. | |
Protected Attributes | |
int | m_textType |
Clone this object returning a pointer to the new object. | |
QByteArray | m_data |
Clone this object returning a pointer to the new object. | |
snd_seq_event_t | m_event |
ALSA sequencer event record. | |
Event representing a SMF text event.
This event type is not intended to be transmitted over the wire to an external device, but it is useful for sequencer programs or MIDI applications
Definition at line 419 of file alsaevent.h.
TextEvent | ( | snd_seq_event_t * | event | ) |
Constructor from an ALSA sequencer record.
event | ALSA sequencer record. |
Definition at line 604 of file alsaevent.cpp.
References m_textType, SequencerEvent::setSequencerType(), and VariableEvent::VariableEvent().
|
explicit |
Constructor from a given string.
text | The event's text |
textType | The SMF text type |
Definition at line 615 of file alsaevent.cpp.
References m_textType, SequencerEvent::setSequencerType(), and VariableEvent::VariableEvent().
Copy constructor.
other | An existing TextEvent object reference |
Definition at line 625 of file alsaevent.cpp.
References getTextType(), m_textType, SequencerEvent::setSequencerType(), TextEvent(), and VariableEvent::VariableEvent().
TextEvent | ( | const unsigned int | datalen, |
char * | dataptr ) |
Constructor from a data pointer and length.
datalen | Data length |
dataptr | Data pointer |
Definition at line 637 of file alsaevent.cpp.
References m_textType, SequencerEvent::setSequencerType(), and VariableEvent::VariableEvent().
|
protectedinherited |
Releases the event record.
Definition at line 372 of file alsaevent.cpp.
References m_event.
Referenced by CLONE_EVENT_DECLARATION().
|
inherited |
Gets the encoded length of the event record.
Definition at line 381 of file alsaevent.cpp.
References m_event.
|
inlineinherited |
Gets the handle of the event.
Definition at line 123 of file alsaevent.h.
References m_event.
Referenced by MidiClient::output(), MidiClient::outputBuffer(), MidiClient::outputDirect(), SequencerOutputThread::sendSongEvent(), MidiQueue::setRealTimePosition(), and MidiQueue::setTickPosition().
|
inherited |
Gets an event's raw 32 bits parameter.
n | The parameter index, between 0 and 2. |
Definition at line 330 of file alsaevent.cpp.
References m_event.
|
inherited |
Gets an event's raw 8 bits parameter.
n | The parameter index, between 0 and 11. |
Definition at line 352 of file alsaevent.cpp.
References m_event.
|
inlineinherited |
Gets the nanoseconds of the event's real time.
Definition at line 101 of file alsaevent.h.
References m_event.
|
inlineinherited |
Gets the seconds of the event's real time.
Definition at line 95 of file alsaevent.h.
References m_event.
|
inlineinherited |
Gets the sequencer event type.
Definition at line 69 of file alsaevent.h.
References m_event.
|
inlineinherited |
Gets the source client id.
Definition at line 77 of file alsaevent.h.
References m_event.
|
inlineinherited |
Gets the source port id.
Definition at line 83 of file alsaevent.h.
References m_event.
|
inlineinherited |
Gets the tag of the event.
Definition at line 113 of file alsaevent.h.
References m_event.
QString getText | ( | ) | const |
Gets the event's text content.
Definition at line 647 of file alsaevent.cpp.
References VariableEvent::m_data.
int getTextType | ( | ) | const |
Gets the event's SMF text type.
Definition at line 656 of file alsaevent.cpp.
References m_textType.
Referenced by TextEvent().
|
inlineinherited |
Gets the tick time of the event.
Definition at line 89 of file alsaevent.h.
References m_event.
|
staticinherited |
Checks if the event's type is a Channel Voice message.
event | A SequencerEvent object pointer |
Definition at line 204 of file alsaevent.cpp.
References SequencerEvent().
|
staticinherited |
Checks if the event's type is of type client.
event | A SequencerEvent object pointer |
Definition at line 170 of file alsaevent.cpp.
References SequencerEvent().
|
staticinherited |
Checks if the event's type is of type connection change.
event | A SequencerEvent object pointer |
Definition at line 184 of file alsaevent.cpp.
References SequencerEvent().
Referenced by SequencerOutputThread::run().
|
staticinherited |
Checks if the event's type is of type port.
event | A SequencerEvent object pointer |
Definition at line 156 of file alsaevent.cpp.
References SequencerEvent().
|
staticinherited |
Checks if the event's type is a subscription.
event | A SequencerEvent object pointer |
Definition at line 143 of file alsaevent.cpp.
References SequencerEvent().
|
inherited |
Sets the event to be scheduled in real (clock) time units.
queue | The queue number to be used. |
secs | The time in whole seconds. |
nanos | The nanoseconds to be added. |
relative | Use relative (to the current) time instead of absolute time. |
Definition at line 291 of file alsaevent.cpp.
References m_event.
|
inherited |
Sets the event to be scheduled in musical time (ticks) units.
queue | The queue number to be used. |
tick | The time in ticks. |
relative | Use relative (to the current) time instead of absolute time. |
Definition at line 279 of file alsaevent.cpp.
References m_event.
Referenced by SequencerOutputThread::sendEchoEvent().
|
inherited |
Sets the client:port destination of the event.
client | The destination's client ID |
port | The destination port ID |
Definition at line 233 of file alsaevent.cpp.
References m_event.
Referenced by SequencerOutputThread::sendEchoEvent().
|
inherited |
Sets the event to be immediately delivered, not queued/scheduled.
Definition at line 268 of file alsaevent.cpp.
References m_event.
|
inherited |
Sets the priority of the event.
This is used in case of several events share the same scheduling time.
high | Mark the event as a high priority one. |
Definition at line 305 of file alsaevent.cpp.
References m_event.
|
inherited |
Sets an event's raw 32 bits parameter.
n | The parameter index, between 0 and 2. |
value | The parameter's value. |
Definition at line 341 of file alsaevent.cpp.
References m_event.
|
inherited |
Sets an event's raw 8 bits parameter.
n | The parameter index, between 0 and 11. |
value | The parameter's value. |
Definition at line 363 of file alsaevent.cpp.
References m_event.
|
inherited |
Sets the event's ALSA sequencer type.
eventType | The ALSA sequencer type |
Definition at line 222 of file alsaevent.cpp.
References m_event.
Referenced by SystemEvent::SystemEvent(), TextEvent::TextEvent(), TextEvent::TextEvent(), TextEvent::TextEvent(), TextEvent::TextEvent(), TextEvent::TextEvent(), and ValueEvent::ValueEvent().
|
inherited |
Sets the event's source port ID.
port | The source port ID |
Definition at line 243 of file alsaevent.cpp.
References m_event.
Referenced by SequencerOutputThread::sendEchoEvent().
|
inherited |
Sets the event's tag.
This attribute is any arbitrary number, not used by the ALSA library. Range limited to 0 thru 255.
aTag | A tag number. |
Definition at line 315 of file alsaevent.cpp.
References m_event.
|
protectedinherited |
ALSA sequencer event record.
Definition at line 142 of file alsaevent.h.
Referenced by ChanPressEvent::ChanPressEvent(), ChanPressEvent::ChanPressEvent(), ControllerEvent::ControllerEvent(), free(), ChannelEvent::getChannel(), VariableEvent::getData(), SubscriptionEvent::getDestClient(), SubscriptionEvent::getDestPort(), NoteEvent::getDuration(), getEncodedLength(), getHandle(), KeyEvent::getKey(), VariableEvent::getLength(), ControllerEvent::getParam(), PortEvent::getPort(), QueueControlEvent::getPosition(), QueueControlEvent::getQueue(), getRaw32(), getRaw8(), getRealTimeNanos(), getRealTimeSecs(), SubscriptionEvent::getSenderClient(), SubscriptionEvent::getSenderPort(), getSequencerType(), QueueControlEvent::getSkewBase(), QueueControlEvent::getSkewValue(), getSourceClient(), getSourcePort(), getTag(), getTick(), QueueControlEvent::getTickTime(), ChanPressEvent::getValue(), ControllerEvent::getValue(), PitchBendEvent::getValue(), ProgramChangeEvent::getValue(), QueueControlEvent::getValue(), ValueEvent::getValue(), KeyEvent::getVelocity(), KeyPressEvent::KeyPressEvent(), KeyPressEvent::KeyPressEvent(), NoteEvent::NoteEvent(), NoteEvent::NoteEvent(), NoteOffEvent::NoteOffEvent(), NoteOffEvent::NoteOffEvent(), NoteOnEvent::NoteOnEvent(), NoteOnEvent::NoteOnEvent(), operator=(), VariableEvent::operator=(), PitchBendEvent::PitchBendEvent(), PitchBendEvent::PitchBendEvent(), ProgramChangeEvent::ProgramChangeEvent(), ProgramChangeEvent::ProgramChangeEvent(), QueueControlEvent::QueueControlEvent(), scheduleReal(), scheduleTick(), SequencerEvent(), SequencerEvent(), SequencerEvent(), setBroadcast(), ChannelEvent::setChannel(), setDestination(), setDirect(), NoteEvent::setDuration(), KeyEvent::setKey(), ControllerEvent::setParam(), QueueControlEvent::setPosition(), setPriority(), QueueControlEvent::setQueue(), setRaw32(), setRaw8(), setSequencerType(), QueueControlEvent::setSkewBase(), QueueControlEvent::setSkewValue(), setSource(), setSubscribers(), setTag(), QueueControlEvent::setTickTime(), ChanPressEvent::setValue(), ControllerEvent::setValue(), PitchBendEvent::setValue(), ProgramChangeEvent::setValue(), QueueControlEvent::setValue(), ValueEvent::setValue(), KeyEvent::setVelocity(), SubscriptionEvent::subscribed(), SysExEvent::SysExEvent(), SysExEvent::SysExEvent(), SysExEvent::SysExEvent(), SysExEvent::SysExEvent(), SysExEvent::SysExEvent(), SystemEvent::SystemEvent(), TempoEvent::TempoEvent(), SubscriptionEvent::unsubscribed(), ValueEvent::ValueEvent(), VariableEvent::VariableEvent(), VariableEvent::VariableEvent(), VariableEvent::VariableEvent(), VariableEvent::VariableEvent(), and VariableEvent::VariableEvent().