WebSockets: let clients know if a strip is a VCA
This allows to hide the panner for example
This commit is contained in:
parent
68463cb591
commit
80dc3a38e0
|
@ -63,12 +63,21 @@ WebsocketsDispatcher::update_all_nodes (Client client)
|
|||
for (uint32_t strip_n = 0; strip_n < strips ().strip_count (); ++strip_n) {
|
||||
boost::shared_ptr<Stripable> strip = strips ().nth_strip (strip_n);
|
||||
|
||||
update (client, Node::strip_description, strip_n, strip->name ());
|
||||
bool is_vca = strip->presentation_info ().flags () & ARDOUR::PresentationInfo::VCA;
|
||||
|
||||
AddressVector strip_addr = AddressVector ();
|
||||
strip_addr.push_back (strip_n);
|
||||
ValueVector strip_desc = ValueVector ();
|
||||
strip_desc.push_back (strip->name ());
|
||||
strip_desc.push_back (is_vca);
|
||||
|
||||
update (client, Node::strip_description, strip_addr, strip_desc);
|
||||
|
||||
update (client, Node::strip_gain, strip_n, strips ().strip_gain (strip_n));
|
||||
update (client, Node::strip_mute, strip_n, strips ().strip_mute (strip_n));
|
||||
|
||||
// Pan and plugins not available in VCAs
|
||||
if ((strip->presentation_info ().flags () & ARDOUR::PresentationInfo::VCA)) {
|
||||
if (is_vca) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ import { Switch, DiscreteSlider, ContinuousSlider, LogarithmicSlider,
|
|||
ardour.connect();
|
||||
}
|
||||
|
||||
function createStrip (stripId, name) {
|
||||
function createStrip (stripId, name, isVca) {
|
||||
const domId = `strip-${stripId}`;
|
||||
if (document.getElementById(domId) != null) {
|
||||
return;
|
||||
|
@ -75,12 +75,14 @@ import { Switch, DiscreteSlider, ContinuousSlider, LogarithmicSlider,
|
|||
gain.appendTo(holder);
|
||||
connectWidget(gain, ANode.STRIP_GAIN, stripId);
|
||||
|
||||
// pan
|
||||
holder = createElem(`<div class="strip-slider"></div>`, div);
|
||||
createElem(`<label>Pan</label>`, holder);
|
||||
const pan = new StripPanSlider();
|
||||
pan.appendTo(holder);
|
||||
connectWidget(pan, ANode.STRIP_PAN, stripId);
|
||||
if (!isVca) {
|
||||
// pan
|
||||
holder = createElem(`<div class="strip-slider"></div>`, div);
|
||||
createElem(`<label>Pan</label>`, holder);
|
||||
const pan = new StripPanSlider();
|
||||
pan.appendTo(holder);
|
||||
connectWidget(pan, ANode.STRIP_PAN, stripId);
|
||||
}
|
||||
}
|
||||
|
||||
function createStripPlugin (stripId, pluginId, name) {
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
onRecordState (value) {}
|
||||
|
||||
// Strips
|
||||
onStripDescription (stripId, name) {}
|
||||
onStripDescription (stripId, name, isVca) {}
|
||||
onStripMeter (stripId, db) {}
|
||||
onStripGain (stripId, db) {}
|
||||
onStripPan (stripId, value) {}
|
||||
|
|
Loading…
Reference in New Issue
Block a user