rename Timecode::BBT_Time::ticks_per_beat to Timecode::BBT_Time::ticks_per_bar_divisi...
authorPaul Davis <paul@linuxaudiosystems.com>
Mon, 19 Dec 2011 19:44:43 +0000 (19:44 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 19 Dec 2011 19:44:43 +0000 (19:44 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@11022 d708f5d6-7413-0410-9779-e7cbd77b26cf

12 files changed:
gtk2_ardour/audio_clock.cc
gtk2_ardour/editor_rulers.cc
gtk2_ardour/midi_list_editor.cc
gtk2_ardour/midi_region_view.cc
gtk2_ardour/step_editor.cc
gtk2_ardour/verbose_cursor.cc
libs/ardour/audio_unit.cc
libs/ardour/session_time.cc
libs/ardour/tempo.cc
libs/surfaces/mackie/mackie_control_protocol.cc
libs/timecode/src/bbt_time.cc
libs/timecode/timecode/bbt_time.h

index aa150795875f16eeb241a19c292cf7e8362afd1c..7d37f9cea8c9fc2234ac2b8db89bd9c40bdee1a1 100644 (file)
@@ -1779,7 +1779,7 @@ AudioClock::bbt_validate_edit (const string& str)
                return false;
        }
 
-       if (any.bbt.ticks > Timecode::BBT_Time::ticks_per_beat) {
+       if (any.bbt.ticks > Timecode::BBT_Time::ticks_per_bar_division) {
                return false;
        }
 
index 3a54e965f17edd538b2468f59aa1b765eb7d3478..9d4ad2be66139cfc9309b5d54e048028211f8d87 100644 (file)
@@ -1262,7 +1262,7 @@ Editor::compute_bbt_ruler_scale (framepos_t lower, framepos_t upper)
                bbt_ruler_scale =  bbt_show_ticks_detail;
        }
 
-       if ((bbt_ruler_scale == bbt_show_ticks_detail) && (lower_beat.beats == upper_beat.beats) && (upper_beat.ticks - lower_beat.ticks <= Timecode::BBT_Time::ticks_per_beat / 4)) {
+       if ((bbt_ruler_scale == bbt_show_ticks_detail) && (lower_beat.beats == upper_beat.beats) && (upper_beat.ticks - lower_beat.ticks <= Timecode::BBT_Time::ticks_per_bar_division / 4)) {
                bbt_ruler_scale =  bbt_show_ticks_super_detail;
        }
 }
@@ -1391,14 +1391,14 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble /*upp
 
                        frame_skip = (framepos_t) floor (frame_skip_error = (_session->frame_rate() *  60) / (bbt_beat_subdivision * (*i).tempo->beats_per_minute()));
                        frame_skip_error -= frame_skip;
-                       skip = (uint32_t) (Timecode::BBT_Time::ticks_per_beat / bbt_beat_subdivision);
+                       skip = (uint32_t) (Timecode::BBT_Time::ticks_per_bar_division / bbt_beat_subdivision);
 
                        pos = (*i).frame + frame_skip;
                        accumulated_error = frame_skip_error;
 
                        tick = skip;
 
-                       for (t = 0; (tick < Timecode::BBT_Time::ticks_per_beat) && (n < bbt_nmarks) && (pos < next_beat_pos) ; pos += frame_skip, tick += skip, ++t) {
+                       for (t = 0; (tick < Timecode::BBT_Time::ticks_per_bar_division) && (n < bbt_nmarks) && (pos < next_beat_pos) ; pos += frame_skip, tick += skip, ++t) {
 
                                if (t % bbt_accent_modulo == (bbt_accent_modulo - 1)) {
                                        i_am_accented = true;
@@ -1483,14 +1483,14 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble /*upp
 
                        frame_skip = (framepos_t) floor (frame_skip_error = (_session->frame_rate() *  60) / (bbt_beat_subdivision * (*i).tempo->beats_per_minute()));
                        frame_skip_error -= frame_skip;
-                       skip = (uint32_t) (Timecode::BBT_Time::ticks_per_beat / bbt_beat_subdivision);
+                       skip = (uint32_t) (Timecode::BBT_Time::ticks_per_bar_division / bbt_beat_subdivision);
 
                        pos = (*i).frame + frame_skip;
                        accumulated_error = frame_skip_error;
 
                        tick = skip;
 
-                       for (t = 0; (tick < Timecode::BBT_Time::ticks_per_beat) && (n < bbt_nmarks) && (pos < next_beat_pos) ; pos += frame_skip, tick += skip, ++t) {
+                       for (t = 0; (tick < Timecode::BBT_Time::ticks_per_bar_division) && (n < bbt_nmarks) && (pos < next_beat_pos) ; pos += frame_skip, tick += skip, ++t) {
 
                                if (t % bbt_accent_modulo == (bbt_accent_modulo - 1)) {
                                        i_am_accented = true;
@@ -1580,14 +1580,14 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble /*upp
 
                        frame_skip = (framepos_t) floor (frame_skip_error = (_session->frame_rate() *  60) / (bbt_beat_subdivision * (*i).tempo->beats_per_minute()));
                        frame_skip_error -= frame_skip;
-                       skip = (uint32_t) (Timecode::BBT_Time::ticks_per_beat / bbt_beat_subdivision);
+                       skip = (uint32_t) (Timecode::BBT_Time::ticks_per_bar_division / bbt_beat_subdivision);
 
                        pos = (*i).frame + frame_skip;
                        accumulated_error = frame_skip_error;
 
                        tick = skip;
 
-                       for (t = 0; (tick < Timecode::BBT_Time::ticks_per_beat) && (n < bbt_nmarks) && (pos < next_beat_pos) ; pos += frame_skip, tick += skip, ++t) {
+                       for (t = 0; (tick < Timecode::BBT_Time::ticks_per_bar_division) && (n < bbt_nmarks) && (pos < next_beat_pos) ; pos += frame_skip, tick += skip, ++t) {
 
                                  if (t % bbt_accent_modulo == (bbt_accent_modulo - 1)) {
                                          i_am_accented = true;
index 879b1a9f2fb99257432870a9b7d014605c865b7c..5b42070e65a67f26a7eb6a14cc181c516238a3ce 100644 (file)
@@ -221,7 +221,7 @@ MidiListEditor::redisplay_model ()
                        bbt.bars = 0;
                        dur = (*i)->end_time() - (*i)->time();
                        bbt.beats = floor (dur);
-                       bbt.ticks = (uint32_t) lrint (fmod (dur, 1.0) * Timecode::BBT_Time::ticks_per_beat);
+                       bbt.ticks = (uint32_t) lrint (fmod (dur, 1.0) * Timecode::BBT_Time::ticks_per_bar_division);
 
                        _session->tempo_map().bbt_duration_at (region->position(), bbt, 0);
 
index c5238a0bffb5ee01092895a17e5c25883f2e752f..6b65bb26b82f08d3c57b4c3e5548b97f8405a17f 100644 (file)
@@ -812,7 +812,7 @@ MidiRegionView::create_note_at (framepos_t t, double y, double length, bool sh,
 
                   length = region_frames_to_region_beats (region_beats_to_region_frames (length) - 1);
                */
-               length -= 1.0/Timecode::BBT_Time::ticks_per_beat;
+               length -= 1.0/Timecode::BBT_Time::ticks_per_bar_division;
        }
 
        const boost::shared_ptr<NoteType> new_note (new NoteType (mtv->get_channel_for_add (),
index 45e286dc709601f0030183f81d0060cf479e4efd..aa0095b1d5959b380a561eedc78d0669ef4023eb 100644 (file)
@@ -272,8 +272,8 @@ StepEditor::step_add_note (uint8_t channel, uint8_t pitch, uint8_t velocity, Evo
                    up by 1 tick from where the last note ended
                 */
 
-                at += 1.0/Timecode::BBT_Time::ticks_per_beat;
-                len -= 1.0/Timecode::BBT_Time::ticks_per_beat;
+                at += 1.0/Timecode::BBT_Time::ticks_per_bar_division;
+                len -= 1.0/Timecode::BBT_Time::ticks_per_bar_division;
         }
 
         step_edit_region_view->step_add_note (channel, pitch, velocity, at, len);
@@ -293,7 +293,7 @@ StepEditor::step_add_note (uint8_t channel, uint8_t pitch, uint8_t velocity, Evo
                 step_edit_beat_pos += beat_duration;
                 step_edit_region_view->move_step_edit_cursor (step_edit_beat_pos);
         } else {
-                step_edit_beat_pos += 1.0/Timecode::BBT_Time::ticks_per_beat; // tiny, but no longer overlapping
+                step_edit_beat_pos += 1.0/Timecode::BBT_Time::ticks_per_bar_division; // tiny, but no longer overlapping
                 _step_edit_chord_duration = max (_step_edit_chord_duration, beat_duration);
         }
 
index f80b74c4f8d7be048a8e4a3d3b8ad6e83a093777..89f8c19c5643bc10804e04cd3f49ea13ab46d024 100644 (file)
@@ -209,7 +209,7 @@ VerboseCursor::set_duration (framepos_t start, framepos_t end, double x, double
 
                ticks -= sbbt.ticks;
                if (ticks < 0) {
-                       ticks += int (Timecode::BBT_Time::ticks_per_beat);
+                       ticks += int (Timecode::BBT_Time::ticks_per_bar_division);
                        --beats;
                }
 
index ca171ddd9799ad4f5a9d1d46f6f44fe2f4efa739..dc8a6eabf443d5fd43d190fb36911353e38310fb 100644 (file)
@@ -1420,7 +1420,7 @@ AUPlugin::get_beat_and_tempo_callback (Float64* outCurrentBeat,
                float beat;
                beat = metric.meter().beats_per_bar() * bbt.bars;
                beat += bbt.beats;
-               beat += bbt.ticks / Timecode::BBT_Time::ticks_per_beat;
+               beat += bbt.ticks / Timecode::BBT_Time::ticks_per_bar_division;
                *outCurrentBeat = beat;
        }
 
@@ -1461,7 +1461,7 @@ AUPlugin::get_musical_time_location_callback (UInt32*   outDeltaSampleOffsetToNe
                        *outDeltaSampleOffsetToNextBeat = 0;
                } else {
                        *outDeltaSampleOffsetToNextBeat = (UInt32) 
-                               floor (((Timecode::BBT_Time::ticks_per_beat - bbt.ticks)/Timecode::BBT_Time::ticks_per_beat) * // fraction of a beat to next beat
+                               floor (((Timecode::BBT_Time::ticks_per_bar_division - bbt.ticks)/Timecode::BBT_Time::ticks_per_bar_division) * // fraction of a beat to next beat
                                       metric.tempo().frames_per_beat(_session.frame_rate(), metric.meter())); // frames per beat
                }
        }
@@ -1553,7 +1553,7 @@ AUPlugin::get_transport_state_callback (Boolean*  outIsPlaying,
                                        float beat;
                                        beat = metric.meter().beats_per_bar() * bbt.bars;
                                        beat += bbt.beats;
-                                       beat += bbt.ticks / Timecode::BBT_Time::ticks_per_beat;
+                                       beat += bbt.ticks / Timecode::BBT_Time::ticks_per_bar_division;
 
                                        *outCycleStartBeat = beat;
                                }
@@ -1565,7 +1565,7 @@ AUPlugin::get_transport_state_callback (Boolean*  outIsPlaying,
                                        float beat;
                                        beat = metric.meter().beats_per_bar() * bbt.bars;
                                        beat += bbt.beats;
-                                       beat += bbt.ticks / Timecode::BBT_Time::ticks_per_beat;
+                                       beat += bbt.ticks / Timecode::BBT_Time::ticks_per_bar_division;
 
                                        *outCycleEndBeat = beat;
                                }
index 0543fe2d021fea6de9b8fa4251478095f0ccee0c..cf8ef084b2bd9ebb2d39a9185267e2d186f26c78 100644 (file)
@@ -494,7 +494,7 @@ Session::jack_timebase_callback (jack_transport_state_t /*state*/,
 
                pos->beats_per_bar = metric.meter().divisions_per_bar();
                pos->beat_type = metric.meter().note_divisor();
-               pos->ticks_per_beat = Timecode::BBT_Time::ticks_per_beat;
+               pos->ticks_per_beat = Timecode::BBT_Time::ticks_per_bar_division;
                pos->beats_per_minute = metric.tempo().beats_per_minute();
 
                pos->valid = jack_position_bits_t (pos->valid | JackPositionBBT);
index 3bb55f76f3f9ea956fc3f8c1ee85effb5c3af9de..a8f5bdf7ae292431b8bfb374c904883f98bdffa6 100644 (file)
@@ -735,7 +735,7 @@ TempoMap::timestamp_metrics (bool use_bbt)
                                first = false;
                        } else {
 
-                               if (bbt.ticks > BBT_Time::ticks_per_beat/2) {
+                               if (bbt.ticks > BBT_Time::ticks_per_bar_division/2) {
                                        /* round up to next beat */
                                        bbt.beats += 1;
                                }
@@ -863,7 +863,7 @@ void
 TempoMap::bbt_time_with_metric (framepos_t frame, BBT_Time& bbt, const TempoMetric& metric) const
 {
        const double divisions_per_bar = metric.meter().divisions_per_bar();
-       const double frames_per_tick = metric.meter().frames_per_division (metric.tempo(),_frame_rate) / BBT_Time::ticks_per_beat;
+       const double frames_per_tick = metric.meter().frames_per_division (metric.tempo(),_frame_rate) / BBT_Time::ticks_per_bar_division;
 
        /* now compute how far beyond the metric we actually are, and add the
         * relevant number of ticks to the metric's BBT time
@@ -873,8 +873,8 @@ TempoMap::bbt_time_with_metric (framepos_t frame, BBT_Time& bbt, const TempoMetr
        uint32_t tick_diff = (uint32_t) lrint ((double) frame_diff / frames_per_tick);
 
        bbt.ticks = metric.start().ticks + tick_diff;
-       uint32_t beat_overflow = bbt.ticks / (uint32_t) BBT_Time::ticks_per_beat;
-       bbt.ticks = bbt.ticks % (uint32_t) BBT_Time::ticks_per_beat;
+       uint32_t beat_overflow = bbt.ticks / (uint32_t) BBT_Time::ticks_per_bar_division;
+       bbt.ticks = bbt.ticks % (uint32_t) BBT_Time::ticks_per_bar_division;
        bbt.beats = metric.start().beats + beat_overflow;
        /* bbt.beats uses 1-based counting, so adjust to get the right answer */
        uint32_t bar_overflow = (bbt.beats - 1) / (uint32_t) divisions_per_bar;
@@ -929,7 +929,7 @@ TempoMap::count_frames_between (const BBT_Time& start, const BBT_Time& end) cons
        uint32_t bar_offset = start.bars - m.start().bars;
 
        double  beat_offset = bar_offset*m.meter().divisions_per_bar() - (m.start().beats-1) + (start.beats -1)
-               + start.ticks/BBT_Time::ticks_per_beat;
+               + start.ticks/BBT_Time::ticks_per_bar_division;
 
        start_frame = m.frame() + (framepos_t) rint(beat_offset * m.meter().frames_per_division(m.tempo(),_frame_rate));
 
@@ -943,7 +943,7 @@ TempoMap::count_frames_between (const BBT_Time& start, const BBT_Time& end) cons
        bar_offset = end.bars - m.start().bars;
 
        beat_offset = bar_offset * m.meter().divisions_per_bar() - (m.start().beats -1) + (end.beats - 1)
-               + end.ticks/BBT_Time::ticks_per_beat;
+               + end.ticks/BBT_Time::ticks_per_bar_division;
 
        end_frame = m.frame() + (framepos_t) rint(beat_offset * m.meter().frames_per_division(m.tempo(),_frame_rate));
 
@@ -1076,8 +1076,8 @@ TempoMap::bbt_duration_at_unlocked (const BBT_Time& when, const BBT_Time& bbt, i
                 */
 
                uint32_t ticks_at_beat = (uint32_t) (result.beats == ceil(divisions_per_bar) ?
-                                       (1 - (ceil(divisions_per_bar) - divisions_per_bar))* BBT_Time::ticks_per_beat
-                                          : BBT_Time::ticks_per_beat );
+                                       (1 - (ceil(divisions_per_bar) - divisions_per_bar))* BBT_Time::ticks_per_bar_division
+                                          : BBT_Time::ticks_per_bar_division );
 
                while (result.ticks >= ticks_at_beat) {
                        result.beats++;
@@ -1089,8 +1089,8 @@ TempoMap::bbt_duration_at_unlocked (const BBT_Time& when, const BBT_Time& bbt, i
                                divisions_per_bar = metric.meter().divisions_per_bar();
                        }
                        ticks_at_beat= (uint32_t) (result.beats == ceil(divisions_per_bar) ?
-                                      (1 - (ceil(divisions_per_bar) - divisions_per_bar) ) * BBT_Time::ticks_per_beat
-                                      : BBT_Time::ticks_per_beat);
+                                      (1 - (ceil(divisions_per_bar) - divisions_per_bar) ) * BBT_Time::ticks_per_bar_division
+                                      : BBT_Time::ticks_per_bar_division);
                }
 
 
@@ -1117,7 +1117,7 @@ TempoMap::bbt_duration_at_unlocked (const BBT_Time& when, const BBT_Time& bbt, i
                        result.ticks = when.ticks - bbt.ticks;
                } else {
 
-                       uint32_t ticks_at_beat= (uint32_t) BBT_Time::ticks_per_beat;
+                       uint32_t ticks_at_beat= (uint32_t) BBT_Time::ticks_per_bar_division;
                        uint32_t t = bbt.ticks - when.ticks;
 
                        do {
@@ -1128,10 +1128,10 @@ TempoMap::bbt_duration_at_unlocked (const BBT_Time& when, const BBT_Time& bbt, i
                                        metric = metric_at(result); // maybe there is a meter change
                                        divisions_per_bar = metric.meter().divisions_per_bar();
                                        result.beats = (uint32_t) ceil(divisions_per_bar);
-                                       ticks_at_beat = (uint32_t) ((1 - (ceil(divisions_per_bar) - divisions_per_bar)) * BBT_Time::ticks_per_beat) ;
+                                       ticks_at_beat = (uint32_t) ((1 - (ceil(divisions_per_bar) - divisions_per_bar)) * BBT_Time::ticks_per_bar_division) ;
                                } else {
                                        --result.beats;
-                                       ticks_at_beat = (uint32_t) BBT_Time::ticks_per_beat;
+                                       ticks_at_beat = (uint32_t) BBT_Time::ticks_per_bar_division;
                                }
 
                                if (t <= ticks_at_beat) {
@@ -1186,7 +1186,7 @@ TempoMap::round_to_beat_subdivision (framepos_t fr, int sub_num, int dir)
 
        bbt_time(fr, the_beat);
 
-       ticks_one_subdivisions_worth = (uint32_t)BBT_Time::ticks_per_beat / sub_num;
+       ticks_one_subdivisions_worth = (uint32_t)BBT_Time::ticks_per_bar_division / sub_num;
        ticks_one_half_subdivisions_worth = ticks_one_subdivisions_worth / 2;
 
        if (dir > 0) {
@@ -1293,7 +1293,7 @@ TempoMap::round_to_type (framepos_t frame, int dir, BBTPointType type)
                        float midbar_ticks;
 
                        midbar_beats = metric.meter().divisions_per_bar() / 2 + 1;
-                       midbar_ticks = BBT_Time::ticks_per_beat * fmod (midbar_beats, 1.0f);
+                       midbar_ticks = BBT_Time::ticks_per_bar_division * fmod (midbar_beats, 1.0f);
                        midbar_beats = floor (midbar_beats);
 
                        BBT_Time midbar (bbt.bars, lrintf (midbar_beats), lrintf (midbar_ticks));
@@ -1346,7 +1346,7 @@ TempoMap::round_to_type (framepos_t frame, int dir, BBTPointType type)
                        /* "true" rounding */
 
                        /* round to nearest beat */
-                       if (bbt.ticks >= (BBT_Time::ticks_per_beat/2)) {
+                       if (bbt.ticks >= (BBT_Time::ticks_per_bar_division/2)) {
 
                                try {
                                        bbt = bbt_add (bbt, one_beat, metric);
@@ -1752,9 +1752,9 @@ TempoMap::bbt_add (const BBT_Time& start, const BBT_Time& increment, const Tempo
        BBT_Time op = increment; /* argument is const, but we need to modify it */
        uint32_t ticks = result.ticks + op.ticks;
 
-       if (ticks >= BBT_Time::ticks_per_beat) {
+       if (ticks >= BBT_Time::ticks_per_bar_division) {
                op.beats++;
-               result.ticks = ticks % (uint32_t) BBT_Time::ticks_per_beat;
+               result.ticks = ticks % (uint32_t) BBT_Time::ticks_per_bar_division;
        } else {
                result.ticks += op.ticks;
        }
@@ -1855,7 +1855,7 @@ TempoMap::bbt_subtract (const BBT_Time& start, const BBT_Time& decrement) const
        if (op.ticks > result.ticks) {
                /* subtract an extra beat later; meanwhile set ticks to the right "carry" value */
                op.beats++;
-               result.ticks = BBT_Time::ticks_per_beat - (op.ticks - result.ticks);
+               result.ticks = BBT_Time::ticks_per_bar_division - (op.ticks - result.ticks);
        } else {
                result.ticks -= op.ticks;
        }
@@ -2228,12 +2228,12 @@ TempoMap::framepos_plus_bbt (framepos_t pos, BBT_Time op) const
        pos += llrint (beats * frames_per_beat);
 
        if (op.ticks) {
-               if (op.ticks >= BBT_Time::ticks_per_beat) {
+               if (op.ticks >= BBT_Time::ticks_per_bar_division) {
                        pos += llrint (frames_per_beat + /* extra beat */
-                                      (frames_per_beat * ((op.ticks % (uint32_t) BBT_Time::ticks_per_beat) / 
-                                                          (double) BBT_Time::ticks_per_beat)));
+                                      (frames_per_beat * ((op.ticks % (uint32_t) BBT_Time::ticks_per_bar_division) / 
+                                                          (double) BBT_Time::ticks_per_bar_division)));
                } else {
-                       pos += llrint (frames_per_beat * (op.ticks / (double) BBT_Time::ticks_per_beat));
+                       pos += llrint (frames_per_beat * (op.ticks / (double) BBT_Time::ticks_per_bar_division));
                }
        }
 
index 7e208686ba23254774a198a1714b28bf08eb59aa..6fda7d74049878a8d234282d16107e704e2b4dfa 100644 (file)
@@ -1025,8 +1025,8 @@ MackieControlProtocol::format_bbt_timecode (framepos_t now_frame)
                subdiv = 3;
        }
 
-       uint32_t subdivisions = bbt_time.ticks / uint32_t (Timecode::BBT_Time::ticks_per_beat / subdiv);
-       uint32_t ticks = bbt_time.ticks % uint32_t (Timecode::BBT_Time::ticks_per_beat / subdiv);
+       uint32_t subdivisions = bbt_time.ticks / uint32_t (Timecode::BBT_Time::ticks_per_bar_division / subdiv);
+       uint32_t ticks = bbt_time.ticks % uint32_t (Timecode::BBT_Time::ticks_per_bar_division / subdiv);
 
        os << setw(2) << setfill('0') << subdivisions + 1;
        os << setw(3) << setfill('0') << ticks;
index c48191abe84ac932a3cfded6e1df9e77e0cc8ac9..6de822524d3ffc35b5e5d5652879474de8bcdae5 100644 (file)
 
 using namespace Timecode;
 
-const double BBT_Time::ticks_per_beat = 1920.0;
+/* This number doesn't describe the smallest division of a "beat" (which is
+   only defined contextually anyway), but rather the smallest division of the the
+   divisions of a bar. If using a meter of 4/8, there are 4 divisions per bar, and
+   we can divide each one into ticks_per_bar_division pieces; in a separate meter
+   (section) of 3/8, there are 3 divisions per bar, each of which can be divided
+   into ticks_per_bar_division pieces.
+
+   The number is intended to have as many integer factors as possible so that
+   1/Nth divisions are integer numbers of ticks.
+
+   1920 is the largest legal value that be used inside an SMF file, and has many factors.
+*/
+
+const double BBT_Time::ticks_per_bar_division = 1920.0;
 
 BBT_Time::BBT_Time (double dbeats)
 {
@@ -36,5 +49,5 @@ BBT_Time::BBT_Time (double dbeats)
 
         bars = 0;
         beats = rint (floor (dbeats));
-        ticks = rint (floor (BBT_Time::ticks_per_beat * fmod (dbeats, 1.0)));
+        ticks = rint (floor (BBT_Time::ticks_per_bar_division * fmod (dbeats, 1.0)));
 }
index 226a2fc894567b19e50797b863000679a10ce898..46307dbc04c6882b5636a6b91fe6f8c18e6b8a3f 100644 (file)
@@ -27,7 +27,7 @@ namespace Timecode {
 
 /** Bar, Beat, Tick Time (i.e. Tempo-Based Time) */
 struct BBT_Time {
-       static const double ticks_per_beat;
+       static const double ticks_per_bar_division;
 
        uint32_t bars;
        uint32_t beats;