diff --git a/Timeline/Engine/Engine.C b/Timeline/Engine/Engine.C index 7bc4bad..ae2149c 100644 --- a/Timeline/Engine/Engine.C +++ b/Timeline/Engine/Engine.C @@ -174,6 +174,7 @@ Engine::timebase ( jack_transport_state_t, jack_nframes_t, jack_position_t *pos, position_info pi = timeline->solve_tempomap( pos->frame ); pos->valid = JackPositionBBT; + pos->beats_per_bar = pi.beats_per_bar; pos->beat_type = pi.beat_type; pos->beats_per_minute = pi.tempo; diff --git a/Timeline/TLE.fl b/Timeline/TLE.fl index 153aacb..e25459c 100644 --- a/Timeline/TLE.fl +++ b/Timeline/TLE.fl @@ -161,7 +161,7 @@ Loggable::progress_callback( &TLE::progress_cb, this );} {} } { Fl_Window main_window { label Timeline - xywh {254 189 1025 770} type Double resizable xclass Non_DAW visible + xywh {174 117 1025 770} type Double resizable xclass Non_DAW visible } { Fl_Menu_Bar menubar { xywh {0 0 1024 25} @@ -933,7 +933,7 @@ while ( _window->shown() ) } { Fl_Window _window { label {Project info} open selected - xywh {394 254 520 625} type Double visible + xywh {215 260 520 625} type Double visible } { Fl_Value_Output {} { label {Sample Rate} diff --git a/Timeline/Timeline.C b/Timeline/Timeline.C index bdf06a1..a553b12 100644 --- a/Timeline/Timeline.C +++ b/Timeline/Timeline.C @@ -686,6 +686,11 @@ Timeline::render_tempomap( nframes_t start, nframes_t length, measure_line_callb BBT &bbt = pos.bbt; + /* default values */ + pos.beat_type = 4; + pos.beats_per_bar = 4; + pos.tempo = 120.0; + const nframes_t samples_per_minute = sample_rate() * 60; float bpm = 120.0f;