TempoMap - rename some methods.
gui_move_tempo -> gui_set_tempo_position gui_move_meter -> gui_set_meter_position gui_dilate_tempo -> gui_stretch_tempo
This commit is contained in:
parent
27b95300e2
commit
d4f7f5ffa2
@ -3310,7 +3310,7 @@ MeterMarkerDrag::motion (GdkEvent* event, bool first_move)
|
||||
pf = adjusted_current_frame (event, false);
|
||||
}
|
||||
|
||||
_editor->session()->tempo_map().gui_move_meter (_real_section, pf);
|
||||
_editor->session()->tempo_map().gui_set_meter_position (_real_section, pf);
|
||||
|
||||
/* fake marker meeds to stay under the mouse, unlike the real one. */
|
||||
_marker->set_position (adjusted_current_frame (event, false));
|
||||
@ -3473,7 +3473,7 @@ TempoMarkerDrag::motion (GdkEvent* event, bool first_move)
|
||||
/* snap to beat is 1, snap to bar is -1 (sorry) */
|
||||
const int sub_num = _editor->get_grid_music_divisions (event->button.state);
|
||||
|
||||
map.gui_move_tempo (_real_section, pf, sub_num);
|
||||
map.gui_set_tempo_position (_real_section, pf, sub_num);
|
||||
|
||||
show_verbose_cursor_time (_real_section->frame());
|
||||
}
|
||||
@ -3572,7 +3572,7 @@ BBTRulerDrag::motion (GdkEvent* event, bool first_move)
|
||||
if (first_move) {
|
||||
/* get current state */
|
||||
before_state = &map.get_state();
|
||||
_editor->begin_reversible_command (_("dilate tempo"));
|
||||
_editor->begin_reversible_command (_("stretch tempo"));
|
||||
}
|
||||
|
||||
framepos_t pf;
|
||||
@ -3585,7 +3585,7 @@ BBTRulerDrag::motion (GdkEvent* event, bool first_move)
|
||||
|
||||
if (ArdourKeyboard::indicates_constraint (event->button.state)) {
|
||||
/* adjust previous tempo to match pointer frame */
|
||||
_editor->session()->tempo_map().gui_dilate_tempo (_tempo, map.frame_at_quarter_note (_grab_qn), pf);
|
||||
_editor->session()->tempo_map().gui_stretch_tempo (_tempo, map.frame_at_quarter_note (_grab_qn), pf);
|
||||
}
|
||||
ostringstream sstr;
|
||||
sstr << "^" << fixed << setprecision(3) << map.tempo_at_frame (pf).note_types_per_minute() << "\n";
|
||||
|
@ -483,10 +483,10 @@ class LIBARDOUR_API TempoMap : public PBD::StatefulDestructible
|
||||
Tempo tempo_at_quarter_note (const double& beat) const;
|
||||
double quarter_note_at_tempo (const Tempo& tempo) const;
|
||||
|
||||
void gui_move_tempo (TempoSection*, const framepos_t& frame, const int& sub_num);
|
||||
void gui_move_meter (MeterSection*, const framepos_t& frame);
|
||||
void gui_set_tempo_position (TempoSection*, const framepos_t& frame, const int& sub_num);
|
||||
void gui_set_meter_position (MeterSection*, const framepos_t& frame);
|
||||
bool gui_change_tempo (TempoSection*, const Tempo& bpm);
|
||||
void gui_dilate_tempo (TempoSection* tempo, const framepos_t& frame, const framepos_t& end_frame);
|
||||
void gui_stretch_tempo (TempoSection* tempo, const framepos_t& frame, const framepos_t& end_frame);
|
||||
|
||||
std::pair<double, framepos_t> predict_tempo_position (TempoSection* section, const Timecode::BBT_Time& bbt);
|
||||
bool can_solve_bbt (TempoSection* section, const Timecode::BBT_Time& bbt);
|
||||
|
@ -1041,7 +1041,6 @@ TempoMap::do_insert (MetricSection* section)
|
||||
|
||||
if (tempo) {
|
||||
bool const ipm = insert_tempo->position_lock_style() == MusicTime;
|
||||
const bool tpm = tempo->position_lock_style() == MusicTime;
|
||||
const bool lm = insert_tempo->locked_to_meter();
|
||||
if ((ipm && tempo->pulse() > insert_tempo->pulse()) || (!ipm && tempo->frame() > insert_tempo->frame())
|
||||
|| (lm && tempo->pulse() > insert_tempo->pulse())) {
|
||||
@ -3211,7 +3210,7 @@ TempoMap::predict_tempo_position (TempoSection* section, const BBT_Time& bbt)
|
||||
* if sub_num is zero, the musical position will be taken from the supplied frame.
|
||||
*/
|
||||
void
|
||||
TempoMap::gui_move_tempo (TempoSection* ts, const framepos_t& frame, const int& sub_num)
|
||||
TempoMap::gui_set_tempo_position (TempoSection* ts, const framepos_t& frame, const int& sub_num)
|
||||
{
|
||||
Metrics future_map;
|
||||
|
||||
@ -3284,7 +3283,7 @@ TempoMap::gui_move_tempo (TempoSection* ts, const framepos_t& frame, const int&
|
||||
* leaving the meter position unchanged.
|
||||
*/
|
||||
void
|
||||
TempoMap::gui_move_meter (MeterSection* ms, const framepos_t& frame)
|
||||
TempoMap::gui_set_meter_position (MeterSection* ms, const framepos_t& frame)
|
||||
{
|
||||
Metrics future_map;
|
||||
|
||||
@ -3353,7 +3352,7 @@ TempoMap::gui_change_tempo (TempoSection* ts, const Tempo& bpm)
|
||||
}
|
||||
|
||||
void
|
||||
TempoMap::gui_dilate_tempo (TempoSection* ts, const framepos_t& frame, const framepos_t& end_frame)
|
||||
TempoMap::gui_stretch_tempo (TempoSection* ts, const framepos_t& frame, const framepos_t& end_frame)
|
||||
{
|
||||
/*
|
||||
Ts (future prev_t) Tnext
|
||||
@ -4397,11 +4396,11 @@ TempoMap::insert_time (framepos_t where, framecnt_t amount)
|
||||
TempoSection* ts;
|
||||
|
||||
if ((ms = dynamic_cast <MeterSection*>(*i)) != 0) {
|
||||
gui_move_meter (ms, (*i)->frame() + amount);
|
||||
gui_set_meter_position (ms, (*i)->frame() + amount);
|
||||
}
|
||||
|
||||
if ((ts = dynamic_cast <TempoSection*>(*i)) != 0) {
|
||||
gui_move_tempo (ts, (*i)->frame() + amount, 0);
|
||||
gui_set_tempo_position (ts, (*i)->frame() + amount, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user