Fix inadvertent "TQ" changes.

pull/1/head
Darrell Anderson 12 years ago
parent 83a1c06d55
commit 4a9d4beee6

@ -115,7 +115,7 @@ const PropertyName TRIGGER_SEGMENT_RETUNE = "triggersegmentretune";
const PropertyName TRIGGER_SEGMENT_ADJUST_TIMES = "triggersegmentadjusttimes"; const PropertyName TRIGGER_SEGMENT_ADJUST_TIMES = "triggersegmentadjusttimes";
const std::string TRIGGER_SEGMENT_ADJUST_NONE = "none"; const std::string TRIGGER_SEGMENT_ADJUST_NONE = "none";
const std::string TRIGGER_SEGMENT_ADJUST_STQUISH = "squish"; const std::string TRIGGER_SEGMENT_ADJUST_SQUISH = "squish";
const std::string TRIGGER_SEGMENT_ADJUST_SYNC_START = "syncstart"; const std::string TRIGGER_SEGMENT_ADJUST_SYNC_START = "syncstart";
const std::string TRIGGER_SEGMENT_ADJUST_SYNC_END = "syncend"; const std::string TRIGGER_SEGMENT_ADJUST_SYNC_END = "syncend";

@ -62,7 +62,7 @@ extern const PropertyName TRIGGER_SEGMENT_RETUNE;
extern const PropertyName TRIGGER_SEGMENT_ADJUST_TIMES; extern const PropertyName TRIGGER_SEGMENT_ADJUST_TIMES;
extern const std::string TRIGGER_SEGMENT_ADJUST_NONE; extern const std::string TRIGGER_SEGMENT_ADJUST_NONE;
extern const std::string TRIGGER_SEGMENT_ADJUST_STQUISH; extern const std::string TRIGGER_SEGMENT_ADJUST_SQUISH;
extern const std::string TRIGGER_SEGMENT_ADJUST_SYNC_START; extern const std::string TRIGGER_SEGMENT_ADJUST_SYNC_START;
extern const std::string TRIGGER_SEGMENT_ADJUST_SYNC_END; extern const std::string TRIGGER_SEGMENT_ADJUST_SYNC_END;

@ -19,8 +19,8 @@
COPYING included with this distribution for more information. COPYING included with this distribution for more information.
*/ */
#ifndef BASIC_TQUANTIZER_H #ifndef BASIC_QUANTIZER_H
#define BASIC_TQUANTIZER_H #define BASIC_QUANTIZER_H
#include "Quantizer.h" #include "Quantizer.h"

