2005-09-25 14:42:24 -04:00
|
|
|
/*
|
2019-08-02 17:26:43 -04:00
|
|
|
* Copyright (C) 2006-2011 David Robillard <d@drobilla.net>
|
|
|
|
* Copyright (C) 2006-2013 Paul Davis <paul@linuxaudiosystems.com>
|
|
|
|
* Copyright (C) 2009-2011 Carl Hetherington <carl@carlh.net>
|
|
|
|
* Copyright (C) 2013 John Emmas <john@creativepost.co.uk>
|
|
|
|
* Copyright (C) 2015-2017 Robin Gareus <robin@gareus.org>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2024-09-25 20:38:59 -04:00
|
|
|
#pragma once
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
#include <map>
|
|
|
|
|
2005-11-28 23:41:15 -05:00
|
|
|
#include <gtkmm/label.h>
|
|
|
|
#include <gtkmm/entry.h>
|
|
|
|
#include <gtkmm/box.h>
|
2022-12-17 06:37:32 -05:00
|
|
|
#include <gtkmm/checkbutton.h>
|
2005-11-28 23:41:15 -05:00
|
|
|
#include <gtkmm/button.h>
|
|
|
|
#include <gtkmm/arrow.h>
|
|
|
|
#include <gtkmm/frame.h>
|
|
|
|
#include <gtkmm/table.h>
|
|
|
|
#include <gtkmm/adjustment.h>
|
|
|
|
#include <gtkmm/separator.h>
|
|
|
|
#include <gtkmm/spinbutton.h>
|
|
|
|
|
2024-04-16 21:53:30 -04:00
|
|
|
#include "widgets/ardour_dropdown.h"
|
2009-12-19 15:26:31 -05:00
|
|
|
|
|
|
|
#include "pbd/signals.h"
|
2011-04-04 08:21:26 -04:00
|
|
|
#include "pbd/crossthread.h"
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
#include "audio_clock.h"
|
|
|
|
#include "ardour_dialog.h"
|
2006-07-31 23:23:35 -04:00
|
|
|
#include "region_editor.h"
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
namespace ARDOUR {
|
|
|
|
class AudioRegion;
|
|
|
|
class Session;
|
|
|
|
}
|
|
|
|
|
|
|
|
class AudioRegionView;
|
|
|
|
|
2006-07-31 23:23:35 -04:00
|
|
|
class AudioRegionEditor : public RegionEditor
|
2005-09-25 14:42:24 -04:00
|
|
|
{
|
2017-07-01 15:11:14 -04:00
|
|
|
public:
|
2024-04-16 21:53:30 -04:00
|
|
|
AudioRegionEditor (ARDOUR::Session*, AudioRegionView*);
|
2010-10-28 16:01:26 -04:00
|
|
|
~AudioRegionEditor ();
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2010-10-28 16:01:26 -04:00
|
|
|
void peak_amplitude_thread ();
|
2024-04-16 21:53:30 -04:00
|
|
|
void on_unmap ();
|
2011-06-01 13:00:29 -04:00
|
|
|
|
2017-07-01 15:11:14 -04:00
|
|
|
private:
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2010-05-21 20:26:26 -04:00
|
|
|
void region_changed (PBD::PropertyChange const &);
|
2024-04-16 21:53:30 -04:00
|
|
|
void region_fx_changed ();
|
2011-06-01 13:00:29 -04:00
|
|
|
|
2010-05-21 20:26:26 -04:00
|
|
|
void gain_changed ();
|
|
|
|
void gain_adjustment_changed ();
|
2011-06-01 13:00:29 -04:00
|
|
|
|
2024-04-16 21:53:30 -04:00
|
|
|
void refill_region_line ();
|
|
|
|
void show_on_touch_changed ();
|
|
|
|
void show_touched_automation (std::weak_ptr<PBD::Controllable>);
|
|
|
|
|
2024-09-07 10:42:40 -04:00
|
|
|
void fade_before_fx_changed ();
|
|
|
|
void fade_before_fx_toggle_changed ();
|
2024-08-13 13:43:36 -04:00
|
|
|
|
2024-04-16 21:53:30 -04:00
|
|
|
AudioRegionView* _arv;
|
2023-02-16 18:33:28 -05:00
|
|
|
std::shared_ptr<ARDOUR::AudioRegion> _audio_region;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2022-12-17 06:37:32 -05:00
|
|
|
Gtk::Label gain_label;
|
2009-10-23 19:21:55 -04:00
|
|
|
Gtk::Adjustment gain_adjustment;
|
|
|
|
Gtk::SpinButton gain_entry;
|
2010-10-28 16:01:26 -04:00
|
|
|
|
2022-12-17 06:37:32 -05:00
|
|
|
Gtk::Label _polarity_label;
|
|
|
|
Gtk::CheckButton _polarity_toggle;
|
|
|
|
|
2024-09-07 10:42:40 -04:00
|
|
|
Gtk::CheckButton _fade_before_fx_toggle;
|
2024-08-13 13:43:36 -04:00
|
|
|
|
2010-10-28 16:01:26 -04:00
|
|
|
Gtk::Label _peak_amplitude_label;
|
|
|
|
Gtk::Entry _peak_amplitude;
|
|
|
|
|
2024-04-16 21:53:30 -04:00
|
|
|
Gtk::Label _region_line_label;
|
|
|
|
ArdourWidgets::ArdourDropdown _region_line;
|
|
|
|
|
|
|
|
Gtk::CheckButton _show_on_touch;
|
|
|
|
PBD::ScopedConnection _ctrl_touched_connection;
|
|
|
|
|
2013-07-13 08:27:56 -04:00
|
|
|
void signal_peak_thread ();
|
2010-10-28 16:01:26 -04:00
|
|
|
pthread_t _peak_amplitude_thread_handle;
|
|
|
|
void peak_amplitude_found (double);
|
2024-10-18 12:03:28 -04:00
|
|
|
PBD::Signal<void(double)> PeakAmplitudeFound;
|
2010-10-28 16:01:26 -04:00
|
|
|
PBD::ScopedConnection _peak_amplitude_connection;
|
2011-04-04 08:21:26 -04:00
|
|
|
CrossThreadChannel _peak_channel;
|
2005-09-25 14:42:24 -04:00
|
|
|
};
|
|
|
|
|