frames_from_start = 0;
}
- step_edit_beat_pos = step_edit_region_view->frames_to_beats (frames_from_start);
+ step_edit_beat_pos = step_edit_region_view->region_frames_to_region_beats (frames_from_start);
step_edit_region_view->move_step_edit_cursor (step_edit_beat_pos);
}
{
if (beats > 0.0) {
step_edit_beat_pos = min (step_edit_beat_pos + beats,
- step_edit_region_view->frames_to_beats (step_edit_region->length()));
+ step_edit_region_view->region_frames_to_region_beats (step_edit_region->length()));
} else if (beats < 0.0) {
if (-beats < step_edit_beat_pos) {
step_edit_beat_pos += beats; // its negative, remember
/* make sure its visible on the horizontal axis */
- framepos_t fpos = step_edit_region->position() +
- step_edit_region_view->beats_to_frames (step_edit_beat_pos + beat_duration);
+ framepos_t fpos = step_edit_region_view->region_beats_to_absolute_frames (step_edit_beat_pos + beat_duration);
if (fpos >= (_editor.leftmost_position() + _editor.current_page_frames())) {
_editor.reset_x_origin (fpos - (_editor.current_page_frames()/4));
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);
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);
}
return;
}
- framepos_t fpos = step_edit_region->position() +
- step_edit_region_view->beats_to_frames (step_edit_beat_pos);
+ framepos_t fpos = step_edit_region_view->region_beats_to_absolute_frames (step_edit_beat_pos);
fpos = _session->tempo_map().round_to_bar (fpos, 1);
- step_edit_beat_pos = ceil (step_edit_region_view->frames_to_beats (fpos - step_edit_region->position()));
+ step_edit_beat_pos = ceil (step_edit_region_view->region_frames_to_region_beats (fpos - step_edit_region->position()));
step_edit_region_view->move_step_edit_cursor (step_edit_beat_pos);
}