2 Copyright (C) 2016 Robin Gareus <robin@gareus.org
3 Copyright (C) 2009-2012 Paul Davis
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 #include <gtkmm/box.h>
26 #include <gtkmm/notebook.h>
27 #include <gtkmm/table.h>
28 #include <gtkmm/label.h>
29 #include <gtkmm/button.h>
30 #include <gtkmm/spinbutton.h>
31 #include <gtkmm/comboboxtext.h>
33 #include "gtkmm2ext/gtk_ui.h"
34 #include "gtkmm2ext/gui_thread.h"
35 #include "gtkmm2ext/utils.h"
41 namespace ArdourSurface {
43 class OSC_GUI : public Gtk::Notebook
51 Gtk::ComboBoxText debug_combo;
52 Gtk::ComboBoxText portmode_combo;
53 Gtk::SpinButton port_entry;
54 Gtk::SpinButton bank_entry;
55 Gtk::ComboBoxText gainmode_combo;
56 void debug_changed ();
57 void portmode_changed ();
58 void gainmode_changed ();
60 void factory_reset ();
61 void reshow_values ();
64 void strips_changed ();
65 void feedback_changed ();
66 // Strip types calculator
68 void calculate_strip_types ();
69 void push_strip_types ();
70 Gtk::Label current_strip_types;
71 Gtk::CheckButton audio_tracks;
72 Gtk::CheckButton midi_tracks;
73 Gtk::CheckButton audio_buses;
74 Gtk::CheckButton midi_buses;
75 Gtk::CheckButton control_masters;
76 Gtk::CheckButton master_type;
77 Gtk::CheckButton monitor_type;
78 Gtk::CheckButton selected_tracks;
79 Gtk::CheckButton hidden_tracks;
81 // feedback calculator
82 uint32_t def_feedback;
83 void calculate_feedback ();
84 void push_feedback ();
85 Gtk::Label current_feedback;
86 Gtk::CheckButton strip_buttons_button;
87 Gtk::CheckButton strip_control_button;
88 Gtk::CheckButton ssid_as_path;
89 Gtk::CheckButton heart_beat;
90 Gtk::CheckButton master_fb;
91 Gtk::CheckButton bar_and_beat;
92 Gtk::CheckButton smpte;
93 Gtk::CheckButton meter_float;
94 Gtk::CheckButton meter_led;
95 Gtk::CheckButton signal_present;
96 Gtk::CheckButton hp_samples;
97 Gtk::CheckButton hp_min_sec;
98 Gtk::CheckButton hp_gui;
99 Gtk::CheckButton select_fb;
106 OSC::get_gui () const
109 const_cast<OSC*>(this)->build_gui ();
111 //static_cast<Gtk::VBox*>(gui)->show_all();
112 static_cast<Gtk::Notebook*>(gui)->show_all();
117 OSC::tear_down_gui ()
120 Gtk::Widget *w = static_cast<Gtk::Notebook*>(gui)->get_parent();
126 delete (OSC_GUI*) gui;
133 gui = (void*) new OSC_GUI (*this);
138 ///////////////////////////////////////////////////////////////////////////////
142 using namespace Gtkmm2ext;
143 using namespace ArdourSurface;
145 OSC_GUI::OSC_GUI (OSC& p)
148 int n = 0; // table row
149 Table* table = manage (new Table);
155 table->set_row_spacings (10);
156 table->set_col_spacings (6);
157 table->set_border_width (12);
160 label = manage (new Gtk::Label(_("Connection:")));
161 label->set_alignment(1, .5);
162 table->attach (*label, 0, 1, n, n+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
163 label = manage (new Gtk::Label(cp.get_server_url()));
164 table->attach (*label, 1, 2, n, n+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
167 // show and set port to auto (default) or manual (one surface only)
168 label = manage (new Gtk::Label(_("Port Mode:")));
169 label->set_alignment(1, .5);
170 table->attach (*label, 0, 1, n, n+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
171 table->attach (portmode_combo, 1, 2, n, n+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
172 std::vector<std::string> portmode_options;
173 portmode_options.push_back (_("Auto"));
174 portmode_options.push_back (_("Manual"));
176 set_popdown_strings (portmode_combo, portmode_options);
177 portmode_combo.set_active ((int)cp.get_portmode());
181 label = manage (new Gtk::Label(_("Manual Port:")));
182 label->set_alignment(1, .5);
183 table->attach (*label, 0, 1, n, n+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
184 table->attach (port_entry, 1, 2, n, n+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
185 port_entry.set_range(1024, 0xffff);
186 port_entry.set_increments (1, 100);
187 port_entry.set_text(cp.get_remote_port().c_str());
188 if (!cp.get_portmode()) {
189 port_entry.set_sensitive (false);
193 // default banksize setting
194 label = manage (new Gtk::Label(_("Bank Size:")));
195 label->set_alignment(1, .5);
196 table->attach (*label, 0, 1, n, n+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
197 table->attach (bank_entry, 1, 2, n, n+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
198 bank_entry.set_range (0, 0xffff);
199 bank_entry.set_increments (1, 8);
200 bank_entry.set_value (cp.get_banksize());
205 label = manage (new Gtk::Label(_("Gain Mode:")));
206 label->set_alignment(1, .5);
207 table->attach (*label, 0, 1, n, n+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
208 table->attach (gainmode_combo, 1, 2, n, n+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
209 std::vector<std::string> gainmode_options;
210 gainmode_options.push_back (_("dB"));
211 gainmode_options.push_back (_("Position"));
213 set_popdown_strings (gainmode_combo, gainmode_options);
214 gainmode_combo.set_active ((int)cp.get_gainmode());
218 label = manage (new Gtk::Label(_("Debug:")));
219 label->set_alignment(1, .5);
220 table->attach (*label, 0, 1, n, n+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
221 table->attach (debug_combo, 1, 2, n, n+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
223 std::vector<std::string> debug_options;
224 debug_options.push_back (_("Off"));
225 debug_options.push_back (_("Log invalid messages"));
226 debug_options.push_back (_("Log all messages"));
228 set_popdown_strings (debug_combo, debug_options);
229 debug_combo.set_active ((int)cp.get_debug_mode());
233 button = manage (new Gtk::Button(_("Clear OSC Devices")));
234 table->attach (*button, 0, 2, n, n+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 10);
238 frbutton = manage (new Gtk::Button(_("Factory Reset")));
239 table->attach (*frbutton, 0, 2, n, n+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 15);
242 append_page (*table, _("OSC Setup"));
244 debug_combo.signal_changed().connect (sigc::mem_fun (*this, &OSC_GUI::debug_changed));
245 portmode_combo.signal_changed().connect (sigc::mem_fun (*this, &OSC_GUI::portmode_changed));
246 gainmode_combo.signal_changed().connect (sigc::mem_fun (*this, &OSC_GUI::gainmode_changed));
247 button->signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::clear_device));
248 frbutton->signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::factory_reset));
249 port_entry.signal_activate().connect (sigc::mem_fun (*this, &OSC_GUI::port_changed));
250 bank_entry.signal_activate().connect (sigc::mem_fun (*this, &OSC_GUI::bank_changed));
252 // Strip Types Calculate Page
253 int stn = 0; // table row
254 Table* sttable = manage (new Table);
255 sttable->set_row_spacings (8);
256 sttable->set_col_spacings (6);
257 sttable->set_border_width (25);
260 label = manage (new Gtk::Label(_("Select Desired Types of Tracks")));
261 sttable->attach (*label, 0, 2, stn, stn+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
264 label = manage (new Gtk::Label(_("Strip Types Value:")));
265 label->set_alignment(1, .5);
266 sttable->attach (*label, 0, 1, stn, stn+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 15);
267 calculate_strip_types ();
268 current_strip_types.set_width_chars(10);
269 sttable->attach (current_strip_types, 1, 2, stn, stn+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 15);
272 label = manage (new Gtk::Label(_("Audio Tracks:")));
273 label->set_alignment(1, .5);
274 sttable->attach (*label, 0, 1, stn, stn+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
275 sttable->attach (audio_tracks, 1, 2, stn, stn+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
276 audio_tracks.signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::calculate_strip_types));
279 label = manage (new Gtk::Label(_("Midi Tracks:")));
280 label->set_alignment(1, .5);
281 sttable->attach (*label, 0, 1, stn, stn+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
282 sttable->attach (midi_tracks, 1, 2, stn, stn+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
283 midi_tracks.signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::calculate_strip_types));
286 label = manage (new Gtk::Label(_("Audio Buses:")));
287 label->set_alignment(1, .5);
288 sttable->attach (*label, 0, 1, stn, stn+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
289 sttable->attach (audio_buses, 1, 2, stn, stn+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
290 audio_buses.signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::calculate_strip_types));
293 label = manage (new Gtk::Label(_("Midi Buses:")));
294 label->set_alignment(1, .5);
295 sttable->attach (*label, 0, 1, stn, stn+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
296 sttable->attach (midi_buses, 1, 2, stn, stn+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
297 midi_buses.signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::calculate_strip_types));
300 label = manage (new Gtk::Label(_("Control Masters:")));
301 label->set_alignment(1, .5);
302 sttable->attach (*label, 0, 1, stn, stn+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
303 sttable->attach (control_masters, 1, 2, stn, stn+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
304 control_masters.signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::calculate_strip_types));
307 label = manage (new Gtk::Label(_("Master (use /master instead):")));
308 label->set_alignment(1, .5);
309 sttable->attach (*label, 0, 1, stn, stn+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
310 sttable->attach (master_type, 1, 2, stn, stn+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
311 master_type.signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::calculate_strip_types));
314 label = manage (new Gtk::Label(_("Monitor (use /monitor instead):")));
315 label->set_alignment(1, .5);
316 sttable->attach (*label, 0, 1, stn, stn+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
317 sttable->attach (monitor_type, 1, 2, stn, stn+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
318 monitor_type.signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::calculate_strip_types));
321 label = manage (new Gtk::Label(_("Selected Tracks (use for selected tracks only):")));
322 label->set_alignment(1, .5);
323 sttable->attach (*label, 0, 1, stn, stn+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
324 sttable->attach (selected_tracks, 1, 2, stn, stn+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
325 selected_tracks.signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::calculate_strip_types));
328 label = manage (new Gtk::Label(_("Hidden Tracks:")));
329 label->set_alignment(1, .5);
330 sttable->attach (*label, 0, 1, stn, stn+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
331 sttable->attach (hidden_tracks, 1, 2, stn, stn+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
332 hidden_tracks.signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::calculate_strip_types));
335 stbutton = manage (new Gtk::Button(_("Set Default Strip Types")));
336 sttable->attach (*stbutton, 0, 2, stn, stn+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 15);
337 stbutton->signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::push_strip_types));
340 sttable->show_all ();
341 append_page (*sttable, _("Default Strip Types"));
344 // Feedback Calculate Page
345 int fn = 0; // table row
346 Table* fbtable = manage (new Table);
347 fbtable->set_row_spacings (4);
348 fbtable->set_col_spacings (6);
349 fbtable->set_border_width (12);
352 label = manage (new Gtk::Label(_("Select Desired Types of Feedback")));
353 fbtable->attach (*label, 0, 2, fn, fn+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
356 label = manage (new Gtk::Label(_("Feedback Value:")));
357 label->set_alignment(1, .5);
358 fbtable->attach (*label, 0, 1, fn, fn+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 15);
359 calculate_feedback ();
360 current_feedback.set_width_chars(10);
361 fbtable->attach (current_feedback, 1, 2, fn, fn+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 15);
364 label = manage (new Gtk::Label(_("Strip Buttons:")));
365 label->set_alignment(1, .5);
366 fbtable->attach (*label, 0, 1, fn, fn+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
367 fbtable->attach (strip_buttons_button, 1, 2, fn, fn+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
368 strip_buttons_button.signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::calculate_feedback));
371 label = manage (new Gtk::Label(_("Strip Controls:")));
372 label->set_alignment(1, .5);
373 fbtable->attach (*label, 0, 1, fn, fn+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
374 fbtable->attach (strip_control_button, 1, 2, fn, fn+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
375 strip_control_button.signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::calculate_feedback));
378 label = manage (new Gtk::Label(_("Use SSID as Path Extension:")));
379 label->set_alignment(1, .5);
380 fbtable->attach (*label, 0, 1, fn, fn+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
381 fbtable->attach (ssid_as_path, 1, 2, fn, fn+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
382 ssid_as_path.signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::calculate_feedback));
385 label = manage (new Gtk::Label(_("Use Heart Beat:")));
386 label->set_alignment(1, .5);
387 fbtable->attach (*label, 0, 1, fn, fn+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
388 fbtable->attach (heart_beat, 1, 2, fn, fn+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
389 heart_beat.signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::calculate_feedback));
392 label = manage (new Gtk::Label(_("Master Section:")));
393 label->set_alignment(1, .5);
394 fbtable->attach (*label, 0, 1, fn, fn+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
395 fbtable->attach (master_fb, 1, 2, fn, fn+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
396 master_fb.signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::calculate_feedback));
399 label = manage (new Gtk::Label(_("Play Head Position as Bar and Beat:")));
400 label->set_alignment(1, .5);
401 fbtable->attach (*label, 0, 1, fn, fn+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
402 fbtable->attach (bar_and_beat, 1, 2, fn, fn+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
403 bar_and_beat.signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::calculate_feedback));
406 label = manage (new Gtk::Label(_("Play Head Position as SMPTE Time:")));
407 label->set_alignment(1, .5);
408 fbtable->attach (*label, 0, 1, fn, fn+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
409 fbtable->attach (smpte, 1, 2, fn, fn+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
410 smpte.signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::calculate_feedback));
413 label = manage (new Gtk::Label(_("Metering as a Float:")));
414 label->set_alignment(1, .5);
415 fbtable->attach (*label, 0, 1, fn, fn+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
416 fbtable->attach (meter_float, 1, 2, fn, fn+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
417 meter_float.signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::calculate_feedback));
420 label = manage (new Gtk::Label(_("Metering as a LED Strip:")));
421 label->set_alignment(1, .5);
422 fbtable->attach (*label, 0, 1, fn, fn+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
423 fbtable->attach (meter_led, 1, 2, fn, fn+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
424 meter_led.signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::calculate_feedback));
427 label = manage (new Gtk::Label(_("Signal Present:")));
428 label->set_alignment(1, .5);
429 fbtable->attach (*label, 0, 1, fn, fn+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
430 fbtable->attach (signal_present, 1, 2, fn, fn+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
431 signal_present.signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::calculate_feedback));
434 label = manage (new Gtk::Label(_("Play Head Position as Samples:")));
435 label->set_alignment(1, .5);
436 fbtable->attach (*label, 0, 1, fn, fn+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
437 fbtable->attach (hp_samples, 1, 2, fn, fn+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
438 hp_samples.signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::calculate_feedback));
441 label = manage (new Gtk::Label(_("Playhead Position as Minutes Seconds:")));
442 label->set_alignment(1, .5);
443 fbtable->attach (*label, 0, 1, fn, fn+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
444 fbtable->attach (hp_min_sec, 1, 2, fn, fn+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
445 hp_min_sec.signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::calculate_feedback));
448 label = manage (new Gtk::Label(_("Playhead Position as per GUI Clock:")));
449 label->set_alignment(1, .5);
450 fbtable->attach (*label, 0, 1, fn, fn+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
451 fbtable->attach (hp_gui, 1, 2, fn, fn+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
452 hp_gui.signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::calculate_feedback));
453 hp_gui.set_sensitive (false); // we don't have this yet (Mixbus wants)
456 label = manage (new Gtk::Label(_("Extra Select Only Feedback:")));
457 label->set_alignment(1, .5);
458 fbtable->attach (*label, 0, 1, fn, fn+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
459 fbtable->attach (select_fb, 1, 2, fn, fn+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
460 select_fb.signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::calculate_feedback));
463 fbbutton = manage (new Gtk::Button(_("Set Default Feedback")));
464 fbtable->attach (*fbbutton, 0, 2, fn, fn+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 15);
465 fbbutton->signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::push_feedback));
468 fbtable->show_all ();
469 append_page (*fbtable, _("Default Feedback"));
479 OSC_GUI::debug_changed ()
481 std::string str = debug_combo.get_active_text ();
482 if (str == _("Off")) {
483 cp.set_debug_mode (OSC::Off);
485 else if (str == _("Log invalid messages")) {
486 cp.set_debug_mode (OSC::Unhandled);
488 else if (str == _("Log all messages")) {
489 cp.set_debug_mode (OSC::All);
492 std::cerr << "Invalid OSC Debug Mode\n";
498 OSC_GUI::portmode_changed ()
500 std::string str = portmode_combo.get_active_text ();
501 if (str == _("Auto")) {
503 port_entry.set_sensitive (false);
505 else if (str == _("Manual")) {
507 port_entry.set_sensitive (true);
510 std::cerr << "Invalid OSC Port Mode\n";
516 OSC_GUI::port_changed ()
518 std::string str = port_entry.get_text ();
519 if (port_entry.get_value() == 3819) {
521 port_entry.set_value (8000);
523 cp.set_remote_port (str);
527 OSC_GUI::bank_changed ()
529 uint32_t bsize = bank_entry.get_value ();
530 cp.set_banksize (bsize);
535 OSC_GUI::gainmode_changed ()
537 std::string str = gainmode_combo.get_active_text ();
538 if (str == _("dB")) {
541 else if (str == _("Position")) {
545 std::cerr << "Invalid OSC Gain Mode\n";
551 OSC_GUI::clear_device ()
557 OSC_GUI::factory_reset ()
560 bank_entry.set_value (0);
561 cp.set_defaultstrip (31);
562 cp.set_defaultfeedback (0);
565 gainmode_combo.set_active (0);
567 portmode_combo.set_active (0);
572 OSC_GUI::reshow_values ()
574 def_strip = cp.get_defaultstrip();
575 audio_tracks.set_active(def_strip & 1);
576 midi_tracks.set_active(def_strip & 2);
577 audio_buses.set_active(def_strip & 4);
578 midi_buses.set_active(def_strip & 8);
579 control_masters.set_active(def_strip & 16);
580 master_type.set_active(def_strip & 32);
581 monitor_type.set_active(def_strip & 64);
582 selected_tracks.set_active(def_strip & 256);
583 hidden_tracks.set_active(def_strip & 512);
584 def_feedback = cp.get_defaultfeedback();
585 strip_buttons_button.set_active(def_feedback & 1);
586 strip_control_button.set_active(def_feedback & 2);
587 ssid_as_path.set_active(def_feedback & 4);
588 heart_beat.set_active(def_feedback & 8);
589 master_fb.set_active(def_feedback & 16);
590 bar_and_beat.set_active(def_feedback & 32);
591 smpte.set_active(def_feedback & 64);
592 meter_float.set_active(def_feedback & 128);
593 meter_led.set_active(def_feedback & 256);
594 signal_present.set_active(def_feedback & 512);
595 hp_samples.set_active(def_feedback & 1024);
596 //hp_gui.set_active (false); // we don't have this yet (Mixbus wants)
597 select_fb.set_active(def_feedback & 8192);
599 calculate_strip_types ();
600 calculate_feedback ();
604 OSC_GUI::calculate_feedback ()
607 if (strip_buttons_button.get_active()) {
610 if (strip_control_button.get_active()) {
613 if (ssid_as_path.get_active()) {
616 if (heart_beat.get_active()) {
619 if (master_fb.get_active()) {
622 if (bar_and_beat.get_active()) {
625 if (smpte.get_active()) {
628 if (meter_float.get_active()) {
631 if (meter_led.get_active()) {
634 if (signal_present.get_active()) {
637 if (hp_samples.get_active()) {
640 if (hp_min_sec.get_active()) {
643 if (hp_gui.get_active()) {
646 if (select_fb.get_active()) {
650 current_feedback.set_text(string_compose("%1", fbvalue));
654 OSC_GUI::push_feedback ()
656 cp.set_defaultfeedback (fbvalue);
660 OSC_GUI::calculate_strip_types ()
663 if (audio_tracks.get_active()) {
666 if (midi_tracks.get_active()) {
669 if (audio_buses.get_active()) {
672 if (midi_buses.get_active()) {
675 if (control_masters.get_active()) {
678 if (master_type.get_active()) {
681 if (monitor_type.get_active()) {
684 /*if (Auditioner_type.get_active()) {
685 stvalue += 128; // this one has no user accessable controls
687 if (selected_tracks.get_active()) {
690 if (hidden_tracks.get_active()) {
694 current_strip_types.set_text(string_compose("%1", stvalue));
698 OSC_GUI::push_strip_types ()
700 cp.set_defaultstrip (stvalue);