mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-06 05:35:47 +01:00
MCU: allow scrolling to gate controls in the dynamics subview
This commit is contained in:
parent
dfa12dedcd
commit
e3710bd0a2
2 changed files with 32 additions and 4 deletions
|
|
@ -420,6 +420,7 @@ void EQSubview::notify_change (std::weak_ptr<ARDOUR::AutomationControl> pc, uint
|
|||
|
||||
DynamicsSubview::DynamicsSubview(MackieControlProtocol& mcp, std::shared_ptr<ARDOUR::Stripable> subview_stripable)
|
||||
: Subview(mcp, subview_stripable)
|
||||
, _current_bank(0)
|
||||
{}
|
||||
|
||||
DynamicsSubview::~DynamicsSubview()
|
||||
|
|
@ -450,13 +451,15 @@ void DynamicsSubview::setup_vpot(
|
|||
Pot* vpot,
|
||||
std::string pending_display[2])
|
||||
{
|
||||
const uint32_t global_strip_position = _mcp.global_index (*strip);
|
||||
store_pointers(strip, vpot, pending_display, global_strip_position);
|
||||
const uint32_t global_strip_position = _mcp.global_index (*strip) + _current_bank;
|
||||
store_pointers(strip, vpot, pending_display, global_strip_position - _current_bank);
|
||||
|
||||
if (!_subview_stripable) {
|
||||
return;
|
||||
}
|
||||
|
||||
available.clear();
|
||||
|
||||
std::shared_ptr<AutomationControl> hpfc = _subview_stripable->mapped_control (HPF_Freq);
|
||||
std::shared_ptr<AutomationControl> lpfc = _subview_stripable->mapped_control (LPF_Freq);
|
||||
std::shared_ptr<AutomationControl> fec = _subview_stripable->mapped_control (HPF_Enable); // shared HP/LP
|
||||
|
|
@ -478,7 +481,6 @@ void DynamicsSubview::setup_vpot(
|
|||
* order shown above.
|
||||
*/
|
||||
|
||||
std::vector<std::pair<std::shared_ptr<AutomationControl>, std::string > > available;
|
||||
std::vector<AutomationType> params;
|
||||
|
||||
//Mixbus32C needs to spill the filter controls into the comp section
|
||||
|
|
@ -535,7 +537,7 @@ DynamicsSubview::notify_change (std::weak_ptr<ARDOUR::AutomationControl> pc, uin
|
|||
Strip* strip = 0;
|
||||
Pot* vpot = 0;
|
||||
std::string* pending_display = 0;
|
||||
if (!retrieve_pointers(&strip, &vpot, &pending_display, global_strip_position))
|
||||
if (!retrieve_pointers(&strip, &vpot, &pending_display, global_strip_position - _current_bank))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -556,6 +558,27 @@ DynamicsSubview::notify_change (std::weak_ptr<ARDOUR::AutomationControl> pc, uin
|
|||
}
|
||||
}
|
||||
|
||||
bool DynamicsSubview::handle_cursor_left_press()
|
||||
{
|
||||
if (_current_bank >= 1)
|
||||
{
|
||||
_current_bank -= 1;
|
||||
mcp().redisplay_subview_mode();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DynamicsSubview::handle_cursor_right_press()
|
||||
{
|
||||
if (available.size() > _current_bank + 1) {
|
||||
_current_bank += 1;
|
||||
mcp().redisplay_subview_mode();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
SendsSubview::SendsSubview(MackieControlProtocol& mcp, std::shared_ptr<ARDOUR::Stripable> subview_stripable)
|
||||
|
|
|
|||
|
|
@ -142,6 +142,11 @@ class DynamicsSubview : public Subview {
|
|||
Pot* vpot,
|
||||
std::string pending_display[2]);
|
||||
void notify_change (std::weak_ptr<ARDOUR::AutomationControl>, uint32_t global_strip_position, bool force, bool propagate_mode_change);
|
||||
virtual bool handle_cursor_left_press();
|
||||
virtual bool handle_cursor_right_press();
|
||||
protected:
|
||||
uint32_t _current_bank;
|
||||
std::vector<std::pair<std::shared_ptr<ARDOUR::AutomationControl>, std::string>> available;
|
||||
};
|
||||
|
||||
class SendsSubview : public Subview {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue