basics of tempo & meter fields in region editor(s)
This commit is contained in:
@@ -92,6 +92,8 @@ AudioRegionEditor::AudioRegionEditor (Session* s, AudioRegionView* arv)
|
||||
gain_table->attach (_peak_amplitude_label, 2, 4, row, row + 1, Gtk::FILL, Gtk::FILL);
|
||||
++row;
|
||||
|
||||
gain_table->show_all ();
|
||||
|
||||
Gtk::HBox* b = Gtk::manage (new Gtk::HBox);
|
||||
b->set_spacing (6);
|
||||
b->pack_start (_gain_entry);
|
||||
@@ -111,10 +113,12 @@ AudioRegionEditor::AudioRegionEditor (Session* s, AudioRegionView* arv)
|
||||
|
||||
/* Add to main layout */
|
||||
|
||||
_table_main.attach (*gain_table, 1, 2, 3, 4, Gtk::FILL, Gtk::SHRINK);
|
||||
_table_main.attach (_region_line_label, 0, 1, 5, 6, Gtk::FILL, Gtk::SHRINK);
|
||||
_table_main.attach (_region_line, 1, 3, 5, 6, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK);
|
||||
_table_main.attach (_show_on_touch, 3, 4, 5, 6, Gtk::FILL, Gtk::SHRINK);
|
||||
row = 4; /* see RegionEditor table packing for why this is 4 */
|
||||
_table_main.attach (*gain_table, 1, 2, row, row+1, Gtk::FILL, Gtk::SHRINK);
|
||||
row++;
|
||||
_table_main.attach (_region_line_label, 0, 1, row, row+1, Gtk::FILL, Gtk::SHRINK);
|
||||
_table_main.attach (_region_line, 1, 3, row, row+1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK);
|
||||
_table_main.attach (_show_on_touch, 3, 4, row, row+1, Gtk::FILL, Gtk::SHRINK);
|
||||
|
||||
UI::instance()->set_tip (_polarity_toggle, _("Invert the signal polarity (180deg phase shift)"));
|
||||
UI::instance()->set_tip (_fade_before_fx_toggle, _("Apply region effects after the region fade.\nThis is useful if the effect(s) have tail, which would otherwise be faded out by the region fade (e.g. reverb, delay)"));
|
||||
|
||||
@@ -131,6 +131,10 @@ RegionEditor::RegionEditor (Session* s, std::shared_ptr<Region> r)
|
||||
_sources_label.set_name ("RegionEditorLabel");
|
||||
_region_fx_label.set_text (_("Region Effects"));
|
||||
_region_fx_label.set_name ("RegionEditorLabel");
|
||||
_region_tempo_label.set_name ("RegionEditorLabel");
|
||||
_region_tempo_label.set_text (_("Region Tempo"));
|
||||
_region_meter_label.set_name ("RegionEditorLabel");
|
||||
_region_meter_label.set_text (_("Region Meter"));
|
||||
|
||||
if (_region->sources ().size () > 1) {
|
||||
_sources_label.set_text (_("Sources:"));
|
||||
@@ -155,6 +159,8 @@ RegionEditor::RegionEditor (Session* s, std::shared_ptr<Region> r)
|
||||
_sync_relative_label.set_alignment (1, 0.5);
|
||||
_start_label.set_alignment (0, 0.5);
|
||||
_sync_absolute_label.set_alignment (1, 0.5);
|
||||
_region_tempo_label.set_alignment (0, 0.5);
|
||||
_region_meter_label.set_alignment (1, 0.5);
|
||||
|
||||
/* Name & Audition Box */
|
||||
Gtk::HBox* nb = Gtk::manage (new Gtk::HBox);
|
||||
@@ -162,6 +168,20 @@ RegionEditor::RegionEditor (Session* s, std::shared_ptr<Region> r)
|
||||
nb->pack_start (_name_entry);
|
||||
nb->pack_start (_audition_button, false, false);
|
||||
|
||||
/* Tempo Layout */
|
||||
|
||||
_table_tempo.set_col_spacings (12);
|
||||
_table_tempo.set_row_spacings (6);
|
||||
_table_tempo.set_border_width (0);
|
||||
_table_tempo.set_homogeneous ();
|
||||
|
||||
_table_tempo.attach (_region_tempo_label, 0, 1, 0, 1, Gtk::FILL, Gtk::FILL);
|
||||
_table_tempo.attach (_region_meter_label, 1, 2, 0, 1, Gtk::FILL, Gtk::FILL);
|
||||
_table_tempo.attach (_region_tempo_entry, 0, 1, 1, 2, Gtk::FILL, Gtk::FILL);
|
||||
_table_tempo.attach (_region_meter_entry, 1, 2, 1, 2, Gtk::FILL, Gtk::FILL);
|
||||
|
||||
_table_tempo.show_all ();
|
||||
|
||||
/* Clock Layout */
|
||||
|
||||
int row = 0;
|
||||
@@ -187,7 +207,6 @@ RegionEditor::RegionEditor (Session* s, std::shared_ptr<Region> r)
|
||||
|
||||
_table_clocks.attach (_start_clock, 0, 2, row, row + 1, Gtk::FILL | Gtk::EXPAND, Gtk::FILL);
|
||||
_table_clocks.attach (_sync_offset_absolute_clock, 2, 4, row, row + 1, Gtk::FILL | Gtk::EXPAND, Gtk::FILL);
|
||||
++row;
|
||||
|
||||
/* Main layout */
|
||||
|
||||
@@ -198,9 +217,12 @@ RegionEditor::RegionEditor (Session* s, std::shared_ptr<Region> r)
|
||||
_table_main.attach (_sources, 1, 3, 1, 2, Gtk::FILL | Gtk::EXPAND, Gtk::SHRINK);
|
||||
|
||||
_table_main.attach (_table_clocks, 1, 2, 2, 3, Gtk::FILL, Gtk::SHRINK);
|
||||
_table_main.attach (_table_tempo, 1, 2, 3, 4, Gtk::FILL, Gtk::SHRINK);
|
||||
|
||||
/* AudioRegionEditor inserts stuff into _table_main here */
|
||||
|
||||
_table_main.attach (*manage (new ArdourWidgets::ArdourVSpacer (0)), 2, 3, 2, 4, Gtk::FILL | Gtk::EXPAND, Gtk::FILL);
|
||||
_table_main.attach (*manage (new ArdourWidgets::ArdourHSpacer (0)), 0, 3, 4, 5, Gtk::FILL, Gtk::FILL | Gtk::EXPAND);
|
||||
_table_main.attach (*manage (new ArdourWidgets::ArdourHSpacer (0)), 0, 3, 5, 6, Gtk::FILL, Gtk::FILL | Gtk::EXPAND);
|
||||
|
||||
_table_main.attach (_region_fx_label, 3, 4, 0, 1, Gtk::SHRINK, Gtk::SHRINK);
|
||||
_table_main.attach (_region_fx_box, 3, 4, 1, 5, Gtk::FILL, Gtk::EXPAND | Gtk::FILL);
|
||||
|
||||
@@ -74,6 +74,7 @@ protected:
|
||||
|
||||
Gtk::Table _table_main;
|
||||
Gtk::Table _table_clocks;
|
||||
Gtk::Table _table_tempo;
|
||||
|
||||
private:
|
||||
class RegionFxEntry : public Gtkmm2ext::DnDVBoxChild, public sigc::trackable
|
||||
@@ -165,6 +166,11 @@ private:
|
||||
Gtk::Label _sync_absolute_label;
|
||||
Gtk::Label _start_label;
|
||||
Gtk::Label _region_fx_label;
|
||||
Gtk::Label _region_tempo_label;
|
||||
Gtk::Label _region_meter_label;
|
||||
|
||||
Gtk::Entry _region_tempo_entry;
|
||||
Gtk::Entry _region_meter_entry;
|
||||
|
||||
Gtk::ToggleButton _audition_button;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user