push2: add velocity sensitivity
This commit is contained in:
parent
1249195516
commit
2f25592702
|
@ -569,7 +569,7 @@ CueLayout::show_running_boxen (bool yn)
|
|||
}
|
||||
|
||||
void
|
||||
CueLayout::pad_press (int y, int x) /* fix coordinate order one day */
|
||||
CueLayout::pad_press (int y, int x, int velocity) /* fix coordinate order one day */
|
||||
{
|
||||
if (!_route[x]) {
|
||||
return;
|
||||
|
@ -582,7 +582,7 @@ CueLayout::pad_press (int y, int x) /* fix coordinate order one day */
|
|||
return;
|
||||
}
|
||||
|
||||
tb->bang_trigger_at (y + scene_base);
|
||||
tb->bang_trigger_at (y + scene_base, velocity / 127.0f);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -82,7 +82,7 @@ class CueLayout : public Push2Layout
|
|||
void strip_vpot (int, int);
|
||||
void strip_vpot_touch (int, bool);
|
||||
|
||||
void pad_press (int x, int y);
|
||||
void pad_press (int x, int y, int velocity);
|
||||
void pad_release (int x, int y);
|
||||
|
||||
/* override to use for clip progress */
|
||||
|
|
|
@ -68,7 +68,7 @@ class Push2Layout : public sigc::trackable, public ArdourCanvas::Container
|
|||
virtual void strip_vpot (int, int) = 0;
|
||||
virtual void strip_vpot_touch (int, bool) = 0;
|
||||
|
||||
virtual void pad_press (int x, int y) {}
|
||||
virtual void pad_press (int x, int y, int velocity) {}
|
||||
virtual void pad_release (int x, int y) {}
|
||||
|
||||
virtual void update_meters () {}
|
||||
|
|
|
@ -655,7 +655,7 @@ Push2::handle_midi_note_on_message (MIDI::Parser& parser, MIDI::EventTwoBytes* e
|
|||
std::shared_ptr<const Pad> pad_pressed = pm->second;
|
||||
|
||||
if (_current_layout == _cue_layout) {
|
||||
_current_layout->pad_press (pad_pressed->x, pad_pressed->y);
|
||||
_current_layout->pad_press (pad_pressed->x, pad_pressed->y, ev->velocity);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user