if (!gtk_window_propagate_key_event (GTK_WINDOW(gobj()), ev)) {
KeyboardKey k (ev->state, ev->keyval);
- if (bindings.activate (k, KeyboardKey::Press)) {
+ if (bindings.activate (k, Bindings::Press)) {
return true;
}
}
if (!gtk_window_propagate_key_event (GTK_WINDOW(gobj()), ev)) {
KeyboardKey k (ev->state, ev->keyval);
- if (bindings.activate (k, KeyboardKey::Release)) {
+ if (bindings.activate (k, Bindings::Release)) {
return true;
}
}
myactions.register_action ("StepEditing", "inc-note-velocity", _("Increase Note Velocity"), sigc::mem_fun (*this, &StepEntry::inc_note_velocity));
myactions.register_action ("StepEditing", "dec-note-velocity", _("Decrease Note Velocity"), sigc::mem_fun (*this, &StepEntry::dec_note_velocity));
- myactions.register_action ("StepEditing", "octave-1", _("Switch to the 1st octave"), sigc::mem_fun (*this, &StepEntry::octave_0));
- myactions.register_action ("StepEditing", "octave-2", _("Switch to the 2nd octave"), sigc::mem_fun (*this, &StepEntry::octave_1));
- myactions.register_action ("StepEditing", "octave-3", _("Switch to the 3rd octave"), sigc::mem_fun (*this, &StepEntry::octave_2));
- myactions.register_action ("StepEditing", "octave-4", _("Switch to the 4th octave"), sigc::mem_fun (*this, &StepEntry::octave_3));
- myactions.register_action ("StepEditing", "octave-5", _("Switch to the 5th octave"), sigc::mem_fun (*this, &StepEntry::octave_4));
- myactions.register_action ("StepEditing", "octave-6", _("Switch to the 6th octave"), sigc::mem_fun (*this, &StepEntry::octave_5));
- myactions.register_action ("StepEditing", "octave-7", _("Switch to the 7th octave"), sigc::mem_fun (*this, &StepEntry::octave_6));
- myactions.register_action ("StepEditing", "octave-8", _("Switch to the 8th octave"), sigc::mem_fun (*this, &StepEntry::octave_7));
- myactions.register_action ("StepEditing", "octave-9", _("Switch to the 9th octave"), sigc::mem_fun (*this, &StepEntry::octave_8));
- myactions.register_action ("StepEditing", "octave-10", _("Switch to the 10th octave"), sigc::mem_fun (*this, &StepEntry::octave_9));
- myactions.register_action ("StepEditing", "octave-11", _("Switch to the 11th octave"), sigc::mem_fun (*this, &StepEntry::octave_10));
+ myactions.register_action ("StepEditing", "octave-0", _("Switch to the 1st octave"), sigc::mem_fun (*this, &StepEntry::octave_0));
+ myactions.register_action ("StepEditing", "octave-1", _("Switch to the 2nd octave"), sigc::mem_fun (*this, &StepEntry::octave_1));
+ myactions.register_action ("StepEditing", "octave-2", _("Switch to the 3rd octave"), sigc::mem_fun (*this, &StepEntry::octave_2));
+ myactions.register_action ("StepEditing", "octave-3", _("Switch to the 4th octave"), sigc::mem_fun (*this, &StepEntry::octave_3));
+ myactions.register_action ("StepEditing", "octave-4", _("Switch to the 5th octave"), sigc::mem_fun (*this, &StepEntry::octave_4));
+ myactions.register_action ("StepEditing", "octave-5", _("Switch to the 6th octave"), sigc::mem_fun (*this, &StepEntry::octave_5));
+ myactions.register_action ("StepEditing", "octave-6", _("Switch to the 7th octave"), sigc::mem_fun (*this, &StepEntry::octave_6));
+ myactions.register_action ("StepEditing", "octave-7", _("Switch to the 8th octave"), sigc::mem_fun (*this, &StepEntry::octave_7));
+ myactions.register_action ("StepEditing", "octave-8", _("Switch to the 9th octave"), sigc::mem_fun (*this, &StepEntry::octave_8));
+ myactions.register_action ("StepEditing", "octave-9", _("Switch to the 10th octave"), sigc::mem_fun (*this, &StepEntry::octave_9));
+ myactions.register_action ("StepEditing", "octave-10", _("Switch to the 11th octave"), sigc::mem_fun (*this, &StepEntry::octave_10));
RadioAction::Group note_length_group;
StepEntry::load_bindings ()
{
/* XXX move this to a better place */
- KeyboardKey::set_ignored_state (GDK_LOCK_MASK|GDK_MOD2_MASK|GDK_MOD3_MASK);
bindings.set_action_map (myactions);
void
StepEntry::insert_note (uint8_t note)
{
+ if (note > 127) {
+ return;
+ }
+
se->step_add_note (note_channel(), note, note_velocity(), note_length());
}
void