mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 23:35:03 +01:00
Auditioner: hide unnecessary widgets for auditioner synth GUI
This commit is contained in:
parent
3694009176
commit
9eb626cc37
6 changed files with 102 additions and 45 deletions
|
|
@ -425,7 +425,14 @@ AUPluginUI::AUPluginUI (boost::shared_ptr<PluginInsert> insert)
|
||||||
top_box.set_homogeneous (false);
|
top_box.set_homogeneous (false);
|
||||||
top_box.set_spacing (6);
|
top_box.set_spacing (6);
|
||||||
top_box.set_border_width (6);
|
top_box.set_border_width (6);
|
||||||
add_common_widgets (&top_box);
|
|
||||||
|
bool for_auditioner = false;
|
||||||
|
if (insert->session().the_auditioner()) {
|
||||||
|
for_auditioner = insert->session().the_auditioner()->the_instrument() == insert;
|
||||||
|
}
|
||||||
|
if (!for_auditioner) {
|
||||||
|
add_common_widgets (&top_box);
|
||||||
|
}
|
||||||
|
|
||||||
set_spacing (0);
|
set_spacing (0);
|
||||||
pack_start (top_box, false, false);
|
pack_start (top_box, false, false);
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@
|
||||||
|
|
||||||
#include "midi++/midnam_patch.h"
|
#include "midi++/midnam_patch.h"
|
||||||
|
|
||||||
|
#include "ardour/auditioner.h"
|
||||||
#include "ardour/midi_patch_manager.h"
|
#include "ardour/midi_patch_manager.h"
|
||||||
#include "ardour/midi_track.h"
|
#include "ardour/midi_track.h"
|
||||||
#include "ardour/plugin.h"
|
#include "ardour/plugin.h"
|
||||||
|
|
@ -58,7 +59,9 @@
|
||||||
#include "gtkmm2ext/utils.h"
|
#include "gtkmm2ext/utils.h"
|
||||||
#include "gtkmm2ext/doi.h"
|
#include "gtkmm2ext/doi.h"
|
||||||
|
|
||||||
|
#include "widgets/frame.h"
|
||||||
#include "widgets/ardour_knob.h"
|
#include "widgets/ardour_knob.h"
|
||||||
|
#include "widgets/ardour_spacer.h"
|
||||||
#include "widgets/fastmeter.h"
|
#include "widgets/fastmeter.h"
|
||||||
#include "widgets/slider_controller.h"
|
#include "widgets/slider_controller.h"
|
||||||
#include "widgets/tooltips.h"
|
#include "widgets/tooltips.h"
|
||||||
|
|
@ -91,6 +94,11 @@ GenericPluginUI::GenericPluginUI (boost::shared_ptr<PluginInsert> pi, bool scrol
|
||||||
, _piano_velocity (*manage (new Adjustment (100, 1, 127, 1, 16)))
|
, _piano_velocity (*manage (new Adjustment (100, 1, 127, 1, 16)))
|
||||||
, _piano_channel (*manage (new Adjustment (0, 1, 16, 1, 1)))
|
, _piano_channel (*manage (new Adjustment (0, 1, 16, 1, 1)))
|
||||||
{
|
{
|
||||||
|
bool for_auditioner = false;
|
||||||
|
if (insert->session().the_auditioner()) {
|
||||||
|
for_auditioner = insert->session().the_auditioner()->the_instrument() == insert;
|
||||||
|
}
|
||||||
|
|
||||||
set_name ("PluginEditor");
|
set_name ("PluginEditor");
|
||||||
set_border_width (6);
|
set_border_width (6);
|
||||||
//set_homogeneous (false);
|
//set_homogeneous (false);
|
||||||
|
|
@ -100,7 +108,13 @@ GenericPluginUI::GenericPluginUI (boost::shared_ptr<PluginInsert> pi, bool scrol
|
||||||
HBox* smaller_hbox = manage (new HBox);
|
HBox* smaller_hbox = manage (new HBox);
|
||||||
smaller_hbox->set_spacing (6);
|
smaller_hbox->set_spacing (6);
|
||||||
smaller_hbox->set_border_width (0);
|
smaller_hbox->set_border_width (0);
|
||||||
add_common_widgets (smaller_hbox, false);
|
|
||||||
|
if (for_auditioner) {
|
||||||
|
Gtk::Label* spacer = manage (new Gtk::Label());
|
||||||
|
smaller_hbox->pack_start(*spacer);
|
||||||
|
} else {
|
||||||
|
add_common_widgets (smaller_hbox, false);
|
||||||
|
}
|
||||||
|
|
||||||
automation_manual_all_button.set_text (GainMeterBase::astate_string (ARDOUR::Off));
|
automation_manual_all_button.set_text (GainMeterBase::astate_string (ARDOUR::Off));
|
||||||
automation_manual_all_button.set_name (X_("generic button"));
|
automation_manual_all_button.set_name (X_("generic button"));
|
||||||
|
|
@ -113,40 +127,42 @@ GenericPluginUI::GenericPluginUI (boost::shared_ptr<PluginInsert> pi, bool scrol
|
||||||
automation_latch_all_button.set_text (GainMeterBase::astate_string (ARDOUR::Latch));
|
automation_latch_all_button.set_text (GainMeterBase::astate_string (ARDOUR::Latch));
|
||||||
automation_latch_all_button.set_name (X_("generic button"));
|
automation_latch_all_button.set_name (X_("generic button"));
|
||||||
|
|
||||||
if (pi->is_instrument ()) {
|
if (!for_auditioner) { /*auditioner is not run when it isn't auditioning; so the piano keyboard, cpu usage, and other features are not applicable */
|
||||||
_piano = new APianoKeyboard ();
|
if (pi->is_instrument ()) {
|
||||||
_piano->set_flags(Gtk::CAN_FOCUS);
|
_piano = new APianoKeyboard ();
|
||||||
|
_piano->set_flags(Gtk::CAN_FOCUS);
|
||||||
|
|
||||||
_piano->NoteOn.connect (sigc::mem_fun (*this, &GenericPluginUI::note_on_event_handler));
|
_piano->NoteOn.connect (sigc::mem_fun (*this, &GenericPluginUI::note_on_event_handler));
|
||||||
_piano->NoteOff.connect (sigc::mem_fun (*this, &GenericPluginUI::note_off_event_handler));
|
_piano->NoteOff.connect (sigc::mem_fun (*this, &GenericPluginUI::note_off_event_handler));
|
||||||
|
|
||||||
HBox* box = manage (new HBox);
|
HBox* box = manage (new HBox);
|
||||||
box->pack_start (*manage (new Label (_("Channel:"))), false, false);
|
box->pack_start (*manage (new Label (_("Channel:"))), false, false);
|
||||||
box->pack_start (_piano_channel, false, false);
|
box->pack_start (_piano_channel, false, false);
|
||||||
box->pack_start (*manage (new Label (_("Velocity:"))), false, false);
|
box->pack_start (*manage (new Label (_("Velocity:"))), false, false);
|
||||||
box->pack_start (_piano_velocity, false, false);
|
box->pack_start (_piano_velocity, false, false);
|
||||||
|
|
||||||
Box* box2 = manage (new HBox ());
|
Box* box2 = manage (new HBox ());
|
||||||
box2->pack_start (*box, true, false);
|
box2->pack_start (*box, true, false);
|
||||||
|
|
||||||
_pianobox.set_spacing (4);
|
_pianobox.set_spacing (4);
|
||||||
_pianobox.pack_start (*box2, true, true);
|
_pianobox.pack_start (*box2, true, true);
|
||||||
_pianobox.pack_start (*_piano, true, true);
|
_pianobox.pack_start (*_piano, true, true);
|
||||||
|
|
||||||
_plugin_pianokeyboard_expander.set_expanded(false);
|
_plugin_pianokeyboard_expander.set_expanded(false);
|
||||||
_plugin_pianokeyboard_expander.property_expanded().signal_changed().connect( sigc::mem_fun(*this, &GenericPluginUI::toggle_pianokeyboard));
|
_plugin_pianokeyboard_expander.property_expanded().signal_changed().connect( sigc::mem_fun(*this, &GenericPluginUI::toggle_pianokeyboard));
|
||||||
|
|
||||||
pack_end (_plugin_pianokeyboard_expander, false, false);
|
pack_end (_plugin_pianokeyboard_expander, false, false);
|
||||||
} else {
|
} else {
|
||||||
pack_end (plugin_analysis_expander, false, false);
|
pack_end (plugin_analysis_expander, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (insert->provides_stats ()) {
|
if (insert->provides_stats ()) {
|
||||||
pack_end (cpuload_expander, false, false);
|
pack_end (cpuload_expander, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!plugin->get_docs().empty()) {
|
if (!plugin->get_docs().empty()) {
|
||||||
pack_end (description_expander, false, false);
|
pack_end (description_expander, false, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
settings_box.set_homogeneous (false);
|
settings_box.set_homogeneous (false);
|
||||||
|
|
@ -415,8 +431,8 @@ GenericPluginUI::automatic_layout (const std::vector<ControlUI*>& control_uis)
|
||||||
Gtk::Table* button_table = manage (new Gtk::Table (initial_button_rows, initial_button_cols));
|
Gtk::Table* button_table = manage (new Gtk::Table (initial_button_rows, initial_button_cols));
|
||||||
Gtk::Table* output_table = manage (new Gtk::Table (initial_output_rows, initial_output_cols));
|
Gtk::Table* output_table = manage (new Gtk::Table (initial_output_rows, initial_output_cols));
|
||||||
|
|
||||||
Frame* frame;
|
Gtk::Frame* frame;
|
||||||
Frame* bt_frame;
|
Gtk::Frame* bt_frame;
|
||||||
VBox* box;
|
VBox* box;
|
||||||
int output_row, output_col;
|
int output_row, output_col;
|
||||||
int button_row, button_col;
|
int button_row, button_col;
|
||||||
|
|
@ -446,7 +462,7 @@ GenericPluginUI::automatic_layout (const std::vector<ControlUI*>& control_uis)
|
||||||
output_table->set_border_width (5);
|
output_table->set_border_width (5);
|
||||||
|
|
||||||
|
|
||||||
bt_frame = manage (new Frame);
|
bt_frame = manage (new Gtk::Frame);
|
||||||
bt_frame->set_name ("BaseFrame");
|
bt_frame->set_name ("BaseFrame");
|
||||||
bt_frame->set_label (_("Switches"));
|
bt_frame->set_label (_("Switches"));
|
||||||
bt_frame->add (*button_table);
|
bt_frame->add (*button_table);
|
||||||
|
|
@ -456,7 +472,7 @@ GenericPluginUI::automatic_layout (const std::vector<ControlUI*>& control_uis)
|
||||||
box->set_border_width (5);
|
box->set_border_width (5);
|
||||||
box->set_spacing (1);
|
box->set_spacing (1);
|
||||||
|
|
||||||
frame = manage (new Frame);
|
frame = manage (new Gtk::Frame);
|
||||||
frame->set_name ("BaseFrame");
|
frame->set_name ("BaseFrame");
|
||||||
frame->set_label (_("Controls"));
|
frame->set_label (_("Controls"));
|
||||||
frame->add (*box);
|
frame->add (*box);
|
||||||
|
|
@ -562,7 +578,7 @@ GenericPluginUI::automatic_layout (const std::vector<ControlUI*>& control_uis)
|
||||||
|
|
||||||
if (x > max_controls_per_column || similarity_scores[i] <= similarity_threshold) {
|
if (x > max_controls_per_column || similarity_scores[i] <= similarity_threshold) {
|
||||||
if (x > min_controls_per_column) {
|
if (x > min_controls_per_column) {
|
||||||
frame = manage (new Frame);
|
frame = manage (new Gtk::Frame);
|
||||||
frame->set_name ("BaseFrame");
|
frame->set_name ("BaseFrame");
|
||||||
frame->set_label (_("Controls"));
|
frame->set_label (_("Controls"));
|
||||||
box = manage (new VBox);
|
box = manage (new VBox);
|
||||||
|
|
@ -597,7 +613,7 @@ GenericPluginUI::automatic_layout (const std::vector<ControlUI*>& control_uis)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!output_table->children().empty()) {
|
if (!output_table->children().empty()) {
|
||||||
frame = manage (new Frame);
|
frame = manage (new Gtk::Frame);
|
||||||
frame->set_name ("BaseFrame");
|
frame->set_name ("BaseFrame");
|
||||||
frame->set_label(_("Meters"));
|
frame->set_label(_("Meters"));
|
||||||
frame->add (*output_table);
|
frame->add (*output_table);
|
||||||
|
|
@ -626,7 +642,7 @@ GenericPluginUI::build_midi_table ()
|
||||||
pgm_table->set_border_width (5);
|
pgm_table->set_border_width (5);
|
||||||
pgm_table->set_col_spacing (2, 10);
|
pgm_table->set_col_spacing (2, 10);
|
||||||
|
|
||||||
Frame* frame = manage (new Frame);
|
ArdourWidgets::Frame* frame = manage (new ArdourWidgets::Frame);
|
||||||
frame->set_name ("BaseFrame");
|
frame->set_name ("BaseFrame");
|
||||||
if (dynamic_cast<MidiTrack*> (insert->owner())) {
|
if (dynamic_cast<MidiTrack*> (insert->owner())) {
|
||||||
frame->set_label (_("MIDI Programs (sent to track)"));
|
frame->set_label (_("MIDI Programs (sent to track)"));
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
#include <gtkmm/stock.h>
|
#include <gtkmm/stock.h>
|
||||||
|
|
||||||
|
#include "ardour/auditioner.h"
|
||||||
#include "ardour/lv2_plugin.h"
|
#include "ardour/lv2_plugin.h"
|
||||||
#include "ardour/session.h"
|
#include "ardour/session.h"
|
||||||
#include "pbd/error.h"
|
#include "pbd/error.h"
|
||||||
|
|
@ -307,7 +308,14 @@ LV2PluginUI::LV2PluginUI(boost::shared_ptr<PluginInsert> pi,
|
||||||
{
|
{
|
||||||
_ardour_buttons_box.set_spacing (6);
|
_ardour_buttons_box.set_spacing (6);
|
||||||
_ardour_buttons_box.set_border_width (6);
|
_ardour_buttons_box.set_border_width (6);
|
||||||
add_common_widgets (&_ardour_buttons_box);
|
|
||||||
|
bool for_auditioner = false;
|
||||||
|
if (insert->session().the_auditioner()) {
|
||||||
|
for_auditioner = insert->session().the_auditioner()->the_instrument() == insert;
|
||||||
|
}
|
||||||
|
if (!for_auditioner) {
|
||||||
|
add_common_widgets (&_ardour_buttons_box);
|
||||||
|
}
|
||||||
|
|
||||||
plugin->PresetLoaded.connect (*this, invalidator (*this), boost::bind (&LV2PluginUI::queue_port_update, this), gui_context ());
|
plugin->PresetLoaded.connect (*this, invalidator (*this), boost::bind (&LV2PluginUI::queue_port_update, this), gui_context ());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,7 @@
|
||||||
#include "widgets/tooltips.h"
|
#include "widgets/tooltips.h"
|
||||||
#include "widgets/fastmeter.h"
|
#include "widgets/fastmeter.h"
|
||||||
|
|
||||||
|
#include "ardour/auditioner.h"
|
||||||
#include "ardour/session.h"
|
#include "ardour/session.h"
|
||||||
#include "ardour/plugin.h"
|
#include "ardour/plugin.h"
|
||||||
#include "ardour/plugin_insert.h"
|
#include "ardour/plugin_insert.h"
|
||||||
|
|
@ -542,6 +543,11 @@ PlugUIBase::PlugUIBase (boost::shared_ptr<PluginInsert> pi)
|
||||||
, preset_gui (0)
|
, preset_gui (0)
|
||||||
, preset_dialog (0)
|
, preset_dialog (0)
|
||||||
{
|
{
|
||||||
|
bool for_auditioner = false;
|
||||||
|
if (insert->session().the_auditioner()) {
|
||||||
|
for_auditioner = insert->session().the_auditioner()->the_instrument() == insert;
|
||||||
|
}
|
||||||
|
|
||||||
_preset_modified.set_size_request (16, -1);
|
_preset_modified.set_size_request (16, -1);
|
||||||
_preset_combo.set_text("(default)");
|
_preset_combo.set_text("(default)");
|
||||||
set_tooltip (_preset_combo, _("Presets (if any) for this plugin\n(Both factory and user-created)"));
|
set_tooltip (_preset_combo, _("Presets (if any) for this plugin\n(Both factory and user-created)"));
|
||||||
|
|
@ -620,16 +626,18 @@ PlugUIBase::PlugUIBase (boost::shared_ptr<PluginInsert> pi)
|
||||||
|
|
||||||
insert->DropReferences.connect (death_connection, invalidator (*this), boost::bind (&PlugUIBase::plugin_going_away, this), gui_context());
|
insert->DropReferences.connect (death_connection, invalidator (*this), boost::bind (&PlugUIBase::plugin_going_away, this), gui_context());
|
||||||
|
|
||||||
plugin->PresetAdded.connect (*this, invalidator (*this), boost::bind (&PlugUIBase::preset_added_or_removed, this), gui_context ());
|
if (!for_auditioner) { /*auditioner can skip these signal-callbacks because these widgets are not shown anyway */
|
||||||
plugin->PresetRemoved.connect (*this, invalidator (*this), boost::bind (&PlugUIBase::preset_added_or_removed, this), gui_context ());
|
plugin->PresetAdded.connect (*this, invalidator (*this), boost::bind (&PlugUIBase::preset_added_or_removed, this), gui_context ());
|
||||||
plugin->PresetLoaded.connect (*this, invalidator (*this), boost::bind (&PlugUIBase::update_preset, this), gui_context ());
|
plugin->PresetRemoved.connect (*this, invalidator (*this), boost::bind (&PlugUIBase::preset_added_or_removed, this), gui_context ());
|
||||||
plugin->PresetDirty.connect (*this, invalidator (*this), boost::bind (&PlugUIBase::update_preset_modified, this), gui_context ());
|
plugin->PresetLoaded.connect (*this, invalidator (*this), boost::bind (&PlugUIBase::update_preset, this), gui_context ());
|
||||||
|
plugin->PresetDirty.connect (*this, invalidator (*this), boost::bind (&PlugUIBase::update_preset_modified, this), gui_context ());
|
||||||
|
|
||||||
insert->AutomationStateChanged.connect (*this, invalidator (*this), boost::bind (&PlugUIBase::automation_state_changed, this), gui_context());
|
insert->AutomationStateChanged.connect (*this, invalidator (*this), boost::bind (&PlugUIBase::automation_state_changed, this), gui_context());
|
||||||
|
|
||||||
insert->LatencyChanged.connect (*this, invalidator (*this), boost::bind (&PlugUIBase::set_latency_label, this), gui_context());
|
insert->LatencyChanged.connect (*this, invalidator (*this), boost::bind (&PlugUIBase::set_latency_label, this), gui_context());
|
||||||
|
|
||||||
automation_state_changed();
|
automation_state_changed();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PlugUIBase::~PlugUIBase()
|
PlugUIBase::~PlugUIBase()
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,8 @@
|
||||||
|
|
||||||
#include <glibmm/main.h>
|
#include <glibmm/main.h>
|
||||||
|
|
||||||
|
#include "ardour/auditioner.h"
|
||||||
|
#include "ardour/session.h"
|
||||||
#include "ardour/plugin_insert.h"
|
#include "ardour/plugin_insert.h"
|
||||||
#include "ardour/vst3_plugin.h"
|
#include "ardour/vst3_plugin.h"
|
||||||
|
|
||||||
|
|
@ -45,7 +47,14 @@ VST3PluginUI::VST3PluginUI (boost::shared_ptr<PluginInsert> pi, boost::shared_pt
|
||||||
{
|
{
|
||||||
_ardour_buttons_box.set_spacing (6);
|
_ardour_buttons_box.set_spacing (6);
|
||||||
_ardour_buttons_box.set_border_width (6);
|
_ardour_buttons_box.set_border_width (6);
|
||||||
add_common_widgets (&_ardour_buttons_box);
|
|
||||||
|
bool for_auditioner =false;
|
||||||
|
if (insert->session().the_auditioner()) {
|
||||||
|
for_auditioner = insert->session().the_auditioner()->the_instrument() == insert;
|
||||||
|
}
|
||||||
|
if (!for_auditioner) {
|
||||||
|
add_common_widgets (&_ardour_buttons_box);
|
||||||
|
}
|
||||||
|
|
||||||
_vst3->OnResizeView.connect (_resize_connection, invalidator (*this), boost::bind (&VST3PluginUI::resize_callback, this, _1, _2), gui_context());
|
_vst3->OnResizeView.connect (_resize_connection, invalidator (*this), boost::bind (&VST3PluginUI::resize_callback, this, _1, _2), gui_context());
|
||||||
//pi->plugin()->PresetLoaded.connect (*this, invalidator (*this), boost::bind (&VST3PluginUI::queue_port_update, this), gui_context ());
|
//pi->plugin()->PresetLoaded.connect (*this, invalidator (*this), boost::bind (&VST3PluginUI::queue_port_update, this), gui_context ());
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <gtkmm.h>
|
#include <gtkmm.h>
|
||||||
|
#include "ardour/auditioner.h"
|
||||||
|
#include "ardour/session.h"
|
||||||
#include "ardour/vst_plugin.h"
|
#include "ardour/vst_plugin.h"
|
||||||
#include "ardour/vst_types.h"
|
#include "ardour/vst_types.h"
|
||||||
#include "ardour/plugin_insert.h"
|
#include "ardour/plugin_insert.h"
|
||||||
|
|
@ -40,7 +42,14 @@ VSTPluginUI::VSTPluginUI (boost::shared_ptr<ARDOUR::PluginInsert> insert, boost:
|
||||||
Gtk::HBox* box = manage (new Gtk::HBox);
|
Gtk::HBox* box = manage (new Gtk::HBox);
|
||||||
box->set_spacing (6);
|
box->set_spacing (6);
|
||||||
box->set_border_width (6);
|
box->set_border_width (6);
|
||||||
add_common_widgets (box);
|
|
||||||
|
bool for_auditioner =false;
|
||||||
|
if (insert->session().the_auditioner()) {
|
||||||
|
for_auditioner = insert->session().the_auditioner()->the_instrument() == insert;
|
||||||
|
}
|
||||||
|
if (!for_auditioner) {
|
||||||
|
add_common_widgets (box);
|
||||||
|
}
|
||||||
|
|
||||||
pack_start (*box, false, false);
|
pack_start (*box, false, false);
|
||||||
box->signal_size_allocate().connect (sigc::mem_fun (*this, &VSTPluginUI::top_box_allocated));
|
box->signal_size_allocate().connect (sigc::mem_fun (*this, &VSTPluginUI::top_box_allocated));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue