drumstick  0.5.0
alsaevent.h
Go to the documentation of this file.
1 /*
2  MIDI Sequencer C++ library
3  Copyright (C) 2006-2010, 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 2 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 along
16  with this program; if not, write to the Free Software Foundation, Inc.,
17  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19 
20 #ifndef DRUMSTICK_ALSAEVENT_H
21 #define DRUMSTICK_ALSAEVENT_H
22 
23 #include "drumstickcommon.h"
24 #include <QEvent>
25 
34 namespace drumstick {
35 
40 const QEvent::Type SequencerEventType = QEvent::Type(QEvent::User + 4154); // :-)
41 
45 #define CLONE_EVENT_DECLARATION(T) virtual T* clone() { return new T(&m_event); }
46 
53 class DRUMSTICK_EXPORT SequencerEvent : public QEvent
54 {
55 public:
57  SequencerEvent(const SequencerEvent& other);
58  SequencerEvent(snd_seq_event_t* event);
60  virtual ~SequencerEvent() {}
61 
62  SequencerEvent& operator=(const SequencerEvent& other);
63  void setSequencerType(const snd_seq_event_type_t eventType);
69  snd_seq_event_type_t getSequencerType() const { return m_event.type; }
70  void setDestination(const unsigned char client, const unsigned char port);
71  void setSource(const unsigned char port);
77  unsigned char getSourceClient() const { return m_event.source.client; }
83  unsigned char getSourcePort() const { return m_event.source.port; }
89  snd_seq_tick_time_t getTick() const { return m_event.time.tick; }
95  unsigned int getRealTimeSecs() const { return m_event.time.time.tv_sec; }
101  unsigned int getRealTimeNanos() const { return m_event.time.time.tv_nsec; }
102  void setSubscribers();
103  void setBroadcast();
104  void setDirect();
105  void scheduleTick(const int queue, const int tick, const bool relative);
106  void scheduleReal(const int queue, const ulong secs, const ulong nanos, const bool relative);
107  void setPriority(const bool high);
113  unsigned char getTag() const { return m_event.tag; }
114  void setTag(const unsigned char aTag);
115  unsigned int getRaw32(const unsigned int n) const;
116  void setRaw32(const unsigned int n, const unsigned int value);
117  unsigned char getRaw8(const unsigned int n) const;
118  void setRaw8(const unsigned int n, const unsigned char value);
123  snd_seq_event_t* getHandle() { return &m_event; }
124  int getEncodedLength();
125 
126  static bool isSubscription(const SequencerEvent* event);
127  static bool isPort(const SequencerEvent* event);
128  static bool isClient(const SequencerEvent* event);
129  static bool isConnectionChange(const SequencerEvent* event);
130  static bool isChannel(const SequencerEvent* event);
131 
134 
135 protected:
136  void free() __attribute__((deprecated));
137 
142  snd_seq_event_t m_event;
143 };
144 
148 class DRUMSTICK_EXPORT ChannelEvent : public SequencerEvent
149 {
150 public:
154  ChannelEvent(snd_seq_event_t* event) : SequencerEvent(event) {}
160  void setChannel(const MidiByte c) { m_event.data.note.channel = (c & 0xf); }
166  int getChannel() const { return m_event.data.note.channel; }
167 };
168 
172 class DRUMSTICK_EXPORT KeyEvent : public ChannelEvent
173 {
174 public:
178  KeyEvent(snd_seq_event_t* event) : ChannelEvent(event) {}
184  int getKey() const { return m_event.data.note.note; }
190  void setKey(const MidiByte b) { m_event.data.note.note = b; }
196  int getVelocity() const { return m_event.data.note.velocity; }
202  void setVelocity(const MidiByte b) { m_event.data.note.velocity = b; }
203 };
204 
211 class DRUMSTICK_EXPORT NoteEvent : public KeyEvent
212 {
213 public:
215  NoteEvent() : KeyEvent() { m_event.type = SND_SEQ_EVENT_NOTE; }
217  NoteEvent(snd_seq_event_t* event) : KeyEvent(event) {}
218  NoteEvent(const int ch, const int key, const int vel, const int dur);
224  ulong getDuration() const { return m_event.data.note.duration; }
230  void setDuration(const ulong d) { m_event.data.note.duration = d; }
233 };
234 
238 class DRUMSTICK_EXPORT NoteOnEvent : public KeyEvent
239 {
240 public:
242  NoteOnEvent() : KeyEvent() { m_event.type = SND_SEQ_EVENT_NOTEON; }
244  NoteOnEvent(snd_seq_event_t* event) : KeyEvent(event) {}
245  NoteOnEvent(const int ch, const int key, const int vel);
248 };
249 
253 class DRUMSTICK_EXPORT NoteOffEvent : public KeyEvent
254 {
255 public:
257  NoteOffEvent() : KeyEvent() { m_event.type = SND_SEQ_EVENT_NOTEOFF; }
259  NoteOffEvent(snd_seq_event_t* event) : KeyEvent(event) {}
260  NoteOffEvent(const int ch, const int key, const int vel);
263 };
264 
268 class DRUMSTICK_EXPORT KeyPressEvent : public KeyEvent
269 {
270 public:
272  KeyPressEvent() : KeyEvent() { m_event.type = SND_SEQ_EVENT_KEYPRESS; }
274  KeyPressEvent(snd_seq_event_t* event) : KeyEvent(event) {}
275  KeyPressEvent(const int ch, const int key, const int vel);
278 };
279 
283 class DRUMSTICK_EXPORT ControllerEvent : public ChannelEvent
284 {
285 public:
289  ControllerEvent(snd_seq_event_t* event) : ChannelEvent(event) {}
290  ControllerEvent(const int ch, const int cc, const int val);
296  uint getParam() const { return m_event.data.control.param; }
302  void setParam( const uint p ) { m_event.data.control.param = p; }
308  int getValue() const { return m_event.data.control.value; }
314  void setValue( const int v ) { m_event.data.control.value = v; }
317 };
318 
322 class DRUMSTICK_EXPORT ProgramChangeEvent : public ChannelEvent
323 {
324 public:
326  ProgramChangeEvent() : ChannelEvent() { m_event.type = SND_SEQ_EVENT_PGMCHANGE; }
328  ProgramChangeEvent(snd_seq_event_t* event) : ChannelEvent(event) {}
329  ProgramChangeEvent(const int ch, const int val);
331  int getValue() const { return m_event.data.control.value; }
333  void setValue( const int v ) { m_event.data.control.value = v; }
336 };
337 
341 class DRUMSTICK_EXPORT PitchBendEvent : public ChannelEvent
342 {
343 public:
345  PitchBendEvent() : ChannelEvent() { m_event.type = SND_SEQ_EVENT_PITCHBEND; }
347  PitchBendEvent(snd_seq_event_t* event) : ChannelEvent(event) {}
348  PitchBendEvent(const int ch, const int val);
350  int getValue() const { return m_event.data.control.value; }
352  void setValue( const int v ) { m_event.data.control.value = v; }
355 };
356 
360 class DRUMSTICK_EXPORT ChanPressEvent : public ChannelEvent
361 {
362 public:
364  ChanPressEvent() : ChannelEvent() { m_event.type = SND_SEQ_EVENT_CHANPRESS; }
366  ChanPressEvent(snd_seq_event_t* event) : ChannelEvent(event) {}
367  ChanPressEvent( const int ch, const int val);
369  int getValue() const { return m_event.data.control.value; }
371  void setValue( const int v ) { m_event.data.control.value = v; }
374 };
375 
379 class DRUMSTICK_EXPORT VariableEvent : public SequencerEvent
380 {
381 public:
382  VariableEvent();
383  VariableEvent(snd_seq_event_t* event);
384  VariableEvent(const QByteArray& data);
385  VariableEvent(const VariableEvent& other);
386  VariableEvent(const unsigned int datalen, char* dataptr);
387  VariableEvent& operator=(const VariableEvent& other);
389  unsigned int getLength() const { return m_event.data.ext.len; }
391  const char* getData() const { return static_cast<const char*>(m_event.data.ext.ptr); }
394 protected:
395  QByteArray m_data;
396 };
397 
401 class DRUMSTICK_EXPORT SysExEvent : public VariableEvent
402 {
403 public:
404  SysExEvent();
405  SysExEvent(snd_seq_event_t* event);
406  SysExEvent(const QByteArray& data);
407  SysExEvent(const SysExEvent& other);
408  SysExEvent(const unsigned int datalen, char* dataptr);
411 };
412 
419 class DRUMSTICK_EXPORT TextEvent : public VariableEvent
420 {
421 public:
422  TextEvent();
423  TextEvent(snd_seq_event_t* event);
424  explicit TextEvent(const QString& text, const int textType = 1);
425  TextEvent(const TextEvent& other);
426  TextEvent(const unsigned int datalen, char* dataptr);
427  QString getText() const;
428  int getTextType() const;
431 protected:
433 };
434 
438 class DRUMSTICK_EXPORT SystemEvent : public SequencerEvent
439 {
440 public:
444  SystemEvent(snd_seq_event_t* event) : SequencerEvent(event) {}
445  SystemEvent(const snd_seq_event_type_t type);
448 };
449 
455 class DRUMSTICK_EXPORT QueueControlEvent : public SequencerEvent
456 {
457 public:
461  QueueControlEvent(snd_seq_event_t* event) : SequencerEvent(event) {}
462  QueueControlEvent(const snd_seq_event_type_t type, const int queue, const int value);
464  int getQueue() const { return m_event.data.queue.queue; }
466  void setQueue(const uchar q) { m_event.data.queue.queue = q; }
468  int getValue() const { return m_event.data.queue.param.value; }
470  void setValue(const int val) { m_event.data.queue.param.value = val; }
472  uint getPosition() const { return m_event.data.queue.param.position; }
474  void setPosition(const uint pos) { m_event.data.queue.param.position = pos; }
476  snd_seq_tick_time_t getTickTime() const { return m_event.data.queue.param.time.tick; }
478  void setTickTime(const snd_seq_tick_time_t t) { m_event.data.queue.param.time.tick = t; }
480  uint getSkewBase() const { return m_event.data.queue.param.skew.base; }
482  void setSkewBase(const uint base) { m_event.data.queue.param.skew.base = base; }
484  uint getSkewValue() const { return m_event.data.queue.param.skew.value; }
486  void setSkewValue(const uint val) {m_event.data.queue.param.skew.value = val; }
489 };
490 
494 class DRUMSTICK_EXPORT ValueEvent : public SequencerEvent
495 {
496 public:
500  ValueEvent(snd_seq_event_t* event) : SequencerEvent(event) {}
501  ValueEvent(const snd_seq_event_type_t type, const int val);
503  int getValue() const { return m_event.data.control.value; }
505  void setValue( const int v ) { m_event.data.control.value = v; }
508 };
509 
513 class DRUMSTICK_EXPORT TempoEvent : public QueueControlEvent
514 {
515 public:
519  TempoEvent(snd_seq_event_t* event) : QueueControlEvent(event) {}
520  TempoEvent(const int queue, const int tempo);
523 };
524 
528 class DRUMSTICK_EXPORT SubscriptionEvent : public SequencerEvent
529 {
530 public:
534  SubscriptionEvent(snd_seq_event_t* event) : SequencerEvent(event) {}
536  bool subscribed() const { return (m_event.type == SND_SEQ_EVENT_PORT_SUBSCRIBED); }
538  bool unsubscribed() const { return (m_event.type == SND_SEQ_EVENT_PORT_UNSUBSCRIBED); }
540  int getSenderClient() const { return m_event.data.connect.sender.client; }
542  int getSenderPort() const { return m_event.data.connect.sender.port; }
544  int getDestClient() const { return m_event.data.connect.dest.client; }
546  int getDestPort() const { return m_event.data.connect.dest.port; }
549 };
550 
554 class DRUMSTICK_EXPORT ClientEvent : public SequencerEvent
555 {
556 public:
560  ClientEvent(snd_seq_event_t* event) : SequencerEvent(event) {}
561  int getClient() const { return m_event.data.addr.client; }
564 };
565 
569 class DRUMSTICK_EXPORT PortEvent : public ClientEvent
570 {
571 public:
575  PortEvent(snd_seq_event_t* event) : ClientEvent(event) {}
577  int getPort() const { return m_event.data.addr.port; }
580 };
581 
586 class DRUMSTICK_EXPORT RemoveEvents
587 {
588 public:
589  friend class MidiClient;
590 
591 public:
593  RemoveEvents();
594  RemoveEvents(const RemoveEvents& other);
595  RemoveEvents(snd_seq_remove_events_t* other);
596  virtual ~RemoveEvents();
597  RemoveEvents* clone();
598  RemoveEvents& operator=(const RemoveEvents& other);
599  int getSizeOfInfo() const;
600 
601  int getChannel();
602  unsigned int getCondition();
603  const snd_seq_addr_t* getDest();
604  int getEventType();
605  int getQueue();
606  int getTag();
607  const snd_seq_timestamp_t* getTime();
608  void setChannel(int chan);
609  void setCondition(unsigned int cond);
610  void setDest(const snd_seq_addr_t* dest);
611  void setEventType(int type);
612  void setQueue(int queue);
613  void setTag(int tag);
614  void setTime(const snd_seq_timestamp_t* time);
615 
616 private:
617  snd_seq_remove_events_t* m_Info;
618 };
619 
623 class DRUMSTICK_EXPORT MidiCodec : public QObject
624 {
625  Q_OBJECT
626 public:
627  explicit MidiCodec(int bufsize, QObject* parent = 0);
628  ~MidiCodec();
629 
630  void init();
631  long decode(unsigned char *buf,
632  long count,
633  const snd_seq_event_t *ev);
634  long encode(const unsigned char *buf,
635  long count,
636  snd_seq_event_t *ev);
637  long encode(int c,
638  snd_seq_event_t *ev);
639  void enableRunningStatus(bool enable);
640  void resetEncoder();
641  void resetDecoder();
642  void resizeBuffer(int bufsize);
643 private:
644  snd_midi_event_t* m_Info;
645 };
646 
647 } /* namespace drumstick */
648 
651 #endif //DRUMSTICK_ALSAEVENT_H
ValueEvent(snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:500
snd_seq_event_t * getHandle()
Gets the handle of the event.
Definition: alsaevent.h:123
ClientEvent(snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:560
void setVelocity(const MidiByte b)
Sets the note velocity of this event.
Definition: alsaevent.h:202
ALSA Event representing a queue control command.
Definition: alsaevent.h:455
int getVelocity() const
Gets the note velocity of this event.
Definition: alsaevent.h:196
snd_seq_tick_time_t getTick() const
Gets the tick time of the event.
Definition: alsaevent.h:89
unsigned char getTag() const
Gets the tag of the event.
Definition: alsaevent.h:113
bool subscribed() const
Returns true if the event was a subscribed port.
Definition: alsaevent.h:536
TempoEvent(snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:519
void setValue(const int v)
Sets the MIDI program number.
Definition: alsaevent.h:333
Base class for the events having Key and Velocity properties.
Definition: alsaevent.h:172
PortEvent(snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:575
int getSenderClient() const
Gets the sender client number.
Definition: alsaevent.h:540
Generic event having a value property.
Definition: alsaevent.h:494
int getQueue() const
Gets the queue number.
Definition: alsaevent.h:464
ChanPressEvent()
Default constructor.
Definition: alsaevent.h:364
int getValue() const
Gets the channel aftertouch value.
Definition: alsaevent.h:369
const QEvent::Type SequencerEventType
Constant SequencerEventType is the QEvent::type() of any SequencerEvent object to be used to check th...
Definition: alsaevent.h:40
QByteArray m_data
Clone this object returning a pointer to the new object.
Definition: alsaevent.h:395
void setDuration(const ulong d)
Sets the note&#39;s duration.
Definition: alsaevent.h:230
PortEvent()
Default constructor.
Definition: alsaevent.h:573
SystemEvent(snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:444
ulong getDuration() const
Gets the note&#39;s duration.
Definition: alsaevent.h:224
virtual ~SequencerEvent()
Destructor.
Definition: alsaevent.h:60
Generic event.
Definition: alsaevent.h:438
Event representing a MIDI control change event.
Definition: alsaevent.h:283
NoteEvent(snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:217
void setTickTime(const snd_seq_tick_time_t t)
Sets the musical time in ticks.
Definition: alsaevent.h:478
KeyEvent()
Default constructor.
Definition: alsaevent.h:176
Base class for variable length events.
Definition: alsaevent.h:379
ProgramChangeEvent(snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:328
ALSA Event representing a change on some ALSA sequencer client on the system.
Definition: alsaevent.h:554
ControllerEvent(snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:289
The QObject class is the base class of all Qt objects.
Base class for the event&#39;s hierarchy.
Definition: alsaevent.h:53
snd_seq_event_type_t getSequencerType() const
Gets the sequencer event type.
Definition: alsaevent.h:69
Auxiliary class to translate between raw MIDI streams and ALSA events.
Definition: alsaevent.h:623
Event representing a MIDI system exclusive event.
Definition: alsaevent.h:401
int getValue() const
Gets the event&#39;s value.
Definition: alsaevent.h:503
int getValue() const
Gets the MIDI program number.
Definition: alsaevent.h:331
bool unsubscribed() const
Returns true if the event was an unsubscribed port.
Definition: alsaevent.h:538
int getValue() const
Gets the event&#39;s value.
Definition: alsaevent.h:468
void setSkewValue(const uint val)
Sets the skew value.
Definition: alsaevent.h:486
uint getParam() const
Gets the controller event&#39;s parameter.
Definition: alsaevent.h:296
int getSenderPort() const
Gets the sender port number.
Definition: alsaevent.h:542
NoteOnEvent()
Default constructor.
Definition: alsaevent.h:242
Client management.
Definition: alsaclient.h:198
void setQueue(const uchar q)
Sets the queue number.
Definition: alsaevent.h:466
ChanPressEvent(snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:366
uint getPosition() const
Gets the queue position.
Definition: alsaevent.h:472
void setSkewBase(const uint base)
Sets the skew base, should be 65536.
Definition: alsaevent.h:482
uint getSkewBase() const
Gets the skew base.
Definition: alsaevent.h:480
PitchBendEvent(snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:347
NoteEvent()
Default constructor.
Definition: alsaevent.h:215
unsigned char getSourcePort() const
Gets the source port id.
Definition: alsaevent.h:83
NoteOffEvent(snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:259
void setValue(const int v)
Sets the channel aftertouch value.
Definition: alsaevent.h:371
ClientEvent()
Default constructor.
Definition: alsaevent.h:558
void setPosition(const uint pos)
Sets the queue position.
Definition: alsaevent.h:474
int getValue() const
Gets the controller event&#39;s value.
Definition: alsaevent.h:308
ALSA Event representing a change on some ALSA sequencer port on the system.
Definition: alsaevent.h:569
Event representing a MIDI key pressure, or polyphonic after-touch event.
Definition: alsaevent.h:268
SubscriptionEvent(snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:534
void setValue(const int v)
Sets the controller event&#39;s value.
Definition: alsaevent.h:314
Event representing a SMF text event.
Definition: alsaevent.h:419
ALSA Event representing a tempo change for an ALSA queue.
Definition: alsaevent.h:513
Event representing a MIDI program change event.
Definition: alsaevent.h:322
PitchBendEvent()
Default constructor.
Definition: alsaevent.h:345
void setChannel(const MidiByte c)
Sets the channel of the event.
Definition: alsaevent.h:160
int getDestClient() const
Gets the destination client number.
Definition: alsaevent.h:544
Base class for the events having a Channel property.
Definition: alsaevent.h:148
SubscriptionEvent()
Default constructor.
Definition: alsaevent.h:532
unsigned int getLength() const
Gets the data length.
Definition: alsaevent.h:389
Common functionality.
unsigned char getSourceClient() const
Gets the source client id.
Definition: alsaevent.h:77
unsigned int getRealTimeSecs() const
Gets the seconds of the event&#39;s real time.
Definition: alsaevent.h:95
int getChannel() const
Gets the event&#39;s channel.
Definition: alsaevent.h:166
void setValue(const int v)
Sets the event&#39;s value.
Definition: alsaevent.h:505
ControllerEvent()
Default constructor.
Definition: alsaevent.h:287
Auxiliary class to remove events from an ALSA queue.
Definition: alsaevent.h:586
Class representing a note event with duration.
Definition: alsaevent.h:211
void setParam(const uint p)
Sets the controller event&#39;s parameter.
Definition: alsaevent.h:302
int m_textType
Clone this object returning a pointer to the new object.
Definition: alsaevent.h:432
ALSA Event representing a subscription between two ALSA clients and ports.
Definition: alsaevent.h:528
int getDestPort() const
Gets the destination port number.
Definition: alsaevent.h:546
QueueControlEvent()
Default constructor.
Definition: alsaevent.h:459
ValueEvent()
Default constructor.
Definition: alsaevent.h:498
ChannelEvent()
Default constructor.
Definition: alsaevent.h:152
uint getSkewValue() const
Gets the skew value.
Definition: alsaevent.h:484
Event representing a MIDI bender, or pitch wheel event.
Definition: alsaevent.h:341
#define CLONE_EVENT_DECLARATION(T)
Macro to declare a virtual clone() method for SequencerEvent and derived classes. ...
Definition: alsaevent.h:45
ProgramChangeEvent()
Default constructor.
Definition: alsaevent.h:326
int getPort() const
Gets the port number.
Definition: alsaevent.h:577
Event representing a note-off MIDI event.
Definition: alsaevent.h:253
NoteOffEvent()
Default constructor.
Definition: alsaevent.h:257
Event representing a MIDI channel pressure or after-touch event.
Definition: alsaevent.h:360
void setValue(const int v)
Sets the MIDI pitch bend value, zero centered from -8192 to 8191.
Definition: alsaevent.h:352
Event representing a note-on MIDI event.
Definition: alsaevent.h:238
unsigned int getRealTimeNanos() const
Gets the nanoseconds of the event&#39;s real time.
Definition: alsaevent.h:101
TempoEvent()
Default constructor.
Definition: alsaevent.h:517
const char * getData() const
Gets the data pointer.
Definition: alsaevent.h:391
snd_seq_event_t m_event
ALSA sequencer event record.
Definition: alsaevent.h:142
KeyEvent(snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:178
int getKey() const
Gets the MIDI note of this event.
Definition: alsaevent.h:184
NoteOnEvent(snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:244
int getValue() const
Gets the MIDI pitch bend value, zero centered from -8192 to 8191.
Definition: alsaevent.h:350
QueueControlEvent(snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:461
The QEvent class is the base class of all event classes.
KeyPressEvent()
Default constructor.
Definition: alsaevent.h:272
snd_seq_tick_time_t getTickTime() const
Gets the musical time in ticks.
Definition: alsaevent.h:476
KeyPressEvent(snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:274
ChannelEvent(snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:154
SystemEvent()
Default constructor.
Definition: alsaevent.h:442
void setKey(const MidiByte b)
Sets the MIDI note of this event.
Definition: alsaevent.h:190
quint8 MidiByte
8-bit unsigned number to be used as a MIDI message parameter
void setValue(const int val)
Sets the event&#39;s value.
Definition: alsaevent.h:470