61 snd_seq_queue_info_malloc(&m_Info);
70 snd_seq_queue_info_malloc(&m_Info);
71 snd_seq_queue_info_copy(m_Info, other);
80 snd_seq_queue_info_malloc(&m_Info);
81 snd_seq_queue_info_copy(m_Info, other.m_Info);
89 snd_seq_queue_info_free(m_Info);
108 snd_seq_queue_info_copy(m_Info, other.m_Info);
118 return snd_seq_queue_info_get_queue(m_Info);
127 return QString(snd_seq_queue_info_get_name(m_Info));
136 return snd_seq_queue_info_get_owner(m_Info);
145 return (snd_seq_queue_info_get_locked(m_Info) != 0);
154 return snd_seq_queue_info_get_flags(m_Info);
163 snd_seq_queue_info_set_name(m_Info, value.toLocal8Bit().data());
172 snd_seq_queue_info_set_owner(m_Info, value);
181 snd_seq_queue_info_set_flags(m_Info, value);
190 snd_seq_queue_info_set_locked(m_Info, locked ? 1 : 0);
199 return snd_seq_queue_info_sizeof();
208 snd_seq_queue_status_malloc(&m_Info);
217 snd_seq_queue_status_malloc(&m_Info);
218 snd_seq_queue_status_copy(m_Info, other);
227 snd_seq_queue_status_malloc(&m_Info);
228 snd_seq_queue_status_copy(m_Info, other.m_Info);
236 snd_seq_queue_status_free(m_Info);
255 snd_seq_queue_status_copy(m_Info, other.m_Info);
265 return snd_seq_queue_status_get_queue(m_Info);
274 return snd_seq_queue_status_get_events(m_Info);
283 return snd_seq_queue_status_get_real_time(m_Info);
292 return snd_seq_queue_status_get_status(m_Info);
301 return snd_seq_queue_status_get_tick_time(m_Info);
310 return snd_seq_queue_status_sizeof();
319 return (snd_seq_queue_status_get_status(m_Info) != 0);
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);
337 snd_seq_queue_tempo_malloc(&m_Info);
346 snd_seq_queue_tempo_malloc(&m_Info);
347 snd_seq_queue_tempo_copy(m_Info, other);
356 snd_seq_queue_tempo_malloc(&m_Info);
357 snd_seq_queue_tempo_copy(m_Info, other.m_Info);
365 snd_seq_queue_tempo_free(m_Info);
384 snd_seq_queue_tempo_copy(m_Info, other.m_Info);
394 return snd_seq_queue_tempo_get_queue(m_Info);
403 return snd_seq_queue_tempo_get_ppq(m_Info);
414 return snd_seq_queue_tempo_get_skew(m_Info);
425 return snd_seq_queue_tempo_get_skew_base(m_Info);
434 return snd_seq_queue_tempo_get_tempo(m_Info);
443 snd_seq_queue_tempo_set_ppq(m_Info, value);
454 snd_seq_queue_tempo_set_skew(m_Info, value);
466 snd_seq_queue_tempo_set_skew_base(m_Info, value);
475 snd_seq_queue_tempo_set_tempo(m_Info, value);
486 return 6.0e7f / itempo;
526 return snd_seq_queue_tempo_sizeof();
534 snd_seq_queue_timer_malloc(&m_Info);
543 snd_seq_queue_timer_malloc(&m_Info);
544 snd_seq_queue_timer_copy(m_Info, other);
553 snd_seq_queue_timer_malloc(&m_Info);
554 snd_seq_queue_timer_copy(m_Info, other.m_Info);
562 snd_seq_queue_timer_free(m_Info);
581 snd_seq_queue_timer_copy(m_Info, other.m_Info);
591 return snd_seq_queue_timer_get_queue(m_Info);
608 return snd_seq_queue_timer_get_type(m_Info);
617 return snd_seq_queue_timer_get_id(m_Info);
626 return snd_seq_queue_timer_get_resolution(m_Info);
642 snd_seq_queue_timer_set_type(m_Info, value);
651 snd_seq_queue_timer_set_id(m_Info, value);
670 snd_seq_queue_timer_set_resolution(m_Info, value);
679 return snd_seq_queue_timer_sizeof();
692 m_allocated = !(m_Id < 0);
707 m_allocated = !(m_Id < 0);
720 m_Id =
CHECK_ERROR(snd_seq_alloc_named_queue(m_MidiClient->
getHandle(), name.toLocal8Bit().data()));
721 m_allocated = !(m_Id < 0);
745 if ( m_allocated && (m_MidiClient->
getHandle() != NULL) )
859 if (m_MidiClient != NULL && m_MidiClient->
getHandle() != NULL) {
881 if (m_MidiClient != NULL && m_MidiClient->
getHandle() != NULL)
882 snd_seq_drop_output(m_MidiClient->
getHandle());
892 snd_seq_ev_set_queue_pos_tick(event.
getHandle(), m_Id, pos);
904 snd_seq_ev_set_queue_pos_real(event.
getHandle(), m_Id, pos);
void setTimer(const QueueTimer &value)
Applies q QueueTimer object to the queue.
snd_seq_event_t * getHandle()
Gets the handle of the event.
virtual ~QueueTempo()
Destructor.
void setPPQ(int value)
Sets the queue resolution in parts per quarter note.
void setTickPosition(snd_seq_tick_time_t pos)
Sets the queue position in musical time (ticks).
virtual ~QueueStatus()
Destructor.
int getInfoSize() const
Gets the size of the ALSA queue timer object.
#define SKEW_BASE
This is the value for the base skew used in ALSA.
Classes managing ALSA Sequencer clients.
void continueRunning()
Start the queue without resetting the last position.
void setLocked(bool locked)
Sets the locked status of the queue.
float getRealBPM()
Gets the queue's real BPM tempo in beats per minute.
void setTempo(const QueueTempo &value)
Applies a QueueTempo object to the queue.
void clear()
Clear the queue, dropping any scheduled events.
int getId()
Gets the queue's numeric identifier.
bool isRunning()
Gets the queue's running state.
QueueInfo()
Default constructor.
void setFlags(unsigned int value)
Sets the bit flags of the queue.
void start()
Start the queue.
void setNominalBPM(float value)
Sets the queue's nominal tempo in BPM (beats per minute).
void setTempoFactor(float value)
Sets the queue's tempo skew factor.
int getPPQ()
Gets the PPQ (parts per quarter note) resolution of the queue.
snd_seq_tick_time_t getTickTime()
Gets the musical time (ticks) of the queue.
void stop()
Stop the queue.
unsigned int getStatusBits()
Gets the running status bits.
snd_seq_t * getHandle()
Returns the sequencer handler managed by ALSA.
void setRealTimePosition(snd_seq_real_time_t *pos)
Sets the queue position in real time (clock) units: seconds and nanoseconds.
int getUsage()
Gets the queue usage flag.
void setName(QString value)
Sets the queue name.
float getNominalBPM()
Gets the queue's nominal BPM tempo (in beats per minute)
QueueStatus & getStatus()
Gets a QueueStatus object reference.
The QObject class is the base class of all Qt objects.
QueueTimer & getTimer()
Gets a QueueTimer object reference.
Classes managing ALSA Timers.
double getClockTime()
Gets the clock time in seconds of the queue.
int getOwner()
Gets the owner's client id of the queue.
int getEvents()
Gets the number of queued events.
MidiQueue(MidiClient *seq, QObject *parent=0)
Constructor.
QueueTempo()
Default constructor.
unsigned int getSkewValue()
Gets the tempo skew numerator.
QueueTempo & operator=(const QueueTempo &other)
Assignment operator.
QueueTempo & getTempo()
Gets a QueueTempo object reference.
void setSkewBase(unsigned int value)
Sets the tempo skew base.
unsigned int getTempo()
Gets the queue's tempo in microseconds per beat.
void setSkewValue(unsigned int value)
Sets the tempo skew numerator.
QueueTimer * clone()
Copy the current object and return the copy.
void setType(snd_seq_queue_timer_type_t value)
Sets the timer type.
void setOwner(int value)
Sets the client ID of the owner.
QueueTempo * clone()
Copy the current object returning the copied object.
QString getName()
Gets the queue name.
virtual ~QueueTimer()
Destructor.
void setId(snd_timer_id_t *value)
Sets the timer identifier record.
unsigned int getResolution()
Gets the timer resolution.
const snd_timer_id_t * getId()
Gets the timer identifier record.
QueueTimer & operator=(const QueueTimer &other)
Assignment operator.
virtual ~QueueInfo()
Destructor.
Queue information container.
void setResolution(unsigned int value)
Sets the timer resolution.
QueueTimer()
Default constructor.
int getQueueId()
The queue's numeric identifier.
QueueInfo & operator=(const QueueInfo &other)
Assignment operator.
int getInfoSize() const
Gets the size of the ALSA queue info object.
unsigned int getSkewBase()
Gets the tempo skew base.
virtual ~MidiQueue()
Destructor.
QueueInfo * clone()
Copy the current object and return the copy.
bool isLocked()
Returns the locking status of the queue.
QueueStatus & operator=(const QueueStatus &other)
Assignment operator.
void setTempo(unsigned int value)
Sets the queue tempo in microseconds per beat.
void outputDirect(SequencerEvent *ev, bool async=false, int timeout=-1)
Output an event directly to the sequencer.
snd_seq_queue_timer_type_t getType()
Gets the timer type.
QueueStatus * clone()
Copy the current object and return the copy.
int getInfoSize() const
Gets the size of the ALSA status object.
#define CHECK_ERROR(x)
This macro calls the check error function.
void setUsage(int used)
Sets the queue usage flag.
void setInfo(const QueueInfo &value)
Applies a QueueInfo object to the queue.
unsigned int getFlags()
Gets the flags of the queue.
#define CHECK_WARNING(x)
This macro calls the check warning function.
Classes managing ALSA Sequencer queues.
QueueInfo & getInfo()
Gets a QueueInfo object reference.
const snd_seq_real_time_t * getRealtime()
Gets the real time (secods and nanoseconds) of the queue.
Classes managing ALSA Sequencer events.
int getInfoSize() const
Gets the size of the ALSA queue tempo object.
int getId()
Gets the queue's numeric identifier.
QueueStatus()
Default constructor.
ALSA Timer identifier container.
int getId()
Gets the queue's numeric identifier.