drumstick 2.0.0
alsaevent.h
Go to the documentation of this file.
1/*
2 MIDI Sequencer C++ library
3 Copyright (C) 2006-2020, 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
39
43typedef quint8 MidiByte;
44
49const QEvent::Type SequencerEventType = QEvent::Type(QEvent::User + 4154); // :-)
50
57class DRUMSTICK_EXPORT SequencerEvent : public QEvent
58{
59public:
61 SequencerEvent(const SequencerEvent& other);
62 explicit SequencerEvent(const snd_seq_event_t* event);
63
65 void setSequencerType(const snd_seq_event_type_t eventType);
71 snd_seq_event_type_t getSequencerType() const { return m_event.type; }
72 void setDestination(const unsigned char client, const unsigned char port);
73 void setSource(const unsigned char port);
79 unsigned char getSourceClient() const { return m_event.source.client; }
85 unsigned char getSourcePort() const { return m_event.source.port; }
91 snd_seq_tick_time_t getTick() const { return m_event.time.tick; }
97 unsigned int getRealTimeSecs() const { return m_event.time.time.tv_sec; }
103 unsigned int getRealTimeNanos() const { return m_event.time.time.tv_nsec; }
104 void setSubscribers();
105 void setBroadcast();
106 void setDirect();
107 void scheduleTick(const int queue, const int tick, const bool relative);
108 void scheduleReal(const int queue, const ulong secs, const ulong nanos, const bool relative);
109 void setPriority(const bool high);
115 unsigned char getTag() const { return m_event.tag; }
116 void setTag(const unsigned char aTag);
117 unsigned int getRaw32(const unsigned int n) const;
118 void setRaw32(const unsigned int n, const unsigned int value);
119 unsigned char getRaw8(const unsigned int n) const;
120 void setRaw8(const unsigned int n, const unsigned char value);
125 snd_seq_event_t* getHandle() { return &m_event; }
126 int getEncodedLength();
127
128 static bool isSubscription(const SequencerEvent* event);
129 static bool isPort(const SequencerEvent* event);
130 static bool isClient(const SequencerEvent* event);
131 static bool isConnectionChange(const SequencerEvent* event);
132 static bool isChannel(const SequencerEvent* event);
133 virtual SequencerEvent* clone() const;
134
135protected:
136 void free() __attribute__((deprecated));
137
142 snd_seq_event_t m_event;
143};
144
148class DRUMSTICK_EXPORT ChannelEvent : public SequencerEvent
149{
150public:
157 explicit ChannelEvent(const snd_seq_event_t* event) : SequencerEvent(event) {}
163 void setChannel(const MidiByte c) { m_event.data.note.channel = (c & 0xf); }
169 int getChannel() const { return m_event.data.note.channel; }
170
171 virtual ChannelEvent* clone() const override;
172};
173
177class DRUMSTICK_EXPORT KeyEvent : public ChannelEvent
178{
179public:
186 explicit KeyEvent(const snd_seq_event_t* event) : ChannelEvent(event) {}
192 int getKey() const { return m_event.data.note.note; }
198 void setKey(const MidiByte b) { m_event.data.note.note = b; }
204 int getVelocity() const { return m_event.data.note.velocity; }
210 void setVelocity(const MidiByte b) { m_event.data.note.velocity = b; }
211
212 virtual KeyEvent* clone() const override;
213};
214
221class DRUMSTICK_EXPORT NoteEvent : public KeyEvent
222{
223public:
225 NoteEvent() : KeyEvent() { m_event.type = SND_SEQ_EVENT_NOTE; }
230 explicit NoteEvent(const snd_seq_event_t* event) : KeyEvent(event) {}
238 NoteEvent(const int ch, const int key, const int vel, const int dur);
244 ulong getDuration() const { return m_event.data.note.duration; }
250 void setDuration(const ulong d) { m_event.data.note.duration = d; }
251
252 virtual NoteEvent* clone() const override;
253};
254
258class DRUMSTICK_EXPORT NoteOnEvent : public KeyEvent
259{
260public:
262 NoteOnEvent() : KeyEvent() { m_event.type = SND_SEQ_EVENT_NOTEON; }
267 explicit NoteOnEvent(const snd_seq_event_t* event) : KeyEvent(event) {}
274 NoteOnEvent(const int ch, const int key, const int vel);
275 virtual NoteOnEvent* clone() const override;
276};
277
281class DRUMSTICK_EXPORT NoteOffEvent : public KeyEvent
282{
283public:
285 NoteOffEvent() : KeyEvent() { m_event.type = SND_SEQ_EVENT_NOTEOFF; }
290 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_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) {}
320 KeyPressEvent(const int ch, const int key, const int vel);
321 virtual KeyPressEvent* clone() const override;
322};
323
327class DRUMSTICK_EXPORT ControllerEvent : public ChannelEvent
328{
329public:
336 explicit ControllerEvent(const snd_seq_event_t* event) : ChannelEvent(event) {}
343 ControllerEvent(const int ch, const int cc, const int val);
349 uint getParam() const { return m_event.data.control.param; }
355 void setParam( const uint p ) { m_event.data.control.param = p; }
361 int getValue() const { return m_event.data.control.value; }
367 void setValue( const int v ) { m_event.data.control.value = v; }
368 virtual ControllerEvent* clone() const override;
369};
370
374class DRUMSTICK_EXPORT ProgramChangeEvent : public ChannelEvent
375{
376public:
378 ProgramChangeEvent() : ChannelEvent() { m_event.type = SND_SEQ_EVENT_PGMCHANGE; }
383 explicit ProgramChangeEvent(const snd_seq_event_t* event) : ChannelEvent(event) {}
389 ProgramChangeEvent(const int ch, const int val);
394 int getValue() const { return m_event.data.control.value; }
399 void setValue( const int v ) { m_event.data.control.value = v; }
400 virtual ProgramChangeEvent* clone() const override;
401};
402
406class DRUMSTICK_EXPORT PitchBendEvent : public ChannelEvent
407{
408public:
410 PitchBendEvent() : ChannelEvent() { m_event.type = SND_SEQ_EVENT_PITCHBEND; }
415 explicit PitchBendEvent(const snd_seq_event_t* event) : ChannelEvent(event) {}
421 PitchBendEvent(const int ch, const int val);
426 int getValue() const { return m_event.data.control.value; }
431 void setValue( const int v ) { m_event.data.control.value = v; }
432 virtual PitchBendEvent* clone() const override;
433};
434
438class DRUMSTICK_EXPORT ChanPressEvent : public ChannelEvent
439{
440public:
442 ChanPressEvent() : ChannelEvent() { m_event.type = SND_SEQ_EVENT_CHANPRESS; }
447 explicit ChanPressEvent( const snd_seq_event_t* event ) : ChannelEvent(event) {}
453 ChanPressEvent( const int ch, const int val );
458 int getValue() const { return m_event.data.control.value; }
463 void setValue( const int v ) { m_event.data.control.value = v; }
464 virtual ChanPressEvent* clone() const override;
465};
466
470class DRUMSTICK_EXPORT VariableEvent : public SequencerEvent
471{
472public:
474 explicit VariableEvent(const snd_seq_event_t* event);
475 explicit VariableEvent(const QByteArray& data);
476 VariableEvent(const VariableEvent& other);
477 VariableEvent(const unsigned int datalen, char* dataptr);
483 unsigned int getLength() const { return m_event.data.ext.len; }
488 const char* getData() const { return static_cast<const char*>(m_event.data.ext.ptr); }
489 virtual VariableEvent* clone() const override;
490protected:
491 QByteArray m_data;
492};
493
497class DRUMSTICK_EXPORT SysExEvent : public VariableEvent
498{
499public:
500 SysExEvent();
501 explicit SysExEvent(const snd_seq_event_t* event);
502 explicit SysExEvent(const QByteArray& data);
503 SysExEvent(const SysExEvent& other);
504 SysExEvent(const unsigned int datalen, char* dataptr);
505 virtual SysExEvent* clone() const override;
506};
507
514class DRUMSTICK_EXPORT TextEvent : public VariableEvent
515{
516public:
517 TextEvent();
518 explicit TextEvent(const snd_seq_event_t* event);
519 explicit TextEvent(const QString& text, const int textType = 1);
520 TextEvent(const TextEvent& other);
521 TextEvent(const unsigned int datalen, char* dataptr);
522 QString getText() const;
523 int getTextType() const;
524 virtual TextEvent* clone() const override;
525protected:
526 int m_textType;
527};
528
532class DRUMSTICK_EXPORT SystemEvent : public SequencerEvent
533{
534public:
541 explicit SystemEvent(const snd_seq_event_t* event) : SequencerEvent(event) {}
542 explicit SystemEvent(const snd_seq_event_type_t type);
543 virtual SystemEvent* clone() const override;
544};
545
551class DRUMSTICK_EXPORT QueueControlEvent : public SequencerEvent
552{
553public:
560 explicit QueueControlEvent(const snd_seq_event_t* event) : SequencerEvent(event) {}
561 QueueControlEvent(const snd_seq_event_type_t type, const int queue, const int value);
566 int getQueue() const { return m_event.data.queue.queue; }
571 void setQueue(const uchar q) { m_event.data.queue.queue = q; }
576 int getValue() const { return m_event.data.queue.param.value; }
581 void setValue(const int val) { m_event.data.queue.param.value = val; }
586 uint getPosition() const { return m_event.data.queue.param.position; }
591 void setPosition(const uint pos) { m_event.data.queue.param.position = pos; }
596 snd_seq_tick_time_t getTickTime() const { return m_event.data.queue.param.time.tick; }
601 void setTickTime(const snd_seq_tick_time_t t) { m_event.data.queue.param.time.tick = t; }
606 uint getSkewBase() const { return m_event.data.queue.param.skew.base; }
611 void setSkewBase(const uint base) { m_event.data.queue.param.skew.base = base; }
616 uint getSkewValue() const { return m_event.data.queue.param.skew.value; }
621 void setSkewValue(const uint val) {m_event.data.queue.param.skew.value = val; }
622 virtual QueueControlEvent* clone() const override;
623};
624
628class DRUMSTICK_EXPORT ValueEvent : public SequencerEvent
629{
630public:
637 explicit ValueEvent(const snd_seq_event_t* event) : SequencerEvent(event) {}
638 ValueEvent(const snd_seq_event_type_t type, const int val);
643 int getValue() const { return m_event.data.control.value; }
648 void setValue( const int v ) { m_event.data.control.value = v; }
649 virtual ValueEvent* clone() const override;
650};
651
655class DRUMSTICK_EXPORT TempoEvent : public QueueControlEvent
656{
657public:
664 explicit TempoEvent(const snd_seq_event_t* event) : QueueControlEvent(event) {}
665 TempoEvent(const int queue, const int tempo);
666 virtual TempoEvent* clone() const override;
667};
668
672class DRUMSTICK_EXPORT SubscriptionEvent : public SequencerEvent
673{
674public:
681 explicit SubscriptionEvent(const snd_seq_event_t* event) : SequencerEvent(event) {}
686 bool subscribed() const { return (m_event.type == SND_SEQ_EVENT_PORT_SUBSCRIBED); }
691 bool unsubscribed() const { return (m_event.type == SND_SEQ_EVENT_PORT_UNSUBSCRIBED); }
696 int getSenderClient() const { return m_event.data.connect.sender.client; }
701 int getSenderPort() const { return m_event.data.connect.sender.port; }
706 int getDestClient() const { return m_event.data.connect.dest.client; }
711 int getDestPort() const { return m_event.data.connect.dest.port; }
712 virtual SubscriptionEvent* clone() const override;
713};
714
718class DRUMSTICK_EXPORT ClientEvent : public SequencerEvent
719{
720public:
727 explicit ClientEvent(const snd_seq_event_t* event) : SequencerEvent(event) {}
732 int getClient() const { return m_event.data.addr.client; }
733 virtual ClientEvent* clone() const override;
734};
735
739class DRUMSTICK_EXPORT PortEvent : public ClientEvent
740{
741public:
748 explicit PortEvent(const snd_seq_event_t* event) : ClientEvent(event) {}
753 int getPort() const { return m_event.data.addr.port; }
754 virtual PortEvent* clone() const override;
755};
756
761class DRUMSTICK_EXPORT RemoveEvents
762{
763public:
764 friend class MidiClient;
765
766public:
767 RemoveEvents();
768 RemoveEvents(const RemoveEvents& other);
769 explicit RemoveEvents(snd_seq_remove_events_t* other);
770 virtual ~RemoveEvents();
772 RemoveEvents& operator=(const RemoveEvents& other);
773 int getSizeOfInfo() const;
774
775 int getChannel();
776 unsigned int getCondition();
777 const snd_seq_addr_t* getDest();
778 int getEventType();
779 int getQueue();
780 int getTag();
781 const snd_seq_timestamp_t* getTime();
782 void setChannel(int chan);
783 void setCondition(unsigned int cond);
784 void setDest(const snd_seq_addr_t* dest);
785 void setEventType(int type);
786 void setQueue(int queue);
787 void setTag(int tag);
788 void setTime(const snd_seq_timestamp_t* time);
789
790private:
791 snd_seq_remove_events_t* m_Info;
792};
793
797class DRUMSTICK_EXPORT MidiCodec : public QObject
798{
799 Q_OBJECT
800public:
801 explicit MidiCodec(int bufsize, QObject* parent = nullptr);
802 ~MidiCodec();
803
804 void init();
805 long decode(unsigned char *buf,
806 long count,
807 const snd_seq_event_t *ev);
808 long encode(const unsigned char *buf,
809 long count,
810 snd_seq_event_t *ev);
811 long encode(int c,
812 snd_seq_event_t *ev);
813 void enableRunningStatus(bool enable);
814 void resetEncoder();
815 void resetDecoder();
816 void resizeBuffer(int bufsize);
817private:
818 snd_midi_event_t* m_Info;
819};
820
822
823}} /* namespace drumstick::ALSA */
824
825#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:439
ChanPressEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition alsaevent.h:447
void setValue(const int v)
Sets the channel aftertouch value.
Definition alsaevent.h:463
int getValue() const
Gets the channel aftertouch value.
Definition alsaevent.h:458
ChanPressEvent()
Default constructor.
Definition alsaevent.h:442
Base class for the events having a Channel property.
Definition alsaevent.h:149
void setChannel(const MidiByte c)
Sets the channel of the event.
Definition alsaevent.h:163
ChannelEvent()
Default constructor.
Definition alsaevent.h:152
ChannelEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition alsaevent.h:157
int getChannel() const
Gets the event's channel.
Definition alsaevent.h:169
ALSA Event representing a change on some ALSA sequencer client on the system.
Definition alsaevent.h:719
ClientEvent()
Default constructor.
Definition alsaevent.h:722
int getClient() const
Gets the client number.
Definition alsaevent.h:732
ClientEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition alsaevent.h:727
Event representing a MIDI control change event.
Definition alsaevent.h:328
uint getParam() const
Gets the controller event's parameter.
Definition alsaevent.h:349
ControllerEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition alsaevent.h:336
void setParam(const uint p)
Sets the controller event's parameter.
Definition alsaevent.h:355
void setValue(const int v)
Sets the controller event's value.
Definition alsaevent.h:367
ControllerEvent()
Default constructor.
Definition alsaevent.h:331
int getValue() const
Gets the controller event's value.
Definition alsaevent.h:361
Base class for the events having Key and Velocity properties.
Definition alsaevent.h:178
int getKey() const
Gets the MIDI note of this event.
Definition alsaevent.h:192
KeyEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition alsaevent.h:186
void setKey(const MidiByte b)
Sets the MIDI note of this event.
Definition alsaevent.h:198
KeyEvent()
Default constructor.
Definition alsaevent.h:181
void setVelocity(const MidiByte b)
Sets the note velocity of this event.
Definition alsaevent.h:210
int getVelocity() const
Gets the note velocity of this event.
Definition alsaevent.h:204
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
void init()
CODEC initialization.
long encode(const unsigned char *buf, long count, snd_seq_event_t *ev)
Encode from byte stream.
void resetEncoder()
Reset MIDI encode parser.
void resizeBuffer(int bufsize)
Resize the CODEC buffer.
void enableRunningStatus(bool enable)
Enable MIDI running status (command merge).
MidiCodec(int bufsize, QObject *parent=nullptr)
MidiCodec constructor.
long decode(unsigned char *buf, long count, const snd_seq_event_t *ev)
Decode from event to bytes.
void resetDecoder()
Reset MIDI decode parser.
Class representing a note event with duration.
Definition alsaevent.h:222
NoteEvent()
Default constructor.
Definition alsaevent.h:225
void setDuration(const ulong d)
Sets the note's duration.
Definition alsaevent.h:250
ulong getDuration() const
Gets the note's duration.
Definition alsaevent.h:244
NoteEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition alsaevent.h:230
Event representing a note-off MIDI event.
Definition alsaevent.h:282
NoteOffEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition alsaevent.h:290
NoteOffEvent()
Default constructor.
Definition alsaevent.h:285
Event representing a note-on MIDI event.
Definition alsaevent.h:259
NoteOnEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition alsaevent.h:267
NoteOnEvent()
Default constructor.
Definition alsaevent.h:262
Event representing a MIDI bender, or pitch wheel event.
Definition alsaevent.h:407
PitchBendEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition alsaevent.h:415
void setValue(const int v)
Sets the MIDI pitch bend value, zero centered from -8192 to 8191.
Definition alsaevent.h:431
int getValue() const
Gets the MIDI pitch bend value, zero centered from -8192 to 8191.
Definition alsaevent.h:426
PitchBendEvent()
Default constructor.
Definition alsaevent.h:410
ALSA Event representing a change on some ALSA sequencer port on the system.
Definition alsaevent.h:740
PortEvent()
Default constructor.
Definition alsaevent.h:743
PortEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition alsaevent.h:748
int getPort() const
Gets the port number.
Definition alsaevent.h:753
Event representing a MIDI program change event.
Definition alsaevent.h:375
void setValue(const int v)
Sets the MIDI program number.
Definition alsaevent.h:399
ProgramChangeEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition alsaevent.h:383
ProgramChangeEvent()
Default constructor.
Definition alsaevent.h:378
int getValue() const
Gets the MIDI program number.
Definition alsaevent.h:394
ALSA Event representing a queue control command.
Definition alsaevent.h:552
QueueControlEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition alsaevent.h:560
void setSkewValue(const uint val)
Sets the skew value.
Definition alsaevent.h:621
void setTickTime(const snd_seq_tick_time_t t)
Sets the musical time in ticks.
Definition alsaevent.h:601
uint getPosition() const
Gets the queue position.
Definition alsaevent.h:586
uint getSkewBase() const
Gets the skew base.
Definition alsaevent.h:606
void setSkewBase(const uint base)
Sets the skew base, should be 65536.
Definition alsaevent.h:611
snd_seq_tick_time_t getTickTime() const
Gets the musical time in ticks.
Definition alsaevent.h:596
int getQueue() const
Gets the queue number.
Definition alsaevent.h:566
void setQueue(const uchar q)
Sets the queue number.
Definition alsaevent.h:571
uint getSkewValue() const
Gets the skew value.
Definition alsaevent.h:616
int getValue() const
Gets the event's value.
Definition alsaevent.h:576
void setPosition(const uint pos)
Sets the queue position.
Definition alsaevent.h:591
QueueControlEvent()
Default constructor.
Definition alsaevent.h:555
void setValue(const int val)
Sets the event's value.
Definition alsaevent.h:581
int getSizeOfInfo() const
Gets the allocated size of the ALSA remove events object.
void setEventType(int type)
Sets the event type.
void setTag(int tag)
Sets the numeric tag.
RemoveEvents & operator=(const RemoveEvents &other)
Assignment operator.
const snd_seq_timestamp_t * getTime()
Gets the timestamp.
RemoveEvents()
Default constructor.
int getQueue()
Gets the queue number.
void setCondition(unsigned int cond)
Sets the flags of the conditional event's removal.
void setQueue(int queue)
Sets the queue number.
void setTime(const snd_seq_timestamp_t *time)
Sets the timestamp.
void setChannel(int chan)
Gets the MIDI channel.
int getEventType()
Gets the event type.
RemoveEvents * clone()
Create a new object copied from this object and return a pointer to the copy.
void setDest(const snd_seq_addr_t *dest)
Set the destination address.
int getTag()
Gets the numeric tag.
const snd_seq_addr_t * getDest()
Gets the destination.
int getChannel()
Gets the MIDI channel.
unsigned int getCondition()
Gets the condition.
Base class for the event's hierarchy.
Definition alsaevent.h:58
snd_seq_event_t m_event
ALSA sequencer event record.
Definition alsaevent.h:142
snd_seq_event_t * getHandle()
Gets the handle of the event.
Definition alsaevent.h:125
void setSequencerType(const snd_seq_event_type_t eventType)
Sets the event's ALSA sequencer type.
unsigned char getSourceClient() const
Gets the source client id.
Definition alsaevent.h:79
unsigned int getRealTimeSecs() const
Gets the seconds of the event's real time.
Definition alsaevent.h:97
unsigned char getTag() const
Gets the tag of the event.
Definition alsaevent.h:115
snd_seq_tick_time_t getTick() const
Gets the tick time of the event.
Definition alsaevent.h:91
unsigned char getSourcePort() const
Gets the source port id.
Definition alsaevent.h:85
SequencerEvent()
Default constructor.
Definition alsaevent.cpp:99
SequencerEvent & operator=(const SequencerEvent &other)
Assignment operator.
snd_seq_event_type_t getSequencerType() const
Gets the sequencer event type.
Definition alsaevent.h:71
unsigned int getRealTimeNanos() const
Gets the nanoseconds of the event's real time.
Definition alsaevent.h:103
ALSA Event representing a subscription between two ALSA clients and ports.
Definition alsaevent.h:673
bool subscribed() const
Returns true if the event was a subscribed port.
Definition alsaevent.h:686
SubscriptionEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition alsaevent.h:681
int getDestClient() const
Gets the destination client number.
Definition alsaevent.h:706
int getDestPort() const
Gets the destination port number.
Definition alsaevent.h:711
SubscriptionEvent()
Default constructor.
Definition alsaevent.h:676
int getSenderClient() const
Gets the sender client number.
Definition alsaevent.h:696
int getSenderPort() const
Gets the sender port number.
Definition alsaevent.h:701
bool unsubscribed() const
Returns true if the event was an unsubscribed port.
Definition alsaevent.h:691
SysExEvent()
Default constructor.
virtual SysExEvent * clone() const override
Clone this object returning a pointer to the new object.
SystemEvent()
Default constructor.
Definition alsaevent.h:536
SystemEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition alsaevent.h:541
ALSA Event representing a tempo change for an ALSA queue.
Definition alsaevent.h:656
TempoEvent()
Default constructor.
Definition alsaevent.h:659
TempoEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition alsaevent.h:664
TextEvent()
Default constructor.
virtual TextEvent * clone() const override
Clone this object returning a pointer to the new object.
QString getText() const
Gets the event's text content.
int getTextType() const
Gets the event's SMF text type.
Generic event having a value property.
Definition alsaevent.h:629
ValueEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition alsaevent.h:637
void setValue(const int v)
Sets the event's value.
Definition alsaevent.h:648
ValueEvent()
Default constructor.
Definition alsaevent.h:632
int getValue() const
Gets the event's value.
Definition alsaevent.h:643
Base class for variable length events.
Definition alsaevent.h:471
unsigned int getLength() const
Gets the data length.
Definition alsaevent.h:483
VariableEvent & operator=(const VariableEvent &other)
Assignment operator.
const char * getData() const
Gets the data pointer.
Definition alsaevent.h:488
VariableEvent()
Default constructor.
quint8 MidiByte
8-bit unsigned number to be used as a MIDI message parameter
Definition alsaevent.h:43
const QEvent::Type SequencerEventType
Constant SequencerEventType is the QEvent::type() of any SequencerEvent object to be used to check th...
Definition alsaevent.h:49
Drumstick visibility macros.
Drumstick ALSA library wrapper.
Drumstick common.