40 #include <rubberband/RubberBandStretcher.h>
56 , pitch_octave_adjustment (0.0, -4.0, 4.0, 1, 2.0)
57 , pitch_semitone_adjustment (0.0, -12.0, 12.0, 1.0, 4.0)
58 , pitch_cent_adjustment (0.0, -499.0, 500.0, 5.0, 15.0)
59 , pitch_octave_spinner (pitch_octave_adjustment)
60 , pitch_semitone_spinner (pitch_semitone_adjustment)
61 , pitch_cent_spinner (pitch_cent_adjustment)
62 , quick_button (
_(
"Quick but Ugly"))
63 , antialias_button (
_(
"Skip Anti-aliasing"))
64 , stretch_opts_label (
_(
"Contents:"))
65 , precise_button (
_(
"Minimize time distortion"))
66 , preserve_formants_button(
_(
"Preserve Formants"))
69 set_skip_taskbar_hint (
true);
70 set_resizable (
false);
71 set_name (
N_(
"TimeFXDialog"));
74 set_title (
_(
"Pitch Shift Audio"));
76 set_title (
_(
"Time Stretch Audio"));
79 cancel_button = add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
81 VBox* vbox = manage (
new VBox);
84 get_vbox()->set_spacing (4);
86 vbox->set_spacing (18);
87 vbox->set_border_width (5);
91 l = manage (
new Label (
_(
"<b>Options</b>"), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER,
false ));
97 Table* table = manage (
new Table (4, 3,
false));
98 table->set_row_spacings (6);
99 table->set_col_spacing (1, 6);
100 l = manage (
new Label (
"", Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER,
false ));
101 l->set_padding (8, 0);
102 table->attach (*l, 0, 1, 0, 4, Gtk::FILL, Gtk::FILL, 0, 0);
104 l = manage (
new Label (
_(
"Octaves:"), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER,
false));
105 table->attach (*l, 1, 2, 0, 1, Gtk::FILL, Gtk::EXPAND, 0, 0);
109 l = manage (
new Label (
_(
"Semitones:"), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER,
false));
110 table->attach (*l, 1, 2, 1, 2, Gtk::FILL, Gtk::EXPAND, 0, 0);
114 l = manage (
new Label (
_(
"Cents:"), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER,
false));
116 table->attach (*l, 1, 2, 2, 3, Gtk::FILL, Gtk::EXPAND, 0, 0);
117 table->attach (
pitch_cent_spinner, 2, 3, 2, 3, Gtk::FILL, Gtk::EXPAND & Gtk::FILL, 0, 0);
122 add_button (
S_(
"Time|Shift"), Gtk::RESPONSE_ACCEPT);
126 Table* table = manage (
new Table (2, 3,
false));
127 table->set_row_spacings (6);
128 table->set_col_spacing (1, 6);
129 l = manage (
new Label (
"", Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER,
false ));
130 l->set_padding (8, 0);
131 table->attach (*l, 0, 1, 0, 2, Gtk::FILL, Gtk::FILL, 0, 0);
133 #ifdef USE_RUBBERBAND
134 vector<string> strings;
143 table->attach (
precise_button, 1, 3, 1, 2, Gtk::FILL, Gtk::EXPAND, 0, 0);
147 table->attach (
quick_button, 1, 3, 0, 1, Gtk::FILL, Gtk::EXPAND, 0, 0);
154 add_button (
_(
"Stretch/Shrink"), Gtk::RESPONSE_ACCEPT);
159 set_default_response (Gtk::RESPONSE_ACCEPT);
161 VBox* progress_box = manage (
new VBox);
162 progress_box->set_spacing (6);
164 l = manage (
new Label (
_(
"<b>Progress</b>"), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER,
false));
165 l->set_use_markup ();
167 progress_box->pack_start (*l,
false,
false);
172 vbox->pack_start (*progress_box,
false,
true);
174 get_vbox()->pack_start (*vbox,
false,
false);
176 show_all_children ();
sigc::connection first_delete
Gtk::CheckButton precise_button
Gtk::ComboBoxText stretch_opts_selector
Gtk::ProgressBar progress_bar
Gtk::SpinButton pitch_octave_spinner
Gtk::SpinButton pitch_semitone_spinner
Gtk::CheckButton antialias_button
Gtk::Button * cancel_button
LIBGTKMM2EXT_API void set_popdown_strings(Gtk::ComboBoxText &, const std::vector< std::string > &)
Gtk::Label stretch_opts_label
Gtk::VBox upper_button_box
gint delete_in_progress(GdkEventAny *)
Gtk::CheckButton quick_button
void update_progress_gui(float)
void cancel_in_progress()
ARDOUR::TimeFXRequest request
TimeFXDialog(Editor &e, bool for_pitch)
sigc::connection first_cancel
Gtk::SpinButton pitch_cent_spinner
Gtk::CheckButton preserve_formants_button