Split control double-tap for default value.
This commit is contained in:
@@ -1138,18 +1138,20 @@ export function makeSplitUiPlugin(): UiPlugin {
|
|||||||
has_midi_output: 0,
|
has_midi_output: 0,
|
||||||
description: "",
|
description: "",
|
||||||
controls: [
|
controls: [
|
||||||
new UiControl().applyProperties({
|
new UiControl().deserialize({
|
||||||
symbol: "splitType",
|
symbol: "splitType",
|
||||||
name: "Type",
|
name: "Type",
|
||||||
index: 0,
|
index: 0,
|
||||||
is_input: true,
|
is_input: true,
|
||||||
min_value: 0.0,
|
min_value: 0.0,
|
||||||
max_value: 2.0,
|
max_value: 2.0,
|
||||||
|
default_value: 0.0,
|
||||||
|
|
||||||
enumeration_property: true,
|
enumeration_property: true,
|
||||||
scale_points: [
|
scale_points: [
|
||||||
new ScalePoint().deserialize({ value: 0, label: "A/B" }),
|
new ScalePoint().deserialize({ value: 0, label: "A/B" }),
|
||||||
new ScalePoint().deserialize({ value: 1, label: "mix" }),
|
new ScalePoint().deserialize({ value: 1, label: "Mix" }),
|
||||||
new ScalePoint().deserialize({ value: 1, label: "L/R" }),
|
new ScalePoint().deserialize({ value: 2, label: "L/R" }),
|
||||||
],
|
],
|
||||||
is_bypass: false,
|
is_bypass: false,
|
||||||
is_program_controller: false,
|
is_program_controller: false,
|
||||||
@@ -1157,18 +1159,22 @@ export function makeSplitUiPlugin(): UiPlugin {
|
|||||||
connection_optional: false,
|
connection_optional: false,
|
||||||
|
|
||||||
}),
|
}),
|
||||||
new UiControl().applyProperties({
|
new UiControl().deserialize({
|
||||||
symbol: "select",
|
symbol: "select",
|
||||||
name: "Select",
|
name: "Select",
|
||||||
index: 1,
|
index: 1,
|
||||||
is_input: true,
|
is_input: true,
|
||||||
min_value: 0.0,
|
min_value: 0.0,
|
||||||
max_value: 1.0,
|
max_value: 1.0,
|
||||||
|
default_value: 0.0,
|
||||||
|
|
||||||
enumeration_property: true,
|
enumeration_property: true,
|
||||||
scale_points: [
|
scale_points: [
|
||||||
new ScalePoint().deserialize({ value: 0, label: "A" }),
|
new ScalePoint().deserialize({ value: 0, label: "A" }),
|
||||||
new ScalePoint().deserialize({ value: 1, label: "B" }),
|
new ScalePoint().deserialize({ value: 1, label: "B" }),
|
||||||
],
|
],
|
||||||
|
controlType: ControlType.ABSwitch,
|
||||||
|
|
||||||
is_bypass: false,
|
is_bypass: false,
|
||||||
is_program_controller: false,
|
is_program_controller: false,
|
||||||
custom_units: "",
|
custom_units: "",
|
||||||
@@ -1176,65 +1182,74 @@ export function makeSplitUiPlugin(): UiPlugin {
|
|||||||
|
|
||||||
}),
|
}),
|
||||||
|
|
||||||
new UiControl().applyProperties({
|
new UiControl().deserialize({
|
||||||
symbol: "mix",
|
symbol: "mix",
|
||||||
name: "Mix",
|
name: "Mix",
|
||||||
index: 2,
|
index: 2,
|
||||||
is_input: true,
|
is_input: true,
|
||||||
min_value: -1.0,
|
min_value: -1.0,
|
||||||
max_value: 1.0,
|
max_value: 1.0,
|
||||||
|
default_value: 0.0,
|
||||||
|
controlType: ControlType.Dial,
|
||||||
is_bypass: false,
|
is_bypass: false,
|
||||||
is_program_controller: false,
|
is_program_controller: false,
|
||||||
custom_units: "",
|
custom_units: "",
|
||||||
connection_optional: false,
|
connection_optional: false,
|
||||||
|
|
||||||
}),
|
}),
|
||||||
new UiControl().applyProperties({
|
new UiControl().deserialize({
|
||||||
symbol: "panL",
|
symbol: "panL",
|
||||||
name: "Pan Top",
|
name: "Pan Top",
|
||||||
index: 3,
|
index: 3,
|
||||||
is_input: true,
|
is_input: true,
|
||||||
min_value: -1.0,
|
min_value: -1.0,
|
||||||
max_value: 1.0,
|
max_value: 1.0,
|
||||||
|
default_value: 0.0,
|
||||||
|
controlType: ControlType.Dial,
|
||||||
is_bypass: false,
|
is_bypass: false,
|
||||||
is_program_controller: false,
|
is_program_controller: false,
|
||||||
custom_units: "",
|
custom_units: "",
|
||||||
connection_optional: false,
|
connection_optional: false,
|
||||||
|
|
||||||
}),
|
}),
|
||||||
new UiControl().applyProperties({
|
new UiControl().deserialize({
|
||||||
symbol: "volL",
|
symbol: "volL",
|
||||||
name: "Vol Top",
|
|
||||||
index: 4,
|
index: 4,
|
||||||
is_input: true,
|
is_input: true,
|
||||||
min_value: -60.0,
|
min_value: -60.0,
|
||||||
max_value: 12.0,
|
max_value: 12.0,
|
||||||
|
default_value: 0.0,
|
||||||
is_bypass: false,
|
is_bypass: false,
|
||||||
|
controlType: ControlType.Dial,
|
||||||
is_program_controller: false,
|
is_program_controller: false,
|
||||||
custom_units: "",
|
custom_units: "",
|
||||||
connection_optional: false,
|
connection_optional: false,
|
||||||
|
|
||||||
}),
|
}),
|
||||||
new UiControl().applyProperties({
|
new UiControl().deserialize({
|
||||||
symbol: "panR",
|
symbol: "panR",
|
||||||
name: "Pan Bottom",
|
name: "Pan Bottom",
|
||||||
index: 5,
|
index: 5,
|
||||||
is_input: true,
|
is_input: true,
|
||||||
min_value: -1.0,
|
min_value: -1.0,
|
||||||
max_value: 1.0,
|
max_value: 1.0,
|
||||||
|
default_value: 0.0,
|
||||||
|
controlType: ControlType.Dial,
|
||||||
is_bypass: false,
|
is_bypass: false,
|
||||||
is_program_controller: false,
|
is_program_controller: false,
|
||||||
custom_units: "",
|
custom_units: "",
|
||||||
connection_optional: false,
|
connection_optional: false,
|
||||||
|
|
||||||
}),
|
}),
|
||||||
new UiControl().applyProperties({
|
new UiControl().deserialize({
|
||||||
symbol: "volR",
|
symbol: "volR",
|
||||||
name: "Vol Bottom",
|
name: "Vol Bottom",
|
||||||
index: 6,
|
index: 6,
|
||||||
is_input: true,
|
is_input: true,
|
||||||
min_value: -60.0,
|
min_value: -60.0,
|
||||||
max_value: 12.0,
|
max_value: 12.0,
|
||||||
|
default_value: 0.0,
|
||||||
|
controlType: ControlType.Dial,
|
||||||
is_bypass: false,
|
is_bypass: false,
|
||||||
is_program_controller: false,
|
is_program_controller: false,
|
||||||
custom_units: "",
|
custom_units: "",
|
||||||
|
|||||||
@@ -686,9 +686,9 @@ export class Pedalboard implements Deserializable<Pedalboard> {
|
|||||||
new ControlValue(PedalboardSplitItem.SELECT_KEY,0),
|
new ControlValue(PedalboardSplitItem.SELECT_KEY,0),
|
||||||
new ControlValue(PedalboardSplitItem.MIX_KEY,0),
|
new ControlValue(PedalboardSplitItem.MIX_KEY,0),
|
||||||
new ControlValue(PedalboardSplitItem.PANL_KEY,0),
|
new ControlValue(PedalboardSplitItem.PANL_KEY,0),
|
||||||
new ControlValue(PedalboardSplitItem.VOLL_KEY,-3),
|
new ControlValue(PedalboardSplitItem.VOLL_KEY,0),
|
||||||
new ControlValue(PedalboardSplitItem.PANR_KEY,0),
|
new ControlValue(PedalboardSplitItem.PANR_KEY,0),
|
||||||
new ControlValue(PedalboardSplitItem.VOLR_KEY,-3)
|
new ControlValue(PedalboardSplitItem.VOLR_KEY,0)
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1721,11 +1721,19 @@ export class PiPedalModel //implements PiPedalModel
|
|||||||
if (pedalboard === undefined) throw new PiPedalStateError("Pedalboard not ready.");
|
if (pedalboard === undefined) throw new PiPedalStateError("Pedalboard not ready.");
|
||||||
let newPedalboard = pedalboard.clone();
|
let newPedalboard = pedalboard.clone();
|
||||||
|
|
||||||
let item = newPedalboard.getItem(instanceId);
|
let item: PedalboardItem = newPedalboard.getItem(instanceId);
|
||||||
|
|
||||||
let changed = value !== item.isEnabled;
|
let changed = value !== item.isEnabled;
|
||||||
if (changed) {
|
if (changed) {
|
||||||
item.isEnabled = value;
|
item.isEnabled = value;
|
||||||
|
let pluginInfo: UiPlugin | null = this.getUiPlugin(item.uri);
|
||||||
|
if (pluginInfo !== null) {
|
||||||
|
for (let uiControl of pluginInfo.controls) {
|
||||||
|
if (uiControl.is_bypass) {
|
||||||
|
this._setPedalboardControlValue(instanceId, uiControl.symbol, value ? 0.0 : 1.0, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
this.setModelPedalboard(newPedalboard);
|
this.setModelPedalboard(newPedalboard);
|
||||||
if (notifyServer) {
|
if (notifyServer) {
|
||||||
let body: PedalboardItemEnableBody = {
|
let body: PedalboardItemEnableBody = {
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ export const SplitTypeControl: UiControl = new UiControl().deserialize({
|
|||||||
symbol: PedalboardSplitItem.TYPE_KEY,
|
symbol: PedalboardSplitItem.TYPE_KEY,
|
||||||
name: "Type",
|
name: "Type",
|
||||||
index: 0,
|
index: 0,
|
||||||
|
is_input: true,
|
||||||
min_value: 0,
|
min_value: 0,
|
||||||
max_value: 2,
|
max_value: 2,
|
||||||
default_value: 0,
|
default_value: 0,
|
||||||
@@ -53,6 +54,8 @@ export const SplitAbControl: UiControl = new UiControl().deserialize({
|
|||||||
symbol: PedalboardSplitItem.SELECT_KEY,
|
symbol: PedalboardSplitItem.SELECT_KEY,
|
||||||
name: "Select",
|
name: "Select",
|
||||||
index: 1,
|
index: 1,
|
||||||
|
is_input: true,
|
||||||
|
|
||||||
min_value: 0,
|
min_value: 0,
|
||||||
max_value: 1,
|
max_value: 1,
|
||||||
default_value: 0,
|
default_value: 0,
|
||||||
@@ -78,6 +81,7 @@ export const SplitMixControl: UiControl = new UiControl().deserialize({
|
|||||||
symbol: PedalboardSplitItem.MIX_KEY,
|
symbol: PedalboardSplitItem.MIX_KEY,
|
||||||
name: "Mix",
|
name: "Mix",
|
||||||
index: 2,
|
index: 2,
|
||||||
|
is_input: true,
|
||||||
min_value: -1,
|
min_value: -1,
|
||||||
max_value: 1,
|
max_value: 1,
|
||||||
default_value: 0,
|
default_value: 0,
|
||||||
@@ -99,6 +103,7 @@ export const SplitPanLeftControl: UiControl = new UiControl().deserialize({
|
|||||||
symbol: PedalboardSplitItem.PANL_KEY,
|
symbol: PedalboardSplitItem.PANL_KEY,
|
||||||
name: "Pan Top",
|
name: "Pan Top",
|
||||||
index: 3,
|
index: 3,
|
||||||
|
is_input: true,
|
||||||
min_value: -1,
|
min_value: -1,
|
||||||
max_value: 1,
|
max_value: 1,
|
||||||
default_value: 0,
|
default_value: 0,
|
||||||
@@ -119,9 +124,10 @@ export const SplitVolLeftControl: UiControl = new UiControl().deserialize({
|
|||||||
symbol: PedalboardSplitItem.VOLL_KEY,
|
symbol: PedalboardSplitItem.VOLL_KEY,
|
||||||
name: "Vol Top",
|
name: "Vol Top",
|
||||||
index: 4,
|
index: 4,
|
||||||
|
is_input: true,
|
||||||
min_value: -60,
|
min_value: -60,
|
||||||
max_value: 12,
|
max_value: 12,
|
||||||
default_value: -3,
|
default_value: 0,
|
||||||
range_steps: 0,
|
range_steps: 0,
|
||||||
is_logarithmic: false,
|
is_logarithmic: false,
|
||||||
display_priority: -1,
|
display_priority: -1,
|
||||||
@@ -146,6 +152,7 @@ export const SplitPanRightControl: UiControl = new UiControl().deserialize({
|
|||||||
symbol: PedalboardSplitItem.PANR_KEY,
|
symbol: PedalboardSplitItem.PANR_KEY,
|
||||||
name: "Pan Bottom",
|
name: "Pan Bottom",
|
||||||
index: 5,
|
index: 5,
|
||||||
|
is_input: true,
|
||||||
min_value: -1,
|
min_value: -1,
|
||||||
max_value: 1,
|
max_value: 1,
|
||||||
default_value: 0,
|
default_value: 0,
|
||||||
@@ -166,9 +173,10 @@ export const SplitVolRightControl: UiControl = new UiControl().deserialize({
|
|||||||
symbol: PedalboardSplitItem.VOLR_KEY,
|
symbol: PedalboardSplitItem.VOLR_KEY,
|
||||||
name: "Vol Bottom",
|
name: "Vol Bottom",
|
||||||
index: 6,
|
index: 6,
|
||||||
|
is_input: true,
|
||||||
min_value: -60,
|
min_value: -60,
|
||||||
max_value: 12,
|
max_value: 12,
|
||||||
default_value: -3,
|
default_value: 0,
|
||||||
range_steps: 0,
|
range_steps: 0,
|
||||||
is_logarithmic: false,
|
is_logarithmic: false,
|
||||||
display_priority: -1,
|
display_priority: -1,
|
||||||
|
|||||||
Reference in New Issue
Block a user