4 BBGUI::BBGUI (int* argc, char** argv[], jack_client_t* j, BeatBox* bb)
8 , quantize_off (quantize_group, "None")
9 , quantize_32nd (quantize_group, "ThirtySecond")
10 , quantize_16th (quantize_group, "Sixteenth")
11 , quantize_8th (quantize_group, "Eighth")
12 , quantize_quarter (quantize_group, "Quarter")
13 , quantize_half (quantize_group, "Half")
14 , quantize_whole (quantize_group, "Whole")
16 , clear_button ("Clear")
17 , tempo_adjustment (bb->tempo(), 1, 300, 1, 10)
18 , tempo_spinner (tempo_adjustment)
20 quantize_off.signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &BBGUI::set_quantize), 0));
21 quantize_32nd.signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &BBGUI::set_quantize), 32));
22 quantize_16th.signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &BBGUI::set_quantize), 16));
23 quantize_8th.signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &BBGUI::set_quantize), 8));
24 quantize_quarter.signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &BBGUI::set_quantize), 4));
25 quantize_half.signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &BBGUI::set_quantize), 2));
26 quantize_whole.signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &BBGUI::set_quantize), 1));
28 quantize_button_box.pack_start (quantize_off);
29 quantize_button_box.pack_start (quantize_32nd);
30 quantize_button_box.pack_start (quantize_16th);
31 quantize_button_box.pack_start (quantize_8th);
32 quantize_button_box.pack_start (quantize_quarter);
33 quantize_button_box.pack_start (quantize_half);
34 quantize_button_box.pack_start (quantize_whole);
36 play_button.signal_toggled().connect (sigc::mem_fun (*this, &BBGUI::toggle_play));
37 clear_button.signal_clicked().connect (sigc::mem_fun (*this, &BBGUI::clear));
39 misc_button_box.pack_start (play_button);
40 misc_button_box.pack_start (clear_button);
42 tempo_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &BBGUI::tempo_changed));
44 misc_button_box.pack_start (tempo_spinner);
46 global_vbox.pack_start (misc_button_box);
47 global_vbox.pack_start (quantize_button_box, true, true);
48 window.add (global_vbox);
64 BBGUI::tempo_changed ()
66 float t = tempo_adjustment.get_value();
71 BBGUI::set_quantize (int divisor)
73 bbox->set_quantize (divisor);
85 if (bbox->running()) {