remove incorrectly retained code (post rebase conflict resolution)
This commit is contained in:
parent
bb87f33506
commit
9531878596
@ -1414,182 +1414,6 @@ Editor::metric_get_bbt (std::vector<ArdourCanvas::Ruler::Mark>& marks, int64_t l
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case bbt_show_thirtyseconds:
|
||||
|
||||
beats = distance (grid.begin(), grid.end());
|
||||
bbt_nmarks = (beats + 2) * bbt_beat_subdivision;
|
||||
|
||||
bbt_position_of_helper = lower + (3 * Editor::get_current_zoom ());
|
||||
|
||||
mark.label = "";
|
||||
mark.position = lower;
|
||||
mark.style = ArdourCanvas::Ruler::Mark::Micro;
|
||||
marks.push_back (mark);
|
||||
|
||||
for (n = 1, i = grid.begin(); n < bbt_nmarks && i != grid.end(); ++i) {
|
||||
|
||||
if ((*i).sample < lower && (bbt_bar_helper_on)) {
|
||||
snprintf (buf, sizeof(buf), "<%" PRIu32 "|%" PRIu32, (*i).bar, (*i).beat);
|
||||
edit_last_mark_label (marks, buf);
|
||||
helper_active = true;
|
||||
} else {
|
||||
|
||||
if ((*i).is_bar()) {
|
||||
mark.style = ArdourCanvas::Ruler::Mark::Major;
|
||||
snprintf (buf, sizeof(buf), "%" PRIu32, (*i).bar);
|
||||
} else {
|
||||
mark.style = ArdourCanvas::Ruler::Mark::Minor;
|
||||
snprintf (buf, sizeof(buf), "%" PRIu32, (*i).beat);
|
||||
}
|
||||
if (((*i).sample < bbt_position_of_helper) && helper_active) {
|
||||
buf[0] = '\0';
|
||||
}
|
||||
mark.label = buf;
|
||||
mark.position = (*i).sample;
|
||||
marks.push_back (mark);
|
||||
n++;
|
||||
}
|
||||
|
||||
/* Add the tick marks */
|
||||
skip = Temporal::ticks_per_beat / bbt_beat_subdivision;
|
||||
|
||||
next_beat.beats = (*i).beat;
|
||||
next_beat.bars = (*i).bar;
|
||||
tick = skip; // the first non-beat tick
|
||||
t = 0;
|
||||
while (tick < Temporal::ticks_per_beat && (n < bbt_nmarks)) {
|
||||
|
||||
next_beat.ticks = tick;
|
||||
pos = _session->tempo_map().sample_at_bbt (next_beat);
|
||||
if (t % bbt_accent_modulo == (bbt_accent_modulo - 1)) {
|
||||
i_am_accented = true;
|
||||
}
|
||||
|
||||
if (pos > bbt_position_of_helper) {
|
||||
snprintf (buf, sizeof(buf), "%" PRIu32, tick);
|
||||
} else {
|
||||
buf[0] = '\0';
|
||||
}
|
||||
|
||||
mark.label = buf;
|
||||
mark.position = pos;
|
||||
|
||||
if ((bbt_beat_subdivision > 4) && i_am_accented) {
|
||||
mark.style = ArdourCanvas::Ruler::Mark::Minor;
|
||||
} else {
|
||||
mark.style = ArdourCanvas::Ruler::Mark::Micro;
|
||||
}
|
||||
i_am_accented = false;
|
||||
marks.push_back (mark);
|
||||
|
||||
tick += skip;
|
||||
++t;
|
||||
++n;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case bbt_show_many:
|
||||
bbt_nmarks = 1;
|
||||
snprintf (buf, sizeof(buf), "cannot handle %" PRIu32 " bars", bbt_bars);
|
||||
mark.style = ArdourCanvas::Ruler::Mark::Major;
|
||||
mark.label = buf;
|
||||
mark.position = lower;
|
||||
marks.push_back (mark);
|
||||
break;
|
||||
|
||||
case bbt_show_64:
|
||||
bbt_nmarks = (gint) (bbt_bars / 64) + 1;
|
||||
for (n = 0, i = grid.begin(); i != grid.end() && n < bbt_nmarks; i++) {
|
||||
if ((*i).is_bar()) {
|
||||
if ((*i).bar % 64 == 1) {
|
||||
if ((*i).bar % 256 == 1) {
|
||||
snprintf (buf, sizeof(buf), "%" PRIu32, (*i).bar);
|
||||
mark.style = ArdourCanvas::Ruler::Mark::Major;
|
||||
} else {
|
||||
buf[0] = '\0';
|
||||
if ((*i).bar % 256 == 129) {
|
||||
mark.style = ArdourCanvas::Ruler::Mark::Minor;
|
||||
} else {
|
||||
mark.style = ArdourCanvas::Ruler::Mark::Micro;
|
||||
}
|
||||
}
|
||||
mark.label = buf;
|
||||
mark.position = (*i).sample;
|
||||
marks.push_back (mark);
|
||||
++n;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case bbt_show_16:
|
||||
bbt_nmarks = (bbt_bars / 16) + 1;
|
||||
for (n = 0, i = grid.begin(); i != grid.end() && n < bbt_nmarks; i++) {
|
||||
if ((*i).is_bar()) {
|
||||
if ((*i).bar % 16 == 1) {
|
||||
if ((*i).bar % 64 == 1) {
|
||||
snprintf (buf, sizeof(buf), "%" PRIu32, (*i).bar);
|
||||
mark.style = ArdourCanvas::Ruler::Mark::Major;
|
||||
} else {
|
||||
buf[0] = '\0';
|
||||
if ((*i).bar % 64 == 33) {
|
||||
mark.style = ArdourCanvas::Ruler::Mark::Minor;
|
||||
} else {
|
||||
mark.style = ArdourCanvas::Ruler::Mark::Micro;
|
||||
}
|
||||
}
|
||||
mark.label = buf;
|
||||
mark.position = (*i).sample;
|
||||
marks.push_back (mark);
|
||||
++n;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case bbt_show_4:
|
||||
bbt_nmarks = (bbt_bars / 4) + 1;
|
||||
for (n = 0, i = grid.begin(); i != grid.end() && n < bbt_nmarks; ++i) {
|
||||
if ((*i).is_bar()) {
|
||||
if ((*i).bar % 4 == 1) {
|
||||
if ((*i).bar % 16 == 1) {
|
||||
snprintf (buf, sizeof(buf), "%" PRIu32, (*i).bar);
|
||||
mark.style = ArdourCanvas::Ruler::Mark::Major;
|
||||
} else {
|
||||
buf[0] = '\0';
|
||||
if ((*i).bar % 16 == 9) {
|
||||
mark.style = ArdourCanvas::Ruler::Mark::Minor;
|
||||
} else {
|
||||
mark.style = ArdourCanvas::Ruler::Mark::Micro;
|
||||
}
|
||||
}
|
||||
mark.label = buf;
|
||||
mark.position = (*i).sample;
|
||||
marks.push_back (mark);
|
||||
++n;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case bbt_show_1:
|
||||
// default:
|
||||
bbt_nmarks = bbt_bars + 2;
|
||||
for (n = 0, i = grid.begin(); i != grid.end() && n < bbt_nmarks; ++i) {
|
||||
if ((*i).is_bar()) {
|
||||
snprintf (buf, sizeof(buf), "%" PRIu32, (*i).bbt().bars);
|
||||
mark.style = ArdourCanvas::Ruler::Mark::Major;
|
||||
mark.label = buf;
|
||||
mark.position = (*i).sample;
|
||||
marks.push_back (mark);
|
||||
++n;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user