mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-29 16:33:14 +01:00
MCP: VCA meter based on gain value since VCA does not have metering
This commit is contained in:
parent
adbd958107
commit
04152c28f1
1 changed files with 31 additions and 4 deletions
|
|
@ -213,6 +213,12 @@ Strip::set_stripable (std::shared_ptr<Stripable> r, bool /*with_messages*/)
|
|||
|
||||
_stripable = r;
|
||||
|
||||
/* VCA meter reset: VCAs have no peak_meter() → meters stick to previous bank.
|
||||
Force zero on assignment (bank switch/session load). */
|
||||
if (r && r->presentation_info().flags() & ARDOUR::PresentationInfo::VCA && _meter) {
|
||||
_meter->send_update(*_surface, 0.0f);
|
||||
}
|
||||
|
||||
reset_saved_values ();
|
||||
|
||||
if (!r) {
|
||||
|
|
@ -1271,11 +1277,32 @@ Strip::return_to_vpot_mode_display ()
|
|||
if (_surface->mcp().subview()->subview_mode() != Subview::None) {
|
||||
/* do nothing - second line shows value of current subview parameter */
|
||||
return;
|
||||
} else if (_stripable) {
|
||||
pending_display[1] = vpot_mode_string();
|
||||
} else {
|
||||
pending_display[1] = string();
|
||||
}
|
||||
|
||||
if (!_stripable) {
|
||||
pending_display[1] = string();
|
||||
return;
|
||||
}
|
||||
|
||||
/* VCA strips: always show current gain in dB permanently */
|
||||
if (_stripable->presentation_info().flags() & ARDOUR::PresentationInfo::VCA) {
|
||||
float db = -INFINITY;
|
||||
if (auto gain = _stripable->gain_control()) {
|
||||
float coeff = gain->get_value();
|
||||
if (coeff > 0.0f) {
|
||||
db = accurate_coefficient_to_dB(coeff);
|
||||
}
|
||||
}
|
||||
|
||||
/* Also drive the meter with the VCA gain — looks alive and correct */
|
||||
/* Use Ardour's official Mackie meter scaling — perfect match */
|
||||
if (_meter) {
|
||||
_meter->send_update(*_surface, db);
|
||||
}
|
||||
return;
|
||||
}
|
||||
/* Normal tracks/buses: show pan mode or value */
|
||||
pending_display[1] = vpot_mode_string();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue