drumstick 2.10.0
C++ MIDI libraries using Qt objects, idioms, and style.
alsaevent.cpp
Go to the documentation of this file.
1/*
2 MIDI Sequencer C++ library
3 Copyright (C) 2006-2024, 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#include <cxxabi.h>
20
21#include "errorcheck.h"
22#include <drumstick/alsaevent.h>
23
28
34
35namespace drumstick { namespace ALSA {
36
97
102{
103 snd_seq_ev_clear( &m_event );
104}
105
111{
112 snd_seq_ev_clear( &m_event );
113 m_event = *event;
114}
115
121{
122 snd_seq_ev_clear( &m_event );
123 m_event = other.m_event;
124}
125
133{
134 m_event = other.m_event;
135 return *this;
136}
137
143bool
145{
146 snd_seq_event_type_t te = event->getSequencerType();
147 return ( te == SND_SEQ_EVENT_PORT_SUBSCRIBED ||
148 te == SND_SEQ_EVENT_PORT_UNSUBSCRIBED );
149}
150
156bool
158{
159 snd_seq_event_type_t te = event->getSequencerType();
160 return ( te == SND_SEQ_EVENT_PORT_START ||
161 te == SND_SEQ_EVENT_PORT_EXIT ||
162 te == SND_SEQ_EVENT_PORT_CHANGE );
163}
164
170bool
172{
173 snd_seq_event_type_t te = event->getSequencerType();
174 return ( te == SND_SEQ_EVENT_CLIENT_START ||
175 te == SND_SEQ_EVENT_CLIENT_EXIT ||
176 te == SND_SEQ_EVENT_CLIENT_CHANGE );
177}
178
184bool
186{
187 snd_seq_event_type_t te = event->getSequencerType();
188 return ( te == SND_SEQ_EVENT_PORT_START ||
189 te == SND_SEQ_EVENT_PORT_EXIT ||
190 te == SND_SEQ_EVENT_PORT_CHANGE ||
191 te == SND_SEQ_EVENT_CLIENT_START ||
192 te == SND_SEQ_EVENT_CLIENT_EXIT ||
193 te == SND_SEQ_EVENT_CLIENT_CHANGE ||
194 te == SND_SEQ_EVENT_PORT_SUBSCRIBED ||
195 te == SND_SEQ_EVENT_PORT_UNSUBSCRIBED );
196}
197
204bool
206{
207 snd_seq_event_type_t te = event->getSequencerType();
208 return ( te == SND_SEQ_EVENT_NOTEOFF ||
209 te == SND_SEQ_EVENT_NOTEON ||
210 te == SND_SEQ_EVENT_NOTE ||
211 te == SND_SEQ_EVENT_KEYPRESS ||
212 te == SND_SEQ_EVENT_CONTROLLER ||
213 te == SND_SEQ_EVENT_CONTROL14 ||
214 te == SND_SEQ_EVENT_PGMCHANGE ||
215 te == SND_SEQ_EVENT_CHANPRESS ||
216 te == SND_SEQ_EVENT_PITCHBEND );
217}
218
223void SequencerEvent::setSequencerType(const snd_seq_event_type_t eventType)
224{
225 m_event.type = eventType;
226}
227
234void SequencerEvent::setDestination(const unsigned char client, const unsigned char port)
235{
236 snd_seq_ev_set_dest(&m_event, client, port);
237}
238
244void SequencerEvent::setSource(const unsigned char port)
245{
246 snd_seq_ev_set_source(&m_event, port);
247}
248
253{
254 snd_seq_ev_set_subs(&m_event);
255}
256
261{
262 snd_seq_ev_set_broadcast(&m_event);
263}
264
270{
271 snd_seq_ev_set_direct(&m_event);
272}
273
280void SequencerEvent::scheduleTick(int queue, int tick, bool relative)
281{
282 snd_seq_ev_schedule_tick(&m_event, queue, relative, tick);
283}
284
292void SequencerEvent::scheduleReal(int queue, ulong secs, ulong nanos, bool relative)
293{
294 snd_seq_real_time_t rtime;
295 rtime.tv_sec = secs;
296 rtime.tv_nsec = nanos;
297 snd_seq_ev_schedule_real(&m_event, queue, relative, &rtime);
298}
299
306void SequencerEvent::setPriority(const bool high)
307{
308 snd_seq_ev_set_priority(&m_event, high);
309}
310
316void SequencerEvent::setTag(const unsigned char aTag)
317{
318#if SND_LIB_VERSION > 0x010008
319 snd_seq_ev_set_tag(&m_event, aTag);
320#else
321 m_event.tag = aTag;
322#endif
323}
324
331unsigned int SequencerEvent::getRaw32(const unsigned int n) const
332{
333 if (n < 3) return m_event.data.raw32.d[n];
334 return 0;
335}
336
342void SequencerEvent::setRaw32(const unsigned int n, const unsigned int value)
343{
344 if (n < 3) m_event.data.raw32.d[n] = value;
345}
346
353unsigned char SequencerEvent::getRaw8(const unsigned int n) const
354{
355 if (n < 12) return m_event.data.raw8.d[n];
356 return 0;
357}
358
364void SequencerEvent::setRaw8(const unsigned int n, const unsigned char value)
365{
366 if (n < 12) m_event.data.raw8.d[n] = value;
367}
368
374{
375 snd_seq_free_event(&m_event);
376}
377
383{
384 return snd_seq_event_length(&m_event);
385}
386
392{
393 return new SequencerEvent(&m_event);
394}
395
401{
402 return new ChannelEvent(&m_event);
403}
404
410{
411 return new KeyEvent(&m_event);
412}
413
421NoteEvent::NoteEvent(const int ch, const int key, const int vel, const int dur) : KeyEvent()
422{
423 snd_seq_ev_set_note(&m_event, ch, key, vel, dur);
424}
425
431{
432 return new NoteEvent(&m_event);
433}
434
441NoteOnEvent::NoteOnEvent(int ch, int key, int vel) : KeyEvent()
442{
443 snd_seq_ev_set_noteon(&m_event, ch, key, vel);
444}
445
451{
452 return new NoteOnEvent(&m_event);
453}
454
461NoteOffEvent::NoteOffEvent(int ch, int key, int vel) : KeyEvent()
462{
463 snd_seq_ev_set_noteoff(&m_event, ch, key, vel);
464}
465
471{
472 return new NoteOffEvent(&m_event);
473}
474
481KeyPressEvent::KeyPressEvent(int ch, int key, int vel) : KeyEvent()
482{
483 snd_seq_ev_set_keypress(&m_event, ch, key, vel);
484}
485
491{
492 return new KeyPressEvent(&m_event);
493}
494
502{
503 snd_seq_ev_set_controller(&m_event, ch, cc, val);
504}
505
514
521{
522 snd_seq_ev_set_pgmchange(&m_event, ch, val);
523}
524
533
540{
541 snd_seq_ev_set_pitchbend(&m_event, ch, val);
542}
543
549{
550 return new PitchBendEvent(&m_event);
551}
552
559{
560 snd_seq_ev_set_chanpress(&m_event, ch, val);
561}
562
568{
569 return new ChanPressEvent(&m_event);
570}
571
577{
578 m_data.clear();
579 snd_seq_ev_set_variable ( &m_event, m_data.size(), m_data.data() );
580}
581
586VariableEvent::VariableEvent(const snd_seq_event_t* event)
587 : SequencerEvent(event)
588{
589 m_data = QByteArray((char *) event->data.ext.ptr,
590 event->data.ext.len);
591 snd_seq_ev_set_variable ( &m_event, m_data.size(), m_data.data() );
592}
593
598VariableEvent::VariableEvent(const QByteArray& data)
600{
601 m_data = data;
602 snd_seq_ev_set_variable ( &m_event, m_data.size(), m_data.data() );
603}
604
610 : SequencerEvent(other)
611{
612 m_data = other.m_data;
613 snd_seq_ev_set_variable ( &m_event, m_data.size(), m_data.data() );
614}
615
621VariableEvent::VariableEvent(const unsigned int datalen, char* dataptr)
623{
624 m_data = QByteArray(dataptr, datalen);
625 snd_seq_ev_set_variable( &m_event, m_data.size(), m_data.data() );
626}
627
634{
635 m_event = other.m_event;
636 m_data = other.m_data;
637 snd_seq_ev_set_variable ( &m_event, m_data.size(), m_data.data() );
638 return *this;
639}
640
646{
647 return new VariableEvent(&m_event);
648}
649
654 : VariableEvent()
655{
656 snd_seq_ev_set_sysex( &m_event, m_data.size(), m_data.data() );
657}
658
663SysExEvent::SysExEvent(const snd_seq_event_t* event)
664 : VariableEvent(event)
665{
666 snd_seq_ev_set_sysex( &m_event, m_data.size(), m_data.data() );
667}
668
673SysExEvent::SysExEvent(const QByteArray& data)
674 : VariableEvent(data)
675{
676 snd_seq_ev_set_sysex( &m_event, m_data.size(), m_data.data() );
677}
678
684 : VariableEvent(other)
685{
686 snd_seq_ev_set_sysex( &m_event, m_data.size(), m_data.data() );
687}
688
694SysExEvent::SysExEvent(const unsigned int datalen, char* dataptr)
695 : VariableEvent( datalen, dataptr )
696{
697 snd_seq_ev_set_sysex( &m_event, m_data.size(), m_data.data() );
698}
699
705{
706 return new SysExEvent(&m_event);
707}
708
715{
716 m_event = other.m_event;
717 m_data = other.m_data;
718 snd_seq_ev_set_sysex(&m_event, m_data.size(), m_data.data());
719 return *this;
720}
721
726 : VariableEvent(), m_textType(1)
727{
728 setSequencerType(SND_SEQ_EVENT_USR_VAR0);
729}
730
735TextEvent::TextEvent(const snd_seq_event_t* event)
736 : VariableEvent(event), m_textType(1)
737{
738 setSequencerType(SND_SEQ_EVENT_USR_VAR0);
739}
740
746TextEvent::TextEvent(const QString& text, const int textType)
747 : VariableEvent(text.toUtf8()), m_textType(textType)
748{
749 setSequencerType(SND_SEQ_EVENT_USR_VAR0);
750}
751
757 : VariableEvent(other)
758{
759 setSequencerType(SND_SEQ_EVENT_USR_VAR0);
760 m_textType = other.getTextType();
761}
762
768TextEvent::TextEvent(const unsigned int datalen, char* dataptr)
769 : VariableEvent(datalen, dataptr), m_textType(1)
770{
771 setSequencerType(SND_SEQ_EVENT_USR_VAR0);
772}
773
778QString TextEvent::getText() const
779{
780 return QString::fromUtf8(m_data.data(), m_data.size());
781}
782
788{
789 return m_textType;
790}
791
797{
798 return new TextEvent(&m_event);
799}
800
807{
808 m_event = other.m_event;
809 m_data = other.m_data;
810 m_textType = other.getTextType();
811 snd_seq_ev_set_variable(&m_event, m_data.size(), m_data.data());
812 setSequencerType(SND_SEQ_EVENT_USR_VAR0);
813 return *this;
814}
815
820SystemEvent::SystemEvent(const snd_seq_event_type_t type) : SequencerEvent()
821{
822 snd_seq_ev_set_fixed(&m_event);
823 setSequencerType(type);
824}
825
831{
832 return new SystemEvent(&m_event);
833}
834
841QueueControlEvent::QueueControlEvent(snd_seq_event_type_t type, int queue, int value)
843{
844 snd_seq_ev_set_queue_control(&m_event, type, queue, value);
845}
846
855
861ValueEvent::ValueEvent(const snd_seq_event_type_t type, int val) : SequencerEvent()
862{
863 snd_seq_ev_set_fixed(&m_event);
864 setSequencerType(type);
865 setValue(val);
866}
867
873{
874 return new ValueEvent(&m_event);
875}
876
883{
884 snd_seq_ev_set_queue_tempo(&m_event, queue, tempo);
885}
886
892{
893 return new TempoEvent(&m_event);
894}
895
901{
902 return new ClientEvent(&m_event);
903}
904
910{
911 return new PortEvent(&m_event);
912}
913
922
927{
928 snd_seq_remove_events_malloc(&m_Info);
929}
930
936{
937 snd_seq_remove_events_malloc(&m_Info);
938 snd_seq_remove_events_copy(m_Info, other.m_Info);
939}
940
945RemoveEvents::RemoveEvents(snd_seq_remove_events_t* other)
946{
947 snd_seq_remove_events_malloc(&m_Info);
948 snd_seq_remove_events_copy(m_Info, other);
949}
950
955{
956 snd_seq_remove_events_free(m_Info);
957}
958
965{
966 return new RemoveEvents(m_Info);
967}
968
976{
977 if (this == &other)
978 return *this;
979 snd_seq_remove_events_copy(m_Info, other.m_Info);
980 return *this;
981}
982
987int
989{
990 return snd_seq_remove_events_sizeof();
991}
992
998int
1000{
1001 return snd_seq_remove_events_get_channel(m_Info);
1002}
1003
1009unsigned int
1011{
1012 return snd_seq_remove_events_get_condition(m_Info);
1013}
1014
1020const snd_seq_addr_t*
1022{
1023 return snd_seq_remove_events_get_dest(m_Info);
1024}
1025
1031int
1033{
1034 return snd_seq_remove_events_get_event_type(m_Info);
1035}
1036
1042int
1044{
1045 return snd_seq_remove_events_get_queue(m_Info);
1046}
1047
1053int
1055{
1056 return snd_seq_remove_events_get_tag(m_Info);
1057}
1058
1064const snd_seq_timestamp_t*
1066{
1067 return snd_seq_remove_events_get_time(m_Info);
1068}
1069
1075void
1077{
1078 snd_seq_remove_events_set_channel(m_Info, chan);
1079}
1080
1099void
1101{
1102 snd_seq_remove_events_set_condition(m_Info, cond);
1103}
1104
1110void
1111RemoveEvents::setDest(const snd_seq_addr_t* dest)
1112{
1113 snd_seq_remove_events_set_dest(m_Info, dest);
1114}
1115
1121void
1123{
1124 snd_seq_remove_events_set_event_type(m_Info, type);
1125}
1126
1132void
1134{
1135 snd_seq_remove_events_set_queue(m_Info, queue);
1136}
1137
1143void
1145{
1146 snd_seq_remove_events_set_tag(m_Info, tag);
1147}
1148
1154void
1155RemoveEvents::setTime(const snd_seq_timestamp_t* time)
1156{
1157 snd_seq_remove_events_set_time(m_Info, time);
1158}
1159
1165MidiCodec::MidiCodec( int bufsize, QObject* parent ) : QObject(parent)
1166{
1167 DRUMSTICK_ALSA_CHECK_ERROR(snd_midi_event_new(bufsize, &m_Info));
1168}
1169
1174{
1175 snd_midi_event_free(m_Info);
1176}
1177
1181void
1183{
1184 snd_midi_event_init(m_Info);
1185}
1186
1194long
1195MidiCodec::decode(unsigned char *buf,
1196 long count,
1197 const snd_seq_event_t *ev)
1198{
1199 return DRUMSTICK_ALSA_CHECK_WARNING(snd_midi_event_decode(m_Info, buf, count, ev));
1200}
1201
1209long
1210MidiCodec::encode(const unsigned char *buf,
1211 long count,
1212 snd_seq_event_t *ev)
1213{
1214 return DRUMSTICK_ALSA_CHECK_WARNING(snd_midi_event_encode(m_Info, buf, count, ev));
1215}
1216
1223long
1225 snd_seq_event_t *ev)
1226{
1227 return DRUMSTICK_ALSA_CHECK_WARNING(snd_midi_event_encode_byte(m_Info, c, ev));
1228}
1229
1234void
1236{
1237 snd_midi_event_no_status(m_Info, enable ? 0 : 1);
1238}
1239
1243void
1245{
1246 snd_midi_event_reset_decode(m_Info);
1247}
1248
1252void
1254{
1255 snd_midi_event_reset_encode(m_Info);
1256}
1257
1262void
1264{
1265 DRUMSTICK_ALSA_CHECK_WARNING(snd_midi_event_resize_buffer(m_Info, bufsize));
1266}
1267
1269{
1270 int status;
1271 char *realname = abi::__cxa_demangle(typeid(v).name(), 0, 0, &status);
1272 QString name(realname && realname[0] ? realname : "drumstick::ALSA::SequencerEvent");
1273 free(realname);
1274 return name;
1275}
1276
1277QDebug operator<<(QDebug d, const SequencerEvent &event)
1278{
1279 QDebugStateSaver saver(d);
1280 d.noquote() << typeOfEvent(event);
1281 return d;
1282}
1283
1284QDebug operator<<(QDebug d, const SequencerEvent *event)
1285{
1286 QDebugStateSaver saver(d);
1287 d.noquote().nospace() << typeOfEvent(*event) << "*";
1288 return d;
1289}
1290
1291} // namespace ALSA
1292} // namespace drumstick
1293
Classes managing ALSA Sequencer events.
The QEvent class is the base class of all event classes.
The QObject class is the base class of all Qt objects.
virtual ChanPressEvent * clone() const override
Clone this object returning a pointer to the new object.
ChanPressEvent()
Default constructor.
Definition alsaevent.h:432
ChannelEvent()
Default constructor.
Definition alsaevent.h:162
virtual ChannelEvent * clone() const override
Clone this object returning a pointer to the new object.
ClientEvent()
Default constructor.
Definition alsaevent.h:712
virtual ClientEvent * clone() const override
Clone this object returning a pointer to the new object.
virtual ControllerEvent * clone() const override
Clone this object returning a pointer to the new object.
ControllerEvent()
Default constructor.
Definition alsaevent.h:328
virtual KeyEvent * clone() const override
Clone this object returning a pointer to the new object.
KeyEvent()
Default constructor.
Definition alsaevent.h:191
KeyPressEvent()
Default constructor.
Definition alsaevent.h:308
virtual KeyPressEvent * clone() const override
Clone this object returning a pointer to the new object.
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.
NoteEvent()
Default constructor.
Definition alsaevent.h:235
virtual NoteEvent * clone() const override
Clone this object returning a pointer to the new object.
NoteOffEvent()
Default constructor.
Definition alsaevent.h:288
virtual NoteOffEvent * clone() const override
Clone this object returning a pointer to the new object.
virtual NoteOnEvent * clone() const override
Clone this object returning a pointer to the new object.
NoteOnEvent()
Default constructor.
Definition alsaevent.h:268
virtual PitchBendEvent * clone() const override
Clone this object returning a pointer to the new object.
PitchBendEvent()
Default constructor.
Definition alsaevent.h:402
PortEvent()
Default constructor.
Definition alsaevent.h:733
virtual PortEvent * clone() const override
Clone this object returning a pointer to the new object.
virtual ProgramChangeEvent * clone() const override
Clone this object returning a pointer to the new object.
ProgramChangeEvent()
Default constructor.
Definition alsaevent.h:372
virtual QueueControlEvent * clone() const override
Clone this object returning a pointer to the new object.
QueueControlEvent()
Default constructor.
Definition alsaevent.h:545
Auxiliary class to remove events from an ALSA queue.
Definition alsaevent.h:752
virtual ~RemoveEvents()
Destructor.
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:68
snd_seq_event_t m_event
ALSA sequencer event record.
Definition alsaevent.h:152
static bool isConnectionChange(const SequencerEvent *event)
Checks if the event's type is of type connection change.
void setSequencerType(const snd_seq_event_type_t eventType)
Sets the event's ALSA sequencer type.
int getEncodedLength()
Gets the encoded length of the event record.
static bool isChannel(const SequencerEvent *event)
Checks if the event's type is a Channel Voice message.
void scheduleTick(const int queue, const int tick, const bool relative)
Sets the event to be scheduled in musical time (ticks) units.
void setDirect()
Sets the event to be immediately delivered, not queued/scheduled.
virtual SequencerEvent * clone() const
Clone this object returning a pointer to the new object.
unsigned char getRaw8(const unsigned int n) const
Gets an event's raw 8 bits parameter.
void setRaw32(const unsigned int n, const unsigned int value)
Sets an event's raw 32 bits parameter.
void scheduleReal(const int queue, const ulong secs, const ulong nanos, const bool relative)
Sets the event to be scheduled in real (clock) time units.
SequencerEvent()
Default constructor.
unsigned int getRaw32(const unsigned int n) const
Gets an event's raw 32 bits parameter.
void setRaw8(const unsigned int n, const unsigned char value)
Sets an event's raw 8 bits parameter.
static bool isSubscription(const SequencerEvent *event)
Checks if the event's type is a subscription.
void setSubscribers()
Sets the event's destination to be all the subscribers of the source port.
void setDestination(const unsigned char client, const unsigned char port)
Sets the client:port destination of the event.
static bool isPort(const SequencerEvent *event)
Checks if the event's type is of type port.
void setSource(const unsigned char port)
Sets the event's source port ID.
Q_DECL_DEPRECATED void free()
Releases the event record.
static bool isClient(const SequencerEvent *event)
Checks if the event's type is of type client.
void setTag(const unsigned char aTag)
Sets the event's tag.
void setPriority(const bool high)
Sets the priority of the event.
SequencerEvent & operator=(const SequencerEvent &other)
Assignment operator.
void setBroadcast()
Sets the event's destination to be all queues/clients/ports/channels.
virtual SubscriptionEvent * clone() const override
Clone this object returning a pointer to the new object.
SubscriptionEvent()
Default constructor.
Definition alsaevent.h:666
SysExEvent & operator=(const SysExEvent &other)
Assignment operator.
SysExEvent()
Default constructor.
virtual SysExEvent * clone() const override
Clone this object returning a pointer to the new object.
SystemEvent()
Default constructor.
Definition alsaevent.h:526
virtual SystemEvent * clone() const override
Clone this object returning a pointer to the new object.
TempoEvent()
Default constructor.
Definition alsaevent.h:649
virtual TempoEvent * clone() const override
Clone this object returning a pointer to the new object.
TextEvent()
Default constructor.
virtual TextEvent * clone() const override
Clone this object returning a pointer to the new object.
TextEvent & operator=(const TextEvent &other)
Assignment operator.
QString getText() const
Gets the event's text content.
int getTextType() const
Gets the event's SMF text type.
virtual ValueEvent * clone() const override
Clone this object returning a pointer to the new object.
void setValue(const int v)
Sets the event's value.
Definition alsaevent.h:638
ValueEvent()
Default constructor.
Definition alsaevent.h:622
virtual VariableEvent * clone() const override
Clone this object returning a pointer to the new object.
VariableEvent & operator=(const VariableEvent &other)
Assignment operator.
VariableEvent()
Default constructor.
Error checking functions and macros.
#define DRUMSTICK_ALSA_CHECK_WARNING(x)
This macro calls the check warning function.
Definition errorcheck.h:86
#define DRUMSTICK_ALSA_CHECK_ERROR(x)
This macro calls the check error function.
Definition errorcheck.h:80
QString typeOfEvent(const SequencerEvent &v)
typeOfEvent returns a QString representing the type of the event
QDebug operator<<(QDebug d, const SequencerEvent &event)
operator << outputs a SequencerEvent instance reference to a QDebug stream
const QEvent::Type SequencerEventType
Constant SequencerEventType is the QEvent::type() of any SequencerEvent object to be used to check th...
Definition alsaevent.h:59
Drumstick common.