mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
triggerbox: new trigger_property widgets, because trigger data != a region
This commit is contained in:
parent
2e48fbc8cb
commit
a15397f746
8 changed files with 31 additions and 42 deletions
|
|
@ -81,7 +81,7 @@ RegionPropertiesBox::RegionPropertiesBox ()
|
||||||
|
|
||||||
row = 0;
|
row = 0;
|
||||||
|
|
||||||
bbt_toggle.set_text (_("BBT Sync"));
|
bbt_toggle.set_text (_("Stretch"));
|
||||||
table.attach (bbt_toggle, 0, 1, row, row + 1, Gtk::SHRINK, Gtk::SHRINK);
|
table.attach (bbt_toggle, 0, 1, row, row + 1, Gtk::SHRINK, Gtk::SHRINK);
|
||||||
row++;
|
row++;
|
||||||
|
|
||||||
|
|
@ -161,16 +161,6 @@ AudioRegionPropertiesBox::AudioRegionPropertiesBox ()
|
||||||
|
|
||||||
int row = 0;
|
int row = 0;
|
||||||
|
|
||||||
label = manage (new Gtk::Label (_("Stretch Mode:")));
|
|
||||||
label->set_alignment (1.0, 0.5);
|
|
||||||
audio_t->attach (*label, 0, 1, row, row + 1, Gtk::FILL, Gtk::SHRINK);
|
|
||||||
|
|
||||||
stretch_selector.set_text ("Mixed");
|
|
||||||
stretch_selector.set_name ("generic button");
|
|
||||||
audio_t->attach (stretch_selector, 1, 3, row, row + 1, Gtk::FILL, Gtk::SHRINK);
|
|
||||||
|
|
||||||
row++;
|
|
||||||
|
|
||||||
label = manage (new Gtk::Label (_("Fades:")));
|
label = manage (new Gtk::Label (_("Fades:")));
|
||||||
label->set_alignment (1.0, 0.5);
|
label->set_alignment (1.0, 0.5);
|
||||||
fade_in_enable_button.set_text (_("In"));
|
fade_in_enable_button.set_text (_("In"));
|
||||||
|
|
|
||||||
|
|
@ -47,8 +47,6 @@ using std::max;
|
||||||
using std::min;
|
using std::min;
|
||||||
|
|
||||||
MidiRegionPropertiesBox::MidiRegionPropertiesBox ()
|
MidiRegionPropertiesBox::MidiRegionPropertiesBox ()
|
||||||
: patch_enable_button (ArdourButton::led_default_elements)
|
|
||||||
, cc_enable_button (ArdourButton::led_default_elements)
|
|
||||||
{
|
{
|
||||||
_header_label.set_text (_("MIDI Region Properties:"));
|
_header_label.set_text (_("MIDI Region Properties:"));
|
||||||
|
|
||||||
|
|
@ -58,23 +56,15 @@ MidiRegionPropertiesBox::MidiRegionPropertiesBox ()
|
||||||
|
|
||||||
int row = 0;
|
int row = 0;
|
||||||
|
|
||||||
patch_enable_button.set_text (_("Send Patches"));
|
|
||||||
patch_enable_button.set_name ("generic button");
|
|
||||||
|
|
||||||
patch_selector_button.set_text (_("Patches..."));
|
patch_selector_button.set_text (_("Patches..."));
|
||||||
patch_selector_button.set_name ("generic button");
|
patch_selector_button.set_name ("generic button");
|
||||||
|
|
||||||
midi_t->attach (patch_enable_button, 0, 1, row, row + 1, Gtk::SHRINK, Gtk::SHRINK);
|
|
||||||
midi_t->attach (patch_selector_button, 1, 2, row, row + 1, Gtk::SHRINK, Gtk::SHRINK);
|
midi_t->attach (patch_selector_button, 1, 2, row, row + 1, Gtk::SHRINK, Gtk::SHRINK);
|
||||||
row++;
|
row++;
|
||||||
|
|
||||||
cc_enable_button.set_text (_("Send CCs"));
|
|
||||||
cc_enable_button.set_name ("generic button");
|
|
||||||
|
|
||||||
cc_selector_button.set_text (_("CCs..."));
|
cc_selector_button.set_text (_("CCs..."));
|
||||||
cc_selector_button.set_name ("generic button");
|
cc_selector_button.set_name ("generic button");
|
||||||
|
|
||||||
midi_t->attach (cc_enable_button, 0, 1, row, row + 1, Gtk::SHRINK, Gtk::SHRINK);
|
|
||||||
midi_t->attach (cc_selector_button, 1, 2, row, row + 1, Gtk::SHRINK, Gtk::SHRINK);
|
midi_t->attach (cc_selector_button, 1, 2, row, row + 1, Gtk::SHRINK, Gtk::SHRINK);
|
||||||
row++;
|
row++;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -52,10 +52,7 @@ private:
|
||||||
|
|
||||||
PBD::ScopedConnection midi_state_connection;
|
PBD::ScopedConnection midi_state_connection;
|
||||||
|
|
||||||
ArdourWidgets::ArdourButton patch_enable_button;
|
|
||||||
ArdourWidgets::ArdourButton patch_selector_button;
|
ArdourWidgets::ArdourButton patch_selector_button;
|
||||||
|
|
||||||
ArdourWidgets::ArdourButton cc_enable_button;
|
|
||||||
ArdourWidgets::ArdourButton cc_selector_button;
|
ArdourWidgets::ArdourButton cc_selector_button;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ TriggerPage::TriggerPage ()
|
||||||
table->attach (_slot_prop_box, col, col + 1, 0, 1, Gtk::FILL | Gtk::EXPAND, Gtk::FILL | Gtk::EXPAND);
|
table->attach (_slot_prop_box, col, col + 1, 0, 1, Gtk::FILL | Gtk::EXPAND, Gtk::FILL | Gtk::EXPAND);
|
||||||
|
|
||||||
col = 1;
|
col = 1;
|
||||||
table->attach (_audio_prop_box, col, col + 1, 0, 1, Gtk::FILL | Gtk::EXPAND, Gtk::FILL | Gtk::EXPAND);
|
table->attach (_audio_trig_box, col, col + 1, 0, 1, Gtk::FILL | Gtk::EXPAND, Gtk::FILL | Gtk::EXPAND);
|
||||||
col++;
|
col++;
|
||||||
table->attach (_audio_trim_box, col, col + 1, 0, 1, Gtk::FILL | Gtk::EXPAND, Gtk::FILL | Gtk::EXPAND);
|
table->attach (_audio_trim_box, col, col + 1, 0, 1, Gtk::FILL | Gtk::EXPAND, Gtk::FILL | Gtk::EXPAND);
|
||||||
col++;
|
col++;
|
||||||
|
|
@ -87,7 +87,7 @@ TriggerPage::TriggerPage ()
|
||||||
col++;
|
col++;
|
||||||
|
|
||||||
col = 1; /* audio and midi boxen share the same table locations; shown and hidden depending on region type */
|
col = 1; /* audio and midi boxen share the same table locations; shown and hidden depending on region type */
|
||||||
table->attach (_midi_prop_box, col, col + 1, 0, 1, Gtk::FILL | Gtk::EXPAND, Gtk::FILL | Gtk::EXPAND);
|
table->attach (_midi_trig_box, col, col + 1, 0, 1, Gtk::FILL | Gtk::EXPAND, Gtk::FILL | Gtk::EXPAND);
|
||||||
col++;
|
col++;
|
||||||
table->attach (_midi_trim_box, col, col + 1, 0, 1, Gtk::FILL | Gtk::EXPAND, Gtk::FILL | Gtk::EXPAND);
|
table->attach (_midi_trim_box, col, col + 1, 0, 1, Gtk::FILL | Gtk::EXPAND, Gtk::FILL | Gtk::EXPAND);
|
||||||
col++;
|
col++;
|
||||||
|
|
@ -242,11 +242,11 @@ TriggerPage::set_session (Session* s)
|
||||||
|
|
||||||
_slot_prop_box.set_session (s);
|
_slot_prop_box.set_session (s);
|
||||||
|
|
||||||
_audio_prop_box.set_session (s);
|
_audio_trig_box.set_session (s);
|
||||||
_audio_ops_box.set_session (s);
|
_audio_ops_box.set_session (s);
|
||||||
_audio_trim_box.set_session (s);
|
_audio_trim_box.set_session (s);
|
||||||
|
|
||||||
_midi_prop_box.set_session (s);
|
_midi_trig_box.set_session (s);
|
||||||
_midi_ops_box.set_session (s);
|
_midi_ops_box.set_session (s);
|
||||||
_midi_trim_box.set_session (s);
|
_midi_trim_box.set_session (s);
|
||||||
|
|
||||||
|
|
@ -322,12 +322,12 @@ TriggerPage::selection_changed ()
|
||||||
|
|
||||||
_slot_prop_box.hide ();
|
_slot_prop_box.hide ();
|
||||||
|
|
||||||
|
_audio_trig_box.hide ();
|
||||||
_audio_ops_box.hide ();
|
_audio_ops_box.hide ();
|
||||||
_audio_prop_box.hide ();
|
|
||||||
_audio_trim_box.hide ();
|
_audio_trim_box.hide ();
|
||||||
|
|
||||||
|
_midi_trig_box.hide ();
|
||||||
_midi_ops_box.hide ();
|
_midi_ops_box.hide ();
|
||||||
_midi_prop_box.hide ();
|
|
||||||
_midi_trim_box.hide ();
|
_midi_trim_box.hide ();
|
||||||
|
|
||||||
_parameter_box.hide ();
|
_parameter_box.hide ();
|
||||||
|
|
@ -341,17 +341,17 @@ TriggerPage::selection_changed ()
|
||||||
_slot_prop_box.show ();
|
_slot_prop_box.show ();
|
||||||
if (slot->region ()) {
|
if (slot->region ()) {
|
||||||
if (slot->region ()->data_type () == DataType::AUDIO) {
|
if (slot->region ()->data_type () == DataType::AUDIO) {
|
||||||
_audio_prop_box.set_region (slot->region ());
|
_audio_trig_box.set_trigger (slot);
|
||||||
_audio_trim_box.set_region (slot->region (), slot);
|
_audio_trim_box.set_region (slot->region (), slot);
|
||||||
|
|
||||||
_audio_prop_box.show ();
|
_audio_trig_box.show ();
|
||||||
_audio_trim_box.show ();
|
_audio_trim_box.show ();
|
||||||
_audio_ops_box.show ();
|
_audio_ops_box.show ();
|
||||||
} else {
|
} else {
|
||||||
_midi_prop_box.set_region (slot->region ());
|
_midi_trig_box.set_trigger (slot);
|
||||||
_midi_trim_box.set_region (slot->region (), slot);
|
_midi_trim_box.set_region (slot->region (), slot);
|
||||||
|
|
||||||
_midi_prop_box.show ();
|
_midi_trig_box.show ();
|
||||||
_midi_trim_box.show ();
|
_midi_trim_box.show ();
|
||||||
_midi_ops_box.show ();
|
_midi_ops_box.show ();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,10 +31,12 @@
|
||||||
|
|
||||||
#include "audio_region_operations_box.h"
|
#include "audio_region_operations_box.h"
|
||||||
#include "audio_region_properties_box.h"
|
#include "audio_region_properties_box.h"
|
||||||
|
#include "audio_trigger_properties_box.h"
|
||||||
#include "fitted_canvas_widget.h"
|
#include "fitted_canvas_widget.h"
|
||||||
#include "midi_clip_editor.h"
|
#include "midi_clip_editor.h"
|
||||||
#include "midi_region_operations_box.h"
|
#include "midi_region_operations_box.h"
|
||||||
#include "midi_region_properties_box.h"
|
#include "midi_region_properties_box.h"
|
||||||
|
#include "midi_trigger_properties_box.h"
|
||||||
#include "slot_properties_box.h"
|
#include "slot_properties_box.h"
|
||||||
#include "trigger_clip_picker.h"
|
#include "trigger_clip_picker.h"
|
||||||
#include "trigger_master.h"
|
#include "trigger_master.h"
|
||||||
|
|
@ -97,11 +99,11 @@ private:
|
||||||
|
|
||||||
SlotPropertiesBox _slot_prop_box;
|
SlotPropertiesBox _slot_prop_box;
|
||||||
|
|
||||||
AudioRegionPropertiesBox _audio_prop_box;
|
AudioTriggerPropertiesBox _audio_trig_box;
|
||||||
AudioRegionOperationsBox _audio_ops_box;
|
AudioRegionOperationsBox _audio_ops_box;
|
||||||
AudioClipEditorBox _audio_trim_box;
|
AudioClipEditorBox _audio_trim_box;
|
||||||
|
|
||||||
MidiRegionPropertiesBox _midi_prop_box;
|
MidiTriggerPropertiesBox _midi_trig_box;
|
||||||
MidiRegionOperationsBox _midi_ops_box;
|
MidiRegionOperationsBox _midi_ops_box;
|
||||||
MidiClipEditorBox _midi_trim_box;
|
MidiClipEditorBox _midi_trim_box;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,9 +31,13 @@
|
||||||
#include "gtkmm2ext/utils.h"
|
#include "gtkmm2ext/utils.h"
|
||||||
|
|
||||||
#include "audio_region_properties_box.h"
|
#include "audio_region_properties_box.h"
|
||||||
#include "midi_region_properties_box.h"
|
#include "audio_trigger_properties_box.h"
|
||||||
#include "audio_region_operations_box.h"
|
#include "audio_region_operations_box.h"
|
||||||
|
|
||||||
|
#include "midi_trigger_properties_box.h"
|
||||||
|
#include "midi_region_properties_box.h"
|
||||||
#include "midi_region_operations_box.h"
|
#include "midi_region_operations_box.h"
|
||||||
|
|
||||||
#include "slot_properties_box.h"
|
#include "slot_properties_box.h"
|
||||||
#include "midi_clip_editor.h"
|
#include "midi_clip_editor.h"
|
||||||
|
|
||||||
|
|
@ -461,20 +465,23 @@ TriggerWindow::TriggerWindow (Trigger* slot)
|
||||||
|
|
||||||
if (slot->region()) {
|
if (slot->region()) {
|
||||||
if (slot->region()->data_type() == DataType::AUDIO) {
|
if (slot->region()->data_type() == DataType::AUDIO) {
|
||||||
_prop_box = manage(new AudioRegionPropertiesBox ());
|
_trig_box = manage(new AudioTriggerPropertiesBox ());
|
||||||
_ops_box = manage(new AudioRegionOperationsBox ());
|
_ops_box = manage(new AudioRegionOperationsBox ());
|
||||||
_trim_box = manage(new AudioClipEditorBox ());
|
_trim_box = manage(new AudioClipEditorBox ());
|
||||||
|
|
||||||
|
_trig_box->set_trigger(slot);
|
||||||
} else {
|
} else {
|
||||||
_prop_box = manage(new MidiRegionPropertiesBox ());
|
_trig_box = manage(new MidiTriggerPropertiesBox ());
|
||||||
_ops_box = manage(new MidiRegionOperationsBox ());
|
_ops_box = manage(new MidiRegionOperationsBox ());
|
||||||
_trim_box = manage(new MidiClipEditorBox ());
|
_trim_box = manage(new MidiClipEditorBox ());
|
||||||
|
|
||||||
|
_trig_box->set_trigger(slot);
|
||||||
}
|
}
|
||||||
|
|
||||||
_prop_box->set_region(slot->region());
|
|
||||||
_trim_box->set_region(slot->region(), slot);
|
_trim_box->set_region(slot->region(), slot);
|
||||||
_ops_box->set_session(&slot->region()->session());
|
_ops_box->set_session(&slot->region()->session());
|
||||||
|
|
||||||
table->attach(*_prop_box, col, col+1, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND ); col++;
|
table->attach(*_trig_box, col, col+1, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND ); col++;
|
||||||
table->attach(*_trim_box, col, col+1, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND ); col++;
|
table->attach(*_trim_box, col, col+1, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND ); col++;
|
||||||
table->attach(*_ops_box, col, col+1, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND ); col++;
|
table->attach(*_ops_box, col, col+1, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND ); col++;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ namespace ArdourWidgets {
|
||||||
class HSliderController;
|
class HSliderController;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class TriggerPropertiesBox;
|
||||||
class RegionPropertiesBox;
|
class RegionPropertiesBox;
|
||||||
class RegionOperationsBox;
|
class RegionOperationsBox;
|
||||||
class ClipEditorBox;
|
class ClipEditorBox;
|
||||||
|
|
@ -105,7 +106,7 @@ class TriggerWindow : public Gtk::Window
|
||||||
bool on_key_press_event (GdkEventKey*);
|
bool on_key_press_event (GdkEventKey*);
|
||||||
bool on_key_release_event (GdkEventKey*);
|
bool on_key_release_event (GdkEventKey*);
|
||||||
|
|
||||||
RegionPropertiesBox *_prop_box;
|
TriggerPropertiesBox *_trig_box;
|
||||||
RegionOperationsBox *_ops_box;
|
RegionOperationsBox *_ops_box;
|
||||||
ClipEditorBox *_trim_box;
|
ClipEditorBox *_trim_box;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,7 @@ gtk2_ardour_sources = [
|
||||||
'audio_region_view.cc',
|
'audio_region_view.cc',
|
||||||
'audio_region_operations_box.cc',
|
'audio_region_operations_box.cc',
|
||||||
'audio_region_properties_box.cc',
|
'audio_region_properties_box.cc',
|
||||||
|
'audio_trigger_properties_box.cc',
|
||||||
'audio_streamview.cc',
|
'audio_streamview.cc',
|
||||||
'audio_time_axis.cc',
|
'audio_time_axis.cc',
|
||||||
'automation_controller.cc',
|
'automation_controller.cc',
|
||||||
|
|
@ -169,6 +170,7 @@ gtk2_ardour_sources = [
|
||||||
'midi_region_view.cc',
|
'midi_region_view.cc',
|
||||||
'midi_region_operations_box.cc',
|
'midi_region_operations_box.cc',
|
||||||
'midi_region_properties_box.cc',
|
'midi_region_properties_box.cc',
|
||||||
|
'midi_trigger_properties_box.cc',
|
||||||
'midi_scroomer.cc',
|
'midi_scroomer.cc',
|
||||||
'midi_selection.cc',
|
'midi_selection.cc',
|
||||||
'midi_streamview.cc',
|
'midi_streamview.cc',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue