drumstick 2.9.0
C++ MIDI libraries using Qt objects, idioms, and style.
alsaevent.h
Go to the documentation of this file.
1/*
2 MIDI Sequencer C++ library
3 Copyright (C) 2006-2023, Pedro Lopez-Cabanillas <plcl@users.sf.net>
4
5 This library is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#ifndef DRUMSTICK_ALSAEVENT_H
20#define DRUMSTICK_ALSAEVENT_H
21
22extern "C" {
23 #include <alsa/asoundlib.h>
24}
25
26#include <QObject>
27#include <QEvent>
28#include "macros.h"
29
30namespace drumstick { namespace ALSA {
31
40#if defined(DRUMSTICK_STATIC)
41#define DRUMSTICK_ALSA_EXPORT
42#else
43#if defined(drumstick_alsa_EXPORTS)
44#define DRUMSTICK_ALSA_EXPORT Q_DECL_EXPORT
45#else
46#define DRUMSTICK_ALSA_EXPORT Q_DECL_IMPORT
47#endif
48#endif
49
53typedef quint8 MidiByte;
54
59const QEvent::Type SequencerEventType = QEvent::Type(QEvent::User + 4154); // :-)
60
67class DRUMSTICK_ALSA_EXPORT SequencerEvent : public QEvent
68{
69public:
71 SequencerEvent(const SequencerEvent& other);
72 explicit SequencerEvent(const snd_seq_event_t* event);
73
74 SequencerEvent& operator=(const SequencerEvent& other);
75 void setSequencerType(const snd_seq_event_type_t eventType);
81 snd_seq_event_type_t getSequencerType() const { return m_event.type; }
82 void setDestination(const unsigned char client, const unsigned char port);
83 void setSource(const unsigned char port);
89 unsigned char getSourceClient() const { return m_event.source.client; }
95 unsigned char getSourcePort() const { return m_event.source.port; }
101 snd_seq_tick_time_t getTick() const { return m_event.time.tick; }
107 unsigned int getRealTimeSecs() const { return m_event.time.time.tv_sec; }
113 unsigned int getRealTimeNanos() const { return m_event.time.time.tv_nsec; }
114 void setSubscribers();
115 void setBroadcast();
116 void setDirect();
117 void scheduleTick(const int queue, const int tick, const bool relative);
118 void scheduleReal(const int queue, const ulong secs, const ulong nanos, const bool relative);
119 void setPriority(const bool high);
125 unsigned char getTag() const { return m_event.tag; }
126 void setTag(const unsigned char aTag);
127 unsigned int getRaw32(const unsigned int n) const;
128 void setRaw32(const unsigned int n, const unsigned int value);
129 unsigned char getRaw8(const unsigned int n) const;
130 void setRaw8(const unsigned int n, const unsigned char value);
135 snd_seq_event_t* getHandle() { return &m_event; }
136 int getEncodedLength();
137
138 static bool isSubscription(const SequencerEvent* event);
139 static bool isPort(const SequencerEvent* event);
140 static bool isClient(const SequencerEvent* event);
141 static bool isConnectionChange(const SequencerEvent* event);
142 static bool isChannel(const SequencerEvent* event);
143 virtual SequencerEvent* clone() const;
144
145protected:
146 Q_DECL_DEPRECATED void free();
147
152 snd_seq_event_t m_event;
153};
154
158class DRUMSTICK_ALSA_EXPORT ChannelEvent : public SequencerEvent
159{
160public:
167 explicit ChannelEvent(const snd_seq_event_t* event) : SequencerEvent(event) {}
173 void setChannel(const MidiByte c) { m_event.data.note.channel = (c & 0xf); }
179 int getChannel() const { return m_event.data.note.channel; }
180
181 virtual ChannelEvent* clone() const override;
182};
183
187class DRUMSTICK_ALSA_EXPORT KeyEvent : public ChannelEvent
188{
189public:
196 explicit KeyEvent(const snd_seq_event_t* event) : ChannelEvent(event) {}
202 int getKey() const { return m_event.data.note.note; }
208 void setKey(const MidiByte b) { m_event.data.note.note = b; }
214 int getVelocity() const { return m_event.data.note.velocity; }
220 void setVelocity(const MidiByte b) { m_event.data.note.velocity = b; }
221
222 virtual KeyEvent* clone() const override;
223};
224
231class DRUMSTICK_ALSA_EXPORT NoteEvent : public KeyEvent
232{
233public:
235 NoteEvent() : KeyEvent() { m_event.type = SND_SEQ_EVENT_NOTE; }
240 explicit NoteEvent(const snd_seq_event_t* event) : KeyEvent(event) {}
244 NoteEvent(const int ch, const int key, const int vel, const int dur);
250 ulong getDuration() const { return m_event.data.note.duration; }
256 void setDuration(const ulong d) { m_event.data.note.duration = d; }
257
258 virtual NoteEvent* clone() const override;
259};
260
264class DRUMSTICK_ALSA_EXPORT NoteOnEvent : public KeyEvent
265{
266public:
268 NoteOnEvent() : KeyEvent() { m_event.type = SND_SEQ_EVENT_NOTEON; }
273 explicit NoteOnEvent(const snd_seq_event_t* event) : KeyEvent(event) {}
277 NoteOnEvent(const int ch, const int key, const int vel);
278 virtual NoteOnEvent* clone() const override;
279};
280
284class DRUMSTICK_ALSA_EXPORT NoteOffEvent : public KeyEvent
285{
286public:
288 NoteOffEvent() : KeyEvent() { m_event.type = SND_SEQ_EVENT_NOTEOFF; }
293 explicit NoteOffEvent(const snd_seq_event_t* event) : KeyEvent(event) {}
297 NoteOffEvent(const int ch, const int key, const int vel);
298 virtual NoteOffEvent* clone() const override;
299};
300
304class DRUMSTICK_ALSA_EXPORT KeyPressEvent : public KeyEvent
305{
306public:
308 KeyPressEvent() : KeyEvent() { m_event.type = SND_SEQ_EVENT_KEYPRESS; }
313 explicit KeyPressEvent(const snd_seq_event_t* event) : KeyEvent(event) {}
317 KeyPressEvent(const int ch, const int key, const int vel);
318 virtual KeyPressEvent* clone() const override;
319};
320
324class DRUMSTICK_ALSA_EXPORT ControllerEvent : public ChannelEvent
325{
326public:
333 explicit ControllerEvent(const snd_seq_event_t* event) : ChannelEvent(event) {}
337 ControllerEvent(const int ch, const int cc, const int val);
343 uint getParam() const { return m_event.data.control.param; }
349 void setParam( const uint p ) { m_event.data.control.param = p; }
355 int getValue() const { return m_event.data.control.value; }
361 void setValue( const int v ) { m_event.data.control.value = v; }
362 virtual ControllerEvent* clone() const override;
363};
364
368class DRUMSTICK_ALSA_EXPORT ProgramChangeEvent : public ChannelEvent
369{
370public:
372 ProgramChangeEvent() : ChannelEvent() { m_event.type = SND_SEQ_EVENT_PGMCHANGE; }
377 explicit ProgramChangeEvent(const snd_seq_event_t* event) : ChannelEvent(event) {}
381 ProgramChangeEvent(const int ch, const int val);
386 int getValue() const { return m_event.data.control.value; }
391 void setValue( const int v ) { m_event.data.control.value = v; }
392 virtual ProgramChangeEvent* clone() const override;
393};
394
398class DRUMSTICK_ALSA_EXPORT PitchBendEvent : public ChannelEvent
399{
400public:
402 PitchBendEvent() : ChannelEvent() { m_event.type = SND_SEQ_EVENT_PITCHBEND; }
407 explicit PitchBendEvent(const snd_seq_event_t* event) : ChannelEvent(event) {}
411 PitchBendEvent(const int ch, const int val);
416 int getValue() const { return m_event.data.control.value; }
421 void setValue( const int v ) { m_event.data.control.value = v; }
422 virtual PitchBendEvent* clone() const override;
423};
424
428class DRUMSTICK_ALSA_EXPORT ChanPressEvent : public ChannelEvent
429{
430public:
432 ChanPressEvent() : ChannelEvent() { m_event.type = SND_SEQ_EVENT_CHANPRESS; }
437 explicit ChanPressEvent( const snd_seq_event_t* event ) : ChannelEvent(event) {}
441 ChanPressEvent( const int ch, const int val );
446 int getValue() const { return m_event.data.control.value; }
451 void setValue( const int v ) { m_event.data.control.value = v; }
452 virtual ChanPressEvent* clone() const override;
453};
454
458class DRUMSTICK_ALSA_EXPORT VariableEvent : public SequencerEvent
459{
460public:
462 explicit VariableEvent(const snd_seq_event_t* event);
463 explicit VariableEvent(const QByteArray& data);
464 VariableEvent(const VariableEvent& other);
465 VariableEvent(const unsigned int datalen, char* dataptr);
466 VariableEvent& operator=(const VariableEvent& other);
471 unsigned int getLength() const { return m_event.data.ext.len; }
476 const char* getData() const { return static_cast<const char*>(m_event.data.ext.ptr); }
477 virtual VariableEvent* clone() const override;
478protected:
479 QByteArray m_data;
480};
481
485class DRUMSTICK_ALSA_EXPORT SysExEvent : public VariableEvent
486{
487public:
488 SysExEvent();
489 explicit SysExEvent(const snd_seq_event_t* event);
490 explicit SysExEvent(const QByteArray& data);
491 SysExEvent(const SysExEvent& other);
492 SysExEvent(const unsigned int datalen, char* dataptr);
493 SysExEvent &operator=(const SysExEvent &other);
494 virtual SysExEvent* clone() const override;
495};
496
503class DRUMSTICK_ALSA_EXPORT TextEvent : public VariableEvent
504{
505public:
506 TextEvent();
507 explicit TextEvent(const snd_seq_event_t* event);
508 explicit TextEvent(const QString& text, const int textType = 1);
509 TextEvent(const TextEvent& other);
510 TextEvent(const unsigned int datalen, char* dataptr);
511 TextEvent &operator=(const TextEvent &other);
512 QString getText() const;
513 int getTextType() const;
514 virtual TextEvent* clone() const override;
515protected:
516 int m_textType;
517};
518
522class DRUMSTICK_ALSA_EXPORT SystemEvent : public SequencerEvent
523{
524public:
531 explicit SystemEvent(const snd_seq_event_t* event) : SequencerEvent(event) {}
532 explicit SystemEvent(const snd_seq_event_type_t type);
533 virtual SystemEvent* clone() const override;
534};
535
541class DRUMSTICK_ALSA_EXPORT QueueControlEvent : public SequencerEvent
542{
543public:
550 explicit QueueControlEvent(const snd_seq_event_t* event) : SequencerEvent(event) {}
551 QueueControlEvent(const snd_seq_event_type_t type, const int queue, const int value);
556 int getQueue() const { return m_event.data.queue.queue; }
561 void setQueue(const uchar q) { m_event.data.queue.queue = q; }
566 int getValue() const { return m_event.data.queue.param.value; }
571 void setValue(const int val) { m_event.data.queue.param.value = val; }
576 uint getPosition() const { return m_event.data.queue.param.position; }
581 void setPosition(const uint pos) { m_event.data.queue.param.position = pos; }
586 snd_seq_tick_time_t getTickTime() const { return m_event.data.queue.param.time.tick; }
591 void setTickTime(const snd_seq_tick_time_t t) { m_event.data.queue.param.time.tick = t; }
596 uint getSkewBase() const { return m_event.data.queue.param.skew.base; }
601 void setSkewBase(const uint base) { m_event.data.queue.param.skew.base = base; }
606 uint getSkewValue() const { return m_event.data.queue.param.skew.value; }
611 void setSkewValue(const uint val) {m_event.data.queue.param.skew.value = val; }
612 virtual QueueControlEvent* clone() const override;
613};
614
618class DRUMSTICK_ALSA_EXPORT ValueEvent : public SequencerEvent
619{
620public:
627 explicit ValueEvent(const snd_seq_event_t* event) : SequencerEvent(event) {}
628 ValueEvent(const snd_seq_event_type_t type, const int val);
633 int getValue() const { return m_event.data.control.value; }
638 void setValue( const int v ) { m_event.data.control.value = v; }
639 virtual ValueEvent* clone() const override;
640};
641
645class DRUMSTICK_ALSA_EXPORT TempoEvent : public QueueControlEvent
646{
647public:
654 explicit TempoEvent(const snd_seq_event_t* event) : QueueControlEvent(event) {}
655 TempoEvent(const int queue, const int tempo);
656 virtual TempoEvent* clone() const override;
657};
658
662class DRUMSTICK_ALSA_EXPORT SubscriptionEvent : public SequencerEvent
663{
664public:
671 explicit SubscriptionEvent(const snd_seq_event_t* event) : SequencerEvent(event) {}
676 bool subscribed() const { return (m_event.type == SND_SEQ_EVENT_PORT_SUBSCRIBED); }
681 bool unsubscribed() const { return (m_event.type == SND_SEQ_EVENT_PORT_UNSUBSCRIBED); }
686 int getSenderClient() const { return m_event.data.connect.sender.client; }
691 int getSenderPort() const { return m_event.data.connect.sender.port; }
696 int getDestClient() const { return m_event.data.connect.dest.client; }
701 int getDestPort() const { return m_event.data.connect.dest.port; }
702 virtual SubscriptionEvent* clone() const override;
703};
704
708class DRUMSTICK_ALSA_EXPORT ClientEvent : public SequencerEvent
709{
710public:
717 explicit ClientEvent(const snd_seq_event_t* event) : SequencerEvent(event) {}
722 int getClient() const { return m_event.data.addr.client; }
723 virtual ClientEvent* clone() const override;
724};
725
729class DRUMSTICK_ALSA_EXPORT PortEvent : public ClientEvent
730{
731public:
738 explicit PortEvent(const snd_seq_event_t* event) : ClientEvent(event) {}
743 int getPort() const { return m_event.data.addr.port; }
744 virtual PortEvent* clone() const override;
745};
746
751class DRUMSTICK_ALSA_EXPORT RemoveEvents
752{
753public:
754 friend class MidiClient;
755
756public:
757 RemoveEvents();
758 RemoveEvents(const RemoveEvents& other);
759 explicit RemoveEvents(snd_seq_remove_events_t* other);
760 virtual ~RemoveEvents();
761 RemoveEvents* clone();
762 RemoveEvents& operator=(const RemoveEvents& other);
763 int getSizeOfInfo() const;
764
765 int getChannel();
766 unsigned int getCondition();
767 const snd_seq_addr_t* getDest();
768 int getEventType();
769 int getQueue();
770 int getTag();
771 const snd_seq_timestamp_t* getTime();
772 void setChannel(int chan);
773 void setCondition(unsigned int cond);
774 void setDest(const snd_seq_addr_t* dest);
775 void setEventType(int type);
776 void setQueue(int queue);
777 void setTag(int tag);
778 void setTime(const snd_seq_timestamp_t* time);
779
780private:
781 snd_seq_remove_events_t* m_Info;
782};
783
787class DRUMSTICK_ALSA_EXPORT MidiCodec : public QObject
788{
789 Q_OBJECT
790public:
791 explicit MidiCodec(int bufsize, QObject* parent = nullptr);
792 ~MidiCodec();
793
794 void init();
795 long decode(unsigned char *buf,
796 long count,
797 const snd_seq_event_t *ev);
798 long encode(const unsigned char *buf,
799 long count,
800 snd_seq_event_t *ev);
801 long encode(int c,
802 snd_seq_event_t *ev);
803 void enableRunningStatus(bool enable);
804 void resetEncoder();
805 void resetDecoder();
806 void resizeBuffer(int bufsize);
807private:
808 snd_midi_event_t* m_Info;
809};
810
813}} /* namespace drumstick::ALSA */
814
815Q_DECLARE_METATYPE(drumstick::ALSA::SequencerEvent)
816Q_DECLARE_METATYPE(drumstick::ALSA::SequencerEvent*)
817
818#endif //DRUMSTICK_ALSAEVENT_H
The QEvent class is the base class of all event classes.
The QObject class is the base class of all Qt objects.
Event representing a MIDI channel pressure or after-touch event.
Definition: alsaevent.h:429
ChanPressEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:437
void setValue(const int v)
Sets the channel aftertouch value.
Definition: alsaevent.h:451
int getValue() const
Gets the channel aftertouch value.
Definition: alsaevent.h:446
ChanPressEvent()
Default constructor.
Definition: alsaevent.h:432
Base class for the events having a Channel property.
Definition: alsaevent.h:159
void setChannel(const MidiByte c)
Sets the channel of the event.
Definition: alsaevent.h:173
ChannelEvent()
Default constructor.
Definition: alsaevent.h:162
ChannelEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:167
int getChannel() const
Gets the event's channel.
Definition: alsaevent.h:179
ALSA Event representing a change on some ALSA sequencer client on the system.
Definition: alsaevent.h:709
ClientEvent()
Default constructor.
Definition: alsaevent.h:712
int getClient() const
Gets the client number.
Definition: alsaevent.h:722
ClientEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:717
Event representing a MIDI control change event.
Definition: alsaevent.h:325
uint getParam() const
Gets the controller event's parameter.
Definition: alsaevent.h:343
ControllerEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:333
void setParam(const uint p)
Sets the controller event's parameter.
Definition: alsaevent.h:349
void setValue(const int v)
Sets the controller event's value.
Definition: alsaevent.h:361
ControllerEvent()
Default constructor.
Definition: alsaevent.h:328
int getValue() const
Gets the controller event's value.
Definition: alsaevent.h:355
Base class for the events having Key and Velocity properties.
Definition: alsaevent.h:188
int getKey() const
Gets the MIDI note of this event.
Definition: alsaevent.h:202
KeyEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:196
void setKey(const MidiByte b)
Sets the MIDI note of this event.
Definition: alsaevent.h:208
KeyEvent()
Default constructor.
Definition: alsaevent.h:191
void setVelocity(const MidiByte b)
Sets the note velocity of this event.
Definition: alsaevent.h:220
int getVelocity() const
Gets the note velocity of this event.
Definition: alsaevent.h:214
Event representing a MIDI key pressure, or polyphonic after-touch event.
Definition: alsaevent.h:305
KeyPressEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:313
KeyPressEvent()
Default constructor.
Definition: alsaevent.h:308
Client management.
Definition: alsaclient.h:219
Auxiliary class to translate between raw MIDI streams and ALSA events.
Definition: alsaevent.h:788
Class representing a note event with duration.
Definition: alsaevent.h:232
NoteEvent()
Default constructor.
Definition: alsaevent.h:235
void setDuration(const ulong d)
Sets the note's duration.
Definition: alsaevent.h:256
ulong getDuration() const
Gets the note's duration.
Definition: alsaevent.h:250
NoteEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:240
Event representing a note-off MIDI event.
Definition: alsaevent.h:285
NoteOffEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:293
NoteOffEvent()
Default constructor.
Definition: alsaevent.h:288
Event representing a note-on MIDI event.
Definition: alsaevent.h:265
NoteOnEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:273
NoteOnEvent()
Default constructor.
Definition: alsaevent.h:268
Event representing a MIDI bender, or pitch wheel event.
Definition: alsaevent.h:399
PitchBendEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:407
void setValue(const int v)
Sets the MIDI pitch bend value, zero centered from -8192 to 8191.
Definition: alsaevent.h:421
int getValue() const
Gets the MIDI pitch bend value, zero centered from -8192 to 8191.
Definition: alsaevent.h:416
PitchBendEvent()
Default constructor.
Definition: alsaevent.h:402
ALSA Event representing a change on some ALSA sequencer port on the system.
Definition: alsaevent.h:730
PortEvent()
Default constructor.
Definition: alsaevent.h:733
PortEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:738
int getPort() const
Gets the port number.
Definition: alsaevent.h:743
Event representing a MIDI program change event.
Definition: alsaevent.h:369
void setValue(const int v)
Sets the MIDI program number.
Definition: alsaevent.h:391
ProgramChangeEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:377
ProgramChangeEvent()
Default constructor.
Definition: alsaevent.h:372
int getValue() const
Gets the MIDI program number.
Definition: alsaevent.h:386
ALSA Event representing a queue control command.
Definition: alsaevent.h:542
QueueControlEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:550
void setSkewValue(const uint val)
Sets the skew value.
Definition: alsaevent.h:611
void setTickTime(const snd_seq_tick_time_t t)
Sets the musical time in ticks.
Definition: alsaevent.h:591
uint getPosition() const
Gets the queue position.
Definition: alsaevent.h:576
uint getSkewBase() const
Gets the skew base.
Definition: alsaevent.h:596
void setSkewBase(const uint base)
Sets the skew base, should be 65536.
Definition: alsaevent.h:601
snd_seq_tick_time_t getTickTime() const
Gets the musical time in ticks.
Definition: alsaevent.h:586
int getQueue() const
Gets the queue number.
Definition: alsaevent.h:556
void setQueue(const uchar q)
Sets the queue number.
Definition: alsaevent.h:561
uint getSkewValue() const
Gets the skew value.
Definition: alsaevent.h:606
int getValue() const
Gets the event's value.
Definition: alsaevent.h:566
void setPosition(const uint pos)
Sets the queue position.
Definition: alsaevent.h:581
QueueControlEvent()
Default constructor.
Definition: alsaevent.h:545
void setValue(const int val)
Sets the event's value.
Definition: alsaevent.h:571
Auxiliary class to remove events from an ALSA queue.
Definition: alsaevent.h:752
Base class for the event's hierarchy.
Definition: alsaevent.h:68
snd_seq_event_t m_event
ALSA sequencer event record.
Definition: alsaevent.h:152
snd_seq_event_t * getHandle()
Gets the handle of the event.
Definition: alsaevent.h:135
unsigned char getSourceClient() const
Gets the source client id.
Definition: alsaevent.h:89
unsigned int getRealTimeSecs() const
Gets the seconds of the event's real time.
Definition: alsaevent.h:107
unsigned char getTag() const
Gets the tag of the event.
Definition: alsaevent.h:125
snd_seq_tick_time_t getTick() const
Gets the tick time of the event.
Definition: alsaevent.h:101
unsigned char getSourcePort() const
Gets the source port id.
Definition: alsaevent.h:95
snd_seq_event_type_t getSequencerType() const
Gets the sequencer event type.
Definition: alsaevent.h:81
unsigned int getRealTimeNanos() const
Gets the nanoseconds of the event's real time.
Definition: alsaevent.h:113
ALSA Event representing a subscription between two ALSA clients and ports.
Definition: alsaevent.h:663
bool subscribed() const
Returns true if the event was a subscribed port.
Definition: alsaevent.h:676
SubscriptionEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:671
int getDestClient() const
Gets the destination client number.
Definition: alsaevent.h:696
int getDestPort() const
Gets the destination port number.
Definition: alsaevent.h:701
SubscriptionEvent()
Default constructor.
Definition: alsaevent.h:666
int getSenderClient() const
Gets the sender client number.
Definition: alsaevent.h:686
int getSenderPort() const
Gets the sender port number.
Definition: alsaevent.h:691
bool unsubscribed() const
Returns true if the event was an unsubscribed port.
Definition: alsaevent.h:681
Event representing a MIDI system exclusive event.
Definition: alsaevent.h:486
SystemEvent()
Default constructor.
Definition: alsaevent.h:526
SystemEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:531
ALSA Event representing a tempo change for an ALSA queue.
Definition: alsaevent.h:646
TempoEvent()
Default constructor.
Definition: alsaevent.h:649
TempoEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:654
Event representing a SMF text event.
Definition: alsaevent.h:504
Generic event having a value property.
Definition: alsaevent.h:619
ValueEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:627
void setValue(const int v)
Sets the event's value.
Definition: alsaevent.h:638
ValueEvent()
Default constructor.
Definition: alsaevent.h:622
int getValue() const
Gets the event's value.
Definition: alsaevent.h:633
Base class for variable length events.
Definition: alsaevent.h:459
unsigned int getLength() const
Gets the data length.
Definition: alsaevent.h:471
const char * getData() const
Gets the data pointer.
Definition: alsaevent.h:476
quint8 MidiByte
8-bit unsigned number to be used as a MIDI message parameter
Definition: alsaevent.h:53
const QEvent::Type SequencerEventType
Constant SequencerEventType is the QEvent::type() of any SequencerEvent object to be used to check th...
Definition: alsaevent.h:59
Drumstick common.
Definition: alsaclient.cpp:68