summaryrefslogtreecommitdiff
path: root/muse2/muse/tempo.cpp
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2012-03-15 18:21:23 +0000
committerFlorian Jung <flo@windfisch.org>2012-03-15 18:21:23 +0000
commit27b7bf6815cda7abb67026c37b3e44daee1803cb (patch)
tree0b9d1c0bc84ac7ff8032e707f2b5fb4e0aaabb5c /muse2/muse/tempo.cpp
parent2d6f113a10eb485694e20a78500f650776d701e3 (diff)
merged with trunk
Diffstat (limited to 'muse2/muse/tempo.cpp')
-rw-r--r--muse2/muse/tempo.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/muse2/muse/tempo.cpp b/muse2/muse/tempo.cpp
index 051fc7c5..1147fd78 100644
--- a/muse2/muse/tempo.cpp
+++ b/muse2/muse/tempo.cpp
@@ -138,12 +138,26 @@ int TempoList::tempo(unsigned tick) const
}
//---------------------------------------------------------
+// tempo
+// Bypass the useList flag and read from the list
+//---------------------------------------------------------
+
+int TempoList::tempoAt(unsigned tick) const
+ {
+ ciTEvent i = upper_bound(tick);
+ if (i == end()) {
+ printf("tempoAt: no TEMPO at tick %d,0x%x\n", tick, tick);
+ return 1000;
+ }
+ return i->second->tempo;
+ }
+
+//---------------------------------------------------------
// del
//---------------------------------------------------------
void TempoList::del(unsigned tick)
{
-// printf("TempoList::del(%d)\n", tick);
iTEvent e = find(tick);
if (e == end()) {
printf("TempoList::del(%d): not found\n", tick);
@@ -270,7 +284,6 @@ unsigned TempoList::tick2frame(unsigned tick, int* sn) const
ciTEvent i = upper_bound(tick);
if (i == end()) {
printf("tick2frame(%d,0x%x): not found\n", tick, tick);
- // abort();
return 0;
}
unsigned dtick = tick - i->second->tick;