@ -770,7 +770,7 @@ public:
////// //////
// //
// TQUANTIZERS // QUANTIZERS
/** /**
* Return a quantizer that quantizes to the our most basic * Return a quantizer that quantizes to the our most basic

@ -20,8 +20,8 @@
COPYING included with this distribution for more information. COPYING included with this distribution for more information.
*/ */
#ifndef _ETQUATION_H_ #ifndef _EQUATION_H_
#define _ETQUATION_H_ #define _EQUATION_H_
namespace Rosegarden { namespace Rosegarden {

@ -19,8 +19,8 @@
COPYING included with this distribution for more information. COPYING included with this distribution for more information.
*/ */
#ifndef LEGATO_TQUANTIZER_H #ifndef LEGATO_QUANTIZER_H
#define LEGATO_TQUANTIZER_H #define LEGATO_QUANTIZER_H
#include "Quantizer.h" #include "Quantizer.h"

@ -37,7 +37,7 @@ using std::cout;
using std::cerr; using std::cerr;
using std::endl; using std::endl;
//#define DEBUG_NOTATION_TQUANTIZER 1 //#define DEBUG_NOTATION_QUANTIZER 1
namespace Rosegarden { namespace Rosegarden {
@ -83,7 +83,7 @@ public:
} }
virtual timeT getQuantizedAbsoluteTime(const Event *e) const { virtual timeT getQuantizedAbsoluteTime(const Event *e) const {
timeT t = m_impl->getProvisional((Event *)e, AbsoluteTimeValue); timeT t = m_impl->getProvisional((Event *)e, AbsoluteTimeValue);
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
cout << "ProvisionalQuantizer::getQuantizedAbsoluteTime: returning " << t << endl; cout << "ProvisionalQuantizer::getQuantizedAbsoluteTime: returning " << t << endl;
#endif #endif
return t; return t;
@ -295,7 +295,7 @@ NotationQuantizer::Impl::quantizeAbsoluteTime(Segment *s, Segment::iterator i) c
long bestScore = 0; long bestScore = 0;
bool bestRight = false; bool bestRight = false;
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
cout << "quantizeAbsoluteTime: t is " << t << ", d is " << d << endl; cout << "quantizeAbsoluteTime: t is " << t << ", d is " << d << endl;
#endif #endif
@ -321,7 +321,7 @@ NotationQuantizer::Impl::quantizeAbsoluteTime(Segment *s, Segment::iterator i) c
} }
} }
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
if (n != s->end() && n != nprime) { if (n != s->end() && n != nprime) {
cout << "found n (distinct from nprime) at " << (*n)->getAbsoluteTime() << endl; cout << "found n (distinct from nprime) at " << (*n)->getAbsoluteTime() << endl;
} }
@ -340,7 +340,7 @@ NotationQuantizer::Impl::quantizeAbsoluteTime(Segment *s, Segment::iterator i) c
t, d, noteType, n, nprime, right); t, d, noteType, n, nprime, right);
if (depth == 0 || score < bestScore) { if (depth == 0 || score < bestScore) {
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
cout << " [*]"; cout << " [*]";
#endif #endif
bestBase = base; bestBase = base;
@ -348,13 +348,13 @@ NotationQuantizer::Impl::quantizeAbsoluteTime(Segment *s, Segment::iterator i) c
bestRight = right; bestRight = right;
} }
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
cout << endl; cout << endl;
#endif #endif
} }
if (bestBase == -2) { if (bestBase == -2) {
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
cout << "Quantizer::quantizeAbsoluteTime: weirdness: no snap found" << endl; cout << "Quantizer::quantizeAbsoluteTime: weirdness: no snap found" << endl;
#endif #endif
} else { } else {
@ -373,7 +373,7 @@ NotationQuantizer::Impl::quantizeAbsoluteTime(Segment *s, Segment::iterator i) c
t += sigTime; t += sigTime;
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
cout << "snap base is " << bestBase << ", snapped to " << t << endl; cout << "snap base is " << bestBase << ", snapped to " << t << endl;
#endif #endif
} }
@ -457,7 +457,7 @@ NotationQuantizer::Impl::scoreAbsoluteTimeForBase(Segment *s,
} }
} }
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
cout << " depth/eff/dist/t/score/pen1/pen2/res: " << depth << "/" << effectiveDepth << "/" << distance << "/" << (right ? t + distance : t - distance) << "/" << score << "/" << penalty1 << "/" << penalty2 << "/" << (score * penalty1 * penalty2); cout << " depth/eff/dist/t/score/pen1/pen2/res: " << depth << "/" << effectiveDepth << "/" << distance << "/" << (right ? t + distance : t - distance) << "/" << score << "/" << penalty1 << "/" << penalty2 << "/" << (score * penalty1 * penalty2);
if (right) cout << " -> "; if (right) cout << " -> ";
else cout << " <- "; else cout << " <- ";
@ -553,7 +553,7 @@ NotationQuantizer::Impl::quantizeDuration(Segment *s, Chord &c) const
Profiler profiler("NotationQuantizer::Impl::quantizeDuration"); Profiler profiler("NotationQuantizer::Impl::quantizeDuration");
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
cout << "quantizeDuration: chord has " << c.size() << " notes" << endl; cout << "quantizeDuration: chord has " << c.size() << " notes" << endl;
#endif #endif
@ -584,7 +584,7 @@ NotationQuantizer::Impl::quantizeDuration(Segment *s, Chord &c) const
if ((**ci)->has(m_provisionalDuration) && if ((**ci)->has(m_provisionalDuration) &&
(**ci)->has(BEAMED_GROUP_TUPLET_BASE)) { (**ci)->has(BEAMED_GROUP_TUPLET_BASE)) {
// dealt with already in tuplet code, we'd only mess it up here // dealt with already in tuplet code, we'd only mess it up here
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
cout << "not recalculating duration for tuplet" << endl; cout << "not recalculating duration for tuplet" << endl;
#endif #endif
continue; continue;
@ -595,7 +595,7 @@ NotationQuantizer::Impl::quantizeDuration(Segment *s, Chord &c) const
if (!m_contrapuntal) { if (!m_contrapuntal) {
// if not contrapuntal, give all notes in chord equal duration // if not contrapuntal, give all notes in chord equal duration
if (nonContrapuntalDuration > 0) { if (nonContrapuntalDuration > 0) {
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
cout << "setting duration trivially to " << nonContrapuntalDuration << endl; cout << "setting duration trivially to " << nonContrapuntalDuration << endl;
#endif #endif
setProvisional(**ci, DurationValue, nonContrapuntalDuration); setProvisional(**ci, DurationValue, nonContrapuntalDuration);
@ -613,7 +613,7 @@ NotationQuantizer::Impl::quantizeDuration(Segment *s, Chord &c) const
timeT qt = getProvisional(**ci, AbsoluteTimeValue); timeT qt = getProvisional(**ci, AbsoluteTimeValue);
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
cout << "note at time " << (**ci)->getAbsoluteTime() << " (provisional time " << qt << ")" << endl; cout << "note at time " << (**ci)->getAbsoluteTime() << " (provisional time " << qt << ")" << endl;
#endif #endif
@ -626,7 +626,7 @@ NotationQuantizer::Impl::quantizeDuration(Segment *s, Chord &c) const
base /= divisions[depth]; base /= divisions[depth];
} }
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
cout << "duration is " << ud << ", probably between " cout << "duration is " << ud << ", probably between "
<< bases.first << " and " << bases.second << endl; << bases.first << " and " << bases.second << endl;
#endif #endif
@ -645,7 +645,7 @@ NotationQuantizer::Impl::quantizeDuration(Segment *s, Chord &c) const
qd = Note::getNearestNote(spaceAvailable).getDuration(); qd = Note::getNearestNote(spaceAvailable).getDuration();
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
cout << "non-contrapuntal segment, rounded duration down to " cout << "non-contrapuntal segment, rounded duration down to "
<< qd << " (as only " << spaceAvailable << " available)" << qd << " (as only " << spaceAvailable << " available)"
<< endl; << endl;
@ -675,7 +675,7 @@ NotationQuantizer::Impl::quantizeDuration(Segment *s, Chord &c) const
bases.second == absTimeBase) { bases.second == absTimeBase) {
if (nextNoteTime >= qt + bases.second) { if (nextNoteTime >= qt + bases.second) {
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
cout << "We rounded to " << qd cout << "We rounded to " << qd
<< " but we're on " << absTimeBase << " absTimeBase" << " but we're on " << absTimeBase << " absTimeBase"
<< " and the next base is " << bases.second << " and the next base is " << bases.second
@ -699,14 +699,14 @@ NotationQuantizer::Impl::quantizeDuration(Segment *s, Chord &c) const
if (note.getNoteType() < Note::Longest) { if (note.getNoteType() < Note::Longest) {
if (bases.second <= spaceAvailable) { if (bases.second <= spaceAvailable) {
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
cout << "We rounded down to " << qd cout << "We rounded down to " << qd
<< " but have room for " << bases.second << " but have room for " << bases.second
<< ", rounding up again" << endl; << ", rounding up again" << endl;
#endif #endif
qd = bases.second; qd = bases.second;
} else { } else {
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
cout << "We rounded down to " << qd cout << "We rounded down to " << qd
<< "; can't fit " << bases.second << endl; << "; can't fit " << bases.second << endl;
#endif #endif
@ -720,7 +720,7 @@ NotationQuantizer::Impl::quantizeDuration(Segment *s, Chord &c) const
if (!m_contrapuntal) nonContrapuntalDuration = qd; if (!m_contrapuntal) nonContrapuntalDuration = qd;
} }
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
cout << "totalFrac " << totalFrac << ", totalFracCount " << totalFracCount << ", avg " << (totalFracCount > 0 ? (totalFrac / totalFracCount) : 0) << endl; cout << "totalFrac " << totalFrac << ", totalFracCount " << totalFracCount << ", avg " << (totalFracCount > 0 ? (totalFrac / totalFracCount) : 0) << endl;
#endif #endif
} }
@ -746,7 +746,7 @@ NotationQuantizer::Impl::scanTupletsInBar(Segment *s,
if (depth >= 0) base /= divisions[depth]; if (depth >= 0) base /= divisions[depth];
if (base <= Note(Note::Semiquaver).getDuration()) break; if (base <= Note(Note::Semiquaver).getDuration()) break;
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
cout << "\nscanTupletsInBar: trying at depth " << depth << " (base " << base << ")" << endl; cout << "\nscanTupletsInBar: trying at depth " << depth << " (base " << base << ")" << endl;
#endif #endif
@ -766,7 +766,7 @@ NotationQuantizer::Impl::scanTupletsInBar(Segment *s,
continue; continue;
} }
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
cout << "scanTupletsInBar: testing " << tupletStart << "," << base << " at tuplet base " << tupletBase << endl; cout << "scanTupletsInBar: testing " << tupletStart << "," << base << " at tuplet base " << tupletBase << endl;
#endif #endif
@ -786,7 +786,7 @@ NotationQuantizer::Impl::scanTupletsInBar(Segment *s,
} }
if (jTime >= tupletEnd) { // nothing to make tuplets of if (jTime >= tupletEnd) { // nothing to make tuplets of
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
cout << "scanTupletsInBar: nothing here" << endl; cout << "scanTupletsInBar: nothing here" << endl;
#endif #endif
tupletStart = tupletEnd; tupletStart = tupletEnd;
@ -827,14 +827,14 @@ NotationQuantizer::Impl::scanTupletsAt(Segment *s,
if (!(*j)->isa(Note::EventType)) { ++j; continue; } if (!(*j)->isa(Note::EventType)) { ++j; continue; }
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
cout << "scanTupletsAt time " << jTime << " (unquantized " cout << "scanTupletsAt time " << jTime << " (unquantized "
<< (*j)->getAbsoluteTime() << "), found note" << endl; << (*j)->getAbsoluteTime() << "), found note" << endl;
#endif #endif
// reject any group containing anything already a tuplet // reject any group containing anything already a tuplet
if ((*j)->has(BEAMED_GROUP_TUPLET_BASE)) { if ((*j)->has(BEAMED_GROUP_TUPLET_BASE)) {
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
cout << "already made tuplet here" << endl; cout << "already made tuplet here" << endl;
#endif #endif
return; return;
@ -843,19 +843,19 @@ NotationQuantizer::Impl::scanTupletsAt(Segment *s,
timeT originalBase; timeT originalBase;
if (!(*j)->get<Int>(m_provisionalBase, originalBase)) { if (!(*j)->get<Int>(m_provisionalBase, originalBase)) {
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
cout << "some notes not provisionally quantized, no good" << endl; cout << "some notes not provisionally quantized, no good" << endl;
#endif #endif
return; return;
} }
if (originalBase == base) { if (originalBase == base) {
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
cout << "accepting note at original base" << endl; cout << "accepting note at original base" << endl;
#endif #endif
candidates.push_back(*j); candidates.push_back(*j);
} else if (((jTime - sigTime) % base) == 0) { } else if (((jTime - sigTime) % base) == 0) {
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
cout << "accepting note that happens to lie on original base" << endl; cout << "accepting note that happens to lie on original base" << endl;
#endif #endif
candidates.push_back(*j); candidates.push_back(*j);
@ -867,7 +867,7 @@ NotationQuantizer::Impl::scanTupletsAt(Segment *s,
// any of the likelihood tests for tuplets. // any of the likelihood tests for tuplets.
if (!isValidTupletAt(s, j, depth, base, sigTime, tupletBase)) { if (!isValidTupletAt(s, j, depth, base, sigTime, tupletBase)) {
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
cout << "no good" << endl; cout << "no good" << endl;
#endif #endif
return; return;
@ -883,13 +883,13 @@ NotationQuantizer::Impl::scanTupletsAt(Segment *s,
// must have at least one note that is not already quantized to the // must have at least one note that is not already quantized to the
// original base // original base
if (count < 1) { if (count < 1) {
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
cout << "scanTupletsAt: found no note not already quantized to " << base << endl; cout << "scanTupletsAt: found no note not already quantized to " << base << endl;
#endif #endif
return; return;
} }
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
cout << "scanTupletsAt: Tuplet group of duration " << base << " starting at " << tupletStart << endl; cout << "scanTupletsAt: Tuplet group of duration " << base << " starting at " << tupletStart << endl;
#endif #endif
@ -970,7 +970,7 @@ NotationQuantizer::Impl::isValidTupletAt(Segment *s,
timeT ud = m_q->getFromSource(*i, DurationValue); timeT ud = m_q->getFromSource(*i, DurationValue);
if (ud > (tupletBase * 5 / 4)) { if (ud > (tupletBase * 5 / 4)) {
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
cout << "\nNotationQuantizer::isValidTupletAt: note too long at " cout << "\nNotationQuantizer::isValidTupletAt: note too long at "
<< (*i)->getDuration() << " (tupletBase is " << tupletBase << ")" << (*i)->getDuration() << " (tupletBase is " << tupletBase << ")"
<< endl; << endl;
@ -981,7 +981,7 @@ NotationQuantizer::Impl::isValidTupletAt(Segment *s,
//!!! This bit is a cop-out. It means we reject anything that looks //!!! This bit is a cop-out. It means we reject anything that looks
// like it's going to have rests in it. Bah. // like it's going to have rests in it. Bah.
if (ud <= (tupletBase * 3 / 8)) { if (ud <= (tupletBase * 3 / 8)) {
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
cout << "\nNotationQuantizer::isValidTupletAt: note too short at " cout << "\nNotationQuantizer::isValidTupletAt: note too short at "
<< (*i)->getDuration() << " (tupletBase is " << tupletBase << ")" << (*i)->getDuration() << " (tupletBase is " << tupletBase << ")"
<< endl; << endl;
@ -1000,7 +1000,7 @@ NotationQuantizer::Impl::isValidTupletAt(Segment *s,
bool dummy; bool dummy;
long tupletScore = scoreAbsoluteTimeForBase long tupletScore = scoreAbsoluteTimeForBase
(s, i, depth, tupletBase, sigTime, t, d, noteType, s->end(), s->end(), dummy); (s, i, depth, tupletBase, sigTime, t, d, noteType, s->end(), s->end(), dummy);
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
cout << "\nNotationQuantizer::isValidTupletAt: score " << score cout << "\nNotationQuantizer::isValidTupletAt: score " << score
<< " vs tupletScore " << tupletScore << endl; << " vs tupletScore " << tupletScore << endl;
#endif #endif
@ -1027,7 +1027,7 @@ NotationQuantizer::Impl::quantizeRange(Segment *s,
int events = 0, notes = 0, passes = 0; int events = 0, notes = 0, passes = 0;
int setGood = 0, setBad = 0; int setGood = 0, setBad = 0;
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
cout << "NotationQuantizer::Impl::quantizeRange: from time " cout << "NotationQuantizer::Impl::quantizeRange: from time "
<< (from == s->end() ? -1 : (*from)->getAbsoluteTime()) << (from == s->end() ? -1 : (*from)->getAbsoluteTime())
<< " to " << " to "
@ -1177,7 +1177,7 @@ NotationQuantizer::Impl::quantizeRange(Segment *s,
(*i)->getDuration() == d) ++setBad; (*i)->getDuration() == d) ++setBad;
else ++setGood; else ++setGood;
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
cout << "Setting to target at " << t << "," << d << endl; cout << "Setting to target at " << t << "," << d << endl;
#endif #endif

@ -19,8 +19,8 @@
COPYING included with this distribution for more information. COPYING included with this distribution for more information.
*/ */
#ifndef NOTATION_TQUANTIZER_H_ #ifndef NOTATION_QUANTIZER_H_
#define NOTATION_TQUANTIZER_H_ #define NOTATION_QUANTIZER_H_
#include "Quantizer.h" #include "Quantizer.h"

@ -37,7 +37,7 @@ using std::cout;
using std::cerr; using std::cerr;
using std::endl; using std::endl;
//#define DEBUG_NOTATION_TQUANTIZER 1 //#define DEBUG_NOTATION_QUANTIZER 1
namespace Rosegarden { namespace Rosegarden {
@ -366,7 +366,7 @@ Quantizer::setToTarget(Segment *s, Segment::iterator i,
// that are already being referred to in ViewElementLists, // that are already being referred to in ViewElementLists,
// preventing us from locating them in the ViewElementLists // preventing us from locating them in the ViewElementLists
// because their ordering would have silently changed // because their ordering would have silently changed
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
cout << "Quantizer: setting " << absTime << " to notation absolute time and " cout << "Quantizer: setting " << absTime << " to notation absolute time and "
<< duration << " to notation duration" << duration << " to notation duration"
<< endl; << endl;
@ -404,7 +404,7 @@ Quantizer::setToTarget(Segment *s, Segment::iterator i,
m_toInsert.push_back(e); m_toInsert.push_back(e);
} }
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
cout << "m_toInsert.size() is now " << m_toInsert.size() << endl; cout << "m_toInsert.size() is now " << m_toInsert.size() << endl;
#endif #endif
} }
@ -464,7 +464,7 @@ Quantizer::insertNewEvents(Segment *s) const
s->insert(m_toInsert[i]); s->insert(m_toInsert[i]);
} }
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
cout << "Quantizer::insertNewEvents: sz is " << sz cout << "Quantizer::insertNewEvents: sz is " << sz
<< ", minTime " << minTime << ", maxTime " << maxTime << ", minTime " << minTime << ", maxTime " << maxTime
<< endl; << endl;
@ -482,7 +482,7 @@ Quantizer::insertNewEvents(Segment *s) const
} }
} }
#ifdef DEBUG_NOTATION_TQUANTIZER #ifdef DEBUG_NOTATION_QUANTIZER
cout << "Quantizer: calling normalizeRests(" cout << "Quantizer: calling normalizeRests("
<< minTime << ", " << maxTime << ")" << endl; << minTime << ", " << maxTime << ")" << endl;
#endif #endif

@ -19,8 +19,8 @@
COPYING included with this distribution for more information. COPYING included with this distribution for more information.
*/ */
#ifndef TQUANTIZER_H #ifndef QUANTIZER_H
#define TQUANTIZER_H #define QUANTIZER_H
#include "Segment.h" #include "Segment.h"
#include "Event.h" #include "Event.h"

@ -283,7 +283,7 @@ public:
////// //////
// //
// TQUANTIZATION // QUANTIZATION
/** /**
* Switch quantization on or off. * Switch quantization on or off.

@ -47,7 +47,7 @@ TriggerSegmentRec::TriggerSegmentRec(TriggerSegmentId id,
m_defaultRetune(retune) m_defaultRetune(retune)
{ {
if (m_defaultTimeAdjust == "") { if (m_defaultTimeAdjust == "") {
m_defaultTimeAdjust = BaseProperties::TRIGGER_SEGMENT_ADJUST_STQUISH; m_defaultTimeAdjust = BaseProperties::TRIGGER_SEGMENT_ADJUST_SQUISH;
} }
calculateBases(); calculateBases();

@ -23,8 +23,8 @@
COPYING included with this distribution for more information. COPYING included with this distribution for more information.
*/ */
#ifndef _RG_EVENTQUANTIZECOMMAND_H_ #ifndef _RG_EVENQUANTIZECOMMAND_H_
#define _RG_EVENTQUANTIZECOMMAND_H_ #define _RG_EVENQUANTIZECOMMAND_H_
#include "document/BasicCommand.h" #include "document/BasicCommand.h"
#include <tqobject.h> #include <tqobject.h>

@ -23,8 +23,8 @@
COPYING included with this distribution for more information. COPYING included with this distribution for more information.
*/ */
#ifndef _RG_EVENTUNTQUANTIZECOMMAND_H_ #ifndef _RG_EVENTUNQUANTIZECOMMAND_H_
#define _RG_EVENTUNTQUANTIZECOMMAND_H_ #define _RG_EVENTUNQUANTIZECOMMAND_H_
#include "document/BasicCommand.h" #include "document/BasicCommand.h"
#include <tqstring.h> #include <tqstring.h>

@ -23,8 +23,8 @@
COPYING included with this distribution for more information. COPYING included with this distribution for more information.
*/ */
#ifndef _RG_ADJUSTMENUFIXNOTATIONTQUANTIZECOMMAND_H_ #ifndef _RG_ADJUSTMENUFIXNOTATIONQUANTIZECOMMAND_H_
#define _RG_ADJUSTMENUFIXNOTATIONTQUANTIZECOMMAND_H_ #define _RG_ADJUSTMENUFIXNOTATIONQUANTIZECOMMAND_H_
#include "document/BasicSelectionCommand.h" #include "document/BasicSelectionCommand.h"
#include <tqstring.h> #include <tqstring.h>

@ -23,8 +23,8 @@
COPYING included with this distribution for more information. COPYING included with this distribution for more information.
*/ */
#ifndef _RG_ADJUSTMENUREMOVENOTATIONTQUANTIZECOMMAND_H_ #ifndef _RG_ADJUSTMENUREMOVENOTATIONQUANTIZECOMMAND_H_
#define _RG_ADJUSTMENUREMOVENOTATIONTQUANTIZECOMMAND_H_ #define _RG_ADJUSTMENUREMOVENOTATIONQUANTIZECOMMAND_H_
#include "document/BasicSelectionCommand.h" #include "document/BasicSelectionCommand.h"
#include <tqstring.h> #include <tqstring.h>

@ -23,8 +23,8 @@
COPYING included with this distribution for more information. COPYING included with this distribution for more information.
*/ */
#ifndef _RG_SEGMENTCHANGETQUANTIZATIONCOMMAND_H_ #ifndef _RG_SEGMENTCHANGEQUANTIZATIONCOMMAND_H_
#define _RG_SEGMENTCHANGETQUANTIZATIONCOMMAND_H_ #define _RG_SEGMENTCHANGEQUANTIZATIONCOMMAND_H_
#include <kcommand.h> #include <kcommand.h>
#include <tqstring.h> #include <tqstring.h>

@ -23,8 +23,8 @@
COPYING included with this distribution for more information. COPYING included with this distribution for more information.
*/ */
#ifndef _RG_SEGMENTQUICKCOPYCOMMAND_H_ #ifndef _RG_SEGMENQUICKCOPYCOMMAND_H_
#define _RG_SEGMENTQUICKCOPYCOMMAND_H_ #define _RG_SEGMENQUICKCOPYCOMMAND_H_
#include <kcommand.h> #include <kcommand.h>
#include <tqstring.h> #include <tqstring.h>

@ -43,7 +43,7 @@ typedef enum
STARTING_TO_PLAY, STARTING_TO_PLAY,
STARTING_TO_RECORD, STARTING_TO_RECORD,
RECORDING_ARMED, // gui only state RECORDING_ARMED, // gui only state
TQUIT QUIT
} TransportStatus; } TransportStatus;

@ -23,8 +23,8 @@
COPYING included with this distribution for more information. COPYING included with this distribution for more information.
*/ */
#ifndef _RG_TQUANTIZEDIALOG_H_ #ifndef _RG_QUANTIZEDIALOG_H_
#define _RG_TQUANTIZEDIALOG_H_ #define _RG_QUANTIZEDIALOG_H_
#include <kdialogbase.h> #include <kdialogbase.h>

@ -101,7 +101,7 @@ TriggerSegmentDialog::setupFromConfig()
std::string timing = qstrtostr std::string timing = qstrtostr
(config->readEntry (config->readEntry
("triggersegmenttiming", ("triggersegmenttiming",
strtoqstr(BaseProperties::TRIGGER_SEGMENT_ADJUST_STQUISH))); strtoqstr(BaseProperties::TRIGGER_SEGMENT_ADJUST_SQUISH)));
bool retune = config->readBoolEntry("triggersegmentretune", true); bool retune = config->readBoolEntry("triggersegmentretune", true);
if (seg >= 0 && seg < m_segment->count()) if (seg >= 0 && seg < m_segment->count())
@ -109,7 +109,7 @@ TriggerSegmentDialog::setupFromConfig()
if (timing == BaseProperties::TRIGGER_SEGMENT_ADJUST_NONE) { if (timing == BaseProperties::TRIGGER_SEGMENT_ADJUST_NONE) {
m_adjustTime->setCurrentItem(0); m_adjustTime->setCurrentItem(0);
} else if (timing == BaseProperties::TRIGGER_SEGMENT_ADJUST_STQUISH) { } else if (timing == BaseProperties::TRIGGER_SEGMENT_ADJUST_SQUISH) {
m_adjustTime->setCurrentItem(3); m_adjustTime->setCurrentItem(3);
} else if (timing == BaseProperties::TRIGGER_SEGMENT_ADJUST_SYNC_START) { } else if (timing == BaseProperties::TRIGGER_SEGMENT_ADJUST_SYNC_START) {
m_adjustTime->setCurrentItem(1); m_adjustTime->setCurrentItem(1);
@ -157,7 +157,7 @@ TriggerSegmentDialog::getTimeAdjust() const
case 2: case 2:
return BaseProperties::TRIGGER_SEGMENT_ADJUST_SYNC_END; return BaseProperties::TRIGGER_SEGMENT_ADJUST_SYNC_END;
case 3: case 3:
return BaseProperties::TRIGGER_SEGMENT_ADJUST_STQUISH; return BaseProperties::TRIGGER_SEGMENT_ADJUST_SQUISH;
default: default:
return BaseProperties::TRIGGER_SEGMENT_ADJUST_NONE; return BaseProperties::TRIGGER_SEGMENT_ADJUST_NONE;

@ -150,7 +150,7 @@ UseOrnamentDialog::setupFromConfig()
std::string timing = qstrtostr std::string timing = qstrtostr
(config->readEntry (config->readEntry
("useornamenttiming", ("useornamenttiming",
strtoqstr(BaseProperties::TRIGGER_SEGMENT_ADJUST_STQUISH))); strtoqstr(BaseProperties::TRIGGER_SEGMENT_ADJUST_SQUISH)));
bool retune = config->readBoolEntry("useornamentretune", true); bool retune = config->readBoolEntry("useornamentretune", true);
size_t i = 0; size_t i = 0;
@ -172,7 +172,7 @@ UseOrnamentDialog::setupFromConfig()
if (timing == BaseProperties::TRIGGER_SEGMENT_ADJUST_NONE) { if (timing == BaseProperties::TRIGGER_SEGMENT_ADJUST_NONE) {
m_adjustTime->setCurrentItem(0); m_adjustTime->setCurrentItem(0);
} else if (timing == BaseProperties::TRIGGER_SEGMENT_ADJUST_STQUISH) { } else if (timing == BaseProperties::TRIGGER_SEGMENT_ADJUST_SQUISH) {
m_adjustTime->setCurrentItem(3); m_adjustTime->setCurrentItem(3);
} else if (timing == BaseProperties::TRIGGER_SEGMENT_ADJUST_SYNC_START) { } else if (timing == BaseProperties::TRIGGER_SEGMENT_ADJUST_SYNC_START) {
m_adjustTime->setCurrentItem(1); m_adjustTime->setCurrentItem(1);
@ -229,7 +229,7 @@ UseOrnamentDialog::getTimeAdjust() const
case 2: case 2:
return BaseProperties::TRIGGER_SEGMENT_ADJUST_SYNC_END; return BaseProperties::TRIGGER_SEGMENT_ADJUST_SYNC_END;
case 3: case 3:
return BaseProperties::TRIGGER_SEGMENT_ADJUST_STQUISH; return BaseProperties::TRIGGER_SEGMENT_ADJUST_SQUISH;
default: default:
return BaseProperties::TRIGGER_SEGMENT_ADJUST_NONE; return BaseProperties::TRIGGER_SEGMENT_ADJUST_NONE;

@ -203,7 +203,7 @@ EventView::EventView(RosegardenGUIDoc *doc,
std::string timing = rec->getDefaultTimeAdjust(); std::string timing = rec->getDefaultTimeAdjust();
if (timing == BaseProperties::TRIGGER_SEGMENT_ADJUST_NONE) { if (timing == BaseProperties::TRIGGER_SEGMENT_ADJUST_NONE) {
adjust->setCurrentItem(0); adjust->setCurrentItem(0);
} else if (timing == BaseProperties::TRIGGER_SEGMENT_ADJUST_STQUISH) { } else if (timing == BaseProperties::TRIGGER_SEGMENT_ADJUST_SQUISH) {
adjust->setCurrentItem(3); adjust->setCurrentItem(3);
} else if (timing == BaseProperties::TRIGGER_SEGMENT_ADJUST_SYNC_START) { } else if (timing == BaseProperties::TRIGGER_SEGMENT_ADJUST_SYNC_START) {
adjust->setCurrentItem(1); adjust->setCurrentItem(1);
@ -744,7 +744,7 @@ EventView::slotEditTriggerVelocity()
void void
EventView::slotTriggerTimeAdjustChanged(int option) EventView::slotTriggerTimeAdjustChanged(int option)
{ {
std::string adjust = BaseProperties::TRIGGER_SEGMENT_ADJUST_STQUISH; std::string adjust = BaseProperties::TRIGGER_SEGMENT_ADJUST_SQUISH;
switch (option) { switch (option) {
@ -758,7 +758,7 @@ EventView::slotTriggerTimeAdjustChanged(int option)
adjust = BaseProperties::TRIGGER_SEGMENT_ADJUST_SYNC_END; adjust = BaseProperties::TRIGGER_SEGMENT_ADJUST_SYNC_END;
break; break;
case 3: case 3:
adjust = BaseProperties::TRIGGER_SEGMENT_ADJUST_STQUISH; adjust = BaseProperties::TRIGGER_SEGMENT_ADJUST_SQUISH;
break; break;
default: default:

@ -6055,7 +6055,7 @@ NotationView::slotMakeOrnament()
style->getName(), style->getName(),
getDocument()->getComposition().getNextTriggerSegmentId(), getDocument()->getComposition().getNextTriggerSegmentId(),
true, true,
BaseProperties::TRIGGER_SEGMENT_ADJUST_STQUISH, BaseProperties::TRIGGER_SEGMENT_ADJUST_SQUISH,
Marks::NoMark)); //!!! Marks::NoMark)); //!!!
addCommandToHistory(command); addCommandToHistory(command);

@ -45,8 +45,8 @@ const CharName SEMIBREVIS_WHITE = "MUSICAL SYMBOL SEMIBREVIS WHITE";
const CharName SEMIBREVIS_BLACK = "MUSICAL SYMBOL SEMIBREVIS BLACK"; const CharName SEMIBREVIS_BLACK = "MUSICAL SYMBOL SEMIBREVIS BLACK";
const CharName TRIANGLE_NOTEHEAD_UP_WHITE = "MUSICAL SYMBOL TRIANGLE NOTEHEAD UP WHITE"; const CharName TRIANGLE_NOTEHEAD_UP_WHITE = "MUSICAL SYMBOL TRIANGLE NOTEHEAD UP WHITE";
const CharName TRIANGLE_NOTEHEAD_UP_BLACK = "MUSICAL SYMBOL TRIANGLE NOTEHEAD UP BLACK"; const CharName TRIANGLE_NOTEHEAD_UP_BLACK = "MUSICAL SYMBOL TRIANGLE NOTEHEAD UP BLACK";
const CharName STQUARE_NOTEHEAD_WHITE = "MUSICAL SYMBOL STQUARE NOTEHEAD WHITE"; const CharName SQUARE_NOTEHEAD_WHITE = "MUSICAL SYMBOL SQUARE NOTEHEAD WHITE";
const CharName STQUARE_NOTEHEAD_BLACK = "MUSICAL SYMBOL STQUARE NOTEHEAD BLACK"; const CharName SQUARE_NOTEHEAD_BLACK = "MUSICAL SYMBOL SQUARE NOTEHEAD BLACK";
// These two names are not valid Unicode names. They describe flags // These two names are not valid Unicode names. They describe flags
// that should be used to compose multi-flag notes, rather than used // that should be used to compose multi-flag notes, rather than used
@ -70,7 +70,7 @@ const CharName WHOLE_REST = "MUSICAL SYMBOL WHOLE REST"; // Unicode-4 glyph 1D13
const CharName WHOLE_REST_ON_STAFF = "MUSICAL SYMBOL WHOLE REST ON STAFF"; const CharName WHOLE_REST_ON_STAFF = "MUSICAL SYMBOL WHOLE REST ON STAFF";
const CharName HALF_REST = "MUSICAL SYMBOL HALF REST"; // Unicode-4 glyph 1D13C const CharName HALF_REST = "MUSICAL SYMBOL HALF REST"; // Unicode-4 glyph 1D13C
const CharName HALF_REST_ON_STAFF = "MUSICAL SYMBOL HALF REST ON STAFF"; const CharName HALF_REST_ON_STAFF = "MUSICAL SYMBOL HALF REST ON STAFF";
const CharName TQUARTER_REST = "MUSICAL SYMBOL TQUARTER REST"; const CharName QUARTER_REST = "MUSICAL SYMBOL QUARTER REST";
const CharName EIGHTH_REST = "MUSICAL SYMBOL EIGHTH REST"; const CharName EIGHTH_REST = "MUSICAL SYMBOL EIGHTH REST";
const CharName SIXTEENTH_REST = "MUSICAL SYMBOL SIXTEENTH REST"; const CharName SIXTEENTH_REST = "MUSICAL SYMBOL SIXTEENTH REST";
const CharName THIRTY_SECOND_REST = "MUSICAL SYMBOL THIRTY-SECOND REST"; const CharName THIRTY_SECOND_REST = "MUSICAL SYMBOL THIRTY-SECOND REST";

@ -49,8 +49,8 @@ extern const CharName SEMIBREVIS_WHITE;
extern const CharName SEMIBREVIS_BLACK; extern const CharName SEMIBREVIS_BLACK;
extern const CharName TRIANGLE_NOTEHEAD_UP_WHITE; extern const CharName TRIANGLE_NOTEHEAD_UP_WHITE;
extern const CharName TRIANGLE_NOTEHEAD_UP_BLACK; extern const CharName TRIANGLE_NOTEHEAD_UP_BLACK;
extern const CharName STQUARE_NOTEHEAD_WHITE; extern const CharName SQUARE_NOTEHEAD_WHITE;
extern const CharName STQUARE_NOTEHEAD_BLACK; extern const CharName SQUARE_NOTEHEAD_BLACK;
extern const CharName FLAG_PARTIAL; extern const CharName FLAG_PARTIAL;
extern const CharName FLAG_PARTIAL_FINAL; extern const CharName FLAG_PARTIAL_FINAL;
@ -66,7 +66,7 @@ extern const CharName WHOLE_REST;
extern const CharName WHOLE_REST_ON_STAFF; extern const CharName WHOLE_REST_ON_STAFF;
extern const CharName HALF_REST; extern const CharName HALF_REST;
extern const CharName HALF_REST_ON_STAFF; extern const CharName HALF_REST_ON_STAFF;
extern const CharName TQUARTER_REST; extern const CharName QUARTER_REST;
extern const CharName EIGHTH_REST; extern const CharName EIGHTH_REST;
extern const CharName SIXTEENTH_REST; extern const CharName SIXTEENTH_REST;
extern const CharName THIRTY_SECOND_REST; extern const CharName THIRTY_SECOND_REST;

@ -225,8 +225,8 @@ NoteStyle::getNoteHeadCharName(Note::Type type)
} else if (desc.shape == Rectangle) { } else if (desc.shape == Rectangle) {
name = desc.filled ? NoteCharacterNames::STQUARE_NOTEHEAD_BLACK name = desc.filled ? NoteCharacterNames::SQUARE_NOTEHEAD_BLACK
: NoteCharacterNames::STQUARE_NOTEHEAD_WHITE; : NoteCharacterNames::SQUARE_NOTEHEAD_WHITE;
} else if (desc.shape == Number) { } else if (desc.shape == Number) {
@ -327,7 +327,7 @@ NoteStyle::getRestCharName(Note::Type type, bool restOutsideStave)
case Note::Quaver: case Note::Quaver:
return NoteCharacterNames::EIGHTH_REST; return NoteCharacterNames::EIGHTH_REST;
case Note::Crotchet: case Note::Crotchet:
return NoteCharacterNames::TQUARTER_REST; return NoteCharacterNames::QUARTER_REST;
case Note::Minim: case Note::Minim:
return restOutsideStave ? return restOutsideStave ?
NoteCharacterNames::HALF_REST NoteCharacterNames::HALF_REST

@ -473,7 +473,7 @@ SegmentMmapper::mergeTriggerSegment(Segment **target,
timeT d = (*i)->getDuration(); timeT d = (*i)->getDuration();
if (evDuration != trDuration && if (evDuration != trDuration &&
timeAdjust == BaseProperties::TRIGGER_SEGMENT_ADJUST_STQUISH) { timeAdjust == BaseProperties::TRIGGER_SEGMENT_ADJUST_SQUISH) {
t = timeT(double(t * evDuration) / double(trDuration)); t = timeT(double(t * evDuration) / double(trDuration));
d = timeT(double(d * evDuration) / double(trDuration)); d = timeT(double(d * evDuration) / double(trDuration));
} }

@ -23,8 +23,8 @@
COPYING included with this distribution for more information. COPYING included with this distribution for more information.
*/ */
#ifndef _RG_ROSEGARDENTQUANTIZEPARAMETERS_H_ #ifndef _RG_ROSEGARDENQUANTIZEPARAMETERS_H_
#define _RG_ROSEGARDENTQUANTIZEPARAMETERS_H_ #define _RG_ROSEGARDENQUANTIZEPARAMETERS_H_
#include <tqframe.h> #include <tqframe.h>
#include <tqstring.h> #include <tqstring.h>

@ -143,7 +143,7 @@ RosegardenSequencerApp::quit()
close(); close();
// and break out of the loop next time around // and break out of the loop next time around
m_transportStatus = TQUIT; m_transportStatus = QUIT;
} }

@ -135,7 +135,7 @@ int main(int argc, char *argv[])
RealTime sleepTime = RealTime(0, 10000000); RealTime sleepTime = RealTime(0, 10000000);
while (!_exiting && roseSeq && roseSeq->getStatus() != TQUIT) { while (!_exiting && roseSeq && roseSeq->getStatus() != QUIT) {
bool atLeisure = true; bool atLeisure = true;

@ -2054,8 +2054,8 @@ AlsaDriver::resetPlayback(const RealTime &oldPosition, const RealTime &position)
unsigned char t_sec = (unsigned char) position.sec % 60; unsigned char t_sec = (unsigned char) position.sec % 60;
unsigned char t_min = (unsigned char) (position.sec / 60) % 60; unsigned char t_min = (unsigned char) (position.sec / 60) % 60;
unsigned char t_hrs = (unsigned char) (position.sec / 3600); unsigned char t_hrs = (unsigned char) (position.sec / 3600);
#define STUPID_BROKEN_ETQUIPMENT #define STUPID_BROKEN_EQUIPMENT
#ifdef STUPID_BROKEN_ETQUIPMENT #ifdef STUPID_BROKEN_EQUIPMENT
// Some recorders assume you are talking in 30fps... // Some recorders assume you are talking in 30fps...
unsigned char t_frm = (unsigned char) (position.nsec / 33333333U); unsigned char t_frm = (unsigned char) (position.nsec / 33333333U);
unsigned char t_sbf = (unsigned char) ((position.nsec / 333333U) % 100U); unsigned char t_sbf = (unsigned char) ((position.nsec / 333333U) % 100U);

@ -25,8 +25,8 @@
#include "PlayableAudioFile.h" #include "PlayableAudioFile.h"
#include "Profiler.h" #include "Profiler.h"
//#define DEBUG_AUDIO_PLAY_TQUEUE 1 //#define DEBUG_AUDIO_PLAY_QUEUE 1
//#define FINE_DEBUG_AUDIO_PLAY_TQUEUE 1 //#define FINE_DEBUG_AUDIO_PLAY_QUEUE 1
namespace Rosegarden namespace Rosegarden
{ {
@ -94,7 +94,7 @@ AudioPlayQueue::addScheduled(PlayableAudioFile *file)
m_instrumentIndex.push_back(ReverseFileMap()); m_instrumentIndex.push_back(ReverseFileMap());
} }
#ifdef DEBUG_AUDIO_PLAY_TQUEUE #ifdef DEBUG_AUDIO_PLAY_QUEUE
std::cerr << "AudioPlayQueue[" << this << "]::addScheduled(" << file << "): start " << file->getStartTime() << ", end " << file->getEndTime() << ", slots: " << std::endl; std::cerr << "AudioPlayQueue[" << this << "]::addScheduled(" << file << "): start " << file->getStartTime() << ", end " << file->getEndTime() << ", slots: " << std::endl;
#endif #endif
@ -107,13 +107,13 @@ AudioPlayQueue::addScheduled(PlayableAudioFile *file)
m_maxBuffers = m_counts[i]; m_maxBuffers = m_counts[i];
} }
} }
#ifdef DEBUG_AUDIO_PLAY_TQUEUE #ifdef DEBUG_AUDIO_PLAY_QUEUE
std::cerr << i << " "; std::cerr << i << " ";
#endif #endif
} }
#ifdef DEBUG_AUDIO_PLAY_TQUEUE #ifdef DEBUG_AUDIO_PLAY_QUEUE
std::cerr << std::endl << "(max buffers now " std::cerr << std::endl << "(max buffers now "
<< m_maxBuffers << ")" << std::endl; << m_maxBuffers << ")" << std::endl;
#endif #endif
@ -122,13 +122,13 @@ AudioPlayQueue::addScheduled(PlayableAudioFile *file)
void void
AudioPlayQueue::addUnscheduled(PlayableAudioFile *file) AudioPlayQueue::addUnscheduled(PlayableAudioFile *file)
{ {
#ifdef DEBUG_AUDIO_PLAY_TQUEUE #ifdef DEBUG_AUDIO_PLAY_QUEUE
std::cerr << "AudioPlayQueue[" << this << "]::addUnscheduled(" << file << "): start " << file->getStartTime() << ", end " << file->getEndTime() << ", instrument " << file->getInstrument() << std::endl; std::cerr << "AudioPlayQueue[" << this << "]::addUnscheduled(" << file << "): start " << file->getStartTime() << ", end " << file->getEndTime() << ", instrument " << file->getInstrument() << std::endl;
#endif #endif
m_unscheduled.push_back(file); m_unscheduled.push_back(file);
#ifdef DEBUG_AUDIO_PLAY_TQUEUE #ifdef DEBUG_AUDIO_PLAY_QUEUE
std::cerr << "AudioPlayQueue[" << this << "]::addUnscheduled: now " << m_unscheduled.size() << " unscheduled files" << std::endl; std::cerr << "AudioPlayQueue[" << this << "]::addUnscheduled: now " << m_unscheduled.size() << " unscheduled files" << std::endl;
#endif #endif
@ -138,7 +138,7 @@ AudioPlayQueue::addUnscheduled(PlayableAudioFile *file)
void void
AudioPlayQueue::erase(PlayableAudioFile *file) AudioPlayQueue::erase(PlayableAudioFile *file)
{ {
#ifdef DEBUG_AUDIO_PLAY_TQUEUE #ifdef DEBUG_AUDIO_PLAY_QUEUE
std::cerr << "AudioPlayQueue::erase(" << file << "): start " << file->getStartTime() << ", end " << file->getEndTime() << std::endl; std::cerr << "AudioPlayQueue::erase(" << file << "): start " << file->getStartTime() << ", end " << file->getEndTime() << std::endl;
#endif #endif
@ -195,7 +195,7 @@ AudioPlayQueue::erase(PlayableAudioFile *file)
void void
AudioPlayQueue::clear() AudioPlayQueue::clear()
{ {
#ifdef DEBUG_AUDIO_PLAY_TQUEUE #ifdef DEBUG_AUDIO_PLAY_QUEUE
std::cerr << "AudioPlayQueue::clear()" << std::endl; std::cerr << "AudioPlayQueue::clear()" << std::endl;
#endif #endif
@ -255,7 +255,7 @@ AudioPlayQueue::getPlayingFiles(const RealTime &sliceStart,
f->getStartTime() + f->getDuration() <= sliceStart) f->getStartTime() + f->getDuration() <= sliceStart)
continue; continue;
#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE #ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE
std::cerr << "... found " << f << " in slot " << i << std::endl; std::cerr << "... found " << f << " in slot " << i << std::endl;
#endif #endif
@ -273,7 +273,7 @@ AudioPlayQueue::getPlayingFiles(const RealTime &sliceStart,
} }
} }
#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE #ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE
if (playing.size() > 0) { if (playing.size() > 0) {
std::cerr << "AudioPlayQueue::getPlayingFiles(" << sliceStart << "," std::cerr << "AudioPlayQueue::getPlayingFiles(" << sliceStart << ","
<< sliceDuration << "): total " << sliceDuration << "): total "
@ -289,7 +289,7 @@ AudioPlayQueue::getPlayingFilesForInstrument(const RealTime &sliceStart,
PlayableAudioFile **playing, PlayableAudioFile **playing,
size_t &size) const size_t &size) const
{ {
#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE #ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE
bool printed = false; bool printed = false;
Profiler profiler("AudioPlayQueue::getPlayingFilesForInstrument", true); Profiler profiler("AudioPlayQueue::getPlayingFilesForInstrument", true);
#endif #endif
@ -321,7 +321,7 @@ AudioPlayQueue::getPlayingFilesForInstrument(const RealTime &sliceStart,
if (f->getInstrument() != instrumentId) if (f->getInstrument() != instrumentId)
continue; continue;
#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE #ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE
if (!printed) { if (!printed) {
std::cerr << "AudioPlayQueue::getPlayingFilesForInstrument(" << sliceStart std::cerr << "AudioPlayQueue::getPlayingFilesForInstrument(" << sliceStart
@ -334,7 +334,7 @@ AudioPlayQueue::getPlayingFilesForInstrument(const RealTime &sliceStart,
if (f->getStartTime() > sliceEnd || if (f->getStartTime() > sliceEnd ||
f->getEndTime() <= sliceStart) { f->getEndTime() <= sliceStart) {
#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE #ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE
std::cerr << "... rejected " << f << " in slot " << i << std::endl; std::cerr << "... rejected " << f << " in slot " << i << std::endl;
if (f->getStartTime() > sliceEnd) { if (f->getStartTime() > sliceEnd) {
std::cerr << "(" << f->getStartTime() << " > " << sliceEnd std::cerr << "(" << f->getStartTime() << " > " << sliceEnd
@ -348,7 +348,7 @@ AudioPlayQueue::getPlayingFilesForInstrument(const RealTime &sliceStart,
continue; continue;
} }
#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE #ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE
std::cerr << "... found " << f << " in slot " << i << " (" std::cerr << "... found " << f << " in slot " << i << " ("
<< f->getStartTime() << " -> " << f->getEndTime() << f->getStartTime() << " -> " << f->getEndTime()
<< ")" << std::endl; << ")" << std::endl;
@ -363,7 +363,7 @@ AudioPlayQueue::getPlayingFilesForInstrument(const RealTime &sliceStart,
break; // already have it break; // already have it
if (written >= size) { if (written >= size) {
#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE #ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE
std::cerr << "No room to write it!" << std::endl; std::cerr << "No room to write it!" << std::endl;
#endif #endif
@ -382,7 +382,7 @@ unscheduled:
PlayableAudioFile *f = *fli; PlayableAudioFile *f = *fli;
if (f->getInstrument() != instrumentId) { if (f->getInstrument() != instrumentId) {
#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE #ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE
std::cerr << "rejecting unscheduled " << f << " as wrong instrument (" std::cerr << "rejecting unscheduled " << f << " as wrong instrument ("
<< f->getInstrument() << " != " << instrumentId << ")" << std::endl; << f->getInstrument() << " != " << instrumentId << ")" << std::endl;
#endif #endif
@ -390,7 +390,7 @@ unscheduled:
continue; continue;
} }
#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE #ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE
if (!printed) { if (!printed) {
std::cerr << "AudioPlayQueue::getPlayingFilesForInstrument(" << sliceStart std::cerr << "AudioPlayQueue::getPlayingFilesForInstrument(" << sliceStart
<< ", " << sliceDuration << ", " << instrumentId << ")" << ", " << sliceDuration << ", " << instrumentId << ")"
@ -402,7 +402,7 @@ unscheduled:
if (f->getStartTime() <= sliceEnd && if (f->getStartTime() <= sliceEnd &&
f->getStartTime() + f->getDuration() > sliceStart) { f->getStartTime() + f->getDuration() > sliceStart) {
#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE #ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE
std::cerr << "... found " << f << " in unscheduled list (" std::cerr << "... found " << f << " in unscheduled list ("
<< f->getStartTime() << " -> " << f->getEndTime() << f->getStartTime() << " -> " << f->getEndTime()
<< ")" << std::endl; << ")" << std::endl;
@ -412,7 +412,7 @@ unscheduled:
break; break;
playing[written++] = f; playing[written++] = f;
#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE #ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE
} else { } else {
@ -429,7 +429,7 @@ unscheduled:
} }
} }
#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE #ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE
if (written > 0) { if (written > 0) {
std::cerr << "AudioPlayQueue::getPlayingFilesForInstrument: total " std::cerr << "AudioPlayQueue::getPlayingFilesForInstrument: total "
<< written << " files" << std::endl; << written << " files" << std::endl;
@ -442,7 +442,7 @@ unscheduled:
bool bool
AudioPlayQueue::haveFilesForInstrument(InstrumentId instrumentId) const AudioPlayQueue::haveFilesForInstrument(InstrumentId instrumentId) const
{ {
#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE #ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE
std::cerr << "AudioPlayQueue::haveFilesForInstrument(" << instrumentId << ")..."; std::cerr << "AudioPlayQueue::haveFilesForInstrument(" << instrumentId << ")...";
#endif #endif
@ -450,7 +450,7 @@ AudioPlayQueue::haveFilesForInstrument(InstrumentId instrumentId) const
if (index < m_instrumentIndex.size() && if (index < m_instrumentIndex.size() &&
!m_instrumentIndex[index].empty()) { !m_instrumentIndex[index].empty()) {
#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE #ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE
std::cerr << " yes (scheduled)" << std::endl; std::cerr << " yes (scheduled)" << std::endl;
#endif #endif
@ -461,7 +461,7 @@ AudioPlayQueue::haveFilesForInstrument(InstrumentId instrumentId) const
fli != m_unscheduled.end(); ++fli) { fli != m_unscheduled.end(); ++fli) {
PlayableAudioFile *file = *fli; PlayableAudioFile *file = *fli;
if (file->getInstrument() == instrumentId) { if (file->getInstrument() == instrumentId) {
#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE #ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE
std::cerr << " yes (unscheduled)" << std::endl; std::cerr << " yes (unscheduled)" << std::endl;
#endif #endif
@ -469,7 +469,7 @@ AudioPlayQueue::haveFilesForInstrument(InstrumentId instrumentId) const
} }
} }
#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE #ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE
std::cerr << " no" << std::endl; std::cerr << " no" << std::endl;
#endif #endif
@ -479,7 +479,7 @@ AudioPlayQueue::haveFilesForInstrument(InstrumentId instrumentId) const
const AudioPlayQueue::FileSet & const AudioPlayQueue::FileSet &
AudioPlayQueue::getAllScheduledFiles() const AudioPlayQueue::getAllScheduledFiles() const
{ {
#ifdef DEBUG_AUDIO_PLAY_TQUEUE #ifdef DEBUG_AUDIO_PLAY_QUEUE
std::cerr << "AudioPlayQueue[" << this << "]::getAllScheduledFiles: have " << m_files.size() << " files" << std::endl; std::cerr << "AudioPlayQueue[" << this << "]::getAllScheduledFiles: have " << m_files.size() << " files" << std::endl;
#endif #endif
@ -489,7 +489,7 @@ AudioPlayQueue::getAllScheduledFiles() const
const AudioPlayQueue::FileList & const AudioPlayQueue::FileList &
AudioPlayQueue::getAllUnscheduledFiles() const AudioPlayQueue::getAllUnscheduledFiles() const
{ {
#ifdef DEBUG_AUDIO_PLAY_TQUEUE #ifdef DEBUG_AUDIO_PLAY_QUEUE
std::cerr << "AudioPlayQueue[" << this << "]::getAllUnscheduledFiles: have " << m_unscheduled.size() << " files" << std::endl; std::cerr << "AudioPlayQueue[" << this << "]::getAllUnscheduledFiles: have " << m_unscheduled.size() << " files" << std::endl;
#endif #endif

@ -19,8 +19,8 @@
COPYING included with this distribution for more information. COPYING included with this distribution for more information.
*/ */
#ifndef _AUDIO_PLAY_TQUEUE_H_ #ifndef _AUDIO_PLAY_QUEUE_H_
#define _AUDIO_PLAY_TQUEUE_H_ #define _AUDIO_PLAY_QUEUE_H_
#include "RealTime.h" #include "RealTime.h"
#include "Instrument.h" #include "Instrument.h"

@ -61,7 +61,7 @@ const MidiByte MIDI_SELECT_CHNL_MODE = 0xB0;
// system messages // system messages
const MidiByte MIDI_SYSTEM_EXCLUSIVE = 0xF0; const MidiByte MIDI_SYSTEM_EXCLUSIVE = 0xF0;
const MidiByte MIDI_TC_TQUARTER_FRAME = 0xF1; const MidiByte MIDI_TC_QUARTER_FRAME = 0xF1;
const MidiByte MIDI_SONG_POSITION_PTR = 0xF2; const MidiByte MIDI_SONG_POSITION_PTR = 0xF2;
const MidiByte MIDI_SONG_SELECT = 0xF3; const MidiByte MIDI_SONG_SELECT = 0xF3;
const MidiByte MIDI_TUNE_REQUEST = 0xF6; const MidiByte MIDI_TUNE_REQUEST = 0xF6;

@ -464,7 +464,7 @@ MidiFile::parseHeader(const string &midiHeader)
m_numberOfTracks = midiBytesToInt(midiHeader.substr(10, 2)); m_numberOfTracks = midiBytesToInt(midiHeader.substr(10, 2));
m_timingDivision = midiBytesToInt(midiHeader.substr(12, 2)); m_timingDivision = midiBytesToInt(midiHeader.substr(12, 2));
if ( m_format == MIDI_SETQUENTIAL_TRACK_FILE ) { if ( m_format == MIDI_SEQUENTIAL_TRACK_FILE ) {
#ifdef MIDI_DEBUG #ifdef MIDI_DEBUG
std::cerr << "MidiFile::parseHeader()" std::cerr << "MidiFile::parseHeader()"
<< "- can't load sequential track file" << "- can't load sequential track file"

@ -73,7 +73,7 @@ public:
{ {
MIDI_SINGLE_TRACK_FILE = 0x00, MIDI_SINGLE_TRACK_FILE = 0x00,
MIDI_SIMULTANEOUS_TRACK_FILE = 0x01, MIDI_SIMULTANEOUS_TRACK_FILE = 0x01,
MIDI_SETQUENTIAL_TRACK_FILE = 0x02, MIDI_SEQUENTIAL_TRACK_FILE = 0x02,
MIDI_CONVERTED_TO_APPLICATION = 0xFE, MIDI_CONVERTED_TO_APPLICATION = 0xFE,
MIDI_FILE_NOT_LOADED = 0xFF MIDI_FILE_NOT_LOADED = 0xFF
} MIDIFileFormatType; } MIDIFileFormatType;

Loading…
Cancel
Save