drumstick  1.1.3
alsaqueue.cpp
Go to the documentation of this file.
1 /*
2  MIDI Sequencer C++ library
3  Copyright (C) 2006-2019, 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
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18 
19 #include <cmath>
20 #include <drumstick/alsaqueue.h>
21 #include <drumstick/alsaclient.h>
22 #include <drumstick/alsaevent.h>
23 #include <drumstick/alsatimer.h>
24 
30 namespace drumstick {
31 
60 {
61  snd_seq_queue_info_malloc(&m_Info);
62 }
63 
68 QueueInfo::QueueInfo(snd_seq_queue_info_t* other)
69 {
70  snd_seq_queue_info_malloc(&m_Info);
71  snd_seq_queue_info_copy(m_Info, other);
72 }
73 
79 {
80  snd_seq_queue_info_malloc(&m_Info);
81  snd_seq_queue_info_copy(m_Info, other.m_Info);
82 }
83 
88 {
89  snd_seq_queue_info_free(m_Info);
90 }
91 
97 {
98  return new QueueInfo(m_Info);
99 }
100 
107 {
108  snd_seq_queue_info_copy(m_Info, other.m_Info);
109  return *this;
110 }
111 
117 {
118  return snd_seq_queue_info_get_queue(m_Info);
119 }
120 
126 {
127  return QString(snd_seq_queue_info_get_name(m_Info));
128 }
129 
135 {
136  return snd_seq_queue_info_get_owner(m_Info);
137 }
138 
144 {
145  return (snd_seq_queue_info_get_locked(m_Info) != 0);
146 }
147 
152 unsigned int QueueInfo::getFlags()
153 {
154  return snd_seq_queue_info_get_flags(m_Info);
155 }
156 
161 void QueueInfo::setName(QString value)
162 {
163  snd_seq_queue_info_set_name(m_Info, value.toLocal8Bit().data());
164 }
165 
170 void QueueInfo::setOwner(int value)
171 {
172  snd_seq_queue_info_set_owner(m_Info, value);
173 }
174 
179 void QueueInfo::setFlags(unsigned int value)
180 {
181  snd_seq_queue_info_set_flags(m_Info, value);
182 }
183 
188 void QueueInfo::setLocked(bool locked)
189 {
190  snd_seq_queue_info_set_locked(m_Info, locked ? 1 : 0);
191 }
192 
198 {
199  return snd_seq_queue_info_sizeof();
200 }
201 
202 
207 {
208  snd_seq_queue_status_malloc(&m_Info);
209 }
210 
215 QueueStatus::QueueStatus(snd_seq_queue_status_t* other)
216 {
217  snd_seq_queue_status_malloc(&m_Info);
218  snd_seq_queue_status_copy(m_Info, other);
219 }
220 
226 {
227  snd_seq_queue_status_malloc(&m_Info);
228  snd_seq_queue_status_copy(m_Info, other.m_Info);
229 }
230 
235 {
236  snd_seq_queue_status_free(m_Info);
237 }
238 
244 {
245  return new QueueStatus(m_Info);
246 }
247 
254 {
255  snd_seq_queue_status_copy(m_Info, other.m_Info);
256  return *this;
257 }
258 
264 {
265  return snd_seq_queue_status_get_queue(m_Info);
266 }
267 
273 {
274  return snd_seq_queue_status_get_events(m_Info);
275 }
276 
281 const snd_seq_real_time_t* QueueStatus::getRealtime()
282 {
283  return snd_seq_queue_status_get_real_time(m_Info);
284 }
285 
291 {
292  return snd_seq_queue_status_get_status(m_Info);
293 }
294 
299 snd_seq_tick_time_t QueueStatus::getTickTime()
300 {
301  return snd_seq_queue_status_get_tick_time(m_Info);
302 }
303 
309 {
310  return snd_seq_queue_status_sizeof();
311 }
312 
318 {
319  return (snd_seq_queue_status_get_status(m_Info) != 0);
320 }
321 
327 {
328  const snd_seq_real_time_t* time = snd_seq_queue_status_get_real_time(m_Info);
329  return (time->tv_sec * 1.0) + (time->tv_nsec * 1.0e-9);
330 }
331 
336 {
337  snd_seq_queue_tempo_malloc(&m_Info);
338 }
339 
344 QueueTempo::QueueTempo(snd_seq_queue_tempo_t* other)
345 {
346  snd_seq_queue_tempo_malloc(&m_Info);
347  snd_seq_queue_tempo_copy(m_Info, other);
348 }
349 
355 {
356  snd_seq_queue_tempo_malloc(&m_Info);
357  snd_seq_queue_tempo_copy(m_Info, other.m_Info);
358 }
359 
364 {
365  snd_seq_queue_tempo_free(m_Info);
366 }
367 
373 {
374  return new QueueTempo(m_Info);
375 }
376 
383 {
384  snd_seq_queue_tempo_copy(m_Info, other.m_Info);
385  return *this;
386 }
387 
393 {
394  return snd_seq_queue_tempo_get_queue(m_Info);
395 }
396 
402 {
403  return snd_seq_queue_tempo_get_ppq(m_Info);
404 }
405 
413 {
414  return snd_seq_queue_tempo_get_skew(m_Info);
415 }
416 
424 {
425  return snd_seq_queue_tempo_get_skew_base(m_Info);
426 }
427 
432 unsigned int QueueTempo::getTempo()
433 {
434  return snd_seq_queue_tempo_get_tempo(m_Info);
435 }
436 
441 void QueueTempo::setPPQ(int value)
442 {
443  snd_seq_queue_tempo_set_ppq(m_Info, value);
444 }
445 
452 void QueueTempo::setSkewValue(unsigned int value)
453 {
454  snd_seq_queue_tempo_set_skew(m_Info, value);
455 }
456 
464 void QueueTempo::setSkewBase(unsigned int value)
465 {
466  snd_seq_queue_tempo_set_skew_base(m_Info, value);
467 }
468 
473 void QueueTempo::setTempo(unsigned int value)
474 {
475  snd_seq_queue_tempo_set_tempo(m_Info, value);
476 }
477 
483 {
484  int itempo = getTempo();
485  if (itempo != 0)
486  return 6.0e7f / itempo;
487  return 0.0f;
488 }
489 
496 {
497  float tempo = getNominalBPM();
498  return tempo * getSkewValue() / SKEW_BASE;
499 }
500 
505 void QueueTempo::setTempoFactor(float value)
506 {
507  setSkewValue(floor(SKEW_BASE * value));
509 }
510 
515 void QueueTempo::setNominalBPM(float value)
516 {
517  setTempo(floor(6.0e7f / value));
518 }
519 
525 {
526  return snd_seq_queue_tempo_sizeof();
527 }
528 
533 {
534  snd_seq_queue_timer_malloc(&m_Info);
535 }
536 
541 QueueTimer::QueueTimer(snd_seq_queue_timer_t* other)
542 {
543  snd_seq_queue_timer_malloc(&m_Info);
544  snd_seq_queue_timer_copy(m_Info, other);
545 }
546 
552 {
553  snd_seq_queue_timer_malloc(&m_Info);
554  snd_seq_queue_timer_copy(m_Info, other.m_Info);
555 }
556 
561 {
562  snd_seq_queue_timer_free(m_Info);
563 }
564 
570 {
571  return new QueueTimer(m_Info);
572 }
573 
580 {
581  snd_seq_queue_timer_copy(m_Info, other.m_Info);
582  return *this;
583 }
584 
590 {
591  return snd_seq_queue_timer_get_queue(m_Info);
592 }
593 
606 snd_seq_queue_timer_type_t QueueTimer::getType()
607 {
608  return snd_seq_queue_timer_get_type(m_Info);
609 }
610 
615 const snd_timer_id_t* QueueTimer::getId()
616 {
617  return snd_seq_queue_timer_get_id(m_Info);
618 }
619 
625 {
626  return snd_seq_queue_timer_get_resolution(m_Info);
627 }
628 
640 void QueueTimer::setType(snd_seq_queue_timer_type_t value)
641 {
642  snd_seq_queue_timer_set_type(m_Info, value);
643 }
644 
649 void QueueTimer::setId(snd_timer_id_t* value)
650 {
651  snd_seq_queue_timer_set_id(m_Info, value);
652 }
653 
659 void QueueTimer::setId(const TimerId& id)
660 {
661  setId(id.m_Info);
662 }
663 
668 void QueueTimer::setResolution(unsigned int value)
669 {
670  snd_seq_queue_timer_set_resolution(m_Info, value);
671 }
672 
678 {
679  return snd_seq_queue_timer_sizeof();
680 }
681 
688  : QObject(parent)
689 {
690  m_MidiClient = seq;
691  m_Id = CHECK_ERROR(snd_seq_alloc_queue(m_MidiClient->getHandle()));
692  m_allocated = !(m_Id < 0);
693 }
694 
702  : QObject(parent)
703 {
704  m_MidiClient = seq;
705  m_Info = info;
706  m_Id = CHECK_ERROR(snd_seq_create_queue(m_MidiClient->getHandle(), m_Info.m_Info));
707  m_allocated = !(m_Id < 0);
708 }
709 
716 MidiQueue::MidiQueue(MidiClient* seq, const QString name, QObject* parent)
717  : QObject(parent)
718 {
719  m_MidiClient = seq;
720  m_Id = CHECK_ERROR(snd_seq_alloc_named_queue(m_MidiClient->getHandle(), name.toLocal8Bit().data()));
721  m_allocated = !(m_Id < 0);
722 }
723 
732 MidiQueue::MidiQueue(MidiClient* seq, const int queue_id, QObject* parent)
733  : QObject(parent)
734 {
735  m_MidiClient = seq;
736  m_Id = queue_id;
737  m_allocated = false;
738 }
739 
744 {
745  if ( m_allocated && (m_MidiClient->getHandle() != NULL) )
746  {
747  CHECK_ERROR(snd_seq_free_queue(m_MidiClient->getHandle(), m_Id));
748  }
749 }
750 
756 {
757  CHECK_WARNING(snd_seq_get_queue_info(m_MidiClient->getHandle(), m_Id, m_Info.m_Info));
758  return m_Info;
759 }
760 
766 {
767  CHECK_WARNING(snd_seq_get_queue_status(m_MidiClient->getHandle(), m_Id, m_Status.m_Info));
768  return m_Status;
769 }
770 
776 {
777  CHECK_WARNING(snd_seq_get_queue_tempo(m_MidiClient->getHandle(), m_Id, m_Tempo.m_Info));
778  return m_Tempo;
779 }
780 
786 {
787  CHECK_WARNING(snd_seq_get_queue_timer(m_MidiClient->getHandle(), m_Id, m_Timer.m_Info));
788  return m_Timer;
789 }
790 
795 void MidiQueue::setInfo(const QueueInfo& value)
796 {
797  m_Info = value;
798  CHECK_WARNING(snd_seq_set_queue_info(m_MidiClient->getHandle(), m_Id, m_Info.m_Info));
799 }
800 
805 void MidiQueue::setTempo(const QueueTempo& value)
806 {
807  m_Tempo = value;
808  CHECK_WARNING(snd_seq_set_queue_tempo(m_MidiClient->getHandle(), m_Id, m_Tempo.m_Info));
809 }
810 
815 void MidiQueue::setTimer(const QueueTimer& value)
816 {
817  m_Timer = value;
818  CHECK_WARNING(snd_seq_set_queue_timer(m_MidiClient->getHandle(), m_Id, m_Timer.m_Info));
819 }
820 
827 {
828  return CHECK_WARNING(snd_seq_get_queue_usage(m_MidiClient->getHandle(), m_Id));
829 }
830 
836 void MidiQueue::setUsage(int used)
837 {
838  CHECK_WARNING(snd_seq_set_queue_usage(m_MidiClient->getHandle(), m_Id, used));
839 }
840 
847 {
848  CHECK_WARNING(snd_seq_start_queue(m_MidiClient->getHandle(), m_Id, NULL));
849  CHECK_WARNING(snd_seq_drain_output(m_MidiClient->getHandle()));
850 }
851 
858 {
859  if (m_MidiClient != NULL && m_MidiClient->getHandle() != NULL) {
860  CHECK_WARNING(snd_seq_stop_queue(m_MidiClient->getHandle(), m_Id, NULL));
861  CHECK_WARNING(snd_seq_drain_output(m_MidiClient->getHandle()));
862  }
863 }
864 
871 {
872  CHECK_WARNING(snd_seq_continue_queue(m_MidiClient->getHandle(), m_Id, NULL));
873  CHECK_WARNING(snd_seq_drain_output(m_MidiClient->getHandle()));
874 }
875 
880 {
881  if (m_MidiClient != NULL && m_MidiClient->getHandle() != NULL)
882  snd_seq_drop_output(m_MidiClient->getHandle());
883 }
884 
889 void MidiQueue::setTickPosition(snd_seq_tick_time_t pos)
890 {
891  SystemEvent event(SND_SEQ_EVENT_SETPOS_TICK);
892  snd_seq_ev_set_queue_pos_tick(event.getHandle(), m_Id, pos);
893  event.setDirect();
894  m_MidiClient->outputDirect(&event);
895 }
896 
901 void MidiQueue::setRealTimePosition(snd_seq_real_time_t* pos)
902 {
903  SystemEvent event(SND_SEQ_EVENT_SETPOS_TIME);
904  snd_seq_ev_set_queue_pos_real(event.getHandle(), m_Id, pos);
905  event.setDirect();
906  m_MidiClient->outputDirect(&event);
907 }
908 
909 } /* namespace drumstick */
drumstick::QueueInfo::isLocked
bool isLocked()
Returns the locking status of the queue.
Definition: alsaqueue.cpp:143
drumstick::QueueTempo::getPPQ
int getPPQ()
Gets the PPQ (parts per quarter note) resolution of the queue.
Definition: alsaqueue.cpp:401
drumstick::QueueInfo
Queue information container.
Definition: alsaqueue.h:46
QObject
CHECK_WARNING
#define CHECK_WARNING(x)
This macro calls the check warning function.
Definition: drumstickcommon.h:145
drumstick::QueueStatus::getStatusBits
unsigned int getStatusBits()
Gets the running status bits.
Definition: alsaqueue.cpp:290
drumstick::MidiQueue::getTimer
QueueTimer & getTimer()
Gets a QueueTimer object reference.
Definition: alsaqueue.cpp:785
drumstick::QueueInfo::clone
QueueInfo * clone()
Copy the current object and return the copy.
Definition: alsaqueue.cpp:96
drumstick::QueueTimer::getInfoSize
int getInfoSize() const
Gets the size of the ALSA queue timer object.
Definition: alsaqueue.cpp:677
drumstick::QueueTempo::setTempoFactor
void setTempoFactor(float value)
Sets the queue's tempo skew factor.
Definition: alsaqueue.cpp:505
drumstick::QueueStatus::getEvents
int getEvents()
Gets the number of queued events.
Definition: alsaqueue.cpp:272
drumstick::MidiQueue::setInfo
void setInfo(const QueueInfo &value)
Applies a QueueInfo object to the queue.
Definition: alsaqueue.cpp:795
drumstick::QueueInfo::setOwner
void setOwner(int value)
Sets the client ID of the owner.
Definition: alsaqueue.cpp:170
drumstick::MidiQueue::setTempo
void setTempo(const QueueTempo &value)
Applies a QueueTempo object to the queue.
Definition: alsaqueue.cpp:805
drumstick::QueueStatus::QueueStatus
QueueStatus()
Default constructor.
Definition: alsaqueue.cpp:206
drumstick::MidiClient::getHandle
snd_seq_t * getHandle()
Returns the sequencer handler managed by ALSA.
Definition: alsaclient.cpp:285
drumstick::QueueStatus::getClockTime
double getClockTime()
Gets the clock time in seconds of the queue.
Definition: alsaqueue.cpp:326
drumstick::QueueStatus::getId
int getId()
Gets the queue's numeric identifier.
Definition: alsaqueue.cpp:263
drumstick::QueueTempo::getNominalBPM
float getNominalBPM()
Gets the queue's nominal BPM tempo (in beats per minute)
Definition: alsaqueue.cpp:482
alsaevent.h
drumstick::QueueInfo::getName
QString getName()
Gets the queue name.
Definition: alsaqueue.cpp:125
drumstick::MidiQueue::setRealTimePosition
void setRealTimePosition(snd_seq_real_time_t *pos)
Sets the queue position in real time (clock) units: seconds and nanoseconds.
Definition: alsaqueue.cpp:901
drumstick::QueueStatus::~QueueStatus
virtual ~QueueStatus()
Destructor.
Definition: alsaqueue.cpp:234
drumstick::QueueTempo::getSkewValue
unsigned int getSkewValue()
Gets the tempo skew numerator.
Definition: alsaqueue.cpp:412
drumstick::MidiQueue::stop
void stop()
Stop the queue.
Definition: alsaqueue.cpp:857
drumstick::QueueTempo
Queue tempo container.
Definition: alsaqueue.h:116
drumstick::QueueTempo::setNominalBPM
void setNominalBPM(float value)
Sets the queue's nominal tempo in BPM (beats per minute).
Definition: alsaqueue.cpp:515
drumstick::MidiQueue::MidiQueue
MidiQueue(MidiClient *seq, QObject *parent=0)
Constructor.
Definition: alsaqueue.cpp:687
drumstick::QueueStatus::isRunning
bool isRunning()
Gets the queue's running state.
Definition: alsaqueue.cpp:317
drumstick::QueueTempo::QueueTempo
QueueTempo()
Default constructor.
Definition: alsaqueue.cpp:335
drumstick::SystemEvent
Generic event.
Definition: alsaevent.h:437
SKEW_BASE
#define SKEW_BASE
This is the value for the base skew used in ALSA.
Definition: alsaqueue.h:36
drumstick::MidiClient
Client management.
Definition: alsaclient.h:197
drumstick::QueueTimer::clone
QueueTimer * clone()
Copy the current object and return the copy.
Definition: alsaqueue.cpp:569
drumstick::QueueTimer::~QueueTimer
virtual ~QueueTimer()
Destructor.
Definition: alsaqueue.cpp:560
drumstick::QueueTimer::setId
void setId(snd_timer_id_t *value)
Sets the timer identifier record.
Definition: alsaqueue.cpp:649
alsaqueue.h
drumstick::QueueInfo::getId
int getId()
Gets the queue's numeric identifier.
Definition: alsaqueue.cpp:116
drumstick::MidiQueue::getStatus
QueueStatus & getStatus()
Gets a QueueStatus object reference.
Definition: alsaqueue.cpp:765
drumstick::QueueTimer::getId
const snd_timer_id_t * getId()
Gets the timer identifier record.
Definition: alsaqueue.cpp:615
drumstick::QueueTempo::operator=
QueueTempo & operator=(const QueueTempo &other)
Assignment operator.
Definition: alsaqueue.cpp:382
drumstick::TimerId
ALSA Timer identifier container.
Definition: alsatimer.h:78
drumstick::QueueInfo::operator=
QueueInfo & operator=(const QueueInfo &other)
Assignment operator.
Definition: alsaqueue.cpp:106
drumstick::QueueTempo::getTempo
unsigned int getTempo()
Gets the queue's tempo in microseconds per beat.
Definition: alsaqueue.cpp:432
drumstick::QueueTempo::setSkewValue
void setSkewValue(unsigned int value)
Sets the tempo skew numerator.
Definition: alsaqueue.cpp:452
drumstick::MidiQueue::getTempo
QueueTempo & getTempo()
Gets a QueueTempo object reference.
Definition: alsaqueue.cpp:775
drumstick::QueueInfo::QueueInfo
QueueInfo()
Default constructor.
Definition: alsaqueue.cpp:59
drumstick::QueueTimer::getResolution
unsigned int getResolution()
Gets the timer resolution.
Definition: alsaqueue.cpp:624
drumstick::MidiQueue::setUsage
void setUsage(int used)
Sets the queue usage flag.
Definition: alsaqueue.cpp:836
drumstick::QueueInfo::setName
void setName(QString value)
Sets the queue name.
Definition: alsaqueue.cpp:161
drumstick::QueueInfo::getFlags
unsigned int getFlags()
Gets the flags of the queue.
Definition: alsaqueue.cpp:152
drumstick::QueueTempo::setSkewBase
void setSkewBase(unsigned int value)
Sets the tempo skew base.
Definition: alsaqueue.cpp:464
drumstick::QueueTimer::operator=
QueueTimer & operator=(const QueueTimer &other)
Assignment operator.
Definition: alsaqueue.cpp:579
drumstick::QueueTimer::setType
void setType(snd_seq_queue_timer_type_t value)
Sets the timer type.
Definition: alsaqueue.cpp:640
drumstick::QueueTempo::getSkewBase
unsigned int getSkewBase()
Gets the tempo skew base.
Definition: alsaqueue.cpp:423
drumstick::QueueTimer::QueueTimer
QueueTimer()
Default constructor.
Definition: alsaqueue.cpp:532
drumstick::QueueTempo::setTempo
void setTempo(unsigned int value)
Sets the queue tempo in microseconds per beat.
Definition: alsaqueue.cpp:473
drumstick::QueueStatus::clone
QueueStatus * clone()
Copy the current object and return the copy.
Definition: alsaqueue.cpp:243
CHECK_ERROR
#define CHECK_ERROR(x)
This macro calls the check error function.
Definition: drumstickcommon.h:139
drumstick::QueueTimer::getType
snd_seq_queue_timer_type_t getType()
Gets the timer type.
Definition: alsaqueue.cpp:606
drumstick::MidiQueue::setTimer
void setTimer(const QueueTimer &value)
Applies q QueueTimer object to the queue.
Definition: alsaqueue.cpp:815
drumstick::QueueTempo::clone
QueueTempo * clone()
Copy the current object returning the copied object.
Definition: alsaqueue.cpp:372
drumstick::QueueTimer
Queue timer container.
Definition: alsaqueue.h:156
drumstick::QueueInfo::getOwner
int getOwner()
Gets the owner's client id of the queue.
Definition: alsaqueue.cpp:134
drumstick::QueueStatus::getRealtime
const snd_seq_real_time_t * getRealtime()
Gets the real time (secods and nanoseconds) of the queue.
Definition: alsaqueue.cpp:281
drumstick::QueueStatus::getInfoSize
int getInfoSize() const
Gets the size of the ALSA status object.
Definition: alsaqueue.cpp:308
drumstick::MidiQueue::setTickPosition
void setTickPosition(snd_seq_tick_time_t pos)
Sets the queue position in musical time (ticks).
Definition: alsaqueue.cpp:889
alsaclient.h
drumstick::QueueTimer::getQueueId
int getQueueId()
The queue's numeric identifier.
Definition: alsaqueue.cpp:589
drumstick::QueueStatus
Queue status container.
Definition: alsaqueue.h:79
drumstick::SequencerEvent::getHandle
snd_seq_event_t * getHandle()
Gets the handle of the event.
Definition: alsaevent.h:122
drumstick::QueueTimer::setResolution
void setResolution(unsigned int value)
Sets the timer resolution.
Definition: alsaqueue.cpp:668
drumstick::QueueInfo::setFlags
void setFlags(unsigned int value)
Sets the bit flags of the queue.
Definition: alsaqueue.cpp:179
drumstick::MidiQueue::continueRunning
void continueRunning()
Start the queue without resetting the last position.
Definition: alsaqueue.cpp:870
drumstick::MidiQueue::~MidiQueue
virtual ~MidiQueue()
Destructor.
Definition: alsaqueue.cpp:743
drumstick::QueueInfo::~QueueInfo
virtual ~QueueInfo()
Destructor.
Definition: alsaqueue.cpp:87
drumstick::QueueInfo::setLocked
void setLocked(bool locked)
Sets the locked status of the queue.
Definition: alsaqueue.cpp:188
alsatimer.h
drumstick::QueueTempo::~QueueTempo
virtual ~QueueTempo()
Destructor.
Definition: alsaqueue.cpp:363
drumstick::QueueTempo::getId
int getId()
Gets the queue's numeric identifier.
Definition: alsaqueue.cpp:392
drumstick::MidiQueue::getUsage
int getUsage()
Gets the queue usage flag.
Definition: alsaqueue.cpp:826
drumstick::MidiQueue::start
void start()
Start the queue.
Definition: alsaqueue.cpp:846
drumstick::QueueStatus::operator=
QueueStatus & operator=(const QueueStatus &other)
Assignment operator.
Definition: alsaqueue.cpp:253
drumstick::MidiQueue::getInfo
QueueInfo & getInfo()
Gets a QueueInfo object reference.
Definition: alsaqueue.cpp:755
drumstick::MidiClient::outputDirect
void outputDirect(SequencerEvent *ev, bool async=false, int timeout=-1)
Output an event directly to the sequencer.
Definition: alsaclient.cpp:1016
drumstick::QueueTempo::getRealBPM
float getRealBPM()
Gets the queue's real BPM tempo in beats per minute.
Definition: alsaqueue.cpp:495
drumstick::QueueStatus::getTickTime
snd_seq_tick_time_t getTickTime()
Gets the musical time (ticks) of the queue.
Definition: alsaqueue.cpp:299
drumstick::QueueTempo::getInfoSize
int getInfoSize() const
Gets the size of the ALSA queue tempo object.
Definition: alsaqueue.cpp:524
drumstick::QueueInfo::getInfoSize
int getInfoSize() const
Gets the size of the ALSA queue info object.
Definition: alsaqueue.cpp:197
drumstick::MidiQueue::clear
void clear()
Clear the queue, dropping any scheduled events.
Definition: alsaqueue.cpp:879
drumstick::QueueTempo::setPPQ
void setPPQ(int value)
Sets the queue resolution in parts per quarter note.
Definition: alsaqueue.cpp:441