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
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
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
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
135protected:
136 Q_DECL_DEPRECATED void free();
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) {}
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
254class DRUMSTICK_EXPORT NoteOnEvent : public KeyEvent
255{
256public:
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
274class DRUMSTICK_EXPORT NoteOffEvent : public KeyEvent
275{
276public:
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
294class DRUMSTICK_EXPORT KeyPressEvent : public KeyEvent
295{
296public:
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
314class DRUMSTICK_EXPORT ControllerEvent : public ChannelEvent
315{
316public:
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
358class DRUMSTICK_EXPORT ProgramChangeEvent : public ChannelEvent
359{
360public:
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
388class DRUMSTICK_EXPORT PitchBendEvent : public ChannelEvent
389{
390public:
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
418class DRUMSTICK_EXPORT ChanPressEvent : public ChannelEvent
419{
420public:
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
448class DRUMSTICK_EXPORT VariableEvent : public SequencerEvent
449{
450public:
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;
468protected:
469 QByteArray m_data;
470};
471
475class DRUMSTICK_EXPORT SysExEvent : public VariableEvent
476{
477public:
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
492class DRUMSTICK_EXPORT TextEvent : public VariableEvent
493{
494public:
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;
503protected:
504 int m_textType;
505};
506
510class DRUMSTICK_EXPORT SystemEvent : public SequencerEvent
511{
512public:
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
529class DRUMSTICK_EXPORT QueueControlEvent : public SequencerEvent
530{
531public:
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
606class DRUMSTICK_EXPORT ValueEvent : public SequencerEvent
607{
608public:
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
633class DRUMSTICK_EXPORT TempoEvent : public QueueControlEvent
634{
635public:
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
650class DRUMSTICK_EXPORT SubscriptionEvent : public SequencerEvent
651{
652public:
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
696class DRUMSTICK_EXPORT ClientEvent : public SequencerEvent
697{
698public:
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
717class DRUMSTICK_EXPORT PortEvent : public ClientEvent
718{
719public:
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
739class DRUMSTICK_EXPORT RemoveEvents
740{
741public:
742 friend class MidiClient;
743
744public:
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
768private:
769 snd_seq_remove_events_t* m_Info;
770};
771
775class DRUMSTICK_EXPORT MidiCodec : public QObject
776{
777 Q_OBJECT
778public:
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);
795private:
796 snd_midi_event_t* m_Info;
797};
798
801}} /* namespace drumstick::ALSA */
802
803Q_DECLARE_METATYPE(drumstick::ALSA::SequencerEvent)
804Q_DECLARE_METATYPE(drumstick::ALSA::SequencerEvent*)
805
806#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:419
ChanPressEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:427
void setValue(const int v)
Sets the channel aftertouch value.
Definition: alsaevent.h:441
int getValue() const
Gets the channel aftertouch value.
Definition: alsaevent.h:436
ChanPressEvent()
Default constructor.
Definition: alsaevent.h:422
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:697
ClientEvent()
Default constructor.
Definition: alsaevent.h:700
int getClient() const
Gets the client number.
Definition: alsaevent.h:710
ClientEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:705
Event representing a MIDI control change event.
Definition: alsaevent.h:315
uint getParam() const
Gets the controller event's parameter.
Definition: alsaevent.h:333
ControllerEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:323
void setParam(const uint p)
Sets the controller event's parameter.
Definition: alsaevent.h:339
void setValue(const int v)
Sets the controller event's value.
Definition: alsaevent.h:351
ControllerEvent()
Default constructor.
Definition: alsaevent.h:318
int getValue() const
Gets the controller event's value.
Definition: alsaevent.h:345
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:295
KeyPressEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:303
KeyPressEvent()
Default constructor.
Definition: alsaevent.h:298
Client management.
Definition: alsaclient.h:209
Auxiliary class to translate between raw MIDI streams and ALSA events.
Definition: alsaevent.h:776
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:246
ulong getDuration() const
Gets the note's duration.
Definition: alsaevent.h:240
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:275
NoteOffEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:283
NoteOffEvent()
Default constructor.
Definition: alsaevent.h:278
Event representing a note-on MIDI event.
Definition: alsaevent.h:255
NoteOnEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:263
NoteOnEvent()
Default constructor.
Definition: alsaevent.h:258
Event representing a MIDI bender, or pitch wheel event.
Definition: alsaevent.h:389
PitchBendEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:397
void setValue(const int v)
Sets the MIDI pitch bend value, zero centered from -8192 to 8191.
Definition: alsaevent.h:411
int getValue() const
Gets the MIDI pitch bend value, zero centered from -8192 to 8191.
Definition: alsaevent.h:406
PitchBendEvent()
Default constructor.
Definition: alsaevent.h:392
ALSA Event representing a change on some ALSA sequencer port on the system.
Definition: alsaevent.h:718
PortEvent()
Default constructor.
Definition: alsaevent.h:721
PortEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:726
int getPort() const
Gets the port number.
Definition: alsaevent.h:731
Event representing a MIDI program change event.
Definition: alsaevent.h:359
void setValue(const int v)
Sets the MIDI program number.
Definition: alsaevent.h:381
ProgramChangeEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:367
ProgramChangeEvent()
Default constructor.
Definition: alsaevent.h:362
int getValue() const
Gets the MIDI program number.
Definition: alsaevent.h:376
ALSA Event representing a queue control command.
Definition: alsaevent.h:530
QueueControlEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:538
void setSkewValue(const uint val)
Sets the skew value.
Definition: alsaevent.h:599
void setTickTime(const snd_seq_tick_time_t t)
Sets the musical time in ticks.
Definition: alsaevent.h:579
uint getPosition() const
Gets the queue position.
Definition: alsaevent.h:564
uint getSkewBase() const
Gets the skew base.
Definition: alsaevent.h:584
void setSkewBase(const uint base)
Sets the skew base, should be 65536.
Definition: alsaevent.h:589
snd_seq_tick_time_t getTickTime() const
Gets the musical time in ticks.
Definition: alsaevent.h:574
int getQueue() const
Gets the queue number.
Definition: alsaevent.h:544
void setQueue(const uchar q)
Sets the queue number.
Definition: alsaevent.h:549
uint getSkewValue() const
Gets the skew value.
Definition: alsaevent.h:594
int getValue() const
Gets the event's value.
Definition: alsaevent.h:554
void setPosition(const uint pos)
Sets the queue position.
Definition: alsaevent.h:569
QueueControlEvent()
Default constructor.
Definition: alsaevent.h:533
void setValue(const int val)
Sets the event's value.
Definition: alsaevent.h:559
Auxiliary class to remove events from an ALSA queue.
Definition: alsaevent.h:740
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
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
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:651
bool subscribed() const
Returns true if the event was a subscribed port.
Definition: alsaevent.h:664
SubscriptionEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:659
int getDestClient() const
Gets the destination client number.
Definition: alsaevent.h:684
int getDestPort() const
Gets the destination port number.
Definition: alsaevent.h:689
SubscriptionEvent()
Default constructor.
Definition: alsaevent.h:654
int getSenderClient() const
Gets the sender client number.
Definition: alsaevent.h:674
int getSenderPort() const
Gets the sender port number.
Definition: alsaevent.h:679
bool unsubscribed() const
Returns true if the event was an unsubscribed port.
Definition: alsaevent.h:669
Event representing a MIDI system exclusive event.
Definition: alsaevent.h:476
SystemEvent()
Default constructor.
Definition: alsaevent.h:514
SystemEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:519
ALSA Event representing a tempo change for an ALSA queue.
Definition: alsaevent.h:634
TempoEvent()
Default constructor.
Definition: alsaevent.h:637
TempoEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:642
Event representing a SMF text event.
Definition: alsaevent.h:493
Generic event having a value property.
Definition: alsaevent.h:607
ValueEvent(const snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:615
void setValue(const int v)
Sets the event's value.
Definition: alsaevent.h:626
ValueEvent()
Default constructor.
Definition: alsaevent.h:610
int getValue() const
Gets the event's value.
Definition: alsaevent.h:621
Base class for variable length events.
Definition: alsaevent.h:449
unsigned int getLength() const
Gets the data length.
Definition: alsaevent.h:461
const char * getData() const
Gets the data pointer.
Definition: alsaevent.h:466
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 common.
Definition: alsaclient.cpp:68