52 bool isCompound()
const {
return numerator() > 3 && numerator() % 3 == 0; }
56 bool isBeatedCompound(qreal tempo)
const {
return tempo2beatsPerMinute(tempo) >= 60.0; }
58 int dUnitTicks()
const;
62 int beatTicks()
const {
return dUnitTicks() * dUnitsPerBeat(); }
65 int subbeatTicks(
int level)
const;
66 int maxSubbeatLevel()
const;
68 bool isTriple()
const {
return beatsPerMeasure() % 3 == 0; }
69 bool isDuple()
const { Q_ASSERT(!
isTriple());
return beatsPerMeasure() % 2 == 0; }
75 BeatType rtick2beatType(
int rtick)
const;
76 int rtick2subbeatLevel(
int rtick)
const;
78 BeatType strongestBeatInRange(
int rtick1,
int rtick2,
int* dUnitsCrossed = 0,
int* subbeatTick = 0,
bool saveLast =
false)
const;
79 int strongestSubbeatLevelInRange(
int rtick1,
int rtick2,
int* subbeatTick = 0)
const;
85 int ticksToNextBeat(
int rtick)
const {
return beatTicks() - ticksPastBeat(rtick); }
87 int ticksPastSubbeat(
int rtick,
int level)
const {
return rtick % subbeatTicks(level); }
88 int ticksToNextSubbeat(
int rtick,
int level)
const {
return subbeatTicks(level) - ticksPastSubbeat(rtick, level); }
108 : _timesig(s), _nominal(s), _bar(bar) {}
110 : _timesig(s), _nominal(ss), _bar(bar) {}
113 bool operator==(
const SigEvent& e)
const;
119 int bar()
const {
return _bar; }
133 void add(
int tick,
const Fraction&);
134 void add(
int tick,
const SigEvent& ev);
138 void clearRange(
int tick1,
int tick2);
144 const SigEvent& timesig(
int tick)
const;
147 void tickValues(
int t,
int* bar,
int* beat,
int* tick)
const;
148 int bar2tick(
int bar,
int beat)
const;
149 QString pos(
int t)
const;
151 unsigned raster(
unsigned tick,
int raster)
const;
152 unsigned raster1(
unsigned tick,
int raster)
const;
153 unsigned raster2(
unsigned tick,
int raster)
const;
154 int rasterStep(
unsigned tick,
int raster)
const;
bool isBeatedCompound(qreal tempo) const
Definition: sig.h:56
SigEvent(const Fraction &s, const Fraction &ss, int bar=0)
Definition: sig.h:109
int ticksPastSubbeat(int rtick, int level) const
Definition: sig.h:87
void setBar(int val)
Definition: sig.h:120
bool isCompound() const
Definition: sig.h:52
TimeSigFrac(const Fraction &f)
Definition: sig.h:48
bool isTriple(const ReducedFraction &barFraction)
Definition: importmidi_meter.cpp:33
TimeSigFrac _timesig
Definition: sig.h:98
constexpr TimeSigFrac(int n=0, int d=1)
Definition: sig.h:47
QString print() const
Definition: fraction.h:243
SigEvent(const Fraction &s, int bar=0)
Definition: sig.h:107
constexpr SigEvent()
default SigEvent is invalid
Definition: sig.h:106
int _bar
precomputed value
Definition: sig.h:100
constexpr Fraction()
Definition: fraction.h:59
const SigEvent & timesig(const Fraction &f) const
Definition: sig.h:145
TimeSigFrac(const TimeSigFrac &f)
Definition: sig.h:49
bool isCompound(const ReducedFraction &barFraction)
Definition: importmidi_meter.cpp:18
TimeSigFrac nominal() const
Definition: sig.h:117
int beatTicks() const
Definition: sig.h:62
int ticks_beat(int n)
Definition: sig.cpp:22
void setNominal(const Fraction &f)
Definition: sig.h:118
TimeSigFrac timesig() const
Definition: sig.h:116
qreal tempo2beatsPerMinute(qreal tempo) const
Definition: sig.h:72
int dUnitsPerBeat() const
Definition: sig.h:61
qreal beatsPerMinute2tempo(qreal bpm) const
Definition: sig.h:73
Definition: aeolus.cpp:26
int ticksPastDUnit(int rtick) const
Definition: sig.h:81
TimeSigMap()
Definition: sig.h:131
int ticksToNextSubbeat(int rtick, int level) const
Definition: sig.h:88
Definition: xmlwriter.h:26
QString print() const
Definition: sig.h:115
int ticks() const
Definition: fraction.h:228
BeatType
Definition: sig.h:29
bool isTriple() const
Definition: sig.h:68
bool valid() const
Definition: sig.h:114
int ticksToNextDUnit(int rtick) const
Definition: sig.h:82
int bar() const
Definition: sig.h:119
Definition: xmlreader.h:28
int ticksPerMeasure() const
Definition: sig.h:59
bool isValid() const
Definition: fraction.h:80
int beatsPerMeasure() const
Definition: sig.h:63
Definition: fraction.h:46
TimeSigFrac _nominal
Definition: sig.h:99
bool isDuple() const
Definition: sig.h:69
int ticksToNextBeat(int rtick) const
Definition: sig.h:85
int ticksPastBeat(int rtick) const
Definition: sig.h:84