use right-side buttons to goto_nth_marker()
This commit is contained in:
parent
ac9b5f872d
commit
f290be21ee
@ -165,3 +165,70 @@ Push2::button_lower (uint32_t n)
|
||||
mc->set_value (!mc->get_value(), PBD::Controllable::UseGroup);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Push2::button_undo ()
|
||||
{
|
||||
if (modifier_state & ModShift) {
|
||||
ControlProtocol::Redo ();
|
||||
} else {
|
||||
ControlProtocol::Undo ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Push2::button_fwd32t ()
|
||||
{
|
||||
const int n = (modifier_state & ModShift) ? 8 : 0;
|
||||
goto_nth_marker (0+n);
|
||||
}
|
||||
|
||||
void
|
||||
Push2::button_fwd32 ()
|
||||
{
|
||||
const int n = (modifier_state & ModShift) ? 8 : 0;
|
||||
goto_nth_marker (1+n);
|
||||
}
|
||||
|
||||
void
|
||||
Push2::button_fwd16t ()
|
||||
{
|
||||
const int n = (modifier_state & ModShift) ? 8 : 0;
|
||||
goto_nth_marker (2+n);
|
||||
}
|
||||
|
||||
void
|
||||
Push2::button_fwd16 ()
|
||||
{
|
||||
const int n = (modifier_state & ModShift) ? 8 : 0;
|
||||
goto_nth_marker (3+n);
|
||||
}
|
||||
|
||||
void
|
||||
Push2::button_fwd8t ()
|
||||
{
|
||||
const int n = (modifier_state & ModShift) ? 8 : 0;
|
||||
goto_nth_marker (4+n);
|
||||
}
|
||||
|
||||
void
|
||||
Push2::button_fwd8 ()
|
||||
{
|
||||
const int n = (modifier_state & ModShift) ? 8 : 0;
|
||||
goto_nth_marker (5+n);
|
||||
}
|
||||
|
||||
void
|
||||
Push2::button_fwd4t ()
|
||||
{
|
||||
const int n = (modifier_state & ModShift) ? 8 : 0;
|
||||
goto_nth_marker (6+n);
|
||||
}
|
||||
|
||||
void
|
||||
Push2::button_fwd4 ()
|
||||
{
|
||||
const int n = (modifier_state & ModShift) ? 8 : 0;
|
||||
goto_nth_marker (7+n);
|
||||
}
|
||||
|
||||
|
@ -684,14 +684,14 @@ Push2::build_maps ()
|
||||
MAKE_COLOR_BUTTON (Mute, 60);
|
||||
MAKE_COLOR_BUTTON_PRESS (Solo, 61, &Push2::button_solo);
|
||||
MAKE_COLOR_BUTTON (Stop, 29);
|
||||
MAKE_COLOR_BUTTON (Fwd32ndT, 43);
|
||||
MAKE_COLOR_BUTTON (Fwd32nd,42 );
|
||||
MAKE_COLOR_BUTTON (Fwd16thT, 41);
|
||||
MAKE_COLOR_BUTTON (Fwd16th, 40);
|
||||
MAKE_COLOR_BUTTON (Fwd8thT, 39 );
|
||||
MAKE_COLOR_BUTTON (Fwd8th, 38);
|
||||
MAKE_COLOR_BUTTON (Fwd4trT, 37);
|
||||
MAKE_COLOR_BUTTON (Fwd4tr, 36);
|
||||
MAKE_COLOR_BUTTON_PRESS (Fwd32ndT, 43, &Push2::button_fwd32t);
|
||||
MAKE_COLOR_BUTTON_PRESS (Fwd32nd,42 , &Push2::button_fwd32);
|
||||
MAKE_COLOR_BUTTON_PRESS (Fwd16thT, 41, &Push2::button_fwd16t);
|
||||
MAKE_COLOR_BUTTON_PRESS (Fwd16th, 40, &Push2::button_fwd16);
|
||||
MAKE_COLOR_BUTTON_PRESS (Fwd8thT, 39 , &Push2::button_fwd8t);
|
||||
MAKE_COLOR_BUTTON_PRESS (Fwd8th, 38, &Push2::button_fwd8);
|
||||
MAKE_COLOR_BUTTON_PRESS (Fwd4trT, 37, &Push2::button_fwd4t);
|
||||
MAKE_COLOR_BUTTON_PRESS (Fwd4tr, 36, &Push2::button_fwd4);
|
||||
MAKE_COLOR_BUTTON (Automate, 89);
|
||||
MAKE_COLOR_BUTTON_PRESS (RecordEnable, 86, &Push2::button_recenable);
|
||||
MAKE_COLOR_BUTTON_PRESS (Play, 85, &Push2::button_play);
|
||||
@ -717,7 +717,7 @@ Push2::build_maps ()
|
||||
MAKE_WHITE_BUTTON (AddDevice, 52);
|
||||
MAKE_WHITE_BUTTON (Device, 110);
|
||||
MAKE_WHITE_BUTTON (Mix, 112);
|
||||
MAKE_WHITE_BUTTON (Undo, 119);
|
||||
MAKE_WHITE_BUTTON_PRESS (Undo, 119, &Push2::button_undo);
|
||||
MAKE_WHITE_BUTTON (AddTrack, 53);
|
||||
MAKE_WHITE_BUTTON_PRESS (Browse, 111, &Push2::button_browse);
|
||||
MAKE_WHITE_BUTTON_PRESS (Clip, 113, &Push2::button_clip);
|
||||
|
@ -366,6 +366,15 @@ class Push2 : public ARDOUR::ControlProtocol
|
||||
void button_lower_6 () { button_lower (5); }
|
||||
void button_lower_7 () { button_lower (6); }
|
||||
void button_lower_8 () { button_lower (7); }
|
||||
void button_undo ();
|
||||
void button_fwd32t ();
|
||||
void button_fwd32 ();
|
||||
void button_fwd16t ();
|
||||
void button_fwd16 ();
|
||||
void button_fwd8t ();
|
||||
void button_fwd8 ();
|
||||
void button_fwd4t ();
|
||||
void button_fwd4 ();
|
||||
|
||||
/* widgets */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user