2 Copyright (C) 2001 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #include <ardour/audioregion.h>
22 #include <ardour/utils.h>
23 #include <gtkmm2ext/utils.h>
24 #include <gtkmm2ext/stop_signal.h>
27 #include "region_editor.h"
28 #include "regionview.h"
29 #include "ardour_ui.h"
34 using namespace ARDOUR;
38 AudioRegionEditor::AudioRegionEditor (Session&s, AudioRegion& r, AudioRegionView& rv)
39 : ArdourDialog ("audio region editor"),
43 name_label (_("NAME:")),
44 lock_button (_("lock")),
45 mute_button (_("mute")),
46 opaque_button (_("opaque")),
47 raise_arrow (Gtk::ARROW_UP, Gtk::SHADOW_OUT),
48 lower_arrow (Gtk::ARROW_DOWN, Gtk::SHADOW_OUT),
49 layer_label (_("Layer")),
50 audition_label (_("play")),
52 start_clock ("AudioRegionEditorClock", true),
53 end_clock ("AudioRegionEditorClock", true),
54 length_clock ("AudioRegionEditorClock", true, true),
55 sync_offset_clock ("AudioRegionEditorClock", true, true),
56 envelope_loop_table (1, 3),
57 envelope_label (_("ENVELOPE")),
59 fade_in_length_adjustment (5.0, 0.0, 10000, 0.05, 1),
60 fade_in_length_spinner (fade_in_length_adjustment, 10),
61 fade_out_table (4, 3),
62 fade_out_length_adjustment (5.0, 0.0, 10000, 0.05, 1),
63 fade_out_length_spinner (fade_out_length_adjustment, 10)
66 start_clock.set_session (&_session);
67 end_clock.set_session (&_session);
68 length_clock.set_session (&_session);
70 name_entry.set_name ("AudioRegionEditorEntry");
71 name_label.set_name ("AudioRegionEditorLabel");
73 name_hbox.set_spacing (5);
74 name_hbox.pack_start (name_label, false, false);
75 name_hbox.pack_start (name_entry, false, false);
77 raise_button.add (raise_arrow);
78 lower_button.add (lower_arrow);
79 layer_frame.set_name ("BaseFrame");
80 layer_frame.set_shadow_type (Gtk::SHADOW_IN);
81 layer_frame.add (layer_value_label);
82 layer_label.set_name ("AudioRegionEditorLabel");
83 layer_value_label.set_name ("AudioRegionEditorLabel");
84 Gtkmm2ext::set_size_request_to_display_given_text (layer_value_label, "99", 5, 2);
86 layer_hbox.set_spacing (5);
87 layer_hbox.pack_start (layer_label, false, false);
88 layer_hbox.pack_start (layer_frame, false, false);
90 layer_hbox.pack_start (raise_button, false, false);
91 layer_hbox.pack_start (lower_button, false, false);
94 audition_button.add (audition_label);
96 mute_button.set_name ("AudioRegionEditorToggleButton");
97 opaque_button.set_name ("AudioRegionEditorToggleButton");
98 lock_button.set_name ("AudioRegionEditorToggleButton");
99 envelope_active_button.set_name ("AudioRegionEditorToggleButton");
100 envelope_view_button.set_name ("AudioRegionEditorToggleButton");
101 fade_in_active_button.set_name ("AudioRegionEditorToggleButton");
102 fade_out_active_button.set_name ("AudioRegionEditorToggleButton");
103 audition_button.set_name ("AudioRegionEditorToggleButton");
105 ARDOUR_UI::instance()->tooltips().set_tip (mute_button, _("mute this region"));
106 ARDOUR_UI::instance()->tooltips().set_tip (opaque_button, _("regions underneath this one cannot be heard"));
107 ARDOUR_UI::instance()->tooltips().set_tip (lock_button, _("prevent any changes to this region"));
108 ARDOUR_UI::instance()->tooltips().set_tip (envelope_active_button, _("use the gain envelope during playback"));
109 ARDOUR_UI::instance()->tooltips().set_tip (envelope_view_button, _("show the gain envelope"));
110 ARDOUR_UI::instance()->tooltips().set_tip (fade_in_active_button, _("use fade in curve during playback"));
111 ARDOUR_UI::instance()->tooltips().set_tip (fade_out_active_button, _("use fade out curve during playback"));
112 ARDOUR_UI::instance()->tooltips().set_tip (audition_button, _("audition this region"));
114 mute_button.unset_flags (Gtk::CAN_FOCUS);
115 opaque_button.unset_flags (Gtk::CAN_FOCUS);
116 lock_button.unset_flags (Gtk::CAN_FOCUS);
117 envelope_active_button.unset_flags (Gtk::CAN_FOCUS);
118 envelope_view_button.unset_flags (Gtk::CAN_FOCUS);
119 fade_in_active_button.unset_flags (Gtk::CAN_FOCUS);
120 fade_out_active_button.unset_flags (Gtk::CAN_FOCUS);
121 audition_button.unset_flags (Gtk::CAN_FOCUS);
123 mute_button.set_events (mute_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
124 opaque_button.set_events (opaque_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
125 lock_button.set_events (lock_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
126 envelope_active_button.set_events (envelope_active_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
127 envelope_view_button.set_events (envelope_view_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
128 fade_in_active_button.set_events (fade_in_active_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
129 fade_out_active_button.set_events (fade_out_active_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
130 audition_button.set_events (audition_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
132 top_row_button_hbox.set_border_width (5);
133 top_row_button_hbox.set_spacing (5);
134 top_row_button_hbox.set_homogeneous (false);
135 top_row_button_hbox.pack_start (mute_button, false, false);
136 top_row_button_hbox.pack_start (opaque_button, false, false);
137 top_row_button_hbox.pack_start (lock_button, false, false);
138 top_row_button_hbox.pack_start (layer_hbox, false, false, 5);
139 top_row_button_hbox.pack_end (audition_button, false, false);
141 top_row_hbox.pack_start (name_hbox, true, true);
142 top_row_hbox.pack_end (top_row_button_hbox, true, true);
144 start_label.set_name ("AudioRegionEditorLabel");
145 start_label.set_text (_("START:"));
146 end_label.set_name ("AudioRegionEditorLabel");
147 end_label.set_text (_("END:"));
148 length_label.set_name ("AudioRegionEditorLabel");
149 length_label.set_text (_("LENGTH:"));
151 time_table.set_col_spacings (2);
152 time_table.set_row_spacings (5);
153 time_table.set_border_width (5);
155 start_alignment.set (1.0, 0.5);
156 end_alignment.set (1.0, 0.5);
157 length_alignment.set (1.0, 0.5);
159 start_alignment.add (start_label);
160 end_alignment.add (end_label);
161 length_alignment.add (length_label);
163 time_table.attach (start_alignment, 0, 1, 0, 1, Gtk::FILL, Gtk::FILL);
164 time_table.attach (start_clock, 1, 2, 0, 1, Gtk::FILL, Gtk::FILL);
166 time_table.attach (end_alignment, 0, 1, 1, 2, Gtk::FILL, Gtk::FILL);
167 time_table.attach (end_clock, 1, 2, 1, 2, Gtk::FILL, Gtk::FILL);
169 time_table.attach (length_alignment, 0, 1, 2, 3, Gtk::FILL, Gtk::FILL);
170 time_table.attach (length_clock, 1, 2, 2, 3, Gtk::FILL, Gtk::FILL);
172 envelope_label.set_name ("AudioRegionEditorLabel");
174 envelope_active_button_label.set_text (_("active"));
175 envelope_active_button.add (envelope_active_button_label);
176 envelope_view_button_label.set_text (_("visible"));
177 envelope_view_button.add (envelope_view_button_label);
179 envelope_loop_table.set_border_width (5);
180 envelope_loop_table.set_row_spacings (2);
181 envelope_loop_table.attach (envelope_label, 0, 1, 0, 1, Gtk::FILL, Gtk::FILL);
182 envelope_loop_table.attach (envelope_active_button, 0, 1, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
183 envelope_loop_table.attach (envelope_view_button, 0, 1, 2, 3, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
187 fade_in_table.set_border_width (5);
188 fade_in_table.set_homogeneous (false);
190 fade_in_label.set_name ("AudioRegionEditorLabel");
191 fade_in_active_button_label.set_name ("AudioRegionEditorSmallLabel");
192 fade_in_length_label.set_name ("AudioRegionEditorSmallLabel");
194 fade_in_label.set_text (_("FADE IN"));
195 fade_in_active_button_label.set_text (_("active"));
196 fade_in_length_label.set_text (_("msecs"));
198 fade_in_active_button.add (fade_in_active_button_label);
200 fade_in_length_spinner.set_name("GenericSpinner");
202 fade_in_length_spinner.set_digits (3);
204 fade_in_length_spinner.signal_activate().connect (mem_fun(*this, &AudioRegionEditor::activation));
206 Gtkmm2ext::set_size_request_to_display_given_text (fade_in_length_spinner, "500g", 20, -1);
208 fade_in_label_align.add (fade_in_label);
209 fade_in_label_align.set (0.5);
212 fade_in_table.attach (fade_in_label_align, 0, 2, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
214 fade_in_table.attach (fade_in_length_label, 0, 1, 1, 2, Gtk::EXPAND, Gtk::FILL);
215 fade_in_table.attach (fade_in_length_spinner, 0, 1, 2, 3, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
217 fade_in_table.attach (fade_in_active_button, 0, 2, 3, 5, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
221 fade_out_table.set_border_width (5);
222 fade_out_table.set_homogeneous (false);
224 fade_out_label.set_name ("AudioRegionEditorLabel");
225 fade_out_active_button_label.set_name ("AudioRegionEditorSmallLabel");
226 fade_out_length_label.set_name ("AudioRegionEditorSmallLabel");
228 fade_out_label.set_text (_("FADE OUT"));
229 fade_out_active_button_label.set_text (_("active"));
230 fade_out_length_label.set_text (_("msecs"));
232 fade_out_active_button.add (fade_out_active_button_label);
234 fade_out_length_spinner.set_name("GenericSpinner");
236 fade_out_length_spinner.set_digits (3);
238 fade_out_length_spinner.signal_activate().connect (mem_fun(*this, &AudioRegionEditor::activation));
240 Gtkmm2ext::set_size_request_to_display_given_text (fade_out_length_spinner, "500g", 20, -1);
242 fade_out_label_align.add (fade_out_label);
243 fade_out_label_align.set (0.5);
245 fade_out_table.attach (fade_out_label_align, 0, 2, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
247 fade_out_table.attach (fade_out_length_label, 0, 1, 1, 2, Gtk::EXPAND, Gtk::FILL);
248 fade_out_table.attach (fade_out_length_spinner, 0, 1, 2, 3, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
250 fade_out_table.attach (fade_out_active_button, 0, 2, 3, 5, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
252 lower_hbox.pack_start (time_table, true, true);
253 lower_hbox.pack_start (sep1, false, false);
254 lower_hbox.pack_start (envelope_loop_table, true, true);
255 lower_hbox.pack_start (sep2, false, false);
256 lower_hbox.pack_start (fade_in_table, true, true);
257 lower_hbox.pack_start (fade_out_table, true, true);
259 upper_vbox.pack_start (top_row_hbox, true, true);
260 upper_vbox.pack_start (sep3, false, false);
261 upper_vbox.pack_start (lower_hbox, true, true);
264 set_name ("AudioRegionEditorWindow");
265 add_events (Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK);
267 signal_delete_event().connect (bind (sigc::ptr_fun (just_hide_it), static_cast<Window *> (this)));
269 string title = _("ardour: region ");
270 title += _region.name();
274 bounds_changed (Change (StartChanged|LengthChanged|PositionChanged));
275 envelope_active_changed ();
283 XMLNode *node = _region.extra_xml ("GUI");
284 XMLProperty *prop = 0;
285 bool showing_envelope = false;
287 if (node && (prop = node->property ("envelope-visible")) != 0) {
288 if (prop->value() == "yes") {
289 showing_envelope = true;
293 if (showing_envelope) {
294 envelope_view_button.set_active (true);
296 envelope_view_button.set_active (false);
299 _region.StateChanged.connect (mem_fun(*this, &AudioRegionEditor::region_changed));
301 spin_arrow_grab = false;
303 connect_editor_events ();
306 AudioRegionEditor::~AudioRegionEditor ()
311 AudioRegionEditor::region_changed (Change what_changed)
313 if (what_changed & NameChanged) {
316 if (what_changed & BoundsChanged) {
317 bounds_changed (what_changed);
320 if (what_changed & Region::OpacityChanged) {
323 if (what_changed & Region::MuteChanged) {
326 if (what_changed & Region::LockChanged) {
329 if (what_changed & Region::LayerChanged) {
333 if (what_changed & AudioRegion::EnvelopeActiveChanged) {
334 envelope_active_changed ();
336 if (what_changed & AudioRegion::FadeInChanged) {
339 if (what_changed & AudioRegion::FadeOutChanged) {
342 if (what_changed & AudioRegion::FadeInActiveChanged) {
343 fade_in_active_changed ();
345 if (what_changed & AudioRegion::FadeOutActiveChanged) {
346 fade_out_active_changed ();
351 AudioRegionEditor::fade_in_realized ()
357 AudioRegionEditor::fade_out_realized ()
363 AudioRegionEditor::bpressed (GdkEventButton* ev, Gtk::SpinButton* but, void (AudioRegionEditor::*pmf)())
365 switch (ev->button) {
369 if (ev->type == GDK_BUTTON_PRESS) { /* no double clicks here */
370 if (!spin_arrow_grab) {
371 if ((ev->window == but->gobj()->panel)) {
372 spin_arrow_grab = true;
385 AudioRegionEditor::breleased (GdkEventButton* ev, Gtk::SpinButton* but, void (AudioRegionEditor::*pmf)())
387 if (spin_arrow_grab) {
389 spin_arrow_grab = false;
395 AudioRegionEditor::start_editing_fade_in ()
401 AudioRegionEditor::stop_editing_fade_in ()
403 _region.thaw (_("fade in edit"));
407 AudioRegionEditor::start_editing_fade_out ()
413 AudioRegionEditor::stop_editing_fade_out ()
415 _region.thaw (_("fade out edit"));
419 AudioRegionEditor::connect_editor_events ()
421 name_entry.signal_changed().connect (mem_fun(*this, &AudioRegionEditor::name_entry_changed));
423 start_clock.ValueChanged.connect (mem_fun(*this, &AudioRegionEditor::start_clock_changed));
424 end_clock.ValueChanged.connect (mem_fun(*this, &AudioRegionEditor::end_clock_changed));
425 length_clock.ValueChanged.connect (mem_fun(*this, &AudioRegionEditor::length_clock_changed));
427 fade_in_length_spinner.signal_button_press_event().connect (bind (mem_fun(*this, &AudioRegionEditor::bpressed), &fade_in_length_spinner,
428 &AudioRegionEditor::start_editing_fade_in));
429 fade_in_length_spinner.signal_button_release_event().connect (bind (mem_fun (*this, &AudioRegionEditor::breleased), &fade_in_length_spinner,
430 &AudioRegionEditor::stop_editing_fade_in));
432 fade_out_length_spinner.signal_button_press_event().connect (bind (mem_fun(*this, &AudioRegionEditor::bpressed), &fade_out_length_spinner,
433 &AudioRegionEditor::start_editing_fade_out));
434 fade_out_length_spinner.signal_button_release_event().connect (bind (mem_fun (*this, &AudioRegionEditor::breleased), &fade_out_length_spinner,
435 &AudioRegionEditor::stop_editing_fade_out));
437 fade_in_length_adjustment.signal_value_changed().connect (mem_fun(*this, &AudioRegionEditor::fade_in_length_adjustment_changed));
438 fade_out_length_adjustment.signal_value_changed().connect (mem_fun(*this, &AudioRegionEditor::fade_out_length_adjustment_changed));
440 fade_in_active_button.signal_toggled().connect (mem_fun(*this, &AudioRegionEditor::fade_in_active_toggled));
441 fade_out_active_button.signal_toggled().connect (mem_fun(*this, &AudioRegionEditor::fade_out_active_toggled));
443 envelope_active_button.signal_button_press_event().connect (mem_fun(*this, &AudioRegionEditor::envelope_active_button_press));
444 envelope_active_button.signal_button_release_event().connect (mem_fun(*this, &AudioRegionEditor::envelope_active_button_release));
445 audition_button.signal_toggled().connect (mem_fun(*this, &AudioRegionEditor::audition_button_toggled));
446 envelope_view_button.signal_toggled().connect (mem_fun(*this, &AudioRegionEditor::envelope_view_button_toggled));
447 lock_button.signal_clicked().connect (mem_fun(*this, &AudioRegionEditor::lock_button_clicked));
448 mute_button.signal_clicked().connect (mem_fun(*this, &AudioRegionEditor::mute_button_clicked));
449 opaque_button.signal_clicked().connect (mem_fun(*this, &AudioRegionEditor::opaque_button_clicked));
450 raise_button.signal_clicked().connect (mem_fun(*this, &AudioRegionEditor::raise_button_clicked));
451 lower_button.signal_clicked().connect (mem_fun(*this, &AudioRegionEditor::lower_button_clicked));
455 AudioRegionEditor::start_clock_changed ()
457 _region.set_position (start_clock.current_time(), this);
461 AudioRegionEditor::end_clock_changed ()
463 _region.trim_end (end_clock.current_time(), this);
465 end_clock.set (_region.position() + _region.length(), true);
469 AudioRegionEditor::length_clock_changed ()
471 jack_nframes_t frames = length_clock.current_time();
472 _region.trim_end (_region.position() + frames, this);
474 length_clock.set (_region.length());
478 AudioRegionEditor::envelope_active_button_press(GdkEventButton *ev)
480 return stop_signal (envelope_active_button, "button_press_event");
484 AudioRegionEditor::envelope_active_button_release (GdkEventButton *ev)
486 _region.set_envelope_active (!_region.envelope_active());
487 return stop_signal (envelope_active_button, "button_release_event");
491 AudioRegionEditor::envelope_view_button_toggled ()
493 bool visible = envelope_view_button.get_active ();
495 _region_view.set_envelope_visible (visible);
499 AudioRegionEditor::audition_button_toggled ()
501 if (audition_button.get_active()) {
502 _session.audition_region (_region);
504 _session.cancel_audition ();
509 AudioRegionEditor::raise_button_clicked ()
515 AudioRegionEditor::lower_button_clicked ()
521 AudioRegionEditor::opaque_button_clicked ()
523 bool ractive = _region.opaque();
525 if (opaque_button.get_active() != ractive) {
526 _region.set_opaque (!ractive);
531 AudioRegionEditor::mute_button_clicked ()
533 bool ractive = _region.muted();
535 if (mute_button.get_active() != ractive) {
536 _region.set_muted (!ractive);
541 AudioRegionEditor::lock_button_clicked ()
543 bool ractive = _region.locked();
545 if (lock_button.get_active() != ractive) {
546 _region.set_locked (!ractive);
551 AudioRegionEditor::layer_changed ()
554 snprintf (buf, sizeof(buf), "%d", (int) _region.layer() + 1);
555 layer_value_label.set_text (buf);
559 AudioRegionEditor::name_changed ()
561 if (name_entry.get_text() != _region.name()) {
562 name_entry.set_text (_region.name());
567 AudioRegionEditor::lock_changed ()
571 if ((yn = _region.locked()) != lock_button.get_active()) {
572 lock_button.set_active (yn);
575 start_clock.set_sensitive (!yn);
576 end_clock.set_sensitive (!yn);
577 length_clock.set_sensitive (!yn);
581 AudioRegionEditor::envelope_active_changed ()
585 if ((yn = _region.envelope_active()) != envelope_active_button.get_active()) {
586 envelope_active_button.set_active (yn);
591 AudioRegionEditor::opacity_changed ()
594 if ((yn = _region.opaque()) != opaque_button.get_active()) {
595 opaque_button.set_active (yn);
600 AudioRegionEditor::mute_changed ()
603 if ((yn = _region.muted()) != mute_button.get_active()) {
604 mute_button.set_active (yn);
609 AudioRegionEditor::bounds_changed (Change what_changed)
611 if (what_changed & Change ((PositionChanged|LengthChanged))) {
612 start_clock.set (_region.position(), true);
613 end_clock.set (_region.position() + _region.length(), true);
614 length_clock.set (_region.length(), true);
619 AudioRegionEditor::activation ()
621 ARDOUR_UI::instance()->allow_focus (false);
625 AudioRegionEditor::name_entry_changed ()
627 if (name_entry.get_text() != _region.name()) {
628 _region.set_name (name_entry.get_text());
633 AudioRegionEditor::fade_in_changed ()
635 float msecs = fade_in_length_adjustment.get_value();
636 jack_nframes_t sr = _session.frame_rate();
637 jack_nframes_t adj_frames = (jack_nframes_t) floor (msecs * (sr/1000.0f));
638 jack_nframes_t frames;
641 if (adj_frames != (frames = (jack_nframes_t) _region.fade_in().back()->when)) {
642 fade_in_length_adjustment.set_value ((frames * 1000.0f) / sr);
645 if ((x = _region.fade_in_active()) != fade_in_active_button.get_active()) {
646 fade_in_active_button.set_active (x);
651 AudioRegionEditor::fade_out_changed ()
653 float msecs = fade_out_length_adjustment.get_value();
654 jack_nframes_t sr = _session.frame_rate();
655 jack_nframes_t adj_frames = (jack_nframes_t) floor (msecs * (sr/1000.0f));
656 jack_nframes_t frames;
658 if (adj_frames != (frames = (jack_nframes_t) _region.fade_out().back()->when)) {
659 fade_out_length_adjustment.set_value ((frames * 1000.0f) / sr);
662 if ((x = _region.fade_out_active()) != fade_out_active_button.get_active()) {
663 fade_out_active_button.set_active (x);
668 AudioRegionEditor::fade_in_length_adjustment_changed ()
670 jack_nframes_t fade_length = (jack_nframes_t) floor (fade_in_length_adjustment.get_value() * _session.frame_rate() * 0.001);
671 fade_length = max (fade_length, (jack_nframes_t) 64);
672 fade_length = min (fade_length, _region.length());
674 _region.set_fade_in_length (fade_length);
675 /* region is frozen, no worries */
680 AudioRegionEditor::fade_out_length_adjustment_changed ()
682 jack_nframes_t fade_length = (jack_nframes_t) floor (fade_out_length_adjustment.get_value() * _session.frame_rate() * 0.001);
683 fade_length = max (fade_length, (jack_nframes_t) 64);
684 fade_length = min (fade_length, _region.length());
686 _region.set_fade_out_length (fade_length);
687 /* region is frozen, no worries */
692 AudioRegionEditor::fade_in_active_toggled ()
694 _region.set_fade_in_active (fade_in_active_button.get_active());
698 AudioRegionEditor::fade_out_active_toggled ()
700 _region.set_fade_out_active (fade_out_active_button.get_active());
704 AudioRegionEditor::fade_out_active_changed ()
708 if ((x = _region.fade_out_active()) != fade_out_active_button.get_active()) {
709 fade_out_active_button.set_active (x);
714 AudioRegionEditor::fade_in_active_changed ()
718 if ((x = _region.fade_in_active()) != fade_in_active_button.get_active()) {
719 fade_in_active_button.set_active (x);