mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-11 09:06:33 +01:00
push2: set and use selected track color for root notes on pads
This commit is contained in:
parent
06683b1bda
commit
a4cd0d7dae
1 changed files with 9 additions and 4 deletions
|
|
@ -135,6 +135,7 @@ Push2::Push2 (ARDOUR::Session& s)
|
||||||
, octave_shift (0)
|
, octave_shift (0)
|
||||||
, percussion (false)
|
, percussion (false)
|
||||||
, _pressure_mode (AfterTouch)
|
, _pressure_mode (AfterTouch)
|
||||||
|
, selection_color (LED::Green)
|
||||||
{
|
{
|
||||||
|
|
||||||
build_maps ();
|
build_maps ();
|
||||||
|
|
@ -1315,8 +1316,8 @@ Push2::set_pad_scale (int root, int octave, MusicalMode::Type mode, bool inkey)
|
||||||
pad->filtered = notenum;
|
pad->filtered = notenum;
|
||||||
|
|
||||||
if ((notenum % 12) == original_root) {
|
if ((notenum % 12) == original_root) {
|
||||||
pad->set_color (LED::Green);
|
pad->set_color (selection_color);
|
||||||
pad->perma_color = LED::Green;
|
pad->perma_color = selection_color;
|
||||||
} else {
|
} else {
|
||||||
pad->set_color (LED::White);
|
pad->set_color (LED::White);
|
||||||
pad->perma_color = LED::White;
|
pad->perma_color = LED::White;
|
||||||
|
|
@ -1353,8 +1354,8 @@ Push2::set_pad_scale (int root, int octave, MusicalMode::Type mode, bool inkey)
|
||||||
if (mode_map.find (note) != mode_map.end()) {
|
if (mode_map.find (note) != mode_map.end()) {
|
||||||
|
|
||||||
if ((note % 12) == original_root) {
|
if ((note % 12) == original_root) {
|
||||||
pad->set_color (LED::Green);
|
pad->set_color (selection_color);
|
||||||
pad->perma_color = LED::Green;
|
pad->perma_color = selection_color;
|
||||||
} else {
|
} else {
|
||||||
pad->set_color (LED::White);
|
pad->set_color (LED::White);
|
||||||
pad->perma_color = LED::White;
|
pad->perma_color = LED::White;
|
||||||
|
|
@ -1472,9 +1473,13 @@ Push2::stripable_selection_change (StripableNotificationListPtr selected)
|
||||||
if (new_pad_target && pad_port) {
|
if (new_pad_target && pad_port) {
|
||||||
new_pad_target->input()->connect (new_pad_target->input()->nth (0), pad_port->name(), this);
|
new_pad_target->input()->connect (new_pad_target->input()->nth (0), pad_port->name(), this);
|
||||||
current_pad_target = new_pad_target;
|
current_pad_target = new_pad_target;
|
||||||
|
selection_color = get_color_index (new_pad_target->presentation_info().color());
|
||||||
} else {
|
} else {
|
||||||
current_pad_target.reset ();
|
current_pad_target.reset ();
|
||||||
|
selection_color = LED::Green;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reset_pad_colors ();
|
||||||
}
|
}
|
||||||
|
|
||||||
Push2::Button*
|
Push2::Button*
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue