Stereo EQS. Toob CRV bypass settings in snapshots.
This commit is contained in:
+42
-5
@@ -2060,6 +2060,26 @@ void PiPedalModel::UpdateDefaults(SnapshotValue&snapshotValue, const PedalboardI
|
|||||||
}
|
}
|
||||||
if (pPlugin)
|
if (pPlugin)
|
||||||
{
|
{
|
||||||
|
// Fix incorrect bypass settings presint in Pipedal < 1.5.96
|
||||||
|
for (size_t i = 0; i < pPlugin->ports().size(); ++i)
|
||||||
|
{
|
||||||
|
auto& port = pPlugin->ports()[i];
|
||||||
|
if (port->is_bypass() && port->is_control_port() && port->is_input())
|
||||||
|
{
|
||||||
|
ControlValue* pValue = snapshotValue.GetControlValue(port->symbol());
|
||||||
|
float value = snapshotValue.isEnabled_ ? 1.0f : 0.0f;
|
||||||
|
|
||||||
|
if (pValue == nullptr)
|
||||||
|
{
|
||||||
|
snapshotValue.controlValues_.push_back(
|
||||||
|
pipedal::ControlValue(port->symbol().c_str(), value));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pValue->value(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
//////// PLUGIN SPECIFIC UPGRADES //////////////////////
|
//////// PLUGIN SPECIFIC UPGRADES //////////////////////
|
||||||
if (pPlugin->uri() == "http://two-play.com/plugins/toob-nam")
|
if (pPlugin->uri() == "http://two-play.com/plugins/toob-nam")
|
||||||
{
|
{
|
||||||
@@ -2172,12 +2192,29 @@ void PiPedalModel::UpdateDefaults(PedalboardItem *pedalboardItem, std::unordered
|
|||||||
|
|
||||||
if (port->is_control_port() && port->is_input())
|
if (port->is_control_port() && port->is_input())
|
||||||
{
|
{
|
||||||
ControlValue *pValue = pedalboardItem->GetControlValue(port->symbol());
|
if (port->is_bypass())
|
||||||
if (pValue == nullptr)
|
|
||||||
{
|
{
|
||||||
// Missing? Set it to default value.
|
// retroactively correct bug in version of PiPedal prior to 1.5.96.
|
||||||
pedalboardItem->controlValues().push_back(
|
ControlValue *pValue = pedalboardItem->GetControlValue(port->symbol());
|
||||||
pipedal::ControlValue(port->symbol().c_str(), port->default_value()));
|
float value = pedalboardItem->isEnabled() ? 1.0f: 0.0f;
|
||||||
|
|
||||||
|
if (pValue == nullptr)
|
||||||
|
{
|
||||||
|
pedalboardItem->controlValues().push_back(
|
||||||
|
pipedal::ControlValue(port->symbol().c_str(), value));
|
||||||
|
} else {
|
||||||
|
pValue->value(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
ControlValue *pValue = pedalboardItem->GetControlValue(port->symbol());
|
||||||
|
if (pValue == nullptr)
|
||||||
|
{
|
||||||
|
// Missing? Set it to default value.
|
||||||
|
pedalboardItem->controlValues().push_back(
|
||||||
|
pipedal::ControlValue(port->symbol().c_str(), port->default_value()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ import ToobMLViewFactory from './ToobMLView';
|
|||||||
import ToobPlayerFactory from './ToobPlayerView';
|
import ToobPlayerFactory from './ToobPlayerView';
|
||||||
import ToobNamViewFactory from './ToobNamView';
|
import ToobNamViewFactory from './ToobNamView';
|
||||||
import ToobParametericEqViewFactory from './ToobParametricEqView';
|
import ToobParametericEqViewFactory from './ToobParametricEqView';
|
||||||
|
import {ToobParametricEqViewFactoryStereo} from './ToobParametricEqView';
|
||||||
|
|
||||||
|
|
||||||
let pluginFactories: IControlViewFactory[] = [
|
let pluginFactories: IControlViewFactory[] = [
|
||||||
@@ -42,7 +43,8 @@ let pluginFactories: IControlViewFactory[] = [
|
|||||||
new ToobMLViewFactory(),
|
new ToobMLViewFactory(),
|
||||||
new ToobPlayerFactory(),
|
new ToobPlayerFactory(),
|
||||||
new ToobNamViewFactory(),
|
new ToobNamViewFactory(),
|
||||||
new ToobParametericEqViewFactory()
|
new ToobParametericEqViewFactory(),
|
||||||
|
new ToobParametricEqViewFactoryStereo(),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1759,7 +1759,7 @@ export class PiPedalModel //implements PiPedalModel
|
|||||||
if (pluginInfo !== null) {
|
if (pluginInfo !== null) {
|
||||||
for (let uiControl of pluginInfo.controls) {
|
for (let uiControl of pluginInfo.controls) {
|
||||||
if (uiControl.is_bypass) {
|
if (uiControl.is_bypass) {
|
||||||
this._setPedalboardControlValue(instanceId, uiControl.symbol, value ? 0.0 : 1.0, false);
|
this._setPedalboardControlValue(instanceId, uiControl.symbol, value ? 1.0 : 0.0, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -736,5 +736,19 @@ class ToobParametricEqViewFactory implements IControlViewFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
};
|
||||||
export default ToobParametricEqViewFactory;
|
export default ToobParametricEqViewFactory;
|
||||||
|
|
||||||
|
class ToobParametricEqViewFactoryStereo implements IControlViewFactory {
|
||||||
|
uri: string = "http://two-play.com/plugins/toob-parametric-eq-stereo";
|
||||||
|
|
||||||
|
Create(model: PiPedalModel, pedalboardItem: PedalboardItem): React.ReactNode {
|
||||||
|
return (<ToobParametricEqView instanceId={pedalboardItem.instanceId} item={pedalboardItem} />);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
export { ToobParametricEqViewFactoryStereo };
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user