diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc index b02543767a..4e8858b84c 100644 --- a/gtk2_ardour/editor_canvas.cc +++ b/gtk2_ardour/editor_canvas.cc @@ -319,20 +319,20 @@ Editor::track_canvas_size_allocated () if (playhead_cursor) playhead_cursor->set_length (canvas_height); for (MarkerSelection::iterator x = selection->markers.begin(); x != selection->markers.end(); ++x) { - (*x)->set_line_length (canvas_height); + (*x)->set_line_length (full_canvas_height); } - range_marker_drag_rect->property_y2() = canvas_height; - transport_loop_range_rect->property_y2() = canvas_height; - transport_punch_range_rect->property_y2() = canvas_height; - transport_punchin_line->property_y2() = canvas_height; - transport_punchout_line->property_y2() = canvas_height; + range_marker_drag_rect->property_y2() = full_canvas_height; + transport_loop_range_rect->property_y2() = full_canvas_height; + transport_punch_range_rect->property_y2() = full_canvas_height; + transport_punchin_line->property_y2() = full_canvas_height; + transport_punchout_line->property_y2() = full_canvas_height; update_fixed_rulers(); redisplay_tempo (true); if (logo_item) { - // logo_item->property_height() = canvas_height; + // logo_item->property_height() = full_canvas_height; // logo_item->property_width() = canvas_width; } diff --git a/gtk2_ardour/editor_markers.cc b/gtk2_ardour/editor_markers.cc index c36cb5bf06..ce9c94082c 100644 --- a/gtk2_ardour/editor_markers.cc +++ b/gtk2_ardour/editor_markers.cc @@ -1172,7 +1172,7 @@ Editor::marker_selection_changed () } for (MarkerSelection::iterator x = selection->markers.begin(); x != selection->markers.end(); ++x) { - (*x)->add_line (cursor_group, canvas_height); + (*x)->add_line (cursor_group, full_canvas_height); (*x)->show_line (); } diff --git a/gtk2_ardour/editor_timefx.cc b/gtk2_ardour/editor_timefx.cc index 75838eb5fc..0691ab7ddb 100644 --- a/gtk2_ardour/editor_timefx.cc +++ b/gtk2_ardour/editor_timefx.cc @@ -62,9 +62,9 @@ Editor::TimeFXDialog::TimeFXDialog (Editor& e, bool pitch) : ArdourDialog (X_("time fx dialog")), editor (e), pitching (pitch), - pitch_octave_adjustment (0.0, 0.0, 4.0, 1, 2.0), - pitch_semitone_adjustment (0.0, 0.0, 12.0, 1.0, 4.0), - pitch_cent_adjustment (0.0, 0.0, 150.0, 5.0, 15.0), + pitch_octave_adjustment (0.0, -4.0, 4.0, 1, 2.0), + pitch_semitone_adjustment (0.0, -12.0, 12.0, 1.0, 4.0), + pitch_cent_adjustment (0.0, -499.0, 500.0, 5.0, 15.0), pitch_octave_spinner (pitch_octave_adjustment), pitch_semitone_spinner (pitch_semitone_adjustment), pitch_cent_spinner (pitch_cent_adjustment), @@ -217,6 +217,7 @@ Editor::time_fx (RegionSelection& regions, float val, bool pitching) if (pitching) { float cents = current_timefx->pitch_octave_adjustment.get_value() * 1200.0; + float pitch_fraction; cents += current_timefx->pitch_semitone_adjustment.get_value() * 100.0; cents += current_timefx->pitch_cent_adjustment.get_value(); @@ -226,19 +227,15 @@ Editor::time_fx (RegionSelection& regions, float val, bool pitching) return 0; } - // we now have the pitch shift in cents. divide by 1200 to get octaves - // then multiply by 2.0 because 1 octave == doubling the frequency - - cents /= 1200.0; - cents /= 2.0; - - // add 1.0 to convert to RB scale - - cents += 1.0; + // one octave == 1200 cents + // adding one octave doubles the frequency + // ratio is 2^^octaves + + pitch_fraction = pow(2, cents/1200); current_timefx->request.time_fraction = 1.0; - current_timefx->request.pitch_fraction = cents; - + current_timefx->request.pitch_fraction = pitch_fraction; + } else { current_timefx->request.time_fraction = val;