Try to be more accurate in drawing measure lines.
This commit is contained in:
parent
50897c6cd7
commit
30b4c1bb4b
|
@ -406,12 +406,14 @@ Timeline::draw_measure ( nframes_t when, int Y, int W, int H, Fl_Color color, me
|
||||||
|
|
||||||
tp = (Tempo_Point*)(*tpi);
|
tp = (Tempo_Point*)(*tpi);
|
||||||
|
|
||||||
const nframes_t ntpo = ntp ? ntp->start() : when + x_to_ts( W + 1 );
|
nframes_t ntpo = ntp ? ntp->start() : when + x_to_ts( W + 1 );
|
||||||
|
|
||||||
beat_inc = samples_per_minute / tp->tempo();
|
beat_inc = samples_per_minute / tp->tempo();
|
||||||
|
|
||||||
const int incx = ts_to_x( beat_inc );
|
const int incx = ts_to_x( beat_inc );
|
||||||
|
|
||||||
|
/* lock to beat lines */
|
||||||
|
ntpo += (ntpo % beat_inc);
|
||||||
|
|
||||||
if ( incx < 8 )
|
if ( incx < 8 )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue