mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 15:54:57 +01:00
Export format GUI updates for loudness normalization
This commit is contained in:
parent
d01cb7910f
commit
1fc50d4c9f
2 changed files with 68 additions and 13 deletions
|
|
@ -38,9 +38,16 @@ ExportFormatDialog::ExportFormatDialog (FormatPtr format, bool new_dialog) :
|
||||||
name_label (_("Label: "), Gtk::ALIGN_LEFT),
|
name_label (_("Label: "), Gtk::ALIGN_LEFT),
|
||||||
name_generated_part ("", Gtk::ALIGN_LEFT),
|
name_generated_part ("", Gtk::ALIGN_LEFT),
|
||||||
|
|
||||||
normalize_checkbox (_("Normalize to:")),
|
normalize_checkbox (_("Normalize:")),
|
||||||
normalize_adjustment (0.00, -90.00, 0.00, 0.1, 0.2),
|
normalize_peak_rb (_("Peak")),
|
||||||
normalize_db_label (_("dBFS"), Gtk::ALIGN_LEFT),
|
normalize_loudness_rb (_("Loudness")),
|
||||||
|
normalize_dbfs_adjustment ( 0.00, -90.00, 0.00, 0.1, 0.2),
|
||||||
|
normalize_lufs_adjustment (-23.0, -90.00, 0.00, 0.1, 1.0),
|
||||||
|
normalize_dbtp_adjustment ( -1.0, -90.00, 0.00, 0.1, 0.2),
|
||||||
|
|
||||||
|
normalize_dbfs_label (_("dBFS"), Gtk::ALIGN_LEFT),
|
||||||
|
normalize_lufs_label (_("LUFS"), Gtk::ALIGN_LEFT),
|
||||||
|
normalize_dbtp_label (_("dBTP"), Gtk::ALIGN_LEFT),
|
||||||
|
|
||||||
silence_table (2, 4),
|
silence_table (2, 4),
|
||||||
trim_start_checkbox (_("Trim silence at start")),
|
trim_start_checkbox (_("Trim silence at start")),
|
||||||
|
|
@ -95,11 +102,26 @@ ExportFormatDialog::ExportFormatDialog (FormatPtr format, bool new_dialog) :
|
||||||
|
|
||||||
/* Normalize */
|
/* Normalize */
|
||||||
|
|
||||||
normalize_hbox.pack_start (normalize_checkbox, false, false, 0);
|
Gtk::RadioButtonGroup normalize_group = normalize_loudness_rb.get_group();
|
||||||
normalize_hbox.pack_start (normalize_spinbutton, false, false, 6);
|
normalize_peak_rb.set_group (normalize_group);
|
||||||
normalize_hbox.pack_start (normalize_db_label, false, false, 0);
|
|
||||||
|
|
||||||
normalize_spinbutton.configure (normalize_adjustment, 0.1, 2);
|
normalize_hbox.pack_start (normalize_checkbox, false, false, 2);
|
||||||
|
normalize_hbox.pack_start (normalize_peak_rb, false, false, 0);
|
||||||
|
normalize_hbox.pack_start (normalize_dbfs_spinbutton, false, false, 2);
|
||||||
|
normalize_hbox.pack_start (normalize_dbfs_label, false, false, 0);
|
||||||
|
|
||||||
|
normalize_hbox.pack_start (*Gtk::manage (new Gtk::Label ("")), false, false, 6); // separator
|
||||||
|
|
||||||
|
normalize_hbox.pack_start (normalize_loudness_rb, false, false, 0);
|
||||||
|
normalize_hbox.pack_start (normalize_lufs_spinbutton, false, false, 2);
|
||||||
|
normalize_hbox.pack_start (normalize_lufs_label, false, false, 0);
|
||||||
|
normalize_hbox.pack_start (*Gtk::manage (new Gtk::Label (_("\u2227"))), false, false, 4);
|
||||||
|
normalize_hbox.pack_start (normalize_dbtp_spinbutton, false, false, 2);
|
||||||
|
normalize_hbox.pack_start (normalize_dbtp_label, false, false, 0);
|
||||||
|
|
||||||
|
normalize_dbfs_spinbutton.configure (normalize_dbfs_adjustment, 0.1, 2);
|
||||||
|
normalize_lufs_spinbutton.configure (normalize_lufs_adjustment, 0.1, 2);
|
||||||
|
normalize_dbtp_spinbutton.configure (normalize_dbtp_adjustment, 0.1, 2);
|
||||||
|
|
||||||
/* Silence */
|
/* Silence */
|
||||||
|
|
||||||
|
|
@ -171,7 +193,11 @@ ExportFormatDialog::ExportFormatDialog (FormatPtr format, bool new_dialog) :
|
||||||
trim_end_checkbox.signal_toggled().connect (sigc::mem_fun (*this, &ExportFormatDialog::update_trim_end_selection));
|
trim_end_checkbox.signal_toggled().connect (sigc::mem_fun (*this, &ExportFormatDialog::update_trim_end_selection));
|
||||||
|
|
||||||
normalize_checkbox.signal_toggled().connect (sigc::mem_fun (*this, &ExportFormatDialog::update_normalize_selection));
|
normalize_checkbox.signal_toggled().connect (sigc::mem_fun (*this, &ExportFormatDialog::update_normalize_selection));
|
||||||
normalize_spinbutton.signal_value_changed().connect (sigc::mem_fun (*this, &ExportFormatDialog::update_normalize_selection));
|
normalize_peak_rb.signal_toggled().connect (sigc::mem_fun (*this, &ExportFormatDialog::update_normalize_selection));
|
||||||
|
normalize_loudness_rb.signal_toggled().connect (sigc::mem_fun (*this, &ExportFormatDialog::update_normalize_selection));
|
||||||
|
normalize_dbfs_spinbutton.signal_value_changed().connect (sigc::mem_fun (*this, &ExportFormatDialog::update_normalize_selection));
|
||||||
|
normalize_lufs_spinbutton.signal_value_changed().connect (sigc::mem_fun (*this, &ExportFormatDialog::update_normalize_selection));
|
||||||
|
normalize_dbtp_spinbutton.signal_value_changed().connect (sigc::mem_fun (*this, &ExportFormatDialog::update_normalize_selection));
|
||||||
|
|
||||||
silence_start_checkbox.signal_toggled().connect (sigc::mem_fun (*this, &ExportFormatDialog::update_silence_start_selection));
|
silence_start_checkbox.signal_toggled().connect (sigc::mem_fun (*this, &ExportFormatDialog::update_silence_start_selection));
|
||||||
silence_start_clock.ValueChanged.connect (sigc::mem_fun (*this, &ExportFormatDialog::update_silence_start_selection));
|
silence_start_clock.ValueChanged.connect (sigc::mem_fun (*this, &ExportFormatDialog::update_silence_start_selection));
|
||||||
|
|
@ -201,6 +227,7 @@ ExportFormatDialog::ExportFormatDialog (FormatPtr format, bool new_dialog) :
|
||||||
/* Finalize */
|
/* Finalize */
|
||||||
|
|
||||||
show_all_children();
|
show_all_children();
|
||||||
|
update_normalize_sensitivity ();
|
||||||
}
|
}
|
||||||
|
|
||||||
ExportFormatDialog::~ExportFormatDialog ()
|
ExportFormatDialog::~ExportFormatDialog ()
|
||||||
|
|
@ -252,7 +279,11 @@ ExportFormatDialog::load_state (FormatPtr spec)
|
||||||
name_entry.set_text (spec->name());
|
name_entry.set_text (spec->name());
|
||||||
|
|
||||||
normalize_checkbox.set_active (spec->normalize());
|
normalize_checkbox.set_active (spec->normalize());
|
||||||
normalize_spinbutton.set_value (spec->normalize_target());
|
normalize_peak_rb.set_active (!spec->normalize_loudness());
|
||||||
|
normalize_loudness_rb.set_active (spec->normalize_loudness());
|
||||||
|
normalize_dbfs_spinbutton.set_value (spec->normalize_dbfs());
|
||||||
|
normalize_lufs_spinbutton.set_value (spec->normalize_lufs());
|
||||||
|
normalize_dbtp_spinbutton.set_value (spec->normalize_dbtp());
|
||||||
|
|
||||||
trim_start_checkbox.set_active (spec->trim_beginning());
|
trim_start_checkbox.set_active (spec->trim_beginning());
|
||||||
silence_start = spec->silence_beginning_time();
|
silence_start = spec->silence_beginning_time();
|
||||||
|
|
@ -307,6 +338,7 @@ ExportFormatDialog::load_state (FormatPtr spec)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
update_normalize_sensitivity ();
|
||||||
tag_checkbox.set_active (spec->tag());
|
tag_checkbox.set_active (spec->tag());
|
||||||
command_entry.set_text (spec->command());
|
command_entry.set_text (spec->command());
|
||||||
}
|
}
|
||||||
|
|
@ -767,11 +799,25 @@ ExportFormatDialog::update_trim_end_selection ()
|
||||||
manager.select_trim_end (trim_end_checkbox.get_active());
|
manager.select_trim_end (trim_end_checkbox.get_active());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ExportFormatDialog::update_normalize_sensitivity ()
|
||||||
|
{
|
||||||
|
bool en = normalize_checkbox.get_active();
|
||||||
|
bool loudness = normalize_loudness_rb.get_active();
|
||||||
|
normalize_dbfs_spinbutton.set_sensitive (!loudness && en);
|
||||||
|
normalize_lufs_spinbutton.set_sensitive (loudness && en);
|
||||||
|
normalize_dbtp_spinbutton.set_sensitive (loudness && en);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ExportFormatDialog::update_normalize_selection ()
|
ExportFormatDialog::update_normalize_selection ()
|
||||||
{
|
{
|
||||||
manager.select_normalize (normalize_checkbox.get_active());
|
manager.select_normalize (normalize_checkbox.get_active());
|
||||||
manager.select_normalize_target (normalize_spinbutton.get_value ());
|
manager.select_normalize_loudness (normalize_loudness_rb.get_active());
|
||||||
|
manager.select_normalize_dbfs (normalize_dbfs_spinbutton.get_value ());
|
||||||
|
manager.select_normalize_lufs (normalize_lufs_spinbutton.get_value ());
|
||||||
|
manager.select_normalize_dbtp (normalize_dbtp_spinbutton.get_value ());
|
||||||
|
update_normalize_sensitivity ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -126,6 +126,7 @@ class ExportFormatDialog : public ArdourDialog, public PBD::ScopedConnectionList
|
||||||
void update_trim_end_selection ();
|
void update_trim_end_selection ();
|
||||||
|
|
||||||
void update_normalize_selection ();
|
void update_normalize_selection ();
|
||||||
|
void update_normalize_sensitivity ();
|
||||||
void update_silence_start_selection ();
|
void update_silence_start_selection ();
|
||||||
void update_silence_end_selection ();
|
void update_silence_end_selection ();
|
||||||
|
|
||||||
|
|
@ -163,9 +164,17 @@ class ExportFormatDialog : public ArdourDialog, public PBD::ScopedConnectionList
|
||||||
|
|
||||||
Gtk::HBox normalize_hbox;
|
Gtk::HBox normalize_hbox;
|
||||||
Gtk::CheckButton normalize_checkbox;
|
Gtk::CheckButton normalize_checkbox;
|
||||||
Gtk::SpinButton normalize_spinbutton;
|
Gtk::RadioButton normalize_peak_rb;
|
||||||
Gtk::Adjustment normalize_adjustment;
|
Gtk::RadioButton normalize_loudness_rb;
|
||||||
Gtk::Label normalize_db_label;
|
Gtk::SpinButton normalize_dbfs_spinbutton;
|
||||||
|
Gtk::Adjustment normalize_dbfs_adjustment;
|
||||||
|
Gtk::SpinButton normalize_lufs_spinbutton;
|
||||||
|
Gtk::Adjustment normalize_lufs_adjustment;
|
||||||
|
Gtk::SpinButton normalize_dbtp_spinbutton;
|
||||||
|
Gtk::Adjustment normalize_dbtp_adjustment;
|
||||||
|
Gtk::Label normalize_dbfs_label;
|
||||||
|
Gtk::Label normalize_lufs_label;
|
||||||
|
Gtk::Label normalize_dbtp_label;
|
||||||
|
|
||||||
/* Silence */
|
/* Silence */
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue