summaryrefslogtreecommitdiff
path: root/gtk2_ardour/step_entry.cc
diff options
context:
space:
mode:
authorThomas Brand <tom@trellis.ch>2017-07-01 18:42:24 +0200
committerRobin Gareus <robin@gareus.org>2017-07-01 19:28:26 +0200
commit63ea7b6516dbd7554d1eff6c98de50cf61fc9a72 (patch)
tree82fa339e009bc082dd8023916990800bea437081 /gtk2_ardour/step_entry.cc
parentf413b83cb9fa50954969a3d849999e1890ce6690 (diff)
NO-OP whitespace (updated GH PR #357)
Diffstat (limited to 'gtk2_ardour/step_entry.cc')
-rw-r--r--gtk2_ardour/step_entry.cc792
1 files changed, 396 insertions, 396 deletions
diff --git a/gtk2_ardour/step_entry.cc b/gtk2_ardour/step_entry.cc
index f7df9e6da9..639b8b7317 100644
--- a/gtk2_ardour/step_entry.cc
+++ b/gtk2_ardour/step_entry.cc
@@ -57,10 +57,10 @@ _rest_event_handler (GtkWidget* /*widget*/, gpointer arg)
StepEntry::StepEntry (StepEditor& seditor)
: ArdourWindow (string_compose (_("Step Entry: %1"), seditor.name()))
- , _current_note_length (1.0)
- , _current_note_velocity (64)
+ , _current_note_length (1.0)
+ , _current_note_velocity (64)
, triplet_button ("3")
- , dot_adjustment (0.0, 0.0, 3.0, 1.0, 1.0)
+ , dot_adjustment (0.0, 0.0, 3.0, 1.0, 1.0)
, beat_resync_button (_(">beat"))
, bar_resync_button (_(">bar"))
, resync_button (_(">EP"))
@@ -70,25 +70,25 @@ StepEntry::StepEntry (StepEditor& seditor)
, back_button (_("back"))
, channel_adjustment (1, 1, 16, 1, 4)
, channel_spinner (channel_adjustment)
- , octave_adjustment (4, 0, 10, 1, 4) // start in octave 4
- , octave_spinner (octave_adjustment)
- , length_divisor_adjustment (1.0, 1.0, 128, 1.0, 4.0)
- , length_divisor_spinner (length_divisor_adjustment)
- , velocity_adjustment (64.0, 0.0, 127.0, 1.0, 4.0)
- , velocity_spinner (velocity_adjustment)
- , bank_adjustment (0, 0.0, 127.0, 1.0, 4.0)
- , bank_spinner (bank_adjustment)
- , bank_button (_("+"))
- , program_adjustment (0, 0.0, 127.0, 1.0, 4.0)
- , program_spinner (program_adjustment)
- , program_button (_("+"))
+ , octave_adjustment (4, 0, 10, 1, 4) // start in octave 4
+ , octave_spinner (octave_adjustment)
+ , length_divisor_adjustment (1.0, 1.0, 128, 1.0, 4.0)
+ , length_divisor_spinner (length_divisor_adjustment)
+ , velocity_adjustment (64.0, 0.0, 127.0, 1.0, 4.0)
+ , velocity_spinner (velocity_adjustment)
+ , bank_adjustment (0, 0.0, 127.0, 1.0, 4.0)
+ , bank_spinner (bank_adjustment)
+ , bank_button (_("+"))
+ , program_adjustment (0, 0.0, 127.0, 1.0, 4.0)
+ , program_spinner (program_adjustment)
+ , program_button (_("+"))
, _piano (0)
, piano (0)
, se (&seditor)
, myactions (X_("step entry"))
{
- register_actions ();
- load_bindings ();
+ register_actions ();
+ load_bindings ();
#if 0
/* set channel selector to first selected channel. if none
@@ -140,37 +140,37 @@ StepEntry::StepEntry (StepEditor& seditor)
w->show();
length_64_button.add (*w);
- RefPtr<Action> act;
-
- act = myactions.find_action ("StepEditing/note-length-whole");
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (length_1_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/note-length-half");
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (length_2_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/note-length-quarter");
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (length_4_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/note-length-eighth");
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (length_8_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/note-length-sixteenth");
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (length_16_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/note-length-thirtysecond");
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (length_32_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/note-length-sixtyfourth");
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (length_64_button.gobj()), act->gobj());
-
- length_1_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
- length_1_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &length_1_button, 1), false);
- length_2_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
- length_2_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &length_1_button, 2), false);
- length_4_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
- length_4_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &length_1_button, 4), false);
- length_8_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
- length_8_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &length_1_button, 8), false);
- length_16_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
- length_16_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &length_1_button, 16), false);
- length_32_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
- length_32_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &length_1_button, 32), false);
- length_64_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
- length_64_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &length_1_button, 64), false);
+ RefPtr<Action> act;
+
+ act = myactions.find_action ("StepEditing/note-length-whole");
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (length_1_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/note-length-half");
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (length_2_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/note-length-quarter");
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (length_4_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/note-length-eighth");
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (length_8_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/note-length-sixteenth");
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (length_16_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/note-length-thirtysecond");
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (length_32_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/note-length-sixtyfourth");
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (length_64_button.gobj()), act->gobj());
+
+ length_1_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
+ length_1_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &length_1_button, 1), false);
+ length_2_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
+ length_2_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &length_1_button, 2), false);
+ length_4_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
+ length_4_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &length_1_button, 4), false);
+ length_8_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
+ length_8_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &length_1_button, 8), false);
+ length_16_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
+ length_16_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &length_1_button, 16), false);
+ length_32_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
+ length_32_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &length_1_button, 32), false);
+ length_64_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
+ length_64_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &length_1_button, 64), false);
length_1_button.property_draw_indicator() = false;
length_2_button.property_draw_indicator() = false;
@@ -230,39 +230,39 @@ StepEntry::StepEntry (StepEditor& seditor)
w->show();
velocity_fff_button.add (*w);
- act = myactions.find_action ("StepEditing/note-velocity-ppp");
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (velocity_ppp_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/note-velocity-pp");
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (velocity_pp_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/note-velocity-p");
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (velocity_p_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/note-velocity-mp");
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (velocity_mp_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/note-velocity-mf");
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (velocity_mf_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/note-velocity-f");
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (velocity_f_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/note-velocity-ff");
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (velocity_ff_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/note-velocity-fff");
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (velocity_fff_button.gobj()), act->gobj());
-
- velocity_ppp_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
- velocity_ppp_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &velocity_ppp_button, 1), false);
- velocity_pp_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
- velocity_pp_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &velocity_pp_button, 16), false);
- velocity_p_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
- velocity_p_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &velocity_p_button, 32), false);
- velocity_mp_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
- velocity_mp_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &velocity_mp_button, 64), false);
- velocity_mf_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
- velocity_mf_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &velocity_mf_button, 80), false);
- velocity_f_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
- velocity_f_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &velocity_f_button, 96), false);
- velocity_ff_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
- velocity_ff_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &velocity_ff_button, 112), false);
- velocity_fff_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
- velocity_fff_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &velocity_fff_button, 127), false);
+ act = myactions.find_action ("StepEditing/note-velocity-ppp");
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (velocity_ppp_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/note-velocity-pp");
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (velocity_pp_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/note-velocity-p");
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (velocity_p_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/note-velocity-mp");
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (velocity_mp_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/note-velocity-mf");
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (velocity_mf_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/note-velocity-f");
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (velocity_f_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/note-velocity-ff");
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (velocity_ff_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/note-velocity-fff");
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (velocity_fff_button.gobj()), act->gobj());
+
+ velocity_ppp_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
+ velocity_ppp_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &velocity_ppp_button, 1), false);
+ velocity_pp_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
+ velocity_pp_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &velocity_pp_button, 16), false);
+ velocity_p_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
+ velocity_p_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &velocity_p_button, 32), false);
+ velocity_mp_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
+ velocity_mp_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &velocity_mp_button, 64), false);
+ velocity_mf_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
+ velocity_mf_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &velocity_mf_button, 80), false);
+ velocity_f_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
+ velocity_f_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &velocity_f_button, 96), false);
+ velocity_ff_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
+ velocity_ff_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &velocity_ff_button, 112), false);
+ velocity_fff_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
+ velocity_fff_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &velocity_fff_button, 127), false);
velocity_ppp_button.property_draw_indicator() = false;
velocity_pp_button.property_draw_indicator() = false;
@@ -343,39 +343,39 @@ StepEntry::StepEntry (StepEditor& seditor)
set_tooltip (&back_button, _("Move Insert Position Back by Note Length"), "");
set_tooltip (&resync_button, _("Move Insert Position to Edit Point"), "");
- act = myactions.find_action ("StepEditing/back");
- gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (back_button.gobj()), false);
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (back_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/sync-to-edit-point");
- gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (resync_button.gobj()), false);
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (resync_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/toggle-triplet");
- gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (triplet_button.gobj()), false);
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (triplet_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/no-dotted");
- gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (dot0_button.gobj()), false);
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (dot0_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/toggle-dotted");
- gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (dot1_button.gobj()), false);
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (dot1_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/toggle-double-dotted");
- gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (dot2_button.gobj()), false);
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (dot2_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/toggle-triple-dotted");
- gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (dot3_button.gobj()), false);
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (dot3_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/toggle-chord");
- gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (chord_button.gobj()), false);
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (chord_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/insert-rest");
- gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (rest_button.gobj()), false);
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (rest_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/insert-snap-rest");
- gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (grid_rest_button.gobj()), false);
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (grid_rest_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/sustain");
- gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (sustain_button.gobj()), false);
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (sustain_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/back");
+ gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (back_button.gobj()), false);
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (back_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/sync-to-edit-point");
+ gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (resync_button.gobj()), false);
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (resync_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/toggle-triplet");
+ gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (triplet_button.gobj()), false);
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (triplet_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/no-dotted");
+ gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (dot0_button.gobj()), false);
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (dot0_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/toggle-dotted");
+ gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (dot1_button.gobj()), false);
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (dot1_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/toggle-double-dotted");
+ gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (dot2_button.gobj()), false);
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (dot2_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/toggle-triple-dotted");
+ gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (dot3_button.gobj()), false);
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (dot3_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/toggle-chord");
+ gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (chord_button.gobj()), false);
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (chord_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/insert-rest");
+ gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (rest_button.gobj()), false);
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (rest_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/insert-snap-rest");
+ gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (grid_rest_button.gobj()), false);
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (grid_rest_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/sustain");
+ gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (sustain_button.gobj()), false);
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (sustain_button.gobj()), act->gobj());
upper_box.set_spacing (6);
upper_box.pack_start (chord_button, false, false);
@@ -390,35 +390,35 @@ StepEntry::StepEntry (StepEditor& seditor)
VBox* v;
- v = manage (new VBox);
+ v = manage (new VBox);
l = manage (new Label (_("Channel")));
v->set_spacing (6);
v->pack_start (*l, false, false);
v->pack_start (channel_spinner, false, false);
upper_box.pack_start (*v, false, false);
- v = manage (new VBox);
+ v = manage (new VBox);
l = manage (new Label (_("1/Note")));
v->set_spacing (6);
v->pack_start (*l, false, false);
v->pack_start (length_divisor_spinner, false, false);
upper_box.pack_start (*v, false, false);
- v = manage (new VBox);
+ v = manage (new VBox);
l = manage (new Label (_("Velocity")));
v->set_spacing (6);
v->pack_start (*l, false, false);
v->pack_start (velocity_spinner, false, false);
upper_box.pack_start (*v, false, false);
- v = manage (new VBox);
+ v = manage (new VBox);
l = manage (new Label (_("Octave")));
v->set_spacing (6);
v->pack_start (*l, false, false);
v->pack_start (octave_spinner, false, false);
upper_box.pack_start (*v, false, false);
- v = manage (new VBox);
+ v = manage (new VBox);
l = manage (new Label (_("Bank")));
v->set_spacing (6);
v->pack_start (*l, false, false);
@@ -426,7 +426,7 @@ StepEntry::StepEntry (StepEditor& seditor)
v->pack_start (bank_button, false, false);
upper_box.pack_start (*v, false, false);
- v = manage (new VBox);
+ v = manage (new VBox);
l = manage (new Label (_("Program")));
v->set_spacing (6);
v->pack_start (*l, false, false);
@@ -434,9 +434,9 @@ StepEntry::StepEntry (StepEditor& seditor)
v->pack_start (program_button, false, false);
upper_box.pack_start (*v, false, false);
- velocity_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &StepEntry::velocity_value_change));
- length_divisor_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &StepEntry::length_value_change));
- dot_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &StepEntry::dot_value_change));
+ velocity_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &StepEntry::velocity_value_change));
+ length_divisor_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &StepEntry::length_value_change));
+ dot_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &StepEntry::dot_value_change));
_piano = (PianoKeyboard*) piano_keyboard_new ();
piano = wrap ((GtkWidget*) _piano);
@@ -451,7 +451,7 @@ StepEntry::StepEntry (StepEditor& seditor)
beat_resync_button.signal_clicked().connect (sigc::mem_fun (*this, &StepEntry::beat_resync_click));
bar_resync_button.signal_clicked().connect (sigc::mem_fun (*this, &StepEntry::bar_resync_click));
- length_divisor_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &StepEntry::length_changed));
+ length_divisor_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &StepEntry::length_changed));
packer.set_spacing (6);
packer.pack_start (upper_box, false, false);
@@ -462,12 +462,12 @@ StepEntry::StepEntry (StepEditor& seditor)
/* initial settings: quarter note and mezzo forte */
- act = myactions.find_action ("StepEditing/note-length-quarter");
+ act = myactions.find_action ("StepEditing/note-length-quarter");
RefPtr<RadioAction> r = RefPtr<RadioAction>::cast_dynamic (act);
assert (r);
r->set_active (true);
- act = myactions.find_action ("StepEditing/note-velocity-mf");
+ act = myactions.find_action ("StepEditing/note-velocity-mf");
r = RefPtr<RadioAction>::cast_dynamic (act);
assert (r);
r->set_active (true);
@@ -480,21 +480,21 @@ StepEntry::~StepEntry()
void
StepEntry::length_changed ()
{
- length_1_button.queue_draw ();
- length_2_button.queue_draw ();
- length_4_button.queue_draw ();
- length_8_button.queue_draw ();
- length_16_button.queue_draw ();
- length_32_button.queue_draw ();
- length_64_button.queue_draw ();
+ length_1_button.queue_draw ();
+ length_2_button.queue_draw ();
+ length_4_button.queue_draw ();
+ length_8_button.queue_draw ();
+ length_16_button.queue_draw ();
+ length_32_button.queue_draw ();
+ length_64_button.queue_draw ();
}
bool
StepEntry::on_key_press_event (GdkEventKey* ev)
{
- /* focus widget gets first shot, then bindings, otherwise
- forward to main window
- */
+ /* focus widget gets first shot, then bindings, otherwise
+ forward to main window
+ */
if (gtk_window_propagate_key_event (GTK_WINDOW(gobj()), ev)) {
return true;
@@ -510,9 +510,9 @@ StepEntry::on_key_release_event (GdkEventKey* ev)
return true;
}
- /* don't forward releases */
+ /* don't forward releases */
- return true;
+ return true;
}
void
@@ -524,24 +524,24 @@ StepEntry::rest_event_handler ()
Evoral::Beats
StepEntry::note_length ()
{
- double base_time = 4.0 / (double) length_divisor_adjustment.get_value();
+ double base_time = 4.0 / (double) length_divisor_adjustment.get_value();
- RefPtr<Action> act = myactions.find_action ("StepEditing/toggle-triplet");
- RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic (act);
- bool triplets = tact->get_active ();
+ RefPtr<Action> act = myactions.find_action ("StepEditing/toggle-triplet");
+ RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic (act);
+ bool triplets = tact->get_active ();
- if (triplets) {
- base_time *= (2.0/3.0);
- }
+ if (triplets) {
+ base_time *= (2.0/3.0);
+ }
- double dots = dot_adjustment.get_value ();
+ double dots = dot_adjustment.get_value ();
- if (dots > 0) {
- dots = pow (2.0, dots);
- base_time *= 1 + ((dots - 1.0)/dots);
- }
+ if (dots > 0) {
+ dots = pow (2.0, dots);
+ base_time *= 1 + ((dots - 1.0)/dots);
+ }
- return Evoral::Beats(base_time);
+ return Evoral::Beats(base_time);
}
uint8_t
@@ -559,7 +559,7 @@ StepEntry::note_channel() const
void
StepEntry::note_off_event_handler (int note)
{
- insert_note (note);
+ insert_note (note);
}
@@ -579,7 +579,7 @@ StepEntry::beat_resync_click ()
void
StepEntry::bar_resync_click ()
{
- se->step_edit_bar_sync ();
+ se->step_edit_bar_sync ();
}
void
@@ -695,78 +695,78 @@ void
StepEntry::load_bindings ()
{
bindings = Bindings::get_bindings (X_("Step Editing"), myactions);
- set_data ("ardour-bindings", bindings);
+ set_data ("ardour-bindings", bindings);
}
void
StepEntry::toggle_triplet ()
{
- se->set_step_edit_cursor_width (note_length());
+ se->set_step_edit_cursor_width (note_length());
}
void
StepEntry::toggle_chord ()
{
- se->step_edit_toggle_chord ();
+ se->step_edit_toggle_chord ();
}
void
StepEntry::dot_change (GtkAction* act)
{
- if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION(act))) {
- gint v = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (act));
- dot_adjustment.set_value (v);
- }
+ if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION(act))) {
+ gint v = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (act));
+ dot_adjustment.set_value (v);
+ }
}
void
StepEntry::dot_value_change ()
{
- RefPtr<Action> act;
- RefPtr<RadioAction> ract;
- double val = dot_adjustment.get_value();
- bool inconsistent = true;
- vector<const char*> dot_actions;
-
- dot_actions.push_back ("StepEditing/no-dotted");
- dot_actions.push_back ("StepEditing/toggle-dotted");
- dot_actions.push_back ("StepEditing/toggle-double-dotted");
- dot_actions.push_back ("StepEditing/toggle-triple-dotted");
-
- for (vector<const char*>::iterator i = dot_actions.begin(); i != dot_actions.end(); ++i) {
-
- act = myactions.find_action (*i);
-
- if (act) {
- ract = RefPtr<RadioAction>::cast_dynamic (act);
-
- if (ract) {
- if (ract->property_value() == val) {
- ract->set_active (true);
- inconsistent = false;
- break;
- }
- }
- }
- }
-
- dot1_button.set_inconsistent (inconsistent);
- dot2_button.set_inconsistent (inconsistent);
- dot3_button.set_inconsistent (inconsistent);
-
- se->set_step_edit_cursor_width (note_length());
+ RefPtr<Action> act;
+ RefPtr<RadioAction> ract;
+ double val = dot_adjustment.get_value();
+ bool inconsistent = true;
+ vector<const char*> dot_actions;
+
+ dot_actions.push_back ("StepEditing/no-dotted");
+ dot_actions.push_back ("StepEditing/toggle-dotted");
+ dot_actions.push_back ("StepEditing/toggle-double-dotted");
+ dot_actions.push_back ("StepEditing/toggle-triple-dotted");
+
+ for (vector<const char*>::iterator i = dot_actions.begin(); i != dot_actions.end(); ++i) {
+
+ act = myactions.find_action (*i);
+
+ if (act) {
+ ract = RefPtr<RadioAction>::cast_dynamic (act);
+
+ if (ract) {
+ if (ract->property_value() == val) {
+ ract->set_active (true);
+ inconsistent = false;
+ break;
+ }
+ }
+ }
+ }
+
+ dot1_button.set_inconsistent (inconsistent);
+ dot2_button.set_inconsistent (inconsistent);
+ dot3_button.set_inconsistent (inconsistent);
+
+ se->set_step_edit_cursor_width (note_length());
}
void
StepEntry::program_click ()
{
- se->step_add_program_change (note_channel(), (int8_t) floor (program_adjustment.get_value()));
+ se->step_add_program_change (note_channel(), (int8_t) floor (program_adjustment.get_value()));
}
void
StepEntry::bank_click ()
{
- se->step_add_bank_change (note_channel(), (int8_t) floor (bank_adjustment.get_value()));
+ se->step_add_bank_change (note_channel(), (int8_t) floor (bank_adjustment.get_value()));
}
void
@@ -784,367 +784,367 @@ StepEntry::insert_grid_rest ()
void
StepEntry::insert_note (uint8_t note)
{
- if (note > 127) {
- return;
- }
+ if (note > 127) {
+ return;
+ }
se->step_add_note (note_channel(), note, note_velocity(), note_length());
}
void
StepEntry::insert_c ()
{
- insert_note (0 + (current_octave() * 12));
+ insert_note (0 + (current_octave() * 12));
}
void
StepEntry::insert_csharp ()
{
- insert_note (1 + (current_octave() * 12));
+ insert_note (1 + (current_octave() * 12));
}
void
StepEntry::insert_d ()
{
- insert_note (2 + (current_octave() * 12));
+ insert_note (2 + (current_octave() * 12));
}
void
StepEntry::insert_dsharp ()
{
- insert_note (3 + (current_octave() * 12));
+ insert_note (3 + (current_octave() * 12));
}
void
StepEntry::insert_e ()
{
- insert_note (4 + (current_octave() * 12));
+ insert_note (4 + (current_octave() * 12));
}
void
StepEntry::insert_f ()
{
- insert_note (5 + (current_octave() * 12));
+ insert_note (5 + (current_octave() * 12));
}
void
StepEntry::insert_fsharp ()
{
- insert_note (6 + (current_octave() * 12));
+ insert_note (6 + (current_octave() * 12));
}
void
StepEntry::insert_g ()
{
- insert_note (7 + (current_octave() * 12));
+ insert_note (7 + (current_octave() * 12));
}
void
StepEntry::insert_gsharp ()
{
- insert_note (8 + (current_octave() * 12));
+ insert_note (8 + (current_octave() * 12));
}
void
StepEntry::insert_a ()
{
- insert_note (9 + (current_octave() * 12));
+ insert_note (9 + (current_octave() * 12));
}
void
StepEntry::insert_asharp ()
{
- insert_note (10 + (current_octave() * 12));
+ insert_note (10 + (current_octave() * 12));
}
void
StepEntry::insert_b ()
{
- insert_note (11 + (current_octave() * 12));
+ insert_note (11 + (current_octave() * 12));
}
void
StepEntry::note_length_change (GtkAction* act)
{
- /* it doesn't matter which note length action we look up - we are interested
- in the current_value which is global across the whole group of note length
- actions. this method is called twice for every user operation,
- once for the action that became "inactive" and once for the action that
- becaome "active". so ... only bother to actually change the value when this
- is called for the "active" action.
- */
-
- if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION(act))) {
- gint v = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (act));
- length_divisor_adjustment.set_value (v);
- }
+ /* it doesn't matter which note length action we look up - we are interested
+ in the current_value which is global across the whole group of note length
+ actions. this method is called twice for every user operation,
+ once for the action that became "inactive" and once for the action that
+ becaome "active". so ... only bother to actually change the value when this
+ is called for the "active" action.
+ */
+
+ if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION(act))) {
+ gint v = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (act));
+ length_divisor_adjustment.set_value (v);
+ }
}
void
StepEntry::note_velocity_change (GtkAction* act)
{
- /* it doesn't matter which note length action we look up - we are interested
- in the current_value which is global across the whole group of note length
- actions. this method is called twice for every user operation,
- once for the action that became "inactive" and once for the action that
- becaome "active". so ... only bother to actually change the value when this
- is called for the "active" action.
- */
-
- if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION(act))) {
- gint v = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (act));
- velocity_adjustment.set_value (v);
- }
+ /* it doesn't matter which note length action we look up - we are interested
+ in the current_value which is global across the whole group of note length
+ actions. this method is called twice for every user operation,
+ once for the action that became "inactive" and once for the action that
+ becaome "active". so ... only bother to actually change the value when this
+ is called for the "active" action.
+ */
+
+ if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION(act))) {
+ gint v = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (act));
+ velocity_adjustment.set_value (v);
+ }
}
void
StepEntry::velocity_value_change ()
{
- RefPtr<Action> act;
- RefPtr<RadioAction> ract;
- double val = velocity_adjustment.get_value();
- bool inconsistent = true;
- vector<const char*> velocity_actions;
-
- velocity_actions.push_back ("StepEditing/note-velocity-ppp");
- velocity_actions.push_back ("StepEditing/note-velocity-pp");
- velocity_actions.push_back ("StepEditing/note-velocity-p");
- velocity_actions.push_back ("StepEditing/note-velocity-mp");
- velocity_actions.push_back ("StepEditing/note-velocity-mf");
- velocity_actions.push_back ("StepEditing/note-velocity-f");
- velocity_actions.push_back ("StepEditing/note-velocity-ff");
- velocity_actions.push_back ("StepEditing/note-velocity-fff");
-
- for (vector<const char*>::iterator i = velocity_actions.begin(); i != velocity_actions.end(); ++i) {
-
- act = myactions.find_action (*i);
-
- if (act) {
- ract = RefPtr<RadioAction>::cast_dynamic (act);
-
- if (ract) {
- if (ract->property_value() == val) {
- ract->set_active (true);
- inconsistent = false;
- break;
- }
- }
- }
- }
-
- velocity_ppp_button.set_inconsistent (inconsistent);
- velocity_pp_button.set_inconsistent (inconsistent);
- velocity_p_button.set_inconsistent (inconsistent);
- velocity_mp_button.set_inconsistent (inconsistent);
- velocity_mf_button.set_inconsistent (inconsistent);
- velocity_f_button.set_inconsistent (inconsistent);
- velocity_ff_button.set_inconsistent (inconsistent);
- velocity_fff_button.set_inconsistent (inconsistent);
+ RefPtr<Action> act;
+ RefPtr<RadioAction> ract;
+ double val = velocity_adjustment.get_value();
+ bool inconsistent = true;
+ vector<const char*> velocity_actions;
+
+ velocity_actions.push_back ("StepEditing/note-velocity-ppp");
+ velocity_actions.push_back ("StepEditing/note-velocity-pp");
+ velocity_actions.push_back ("StepEditing/note-velocity-p");
+ velocity_actions.push_back ("StepEditing/note-velocity-mp");
+ velocity_actions.push_back ("StepEditing/note-velocity-mf");
+ velocity_actions.push_back ("StepEditing/note-velocity-f");
+ velocity_actions.push_back ("StepEditing/note-velocity-ff");
+ velocity_actions.push_back ("StepEditing/note-velocity-fff");
+
+ for (vector<const char*>::iterator i = velocity_actions.begin(); i != velocity_actions.end(); ++i) {
+
+ act = myactions.find_action (*i);
+
+ if (act) {
+ ract = RefPtr<RadioAction>::cast_dynamic (act);
+
+ if (ract) {
+ if (ract->property_value() == val) {
+ ract->set_active (true);
+ inconsistent = false;
+ break;
+ }
+ }
+ }
+ }
+
+ velocity_ppp_button.set_inconsistent (inconsistent);
+ velocity_pp_button.set_inconsistent (inconsistent);
+ velocity_p_button.set_inconsistent (inconsistent);
+ velocity_mp_button.set_inconsistent (inconsistent);
+ velocity_mf_button.set_inconsistent (inconsistent);
+ velocity_f_button.set_inconsistent (inconsistent);
+ velocity_ff_button.set_inconsistent (inconsistent);
+ velocity_fff_button.set_inconsistent (inconsistent);
}
void
StepEntry::length_value_change ()
{
- RefPtr<Action> act;
- RefPtr<RadioAction> ract;
- double val = length_divisor_adjustment.get_value();
- bool inconsistent = true;
- vector<const char*> length_actions;
-
- length_actions.push_back ("StepEditing/note-length-whole");
- length_actions.push_back ("StepEditing/note-length-half");
- length_actions.push_back ("StepEditing/note-length-quarter");
- length_actions.push_back ("StepEditing/note-length-eighth");
- length_actions.push_back ("StepEditing/note-length-sixteenth");
- length_actions.push_back ("StepEditing/note-length-thirtysecond");
- length_actions.push_back ("StepEditing/note-length-sixtyfourth");
-
- for (vector<const char*>::iterator i = length_actions.begin(); i != length_actions.end(); ++i) {
-
- act = myactions.find_action (*i);
-
- if (act) {
- ract = RefPtr<RadioAction>::cast_dynamic (act);
-
- if (ract) {
- if (ract->property_value() == val) {
- ract->set_active (true);
- inconsistent = false;
- break;
- }
- }
- }
- }
-
- length_1_button.set_inconsistent (inconsistent);
- length_2_button.set_inconsistent (inconsistent);
- length_4_button.set_inconsistent (inconsistent);
- length_8_button.set_inconsistent (inconsistent);
- length_16_button.set_inconsistent (inconsistent);
- length_32_button.set_inconsistent (inconsistent);
- length_64_button.set_inconsistent (inconsistent);
-
- se->set_step_edit_cursor_width (note_length());
+ RefPtr<Action> act;
+ RefPtr<RadioAction> ract;
+ double val = length_divisor_adjustment.get_value();
+ bool inconsistent = true;
+ vector<const char*> length_actions;
+
+ length_actions.push_back ("StepEditing/note-length-whole");
+ length_actions.push_back ("StepEditing/note-length-half");
+ length_actions.push_back ("StepEditing/note-length-quarter");
+ length_actions.push_back ("StepEditing/note-length-eighth");
+ length_actions.push_back ("StepEditing/note-length-sixteenth");
+ length_actions.push_back ("StepEditing/note-length-thirtysecond");
+ length_actions.push_back ("StepEditing/note-length-sixtyfourth");
+
+ for (vector<const char*>::iterator i = length_actions.begin(); i != length_actions.end(); ++i) {
+
+ act = myactions.find_action (*i);
+
+ if (act) {
+ ract = RefPtr<RadioAction>::cast_dynamic (act);
+
+ if (ract) {
+ if (ract->property_value() == val) {
+ ract->set_active (true);
+ inconsistent = false;
+ break;
+ }
+ }
+ }
+ }
+
+ length_1_button.set_inconsistent (inconsistent);
+ length_2_button.set_inconsistent (inconsistent);
+ length_4_button.set_inconsistent (inconsistent);
+ length_8_button.set_inconsistent (inconsistent);
+ length_16_button.set_inconsistent (inconsistent);
+ length_32_button.set_inconsistent (inconsistent);
+ length_64_button.set_inconsistent (inconsistent);
+
+ se->set_step_edit_cursor_width (note_length());
}
bool
StepEntry::radio_button_press (GdkEventButton* ev)
{
- if (ev->button == 1) {
- return true;
- }
+ if (ev->button == 1) {
+ return true;
+ }
- return false;
+ return false;
}
bool
StepEntry::radio_button_release (GdkEventButton* ev, RadioButton* btn, int v)
{
- if (ev->button == 1) {
- GtkAction* act = gtk_activatable_get_related_action (GTK_ACTIVATABLE (btn->gobj()));
+ if (ev->button == 1) {
+ GtkAction* act = gtk_activatable_get_related_action (GTK_ACTIVATABLE (btn->gobj()));
- if (act) {
- gtk_radio_action_set_current_value (GTK_RADIO_ACTION(act), v);
- }
+ if (act) {
+ gtk_radio_action_set_current_value (GTK_RADIO_ACTION(act), v);
+ }
- return true;
- }
+ return true;
+ }
- return false;
+ return false;
}
void
StepEntry::next_octave ()
{
- octave_adjustment.set_value (octave_adjustment.get_value() + 1.0);
+ octave_adjustment.set_value (octave_adjustment.get_value() + 1.0);
}
void
StepEntry::prev_octave ()
{
- octave_adjustment.set_value (octave_adjustment.get_value() - 1.0);
+ octave_adjustment.set_value (octave_adjustment.get_value() - 1.0);
}
void
StepEntry::inc_note_length ()
{
- length_divisor_adjustment.set_value (length_divisor_adjustment.get_value() - 1.0);
+ length_divisor_adjustment.set_value (length_divisor_adjustment.get_value() - 1.0);
}
void
StepEntry::dec_note_length ()
{
- length_divisor_adjustment.set_value (length_divisor_adjustment.get_value() + 1.0);
+ length_divisor_adjustment.set_value (length_divisor_adjustment.get_value() + 1.0);
}
void
StepEntry::prev_note_length ()
{
- double l = length_divisor_adjustment.get_value();
- int il = (int) lrintf (l); // round to nearest integer
- il = (il/2) * 2; // round to power of 2
+ double l = length_divisor_adjustment.get_value();
+ int il = (int) lrintf (l); // round to nearest integer
+ il = (il/2) * 2; // round to power of 2
- if (il == 0) {
- il = 1;
- }
+ if (il == 0) {
+ il = 1;
+ }
- il *= 2; // double
+ il *= 2; // double
- length_divisor_adjustment.set_value (il);
+ length_divisor_adjustment.set_value (il);
}
void
StepEntry::next_note_length ()
{
- double l = length_divisor_adjustment.get_value();
- int il = (int) lrintf (l); // round to nearest integer
- il = (il/2) * 2; // round to power of 2
+ double l = length_divisor_adjustment.get_value();
+ int il = (int) lrintf (l); // round to nearest integer
+ il = (il/2) * 2; // round to power of 2
- if (il == 0) {
- il = 1;
- }
+ if (il == 0) {
+ il = 1;
+ }
- il /= 2; // half
+ il /= 2; // half
- if (il > 0) {
- length_divisor_adjustment.set_value (il);
- }
+ if (il > 0) {
+ length_divisor_adjustment.set_value (il);
+ }
}
void
StepEntry::inc_note_velocity ()
{
- velocity_adjustment.set_value (velocity_adjustment.get_value() + 1.0);
+ velocity_adjustment.set_value (velocity_adjustment.get_value() + 1.0);
}
void
StepEntry::dec_note_velocity ()
{
- velocity_adjustment.set_value (velocity_adjustment.get_value() - 1.0);
+ velocity_adjustment.set_value (velocity_adjustment.get_value() - 1.0);
}
void
StepEntry::next_note_velocity ()
{
- double l = velocity_adjustment.get_value ();
-
- if (l < 16) {
- l = 16;
- } else if (l < 32) {
- l = 32;
- } else if (l < 48) {
- l = 48;
- } else if (l < 64) {
- l = 64;
- } else if (l < 80) {
- l = 80;
- } else if (l < 96) {
- l = 96;
- } else if (l < 112) {
- l = 112;
- } else if (l < 127) {
- l = 127;
- }
-
- velocity_adjustment.set_value (l);
+ double l = velocity_adjustment.get_value ();
+
+ if (l < 16) {
+ l = 16;
+ } else if (l < 32) {
+ l = 32;
+ } else if (l < 48) {
+ l = 48;
+ } else if (l < 64) {
+ l = 64;
+ } else if (l < 80) {
+ l = 80;
+ } else if (l < 96) {
+ l = 96;
+ } else if (l < 112) {
+ l = 112;
+ } else if (l < 127) {
+ l = 127;
+ }
+
+ velocity_adjustment.set_value (l);
}
void
StepEntry::prev_note_velocity ()
{
- double l = velocity_adjustment.get_value ();
-
- if (l > 112) {
- l = 112;
- } else if (l > 96) {
- l = 96;
- } else if (l > 80) {
- l = 80;
- } else if (l > 64) {
- l = 64;
- } else if (l > 48) {
- l = 48;
- } else if (l > 32) {
- l = 32;
- } else if (l > 16) {
- l = 16;
- } else {
- l = 1;
- }
-
- velocity_adjustment.set_value (l);
+ double l = velocity_adjustment.get_value ();
+
+ if (l > 112) {
+ l = 112;
+ } else if (l > 96) {
+ l = 96;
+ } else if (l > 80) {
+ l = 80;
+ } else if (l > 64) {
+ l = 64;
+ } else if (l > 48) {
+ l = 48;
+ } else if (l > 32) {
+ l = 32;
+ } else if (l > 16) {
+ l = 16;
+ } else {
+ l = 1;
+ }
+
+ velocity_adjustment.set_value (l);
}
void
StepEntry::octave_n (int n)
{
- octave_adjustment.set_value (n);
+ octave_adjustment.set_value (n);
}
void
StepEntry::do_sustain ()
{
- se->step_edit_sustain (note_length());
+ se->step_edit_sustain (note_length());
}
void
StepEntry::back ()
{
- se->move_step_edit_beat_pos (-note_length());
+ se->move_step_edit_beat_pos (-note_length());
}
void
StepEntry::sync_to_edit_point ()
{
- se->resync_step_edit_to_edit_point ();
+ se->resync_step_edit_to_edit_point ();
}