drumstick  2.7.2
alsaevent.h
Go to the documentation of this file.
1 /*
2  MIDI Sequencer C++ library
3  Copyright (C) 2006-2022, 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 
22 extern "C" {
23  #include <alsa/asoundlib.h>
24 }
25 
26 #include <QObject>
27 #include <QEvent>
28 #include "macros.h"
29 
30 namespace drumstick { namespace ALSA {
31 
43 typedef quint8 MidiByte;
44 
49 const QEvent::Type SequencerEventType = QEvent::Type(QEvent::User + 4154); // :-)
50 
57 class DRUMSTICK_EXPORT SequencerEvent : public QEvent
58 {
59 public:
61  SequencerEvent(const SequencerEvent& other);
62  explicit SequencerEvent(const snd_seq_event_t* event);
63 
64  SequencerEvent& operator=(const SequencerEvent& other);
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 
135 protected:
136  Q_DECL_DEPRECATED void free();
137 
142  snd_seq_event_t m_event;
143 };
144 
148 class DRUMSTICK_EXPORT ChannelEvent : public SequencerEvent
149 {
150 public:
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 
177 class DRUMSTICK_EXPORT KeyEvent : public ChannelEvent
178 {
179 public:
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 
221 class DRUMSTICK_EXPORT NoteEvent : public KeyEvent
222 {
223 public:
225  NoteEvent() : KeyEvent() { m_event.type = SND_SEQ_EVENT_NOTE; }
230  explicit NoteEvent(const snd_seq_event_t* event) : KeyEvent(event) {}
234  NoteEvent(const int ch, const int key, const int vel, const int dur);
240  ulong getDuration() const { return m_event.data.note.duration; }
246  void setDuration(const ulong d) { m_event.data.note.duration = d; }
247 
248  virtual NoteEvent* clone() const override;
249 };
250 
254 class DRUMSTICK_EXPORT NoteOnEvent : public KeyEvent
255 {
256 public:
258  NoteOnEvent() : KeyEvent() { m_event.type = SND_SEQ_EVENT_NOTEON; }
263  explicit NoteOnEvent(const snd_seq_event_t* event) : KeyEvent(event) {}
267  NoteOnEvent(const int ch, const int key, const int vel);
268  virtual NoteOnEvent* clone() const override;
269 };
270 
274 class DRUMSTICK_EXPORT NoteOffEvent : public KeyEvent
275 {
276 public:
278  NoteOffEvent() : KeyEvent() { m_event.type = SND_SEQ_EVENT_NOTEOFF; }
283  explicit NoteOffEvent(const snd_seq_event_t* event) : KeyEvent(event) {}
287  NoteOffEvent(const int ch, const int key, const int vel);
288  virtual NoteOffEvent* clone() const override;
289 };
290 
294 class DRUMSTICK_EXPORT KeyPressEvent : public KeyEvent
295 {
296 public:
298  KeyPressEvent() : KeyEvent() { m_event.type = SND_SEQ_EVENT_KEYPRESS; }
303  explicit KeyPressEvent(const snd_seq_event_t* event) : KeyEvent(event) {}
307  KeyPressEvent(const int ch, const int key, const int vel);
308  virtual KeyPressEvent* clone() const override;
309 };
310 
314 class DRUMSTICK_EXPORT ControllerEvent : public ChannelEvent
315 {
316 public:
323  explicit ControllerEvent(const snd_seq_event_t* event) : ChannelEvent(event) {}
327  ControllerEvent(const int ch, const int cc, const int val);
333  uint getParam() const { return m_event.data.control.param; }
339  void setParam( const uint p ) { m_event.data.control.param = p; }
345  int getValue() const { return m_event.data.control.value; }
351  void setValue( const int v ) { m_event.data.control.value = v; }
352  virtual ControllerEvent* clone() const override;
353 };
354 
358 class DRUMSTICK_EXPORT ProgramChangeEvent : public ChannelEvent
359 {
360 public:
362  ProgramChangeEvent() : ChannelEvent() { m_event.type = SND_SEQ_EVENT_PGMCHANGE; }
367  explicit ProgramChangeEvent(const snd_seq_event_t* event) : ChannelEvent(event) {}
371  ProgramChangeEvent(const int ch, const int val);
376  int getValue() const { return m_event.data.control.value; }
381  void setValue( const int v ) { m_event.data.control.value = v; }
382  virtual ProgramChangeEvent* clone() const override;
383 };
384 
388 class DRUMSTICK_EXPORT PitchBendEvent : public ChannelEvent
389 {
390 public:
392  PitchBendEvent() : ChannelEvent() { m_event.type = SND_SEQ_EVENT_PITCHBEND; }
397  explicit PitchBendEvent(const snd_seq_event_t* event) : ChannelEvent(event) {}
401  PitchBendEvent(const int ch, const int val);
406  int getValue() const { return m_event.data.control.value; }
411  void setValue( const int v ) { m_event.data.control.value = v; }
412  virtual PitchBendEvent* clone() const override;
413 };
414 
418 class DRUMSTICK_EXPORT ChanPressEvent : public ChannelEvent
419 {
420 public:
422  ChanPressEvent() : ChannelEvent() { m_event.type = SND_SEQ_EVENT_CHANPRESS; }
427  explicit ChanPressEvent( const snd_seq_event_t* event ) : ChannelEvent(event) {}
431  ChanPressEvent( const int ch, const int val );
436  int getValue() const { return m_event.data.control.value; }
441  void setValue( const int v ) { m_event.data.control.value = v; }
442  virtual ChanPressEvent* clone() const override;
443 };
444 
448 class DRUMSTICK_EXPORT VariableEvent : public SequencerEvent
449 {
450 public:
451  VariableEvent();
452  explicit VariableEvent(const snd_seq_event_t* event);
453  explicit VariableEvent(const QByteArray& data);
454  VariableEvent(const VariableEvent& other);
455  VariableEvent(const unsigned int datalen, char* dataptr);
456  VariableEvent& operator=(const VariableEvent& other);
461  unsigned int getLength() const { return m_event.data.ext.len; }
466  const char* getData() const { return static_cast<const char*>(m_event.data.ext.ptr); }
467  virtual VariableEvent* clone() const override;
468 protected:
469  QByteArray m_data;
470 };
471 
475 class DRUMSTICK_EXPORT SysExEvent : public VariableEvent
476 {
477 public:
478  SysExEvent();
479  explicit SysExEvent(const snd_seq_event_t* event);
480  explicit SysExEvent(const QByteArray& data);
481  SysExEvent(const SysExEvent& other);
482  SysExEvent(const unsigned int datalen, char* dataptr);
483  virtual SysExEvent* clone() const override;
484 };
485 
492 class DRUMSTICK_EXPORT TextEvent : public VariableEvent
493 {
494 public:
495  TextEvent();
496  explicit TextEvent(const snd_seq_event_t* event);
497  explicit TextEvent(const QString& text, const int textType = 1);
498  TextEvent(const TextEvent& other);
499  TextEvent(const unsigned int datalen, char* dataptr);
500  QString getText() const;
501  int getTextType() const;
502  virtual TextEvent* clone() const override;
503 protected:
504  int m_textType;
505 };
506 
510 class DRUMSTICK_EXPORT SystemEvent : public SequencerEvent
511 {
512 public:
519  explicit SystemEvent(const snd_seq_event_t* event) : SequencerEvent(event) {}
520  explicit SystemEvent(const snd_seq_event_type_t type);
521  virtual SystemEvent* clone() const override;
522 };
523 
529 class DRUMSTICK_EXPORT QueueControlEvent : public SequencerEvent
530 {
531 public:
538  explicit QueueControlEvent(const snd_seq_event_t* event) : SequencerEvent(event) {}
539  QueueControlEvent(const snd_seq_event_type_t type, const int queue, const int value);
544  int getQueue() const { return m_event.data.queue.queue; }
549  void setQueue(const uchar q) { m_event.data.queue.queue = q; }
554  int getValue() const { return m_event.data.queue.param.value; }
559  void setValue(const int val) { m_event.data.queue.param.value = val; }
564  uint getPosition() const { return m_event.data.queue.param.position; }
569  void setPosition(const uint pos) { m_event.data.queue.param.position = pos; }
574  snd_seq_tick_time_t getTickTime() const { return m_event.data.queue.param.time.tick; }
579  void setTickTime(const snd_seq_tick_time_t t) { m_event.data.queue.param.time.tick = t; }
584  uint getSkewBase() const { return m_event.data.queue.param.skew.base; }
589  void setSkewBase(const uint base) { m_event.data.queue.param.skew.base = base; }
594  uint getSkewValue() const { return m_event.data.queue.param.skew.value; }
599  void setSkewValue(const uint val) {m_event.data.queue.param.skew.value = val; }
600  virtual QueueControlEvent* clone() const override;
601 };
602 
606 class DRUMSTICK_EXPORT ValueEvent : public SequencerEvent
607 {
608 public:
615  explicit ValueEvent(const snd_seq_event_t* event) : SequencerEvent(event) {}
616  ValueEvent(const snd_seq_event_type_t type, const int val);
621  int getValue() const { return m_event.data.control.value; }
626  void setValue( const int v ) { m_event.data.control.value = v; }
627  virtual ValueEvent* clone() const override;
628 };
629 
633 class DRUMSTICK_EXPORT TempoEvent : public QueueControlEvent
634 {
635 public:
642  explicit TempoEvent(const snd_seq_event_t* event) : QueueControlEvent(event) {}
643  TempoEvent(const int queue, const int tempo);
644  virtual TempoEvent* clone() const override;
645 };
646 
650 class DRUMSTICK_EXPORT SubscriptionEvent : public SequencerEvent
651 {
652 public:
659  explicit SubscriptionEvent(const snd_seq_event_t* event) : SequencerEvent(event) {}
664  bool subscribed() const { return (m_event.type == SND_SEQ_EVENT_PORT_SUBSCRIBED); }
669  bool unsubscribed() const { return (m_event.type == SND_SEQ_EVENT_PORT_UNSUBSCRIBED); }
674  int getSenderClient() const { return m_event.data.connect.sender.client; }
679  int getSenderPort() const { return m_event.data.connect.sender.port; }
684  int getDestClient() const { return m_event.data.connect.dest.client; }
689  int getDestPort() const { return m_event.data.connect.dest.port; }
690  virtual SubscriptionEvent* clone() const override;
691 };
692 
696 class DRUMSTICK_EXPORT ClientEvent : public SequencerEvent
697 {
698 public:
705  explicit ClientEvent(const snd_seq_event_t* event) : SequencerEvent(event) {}
710  int getClient() const { return m_event.data.addr.client; }
711  virtual ClientEvent* clone() const override;
712 };
713 
717 class DRUMSTICK_EXPORT PortEvent : public ClientEvent
718 {
719 public:
726  explicit PortEvent(const snd_seq_event_t* event) : ClientEvent(event) {}
731  int getPort() const { return m_event.data.addr.port; }
732  virtual PortEvent* clone() const override;
733 };
734 
739 class DRUMSTICK_EXPORT RemoveEvents
740 {
741 public:
742  friend class MidiClient;
743 
744 public:
745  RemoveEvents();
746  RemoveEvents(const RemoveEvents& other);
747  explicit RemoveEvents(snd_seq_remove_events_t* other);
748  virtual ~RemoveEvents();
749  RemoveEvents* clone();
750  RemoveEvents& operator=(const RemoveEvents& other);
751  int getSizeOfInfo() const;
752 
753  int getChannel();
754  unsigned int getCondition();
755  const snd_seq_addr_t* getDest();
756  int getEventType();
757  int getQueue();
758  int getTag();
759  const snd_seq_timestamp_t* getTime();
760  void setChannel(int chan);
761  void setCondition(unsigned int cond);
762  void setDest(const snd_seq_addr_t* dest);
763  void setEventType(int type);
764  void setQueue(int queue);
765  void setTag(int tag);
766  void setTime(const snd_seq_timestamp_t* time);
767 
768 private:
769  snd_seq_remove_events_t* m_Info;
770 };
771 
775 class DRUMSTICK_EXPORT MidiCodec : public QObject
776 {
777  Q_OBJECT
778 public:
779  explicit MidiCodec(int bufsize, QObject* parent = nullptr);
780  ~MidiCodec();
781 
782  void init();
783  long decode(unsigned char *buf,
784  long count,
785  const snd_seq_event_t *ev);
786  long encode(const unsigned char *buf,
787  long count,
788  snd_seq_event_t *ev);
789  long encode(int c,
790  snd_seq_event_t *ev);
791  void enableRunningStatus(bool enable);
792  void resetEncoder();
793  void resetDecoder();
794  void resizeBuffer(int bufsize);
795 private:
796  snd_midi_event_t* m_Info;
797 };
798 
801 }} /* namespace drumstick::ALSA */
802 
803 Q_DECLARE_METATYPE(drumstick::ALSA::SequencerEvent)
804 Q_DECLARE_METATYPE(drumstick::ALSA::SequencerEvent*)
805 
806 #endif //DRUMSTICK_ALSAEVENT_H
void setPosition(const uint pos)
Sets the queue position.
Definition: alsaevent.h:569
NoteEvent()
Default constructor.
Definition: alsaevent.h:225
TempoEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:642
ControllerEvent()
Default constructor.
Definition: alsaevent.h:318
unsigned int getRealTimeSecs() const
Gets the seconds of the event&#39;s real time.
Definition: alsaevent.h:97
void setChannel(const MidiByte c)
Sets the channel of the event.
Definition: alsaevent.h:163
int getQueue() const
Gets the queue number.
Definition: alsaevent.h:544
ChanPressEvent()
Default constructor.
Definition: alsaevent.h:422
ClientEvent()
Default constructor.
Definition: alsaevent.h:700
KeyPressEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:303
void setValue(const int v)
Sets the controller event&#39;s value.
Definition: alsaevent.h:351
Base class for the events having Key and Velocity properties.
Definition: alsaevent.h:177
snd_seq_tick_time_t getTickTime() const
Gets the musical time in ticks.
Definition: alsaevent.h:574
int getValue() const
Gets the controller event&#39;s value.
Definition: alsaevent.h:345
unsigned int getRealTimeNanos() const
Gets the nanoseconds of the event&#39;s real time.
Definition: alsaevent.h:103
void setTickTime(const snd_seq_tick_time_t t)
Sets the musical time in ticks.
Definition: alsaevent.h:579
ClientEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:705
QueueControlEvent()
Default constructor.
Definition: alsaevent.h:533
unsigned char getSourcePort() const
Gets the source port id.
Definition: alsaevent.h:85
NoteEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:230
Event representing a MIDI bender, or pitch wheel event.
Definition: alsaevent.h:388
snd_seq_event_t m_event
ALSA sequencer event record.
Definition: alsaevent.h:142
unsigned int getLength() const
Gets the data length.
Definition: alsaevent.h:461
SubscriptionEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:659
Event representing a note-off MIDI event.
Definition: alsaevent.h:274
NoteOnEvent()
Default constructor.
Definition: alsaevent.h:258
void setValue(const int v)
Sets the MIDI program number.
Definition: alsaevent.h:381
Event representing a MIDI system exclusive event.
Definition: alsaevent.h:475
PortEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:726
void setSkewValue(const uint val)
Sets the skew value.
Definition: alsaevent.h:599
int getPort() const
Gets the port number.
Definition: alsaevent.h:731
void setVelocity(const MidiByte b)
Sets the note velocity of this event.
Definition: alsaevent.h:210
The QObject class is the base class of all Qt objects.
QueueControlEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:538
int getChannel() const
Gets the event&#39;s channel.
Definition: alsaevent.h:169
Generic event having a value property.
Definition: alsaevent.h:606
void setValue(const int val)
Sets the event&#39;s value.
Definition: alsaevent.h:559
Drumstick visibility macros.
SystemEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:519
KeyPressEvent()
Default constructor.
Definition: alsaevent.h:298
uint getPosition() const
Gets the queue position.
Definition: alsaevent.h:564
void setValue(const int v)
Sets the event&#39;s value.
Definition: alsaevent.h:626
int getKey() const
Gets the MIDI note of this event.
Definition: alsaevent.h:192
int getSenderClient() const
Gets the sender client number.
Definition: alsaevent.h:674
ChannelEvent()
Default constructor.
Definition: alsaevent.h:152
Drumstick common.
Definition: alsaclient.cpp:68
NoteOffEvent()
Default constructor.
Definition: alsaevent.h:278
int getClient() const
Gets the client number.
Definition: alsaevent.h:710
snd_seq_event_t * getHandle()
Gets the handle of the event.
Definition: alsaevent.h:125
const QEvent::Type SequencerEventType
Constant SequencerEventType is the QEvent::type() of any SequencerEvent object to be used to check th...
Definition: alsaevent.h:49
ValueEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:615
Event representing a MIDI channel pressure or after-touch event.
Definition: alsaevent.h:418
PitchBendEvent()
Default constructor.
Definition: alsaevent.h:392
void setQueue(const uchar q)
Sets the queue number.
Definition: alsaevent.h:549
void setValue(const int v)
Sets the MIDI pitch bend value, zero centered from -8192 to 8191.
Definition: alsaevent.h:411
Class representing a note event with duration.
Definition: alsaevent.h:221
Base class for the event&#39;s hierarchy.
Definition: alsaevent.h:57
void setKey(const MidiByte b)
Sets the MIDI note of this event.
Definition: alsaevent.h:198
NoteOnEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:263
int getValue() const
Gets the MIDI program number.
Definition: alsaevent.h:376
quint8 MidiByte
8-bit unsigned number to be used as a MIDI message parameter
Definition: alsaevent.h:43
KeyEvent()
Default constructor.
Definition: alsaevent.h:181
snd_seq_event_type_t getSequencerType() const
Gets the sequencer event type.
Definition: alsaevent.h:71
int getSenderPort() const
Gets the sender port number.
Definition: alsaevent.h:679
Auxiliary class to remove events from an ALSA queue.
Definition: alsaevent.h:739
unsigned char getTag() const
Gets the tag of the event.
Definition: alsaevent.h:115
ALSA Event representing a tempo change for an ALSA queue.
Definition: alsaevent.h:633
Auxiliary class to translate between raw MIDI streams and ALSA events.
Definition: alsaevent.h:775
KeyEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:186
Base class for variable length events.
Definition: alsaevent.h:448
ulong getDuration() const
Gets the note&#39;s duration.
Definition: alsaevent.h:240
NoteOffEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:283
bool unsubscribed() const
Returns true if the event was an unsubscribed port.
Definition: alsaevent.h:669
TempoEvent()
Default constructor.
Definition: alsaevent.h:637
ALSA Event representing a queue control command.
Definition: alsaevent.h:529
uint getSkewValue() const
Gets the skew value.
Definition: alsaevent.h:594
ProgramChangeEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:367
PortEvent()
Default constructor.
Definition: alsaevent.h:721
PitchBendEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:397
int getValue() const
Gets the MIDI pitch bend value, zero centered from -8192 to 8191.
Definition: alsaevent.h:406
ControllerEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:323
int getValue() const
Gets the event&#39;s value.
Definition: alsaevent.h:554
Event representing a MIDI program change event.
Definition: alsaevent.h:358
void setValue(const int v)
Sets the channel aftertouch value.
Definition: alsaevent.h:441
Base class for the events having a Channel property.
Definition: alsaevent.h:148
ValueEvent()
Default constructor.
Definition: alsaevent.h:610
void setParam(const uint p)
Sets the controller event&#39;s parameter.
Definition: alsaevent.h:339
Event representing a MIDI key pressure, or polyphonic after-touch event.
Definition: alsaevent.h:294
ChanPressEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:427
int getValue() const
Gets the event&#39;s value.
Definition: alsaevent.h:621
ProgramChangeEvent()
Default constructor.
Definition: alsaevent.h:362
int getDestClient() const
Gets the destination client number.
Definition: alsaevent.h:684
snd_seq_tick_time_t getTick() const
Gets the tick time of the event.
Definition: alsaevent.h:91
void setDuration(const ulong d)
Sets the note&#39;s duration.
Definition: alsaevent.h:246
void setSkewBase(const uint base)
Sets the skew base, should be 65536.
Definition: alsaevent.h:589
ChannelEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:157
int getValue() const
Gets the channel aftertouch value.
Definition: alsaevent.h:436
bool subscribed() const
Returns true if the event was a subscribed port.
Definition: alsaevent.h:664
Event representing a note-on MIDI event.
Definition: alsaevent.h:254
int getVelocity() const
Gets the note velocity of this event.
Definition: alsaevent.h:204
uint getSkewBase() const
Gets the skew base.
Definition: alsaevent.h:584
const char * getData() const
Gets the data pointer.
Definition: alsaevent.h:466
ALSA Event representing a change on some ALSA sequencer client on the system.
Definition: alsaevent.h:696
The QEvent class is the base class of all event classes.
SubscriptionEvent()
Default constructor.
Definition: alsaevent.h:654
int getDestPort() const
Gets the destination port number.
Definition: alsaevent.h:689
Client management.
Definition: alsaclient.h:208
unsigned char getSourceClient() const
Gets the source client id.
Definition: alsaevent.h:79
uint getParam() const
Gets the controller event&#39;s parameter.
Definition: alsaevent.h:333
Event representing a MIDI control change event.
Definition: alsaevent.h:314
SystemEvent()
Default constructor.
Definition: alsaevent.h:514
ALSA Event representing a subscription between two ALSA clients and ports.
Definition: alsaevent.h:650
ALSA Event representing a change on some ALSA sequencer port on the system.
Definition: alsaevent.h:717
Event representing a SMF text event.
Definition: alsaevent.h:492