Publish licenses to website.
This commit is contained in:
+7
-1
@@ -17,6 +17,7 @@
|
|||||||
"@types/react-dom": "^17.0.8",
|
"@types/react-dom": "^17.0.8",
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
"react-dom": "^17.0.2",
|
"react-dom": "^17.0.2",
|
||||||
|
"react-remark": "^2.1.0",
|
||||||
"react-scripts": "5.0.0",
|
"react-scripts": "5.0.0",
|
||||||
"react-virtualized-auto-sizer": "^1.0.6",
|
"react-virtualized-auto-sizer": "^1.0.6",
|
||||||
"react-window": "^1.8.6",
|
"react-window": "^1.8.6",
|
||||||
@@ -33,7 +34,12 @@
|
|||||||
"extends": [
|
"extends": [
|
||||||
"react-app",
|
"react-app",
|
||||||
"react-app/jest"
|
"react-app/jest"
|
||||||
]
|
],
|
||||||
|
"rules": {
|
||||||
|
"eqeqeq": 2,
|
||||||
|
"no-unused-expressions": 2,
|
||||||
|
"@typescript-eslint/no-unused-vars": 2
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"browserslist": {
|
"browserslist": {
|
||||||
"production": [
|
"production": [
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
@@ -207,7 +207,7 @@ const FilePropertyControl =
|
|||||||
<Typography variant="caption" display="block" noWrap style={{
|
<Typography variant="caption" display="block" noWrap style={{
|
||||||
width: "100%",
|
width: "100%",
|
||||||
textAlign: "start"
|
textAlign: "start"
|
||||||
}}> {fileProperty.name}</Typography>
|
}}> {fileProperty.label}</Typography>
|
||||||
</div>
|
</div>
|
||||||
{/* CONTROL SECTION */}
|
{/* CONTROL SECTION */}
|
||||||
|
|
||||||
|
|||||||
@@ -153,9 +153,12 @@ export default class FilePropertyDialog extends ResizeResponsiveComponent<FilePr
|
|||||||
return hasSelection;
|
return hasSelection;
|
||||||
}
|
}
|
||||||
|
|
||||||
onSelect(selectedFile: string) {
|
onSelectValue(selectedFile: string) {
|
||||||
this.setState({ selectedFile: selectedFile, hasSelection: this.isFileInList(this.state.files, selectedFile) })
|
this.setState({ selectedFile: selectedFile, hasSelection: this.isFileInList(this.state.files, selectedFile) })
|
||||||
}
|
}
|
||||||
|
onDoubleClickValue(selectedFile: string) {
|
||||||
|
this.props.onOk(this.props.fileProperty,selectedFile);
|
||||||
|
}
|
||||||
|
|
||||||
handleDelete() {
|
handleDelete() {
|
||||||
this.setState({openConfirmDeleteDialog: true});
|
this.setState({openConfirmDeleteDialog: true});
|
||||||
@@ -216,7 +219,7 @@ export default class FilePropertyDialog extends ResizeResponsiveComponent<FilePr
|
|||||||
>
|
>
|
||||||
<ArrowBackIcon fontSize="small" style={{ opacity: "0.6" }} />
|
<ArrowBackIcon fontSize="small" style={{ opacity: "0.6" }} />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
<Typography display="inline" >{this.props.fileProperty.name}</Typography>
|
<Typography display="inline" >{this.props.fileProperty.label}</Typography>
|
||||||
</div>
|
</div>
|
||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
<div style={{ flex: "0 0 auto", height: "1px", background: "rgba(0,0,0,0.2" }}> </div>
|
<div style={{ flex: "0 0 auto", height: "1px", background: "rgba(0,0,0,0.2" }}> </div>
|
||||||
@@ -230,7 +233,7 @@ export default class FilePropertyDialog extends ResizeResponsiveComponent<FilePr
|
|||||||
return (
|
return (
|
||||||
<ButtonBase key={this.mapKey++}
|
<ButtonBase key={this.mapKey++}
|
||||||
style={{ width: "320px", flex: "0 0 48px", position: "relative" }}
|
style={{ width: "320px", flex: "0 0 48px", position: "relative" }}
|
||||||
onClick={() => this.onSelect(value)}
|
onClick={() => this.onSelectValue(value)} onDoubleClick={()=> {this.onDoubleClickValue(value);}}
|
||||||
>
|
>
|
||||||
<div style={{ position: "absolute", background: selectBg, width: "100%", height: "100%", borderRadius: 4 }} />
|
<div style={{ position: "absolute", background: selectBg, width: "100%", height: "100%", borderRadius: 4 }} />
|
||||||
<div style={{ display: "flex", flexFlow: "row nowrap", justifyContent: "start", alignItems: "center", width: "100%", height: "100%" }}>
|
<div style={{ display: "flex", flexFlow: "row nowrap", justifyContent: "start", alignItems: "center", width: "100%", height: "100%" }}>
|
||||||
|
|||||||
@@ -432,7 +432,7 @@ export const LoadPluginDialog =
|
|||||||
if (!uiPlugin) {
|
if (!uiPlugin) {
|
||||||
return (<Fragment />);
|
return (<Fragment />);
|
||||||
} else {
|
} else {
|
||||||
let stereoIndicator = this.stereo_indicator(uiPlugin)
|
let stereoIndicator = "\u00A0" + this.stereo_indicator(uiPlugin)
|
||||||
if (uiPlugin.author_name !== "") {
|
if (uiPlugin.author_name !== "") {
|
||||||
if (uiPlugin.author_homepage !== "") {
|
if (uiPlugin.author_homepage !== "") {
|
||||||
return (<Fragment>
|
return (<Fragment>
|
||||||
@@ -440,21 +440,24 @@ export const LoadPluginDialog =
|
|||||||
<Typography variant='body2' color="textSecondary" noWrap>{uiPlugin.name + ",\u00A0"}</Typography>
|
<Typography variant='body2' color="textSecondary" noWrap>{uiPlugin.name + ",\u00A0"}</Typography>
|
||||||
</div>
|
</div>
|
||||||
<div style={{flex: "0 1 auto"}}>
|
<div style={{flex: "0 1 auto"}}>
|
||||||
<a href={uiPlugin.author_homepage} target="_blank" >
|
<a href={uiPlugin.author_homepage} target="_blank" rel="noopener noreferrer" >
|
||||||
<Typography variant='body2' color="textSecondary" noWrap>{uiPlugin.author_name}</Typography>
|
<Typography variant='body2' color="textSecondary" noWrap>{uiPlugin.author_name}</Typography>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
<div style={{flex: "0 0 auto"}}>
|
||||||
|
<Typography variant='body2' color="textSecondary" noWrap>{stereoIndicator}</Typography>
|
||||||
|
</div>
|
||||||
</Fragment>);
|
</Fragment>);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
return (<Fragment>
|
return (<Fragment>
|
||||||
<Typography variant='body2' color="textSecondary" noWrap>{uiPlugin.name + ", " + uiPlugin.author_name}</Typography>
|
<Typography variant='body2' color="textSecondary" noWrap>{uiPlugin.name + ", " + uiPlugin.author_name + stereoIndicator}</Typography>
|
||||||
</Fragment>);
|
</Fragment>);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<Typography variant='body2' color="textSecondary" noWrap>{uiPlugin?.name ?? ""}</Typography>
|
<Typography variant='body2' color="textSecondary" noWrap>{uiPlugin?.name ?? "" + stereoIndicator}</Typography>
|
||||||
</Fragment>);
|
</Fragment>);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -545,7 +548,7 @@ export const LoadPluginDialog =
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (position != -1) {
|
if (position !== -1) {
|
||||||
element.scrollToItem({ rowIndex: Math.floor(position / this.state.grid_cell_columns) });
|
element.scrollToItem({ rowIndex: Math.floor(position / this.state.grid_cell_columns) });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+24
-5
@@ -18,7 +18,7 @@
|
|||||||
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
import {PiPedalArgumentError} from "./PiPedalError";
|
|
||||||
import Units from './Units';
|
import Units from './Units';
|
||||||
|
|
||||||
interface Deserializable<T> {
|
interface Deserializable<T> {
|
||||||
@@ -83,6 +83,7 @@ export class Port implements Deserializable<Port> {
|
|||||||
|
|
||||||
export class PortGroup {
|
export class PortGroup {
|
||||||
deserialize(input: any): PortGroup {
|
deserialize(input: any): PortGroup {
|
||||||
|
this.uri = input.uri;
|
||||||
this.symbol = input.symbol;
|
this.symbol = input.symbol;
|
||||||
this.name = input.name;
|
this.name = input.name;
|
||||||
this.parent_group = input.parent_group;
|
this.parent_group = input.parent_group;
|
||||||
@@ -99,6 +100,7 @@ export class PortGroup {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uri: string = "";
|
||||||
symbol: string = "";
|
symbol: string = "";
|
||||||
name: string = "";
|
name: string = "";
|
||||||
parent_group: string = "";
|
parent_group: string = "";
|
||||||
@@ -151,10 +153,12 @@ export class UiPropertyNotification {
|
|||||||
export class PiPedalFileProperty {
|
export class PiPedalFileProperty {
|
||||||
deserialize(input: any): PiPedalFileProperty
|
deserialize(input: any): PiPedalFileProperty
|
||||||
{
|
{
|
||||||
this.name = input.name;
|
this.label = input.label;
|
||||||
this.fileTypes = PiPedalFileType.deserialize_array(input.fileTypes);
|
this.fileTypes = PiPedalFileType.deserialize_array(input.fileTypes);
|
||||||
this.patchProperty = input.patchProperty;
|
this.patchProperty = input.patchProperty;
|
||||||
this.directory = input.directory;
|
this.directory = input.directory;
|
||||||
|
this.index = input.index;
|
||||||
|
this.portGroup = input.portGroup;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
static deserialize_array(input: any): PiPedalFileProperty[]
|
static deserialize_array(input: any): PiPedalFileProperty[]
|
||||||
@@ -198,10 +202,12 @@ export class PiPedalFileProperty {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
name: string = "";
|
label: string = "";
|
||||||
fileTypes: PiPedalFileType[] = [];
|
fileTypes: PiPedalFileType[] = [];
|
||||||
patchProperty: string = "";
|
patchProperty: string = "";
|
||||||
directory: string = "";
|
directory: string = "";
|
||||||
|
index: number = -1;
|
||||||
|
portGroup: string = "";
|
||||||
|
|
||||||
};
|
};
|
||||||
export class Lv2Plugin implements Deserializable<Lv2Plugin> {
|
export class Lv2Plugin implements Deserializable<Lv2Plugin> {
|
||||||
@@ -635,9 +641,22 @@ export class UiPlugin implements Deserializable<UiPlugin> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return undefined;
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
getPortGroupByUri(uri: string) :PortGroup | null
|
||||||
|
{
|
||||||
|
for (let i = 0; i < this.port_groups.length; ++i)
|
||||||
|
{
|
||||||
|
let port_group = this.port_groups[i];
|
||||||
|
if (port_group.uri === uri)
|
||||||
|
{
|
||||||
|
return port_group;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
getPortGroup(symbol: string): PortGroup
|
getPortGroupBySymbol(symbol: string): PortGroup | null
|
||||||
{
|
{
|
||||||
for (let i = 0; i < this.port_groups.length; ++i)
|
for (let i = 0; i < this.port_groups.length; ++i)
|
||||||
{
|
{
|
||||||
@@ -647,7 +666,7 @@ export class UiPlugin implements Deserializable<UiPlugin> {
|
|||||||
return port_group;
|
return port_group;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw new PiPedalArgumentError("Port group not found.");
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
uri: string = "";
|
uri: string = "";
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ import PluginInfoDialog from './PluginInfoDialog';
|
|||||||
import { GetControlView } from './ControlViewFactory';
|
import { GetControlView } from './ControlViewFactory';
|
||||||
import MidiBindingsDialog from './MidiBindingsDialog';
|
import MidiBindingsDialog from './MidiBindingsDialog';
|
||||||
import PluginPresetSelector from './PluginPresetSelector';
|
import PluginPresetSelector from './PluginPresetSelector';
|
||||||
import SaveIconOutline from '@mui/icons-material/Save';
|
|
||||||
|
|
||||||
|
|
||||||
const SPLIT_CONTROLBAR_THRESHHOLD = 650;
|
const SPLIT_CONTROLBAR_THRESHHOLD = 650;
|
||||||
@@ -194,7 +194,7 @@ export const MainPage =
|
|||||||
}
|
}
|
||||||
onPedalboardChanged(value: Pedalboard) {
|
onPedalboardChanged(value: Pedalboard) {
|
||||||
let selectedItem = -1;
|
let selectedItem = -1;
|
||||||
if (this.state.selectedPedal == Pedalboard.START_CONTROL || this.state.selectedPedal == Pedalboard.END_CONTROL) {
|
if (this.state.selectedPedal === Pedalboard.START_CONTROL || this.state.selectedPedal === Pedalboard.END_CONTROL) {
|
||||||
selectedItem = this.state.selectedPedal;
|
selectedItem = this.state.selectedPedal;
|
||||||
} else if (value.hasItem(this.state.selectedPedal)) {
|
} else if (value.hasItem(this.state.selectedPedal)) {
|
||||||
selectedItem = this.state.selectedPedal;
|
selectedItem = this.state.selectedPedal;
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ const TERMINAL_ICON_URL = "img/fx_terminal.svg";
|
|||||||
|
|
||||||
function CalculateConnection(numberOfInputs: number, numberOfOutputs: number)
|
function CalculateConnection(numberOfInputs: number, numberOfOutputs: number)
|
||||||
{
|
{
|
||||||
|
|
||||||
let result = Math.min(numberOfInputs, numberOfOutputs);
|
let result = Math.min(numberOfInputs, numberOfOutputs);
|
||||||
if (result > 2) result = 2;
|
if (result > 2) result = 2;
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ import GovernorSettings from './GovernorSettings';
|
|||||||
import WifiChannel from './WifiChannel';
|
import WifiChannel from './WifiChannel';
|
||||||
import AlsaDeviceInfo from './AlsaDeviceInfo';
|
import AlsaDeviceInfo from './AlsaDeviceInfo';
|
||||||
import { AndroidHostInterface, FakeAndroidHost } from './AndroidHost';
|
import { AndroidHostInterface, FakeAndroidHost } from './AndroidHost';
|
||||||
import Xxx from './XxxSnippet';
|
|
||||||
|
|
||||||
|
|
||||||
export enum State {
|
export enum State {
|
||||||
@@ -1176,7 +1175,7 @@ export class PiPedalModel //implements PiPedalModel
|
|||||||
let changed: boolean = false;
|
let changed: boolean = false;
|
||||||
|
|
||||||
let pedalboard = this.pedalboard.get();
|
let pedalboard = this.pedalboard.get();
|
||||||
if (pedalboard.input_volume_db != volume_db)
|
if (pedalboard.input_volume_db !== volume_db)
|
||||||
{
|
{
|
||||||
let newPedalboard = pedalboard.clone();
|
let newPedalboard = pedalboard.clone();
|
||||||
newPedalboard.input_volume_db = volume_db;
|
newPedalboard.input_volume_db = volume_db;
|
||||||
@@ -1207,7 +1206,7 @@ export class PiPedalModel //implements PiPedalModel
|
|||||||
let changed: boolean = false;
|
let changed: boolean = false;
|
||||||
|
|
||||||
let pedalboard = this.pedalboard.get();
|
let pedalboard = this.pedalboard.get();
|
||||||
if (pedalboard.output_volume_db != volume_db)
|
if (pedalboard.output_volume_db !== volume_db)
|
||||||
{
|
{
|
||||||
let newPedalboard = pedalboard.clone();
|
let newPedalboard = pedalboard.clone();
|
||||||
newPedalboard.output_volume_db = volume_db;
|
newPedalboard.output_volume_db = volume_db;
|
||||||
@@ -1234,7 +1233,7 @@ 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();
|
||||||
|
|
||||||
if (instanceId === Pedalboard.START_CONTROL && key == "volume_db")
|
if (instanceId === Pedalboard.START_CONTROL && key === "volume_db")
|
||||||
{
|
{
|
||||||
this._setInputVolume(value,notifyServer);
|
this._setInputVolume(value,notifyServer);
|
||||||
return;
|
return;
|
||||||
@@ -1371,7 +1370,7 @@ export class PiPedalModel //implements PiPedalModel
|
|||||||
// mouse is down. Don't update EVERYBODY, but we must change
|
// mouse is down. Don't update EVERYBODY, but we must change
|
||||||
// the control on the running audio plugin.
|
// the control on the running audio plugin.
|
||||||
// TODO: respect "expensive" port attribute.
|
// TODO: respect "expensive" port attribute.
|
||||||
if (instanceId === Pedalboard.START_CONTROL && key == "volume_db")
|
if (instanceId === Pedalboard.START_CONTROL && key === "volume_db")
|
||||||
{
|
{
|
||||||
this.previewInputVolume(value);
|
this.previewInputVolume(value);
|
||||||
return;
|
return;
|
||||||
@@ -1391,7 +1390,7 @@ export class PiPedalModel //implements PiPedalModel
|
|||||||
this.updateVst3State(newPedalboard);
|
this.updateVst3State(newPedalboard);
|
||||||
|
|
||||||
let result = newPedalboard.deleteItem(instanceId);
|
let result = newPedalboard.deleteItem(instanceId);
|
||||||
if (result != null) {
|
if (result !== null) {
|
||||||
this.pedalboard.set(newPedalboard);
|
this.pedalboard.set(newPedalboard);
|
||||||
this.updateServerPedalboard();
|
this.updateServerPedalboard();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -181,6 +181,7 @@ const styles = (theme: Theme) => createStyles({
|
|||||||
borderRadius: 8,
|
borderRadius: 8,
|
||||||
elevation: 12,
|
elevation: 12,
|
||||||
display: "flex",
|
display: "flex",
|
||||||
|
textOverflow: "ellipsis",
|
||||||
flexDirection: "row", flexWrap: "nowrap",
|
flexDirection: "row", flexWrap: "nowrap",
|
||||||
flex: "0 0 auto"
|
flex: "0 0 auto"
|
||||||
},
|
},
|
||||||
@@ -188,9 +189,12 @@ const styles = (theme: Theme) => createStyles({
|
|||||||
position: "absolute",
|
position: "absolute",
|
||||||
top: -15,
|
top: -15,
|
||||||
background: "white",
|
background: "white",
|
||||||
|
textOverflow: "ellipsis",
|
||||||
|
minWidth: 0,
|
||||||
marginLeft: 20,
|
marginLeft: 20,
|
||||||
paddingLeft: 8,
|
paddingLeft: 8,
|
||||||
paddingRight: 8
|
paddingRight: 8,
|
||||||
|
margin_right: 28
|
||||||
},
|
},
|
||||||
portGroupControls: {
|
portGroupControls: {
|
||||||
display: "flex",
|
display: "flex",
|
||||||
@@ -203,11 +207,13 @@ const styles = (theme: Theme) => createStyles({
|
|||||||
});
|
});
|
||||||
|
|
||||||
export class ControlGroup {
|
export class ControlGroup {
|
||||||
constructor(name: string, controls: ReactNode[]) {
|
constructor(name: string, indexes: number[], controls: ReactNode[]) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
|
this.indexes = indexes;
|
||||||
this.controls = controls;
|
this.controls = controls;
|
||||||
}
|
}
|
||||||
name: string;
|
name: string;
|
||||||
|
indexes: number[];
|
||||||
controls: React.ReactNode[];
|
controls: React.ReactNode[];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -330,8 +336,7 @@ const PluginControlView =
|
|||||||
}
|
}
|
||||||
makeStandardControl(uiControl: UiControl, controlValues: ControlValue[]): ReactNode {
|
makeStandardControl(uiControl: UiControl, controlValues: ControlValue[]): ReactNode {
|
||||||
let symbol = uiControl.symbol;
|
let symbol = uiControl.symbol;
|
||||||
if (!uiControl.is_input)
|
if (!uiControl.is_input) {
|
||||||
{
|
|
||||||
return (
|
return (
|
||||||
<PluginOutputControl instanceId={this.props.instanceId} uiControl={uiControl} />
|
<PluginOutputControl instanceId={this.props.instanceId} uiControl={uiControl} />
|
||||||
|
|
||||||
@@ -362,28 +367,35 @@ const PluginControlView =
|
|||||||
|
|
||||||
getStandardControlNodes(plugin: UiPlugin, controlValues: ControlValue[]): ControlNodes {
|
getStandardControlNodes(plugin: UiPlugin, controlValues: ControlValue[]): ControlNodes {
|
||||||
let result: ControlNodes = [];
|
let result: ControlNodes = [];
|
||||||
|
let portGroupMap: { [id: string]: ControlGroup } = {};
|
||||||
|
|
||||||
for (let i = 0; i < plugin.controls.length; ++i) {
|
for (let i = 0; i < plugin.controls.length; ++i) {
|
||||||
let pluginControl = plugin.controls[i];
|
let pluginControl = plugin.controls[i];
|
||||||
if (!pluginControl.not_on_gui) {
|
if (!pluginControl.not_on_gui) {
|
||||||
if (pluginControl.port_group !== "") {
|
if (pluginControl.port_group !== "" && plugin.getPortGroupBySymbol(pluginControl.port_group)) {
|
||||||
let portGroup = pluginControl.port_group;
|
let portGroup = nullCast(plugin.getPortGroupBySymbol(pluginControl.port_group));
|
||||||
|
|
||||||
let groupControls: ReactNode[] = [];
|
let groupControls: ReactNode[] = [];
|
||||||
|
let indexes: number[] = [];
|
||||||
groupControls.push(
|
groupControls.push(
|
||||||
this.makeStandardControl(pluginControl, controlValues)
|
this.makeStandardControl(pluginControl, controlValues)
|
||||||
);
|
);
|
||||||
while (i + 1 < plugin.controls.length && plugin.controls[i + 1].port_group === portGroup) {
|
indexes.push(pluginControl.index);
|
||||||
|
while (i + 1 < plugin.controls.length && plugin.controls[i + 1].port_group === pluginControl.port_group) {
|
||||||
++i;
|
++i;
|
||||||
pluginControl = plugin.controls[i];
|
pluginControl = plugin.controls[i];
|
||||||
if (!pluginControl.not_on_gui) {
|
if (!pluginControl.not_on_gui) {
|
||||||
groupControls.push(
|
groupControls.push(
|
||||||
this.makeStandardControl(pluginControl, controlValues)
|
this.makeStandardControl(pluginControl, controlValues)
|
||||||
)
|
)
|
||||||
|
indexes.push(pluginControl.index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
let controlGroup = new ControlGroup(portGroup.name, indexes, groupControls);
|
||||||
result.push(
|
result.push(
|
||||||
new ControlGroup(plugin.getPortGroup(portGroup).name, groupControls)
|
controlGroup
|
||||||
)
|
)
|
||||||
|
portGroupMap[pluginControl.port_group] = controlGroup;
|
||||||
} else {
|
} else {
|
||||||
result.push(
|
result.push(
|
||||||
this.makeStandardControl(pluginControl, controlValues)
|
this.makeStandardControl(pluginControl, controlValues)
|
||||||
@@ -393,9 +405,44 @@ const PluginControlView =
|
|||||||
}
|
}
|
||||||
for (let i = 0; i < plugin.fileProperties.length; ++i) {
|
for (let i = 0; i < plugin.fileProperties.length; ++i) {
|
||||||
let fileProperty = plugin.fileProperties[i];
|
let fileProperty = plugin.fileProperties[i];
|
||||||
|
let filePropertyUi = this.makeFilePropertyUI(fileProperty);
|
||||||
|
|
||||||
|
if (fileProperty.portGroup !== "" && plugin.getPortGroupByUri(fileProperty.portGroup)) {
|
||||||
|
let portGroup = nullCast(plugin.getPortGroupByUri(fileProperty.portGroup));
|
||||||
|
let controlGroup = portGroupMap[portGroup.symbol];
|
||||||
|
if (controlGroup) {
|
||||||
|
let insertPosition = controlGroup.indexes.length;
|
||||||
|
if (fileProperty.index !== -1) {
|
||||||
|
for (let i = 0; i < controlGroup.controls.length; ++i) {
|
||||||
|
if (controlGroup.indexes[i] >= fileProperty.index) {
|
||||||
|
insertPosition = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let index = fileProperty.index !== -1 ? fileProperty.index : 100;
|
||||||
|
controlGroup.controls.splice(insertPosition, 0, filePropertyUi);
|
||||||
|
controlGroup.indexes.splice(insertPosition, 0, index);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
let index = fileProperty.index !== -1 ? fileProperty.index : 100;
|
||||||
|
let controlGroup = new ControlGroup(
|
||||||
|
portGroup.name,
|
||||||
|
[index],
|
||||||
|
[filePropertyUi]);
|
||||||
result.push(
|
result.push(
|
||||||
this.makeFilePropertyUI(fileProperty)
|
controlGroup
|
||||||
);
|
);
|
||||||
|
portGroupMap[portGroup.symbol] = controlGroup;
|
||||||
|
|
||||||
|
}
|
||||||
|
} else if (fileProperty.index !== -1) {
|
||||||
|
result.splice(fileProperty.index, 0, filePropertyUi);
|
||||||
|
} else {
|
||||||
|
result.push(
|
||||||
|
filePropertyUi
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -487,11 +534,9 @@ const PluginControlView =
|
|||||||
let classes = this.props.classes;
|
let classes = this.props.classes;
|
||||||
let pedalboardItem: PedalboardItem;
|
let pedalboardItem: PedalboardItem;
|
||||||
let pedalboard = this.model.pedalboard.get();
|
let pedalboard = this.model.pedalboard.get();
|
||||||
if (this.props.instanceId == Pedalboard.START_CONTROL)
|
if (this.props.instanceId === Pedalboard.START_CONTROL) {
|
||||||
{
|
|
||||||
pedalboardItem = pedalboard.makeStartItem();
|
pedalboardItem = pedalboard.makeStartItem();
|
||||||
} else if (this.props.instanceId == Pedalboard.END_CONTROL)
|
} else if (this.props.instanceId === Pedalboard.END_CONTROL) {
|
||||||
{
|
|
||||||
pedalboardItem = pedalboard.makeEndItem();
|
pedalboardItem = pedalboard.makeEndItem();
|
||||||
} else {
|
} else {
|
||||||
pedalboardItem = pedalboard.getItem(this.props.instanceId);
|
pedalboardItem = pedalboard.getItem(this.props.instanceId);
|
||||||
@@ -504,12 +549,10 @@ const PluginControlView =
|
|||||||
|
|
||||||
|
|
||||||
let plugin: UiPlugin;
|
let plugin: UiPlugin;
|
||||||
if (pedalboardItem.isStart())
|
if (pedalboardItem.isStart()) {
|
||||||
{
|
|
||||||
plugin = startPluginInfo;
|
plugin = startPluginInfo;
|
||||||
controlValues = [new ControlValue("volume_db", pedalboard.input_volume_db)];
|
controlValues = [new ControlValue("volume_db", pedalboard.input_volume_db)];
|
||||||
} else if (pedalboardItem.isEnd())
|
} else if (pedalboardItem.isEnd()) {
|
||||||
{
|
|
||||||
plugin = endPluginInfo;
|
plugin = endPluginInfo;
|
||||||
controlValues = [new ControlValue("volume_db", pedalboard.output_volume_db)];
|
controlValues = [new ControlValue("volume_db", pedalboard.output_volume_db)];
|
||||||
} else {
|
} else {
|
||||||
@@ -567,11 +610,11 @@ const PluginControlView =
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
|
|
||||||
})
|
})
|
||||||
.catch((error) =>
|
.catch((error) => {
|
||||||
{
|
|
||||||
this.model.showAlert("setPatchProperty failed: " + error);
|
this.model.showAlert("setPatchProperty failed: " + error);
|
||||||
});
|
});
|
||||||
this.setState({ showFileDialog: false});}
|
this.setState({ showFileDialog: false });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<FullScreenIME uiControl={this.state.imeUiControl} value={this.state.imeValue}
|
<FullScreenIME uiControl={this.state.imeUiControl} value={this.state.imeValue}
|
||||||
|
|||||||
@@ -35,10 +35,15 @@ import { PiPedalModelFactory } from "./PiPedalModel";
|
|||||||
import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
|
import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
|
||||||
import { UiPlugin, UiControl } from './Lv2Plugin';
|
import { UiPlugin, UiControl } from './Lv2Plugin';
|
||||||
import PluginIcon from './PluginIcon';
|
import PluginIcon from './PluginIcon';
|
||||||
|
import { Remark } from 'react-remark';
|
||||||
|
|
||||||
|
/* eslint-disable */
|
||||||
|
let myTheme: Theme| undefined = undefined;
|
||||||
|
|
||||||
const styles = (theme: Theme) =>
|
const styles = (theme: Theme) =>
|
||||||
createStyles({
|
{
|
||||||
|
myTheme = theme;
|
||||||
|
return createStyles({
|
||||||
root: {
|
root: {
|
||||||
margin: 0,
|
margin: 0,
|
||||||
padding: theme.spacing(2),
|
padding: theme.spacing(2),
|
||||||
@@ -50,7 +55,7 @@ const styles = (theme: Theme) =>
|
|||||||
color: theme.palette.grey[500],
|
color: theme.palette.grey[500],
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
};
|
||||||
export interface PluginInfoDialogTitleProps extends WithStyles<typeof styles> {
|
export interface PluginInfoDialogTitleProps extends WithStyles<typeof styles> {
|
||||||
id: string;
|
id: string;
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
@@ -116,23 +121,23 @@ function ioDescription(plugin: UiPlugin): string {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function makeParagraphs(description: string) {
|
// function makeParagraphs(description: string) {
|
||||||
description = description.replaceAll('\r', '');
|
// description = description.replaceAll('\r', '');
|
||||||
description = description.replaceAll('\n\n', '\r');
|
// description = description.replaceAll('\n\n', '\r');
|
||||||
description = description.replaceAll('\n', ' ');
|
// description = description.replaceAll('\n', ' ');
|
||||||
|
|
||||||
let paragraphs: string[] = description.split('\r');
|
// let paragraphs: string[] = description.split('\r');
|
||||||
return (
|
// return (
|
||||||
<div style={{ paddingLeft: "24px" }}>
|
// <div style={{ paddingLeft: "24px" }}>
|
||||||
{paragraphs.map((para) => (
|
// {paragraphs.map((para) => (
|
||||||
<Typography variant="body2" paragraph >
|
// <Typography variant="body2" paragraph >
|
||||||
{para}
|
// {para}
|
||||||
</Typography>
|
// </Typography>
|
||||||
))}
|
// ))}
|
||||||
</div>
|
// </div>
|
||||||
|
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
function makeControls(controls: UiControl[]) {
|
function makeControls(controls: UiControl[]) {
|
||||||
let hasComments = false;
|
let hasComments = false;
|
||||||
|
|
||||||
@@ -146,7 +151,7 @@ function makeControls(controls: UiControl[]) {
|
|||||||
let trs: React.ReactElement[] = [];
|
let trs: React.ReactElement[] = [];
|
||||||
for (let i = 0; i < controls.length; ++i) {
|
for (let i = 0; i < controls.length; ++i) {
|
||||||
let control = controls[i];
|
let control = controls[i];
|
||||||
|
if (!(control.not_on_gui) && control.is_input)
|
||||||
trs.push((
|
trs.push((
|
||||||
<tr>
|
<tr>
|
||||||
<td style={{ verticalAlign: "top" }}>
|
<td style={{ verticalAlign: "top" }}>
|
||||||
@@ -247,36 +252,65 @@ const PluginInfoDialog = withStyles(styles)((props: PluginInfoProps) => {
|
|||||||
</MuiDialogTitle>
|
</MuiDialogTitle>
|
||||||
<PluginInfoDialogContent dividers style={{ width: "100%", maxHeight: "80%", overflowX: "hidden" }}>
|
<PluginInfoDialogContent dividers style={{ width: "100%", maxHeight: "80%", overflowX: "hidden" }}>
|
||||||
<div style={{ width: "100%", display: "flex", flexFlow: "row", justifyItems: "stretch", flexWrap: "nowrap" }} >
|
<div style={{ width: "100%", display: "flex", flexFlow: "row", justifyItems: "stretch", flexWrap: "nowrap" }} >
|
||||||
<div style={{ flex: "1 1 100%" }}>
|
<div style={{ flex: "1 1 auto", whiteSpace: "nowrap",minWidth: "auto" }}>
|
||||||
<Typography gutterBottom >
|
<Typography gutterBottom variant="body2" >
|
||||||
Author:
|
Author:
|
||||||
{(plugin.author_homepage !== "")
|
{(plugin.author_homepage !== "")
|
||||||
? <a href={plugin.author_homepage} target="_blank" rel="noreferrer">{plugin.author_name}</a>
|
? (<a href={plugin.author_homepage} target="_blank" rel="noopener noreferrer">
|
||||||
: (
|
{plugin.author_name}
|
||||||
plugin.author_name
|
</a>
|
||||||
)
|
)
|
||||||
|
: (
|
||||||
|
<span>{plugin.author_name}</span>
|
||||||
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
</Typography>
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
<div style={{ flex: "0 0 auto" }}>
|
<div style={{ flex: "0 0 auto" }}>
|
||||||
<Typography gutterBottom >
|
<Typography gutterBottom variant="body2" >
|
||||||
{ioDescription(plugin)}
|
{ioDescription(plugin)}
|
||||||
</Typography>
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<Typography variant="body1" gutterBottom style={{ paddingTop: "1em" }}>
|
<Typography variant="body2" gutterBottom style={{ paddingTop: "1em" }}>
|
||||||
Controls:
|
Controls:
|
||||||
</Typography>
|
</Typography>
|
||||||
{
|
{
|
||||||
makeControls(plugin.controls)
|
makeControls(plugin.controls)
|
||||||
}
|
}
|
||||||
<Typography gutterBottom style={{ paddingTop: "1em" }}>
|
<Typography gutterBottom variant="body2" style={{ paddingTop: "1em" }}>
|
||||||
Description:
|
Description:
|
||||||
</Typography>
|
</Typography>
|
||||||
{
|
<div style={{ marginLeft: 24, marginTop: 16 }}>
|
||||||
(plugin.description !== "") && makeParagraphs(plugin.description)
|
<Remark
|
||||||
|
rehypeReactOptions={{
|
||||||
|
components: {
|
||||||
|
p: (props: any) => {
|
||||||
|
// return (
|
||||||
|
// <p className="MuiTypography-root MuiTypography-body2" {...props} />
|
||||||
|
// );
|
||||||
|
return (
|
||||||
|
<Typography variant="body2" paragraph={true} {...props} />
|
||||||
|
);
|
||||||
|
|
||||||
|
},
|
||||||
|
code: (props: any) => {
|
||||||
|
return (<code style={{fontSize: 14}} {...props} />);
|
||||||
|
},
|
||||||
|
a: (props: any) => {
|
||||||
|
return (
|
||||||
|
<a target="_blank" {...props} />
|
||||||
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{plugin.description}
|
||||||
|
</Remark>
|
||||||
|
</div>
|
||||||
</PluginInfoDialogContent>
|
</PluginInfoDialogContent>
|
||||||
<PluginInfoDialogActions>
|
<PluginInfoDialogActions>
|
||||||
<Button autoFocus onClick={handleClose} color="primary" style={{ width: "130px" }}>
|
<Button autoFocus onClick={handleClose} color="primary" style={{ width: "130px" }}>
|
||||||
|
|||||||
@@ -186,7 +186,6 @@ const PresetSelector =
|
|||||||
let currentPresets = this.model.presets.get();
|
let currentPresets = this.model.presets.get();
|
||||||
let item = currentPresets.getItem(currentPresets.selectedInstanceId);
|
let item = currentPresets.getItem(currentPresets.selectedInstanceId);
|
||||||
if (item == null) return;
|
if (item == null) return;
|
||||||
let name = item.name;
|
|
||||||
this.model.newPresetItem(currentPresets.selectedInstanceId)
|
this.model.newPresetItem(currentPresets.selectedInstanceId)
|
||||||
.then((instanceId) => {
|
.then((instanceId) => {
|
||||||
this.model.loadPreset(instanceId);
|
this.model.loadPreset(instanceId);
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ const SearchControl = withStyles(styles, { withTheme: true })(
|
|||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
<Input style={{
|
<Input spellCheck={false} style={{
|
||||||
flex: "1 1", visibility: (this.props.collapsed ?? false) ? "collapse" : "visible", marginRight: 12, height: 32,
|
flex: "1 1", visibility: (this.props.collapsed ?? false) ? "collapse" : "visible", marginRight: 12, height: 32,
|
||||||
}}
|
}}
|
||||||
inputRef={this.getInputRef()}
|
inputRef={this.getInputRef()}
|
||||||
|
|||||||
+16
-9
@@ -100,18 +100,18 @@ UiFileProperty::UiFileProperty(PluginHost *pHost, const LilvNode *node, const st
|
|||||||
{
|
{
|
||||||
auto pWorld = pHost->getWorld();
|
auto pWorld = pHost->getWorld();
|
||||||
|
|
||||||
AutoLilvNode name = lilv_world_get(
|
AutoLilvNode label = lilv_world_get(
|
||||||
pWorld,
|
pWorld,
|
||||||
node,
|
node,
|
||||||
pHost->lilvUris.lv2core__name,
|
pHost->lilvUris.rdfs__label,
|
||||||
nullptr);
|
nullptr);
|
||||||
if (name)
|
if (label)
|
||||||
{
|
{
|
||||||
this->name_ = name.AsString();
|
this->label_ = label.AsString();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->name_ = "File";
|
this->label_ = "File";
|
||||||
}
|
}
|
||||||
AutoLilvNode index = lilv_world_get(
|
AutoLilvNode index = lilv_world_get(
|
||||||
pWorld,
|
pWorld,
|
||||||
@@ -120,7 +120,7 @@ UiFileProperty::UiFileProperty(PluginHost *pHost, const LilvNode *node, const st
|
|||||||
nullptr);
|
nullptr);
|
||||||
if (index)
|
if (index)
|
||||||
{
|
{
|
||||||
this->index_ = name.AsInt();
|
this->index_ = index.AsInt(-1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -159,6 +159,12 @@ UiFileProperty::UiFileProperty(PluginHost *pHost, const LilvNode *node, const st
|
|||||||
throw std::logic_error("PiPedal FileProperty is missing pipedalui:patchProperty value.");
|
throw std::logic_error("PiPedal FileProperty is missing pipedalui:patchProperty value.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AutoLilvNode portGroup = lilv_world_get(pWorld,node,pHost->lilvUris.portgroups__group,nullptr);
|
||||||
|
if (portGroup)
|
||||||
|
{
|
||||||
|
this->portGroup_ = portGroup.AsUri();
|
||||||
|
}
|
||||||
|
|
||||||
this->fileTypes_ = PiPedalFileType::GetArray(pHost, node, pHost->lilvUris.pipedalUI__fileTypes);
|
this->fileTypes_ = PiPedalFileType::GetArray(pHost, node, pHost->lilvUris.pipedalUI__fileTypes);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -297,7 +303,7 @@ UiPortNotification::UiPortNotification(PluginHost *pHost, const LilvNode *node)
|
|||||||
}
|
}
|
||||||
|
|
||||||
UiFileProperty::UiFileProperty(const std::string &name, const std::string &patchProperty, const std::string &directory)
|
UiFileProperty::UiFileProperty(const std::string &name, const std::string &patchProperty, const std::string &directory)
|
||||||
: name_(name),
|
: label_(name),
|
||||||
patchProperty_(patchProperty),
|
patchProperty_(patchProperty),
|
||||||
directory_(directory)
|
directory_(directory)
|
||||||
{
|
{
|
||||||
@@ -320,9 +326,10 @@ JSON_MAP_REFERENCE(PiPedalFileType, fileExtension)
|
|||||||
JSON_MAP_END()
|
JSON_MAP_END()
|
||||||
|
|
||||||
JSON_MAP_BEGIN(UiFileProperty)
|
JSON_MAP_BEGIN(UiFileProperty)
|
||||||
JSON_MAP_REFERENCE(UiFileProperty, name)
|
JSON_MAP_REFERENCE(UiFileProperty, label)
|
||||||
JSON_MAP_REFERENCE(UiFileProperty, index)
|
JSON_MAP_REFERENCE(UiFileProperty, index)
|
||||||
JSON_MAP_REFERENCE(UiFileProperty, directory)
|
JSON_MAP_REFERENCE(UiFileProperty, directory)
|
||||||
JSON_MAP_REFERENCE(UiFileProperty, fileTypes)
|
|
||||||
JSON_MAP_REFERENCE(UiFileProperty, patchProperty)
|
JSON_MAP_REFERENCE(UiFileProperty, patchProperty)
|
||||||
|
JSON_MAP_REFERENCE(UiFileProperty, fileTypes)
|
||||||
|
JSON_MAP_REFERENCE(UiFileProperty, portGroup)
|
||||||
JSON_MAP_END()
|
JSON_MAP_END()
|
||||||
+4
-2
@@ -93,11 +93,12 @@ namespace pipedal {
|
|||||||
};
|
};
|
||||||
class UiFileProperty {
|
class UiFileProperty {
|
||||||
private:
|
private:
|
||||||
std::string name_;
|
std::string label_;
|
||||||
std::int64_t index_ = -1;
|
std::int64_t index_ = -1;
|
||||||
std::string directory_;
|
std::string directory_;
|
||||||
std::vector<PiPedalFileType> fileTypes_;
|
std::vector<PiPedalFileType> fileTypes_;
|
||||||
std::string patchProperty_;
|
std::string patchProperty_;
|
||||||
|
std::string portGroup_;
|
||||||
public:
|
public:
|
||||||
using ptr = std::shared_ptr<UiFileProperty>;
|
using ptr = std::shared_ptr<UiFileProperty>;
|
||||||
UiFileProperty() { }
|
UiFileProperty() { }
|
||||||
@@ -105,9 +106,10 @@ namespace pipedal {
|
|||||||
UiFileProperty(const std::string&name, const std::string&patchProperty,const std::string &directory);
|
UiFileProperty(const std::string&name, const std::string&patchProperty,const std::string &directory);
|
||||||
|
|
||||||
|
|
||||||
const std::string &name() const { return name_; }
|
const std::string &label() const { return label_; }
|
||||||
int64_t index() const { return index_; }
|
int64_t index() const { return index_; }
|
||||||
const std::string &directory() const { return directory_; }
|
const std::string &directory() const { return directory_; }
|
||||||
|
const std::string&portGroup() const { return portGroup_; }
|
||||||
|
|
||||||
const std::vector<PiPedalFileType> &fileTypes() const { return fileTypes_; }
|
const std::vector<PiPedalFileType> &fileTypes() const { return fileTypes_; }
|
||||||
|
|
||||||
|
|||||||
+9
-34
@@ -554,33 +554,6 @@ void PluginHost::Load(const char *lv2Path)
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
class NodesAutoFree
|
|
||||||
{
|
|
||||||
LilvNodes *nodes;
|
|
||||||
|
|
||||||
// const LilvNode* returns must not be freed, by convention.
|
|
||||||
NodesAutoFree(const LilvNodes *nodes)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
|
||||||
NodesAutoFree(LilvNodes *nodes)
|
|
||||||
{
|
|
||||||
this->nodes = nodes;
|
|
||||||
}
|
|
||||||
operator const LilvNodes *()
|
|
||||||
{
|
|
||||||
return this->nodes;
|
|
||||||
}
|
|
||||||
operator bool()
|
|
||||||
{
|
|
||||||
return this->nodes != nullptr;
|
|
||||||
}
|
|
||||||
~NodesAutoFree()
|
|
||||||
{
|
|
||||||
lilv_nodes_free(this->nodes);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
static std::vector<std::string> nodeAsStringArray(const LilvNodes *nodes)
|
static std::vector<std::string> nodeAsStringArray(const LilvNodes *nodes)
|
||||||
{
|
{
|
||||||
@@ -614,7 +587,7 @@ static bool ports_sort_compare(std::shared_ptr<Lv2PortInfo> &p1, const std::shar
|
|||||||
|
|
||||||
bool Lv2PluginInfo::HasFactoryPresets(PluginHost *lv2Host, const LilvPlugin *plugin)
|
bool Lv2PluginInfo::HasFactoryPresets(PluginHost *lv2Host, const LilvPlugin *plugin)
|
||||||
{
|
{
|
||||||
NodesAutoFree nodes = lilv_plugin_get_related(plugin, lv2Host->lilvUris.presets__preset);
|
AutoLilvNodes nodes = lilv_plugin_get_related(plugin, lv2Host->lilvUris.presets__preset);
|
||||||
bool result = false;
|
bool result = false;
|
||||||
LILV_FOREACH(nodes, iNode, nodes)
|
LILV_FOREACH(nodes, iNode, nodes)
|
||||||
{
|
{
|
||||||
@@ -711,16 +684,16 @@ Lv2PluginInfo::Lv2PluginInfo(PluginHost *lv2Host, LilvWorld *pWorld, const LilvP
|
|||||||
const LilvPluginClass *pClass = lilv_plugin_get_class(pPlugin);
|
const LilvPluginClass *pClass = lilv_plugin_get_class(pPlugin);
|
||||||
this->plugin_class_ = nodeAsString(lilv_plugin_class_get_uri(pClass));
|
this->plugin_class_ = nodeAsString(lilv_plugin_class_get_uri(pClass));
|
||||||
|
|
||||||
NodesAutoFree required_features = lilv_plugin_get_required_features(pPlugin);
|
AutoLilvNodes required_features = lilv_plugin_get_required_features(pPlugin);
|
||||||
this->required_features_ = nodeAsStringArray(required_features);
|
this->required_features_ = nodeAsStringArray(required_features);
|
||||||
|
|
||||||
NodesAutoFree supported_features = lilv_plugin_get_supported_features(pPlugin);
|
AutoLilvNodes supported_features = lilv_plugin_get_supported_features(pPlugin);
|
||||||
this->supported_features_ = nodeAsStringArray(supported_features);
|
this->supported_features_ = nodeAsStringArray(supported_features);
|
||||||
|
|
||||||
NodesAutoFree optional_features = lilv_plugin_get_optional_features(pPlugin);
|
AutoLilvNodes optional_features = lilv_plugin_get_optional_features(pPlugin);
|
||||||
this->optional_features_ = nodeAsStringArray(optional_features);
|
this->optional_features_ = nodeAsStringArray(optional_features);
|
||||||
|
|
||||||
NodesAutoFree extensions = lilv_plugin_get_extension_data(pPlugin);
|
AutoLilvNodes extensions = lilv_plugin_get_extension_data(pPlugin);
|
||||||
this->extensions_ = nodeAsStringArray(extensions);
|
this->extensions_ = nodeAsStringArray(extensions);
|
||||||
|
|
||||||
AutoLilvNode comment = lv2Host->get_comment(this->uri_);
|
AutoLilvNode comment = lv2Host->get_comment(this->uri_);
|
||||||
@@ -827,6 +800,7 @@ std::vector<std::string> supportedFeatures = {
|
|||||||
LV2_STATE__loadDefaultState,
|
LV2_STATE__loadDefaultState,
|
||||||
LV2_STATE__makePath,
|
LV2_STATE__makePath,
|
||||||
LV2_STATE__mapPath,
|
LV2_STATE__mapPath,
|
||||||
|
LV2_STATE__freePath,
|
||||||
LV2_CORE__inPlaceBroken,
|
LV2_CORE__inPlaceBroken,
|
||||||
|
|
||||||
// UI features that we can ignore, since we won't load their ui.
|
// UI features that we can ignore, since we won't load their ui.
|
||||||
@@ -908,7 +882,7 @@ Lv2PortInfo::Lv2PortInfo(PluginHost *host, const LilvPlugin *plugin, const LilvP
|
|||||||
// typo in invada plugins.
|
// typo in invada plugins.
|
||||||
this->is_logarithmic_ |= lilv_port_has_property(plugin, pPort, host->lilvUris.invada_portprops__logarithmic);
|
this->is_logarithmic_ |= lilv_port_has_property(plugin, pPort, host->lilvUris.invada_portprops__logarithmic);
|
||||||
|
|
||||||
NodesAutoFree priority_nodes = lilv_port_get_value(plugin, pPort, host->lilvUris.port__display_priority);
|
AutoLilvNodes priority_nodes = lilv_port_get_value(plugin, pPort, host->lilvUris.port__display_priority);
|
||||||
|
|
||||||
this->display_priority_ = -1;
|
this->display_priority_ = -1;
|
||||||
if (priority_nodes)
|
if (priority_nodes)
|
||||||
@@ -920,7 +894,7 @@ Lv2PortInfo::Lv2PortInfo(PluginHost *host, const LilvPlugin *plugin, const LilvP
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NodesAutoFree range_steps_nodes = lilv_port_get_value(plugin, pPort, host->lilvUris.port_range_steps);
|
AutoLilvNodes range_steps_nodes = lilv_port_get_value(plugin, pPort, host->lilvUris.port_range_steps);
|
||||||
this->range_steps_ = 0;
|
this->range_steps_ = 0;
|
||||||
if (range_steps_nodes)
|
if (range_steps_nodes)
|
||||||
{
|
{
|
||||||
@@ -1458,6 +1432,7 @@ json_map::storage_type<Lv2PluginClass> Lv2PluginClass::jmap{{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
json_map::storage_type<Lv2PluginUiPortGroup> Lv2PluginUiPortGroup::jmap{{
|
json_map::storage_type<Lv2PluginUiPortGroup> Lv2PluginUiPortGroup::jmap{{
|
||||||
|
MAP_REF(Lv2PluginUiPortGroup, uri),
|
||||||
MAP_REF(Lv2PluginUiPortGroup, symbol),
|
MAP_REF(Lv2PluginUiPortGroup, symbol),
|
||||||
MAP_REF(Lv2PluginUiPortGroup, name),
|
MAP_REF(Lv2PluginUiPortGroup, name),
|
||||||
MAP_REF(Lv2PluginUiPortGroup, parent_group),
|
MAP_REF(Lv2PluginUiPortGroup, parent_group),
|
||||||
|
|||||||
+15
-7
@@ -443,12 +443,15 @@ namespace pipedal
|
|||||||
class Lv2PluginUiPortGroup
|
class Lv2PluginUiPortGroup
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
std::string uri_;
|
||||||
std::string symbol_;
|
std::string symbol_;
|
||||||
std::string name_;
|
std::string name_;
|
||||||
|
|
||||||
std::string parent_group_;
|
std::string parent_group_;
|
||||||
int32_t program_list_id_ = -1; // used by VST3.
|
int32_t program_list_id_ = -1; // used by VST3.
|
||||||
public:
|
public:
|
||||||
|
LV2_PROPERTY_GETSET(uri)
|
||||||
|
|
||||||
LV2_PROPERTY_GETSET(symbol)
|
LV2_PROPERTY_GETSET(symbol)
|
||||||
LV2_PROPERTY_GETSET(name)
|
LV2_PROPERTY_GETSET(name)
|
||||||
LV2_PROPERTY_GETSET(parent_group)
|
LV2_PROPERTY_GETSET(parent_group)
|
||||||
@@ -457,7 +460,9 @@ namespace pipedal
|
|||||||
public:
|
public:
|
||||||
Lv2PluginUiPortGroup() {}
|
Lv2PluginUiPortGroup() {}
|
||||||
Lv2PluginUiPortGroup(Lv2PortGroup *pPortGroup)
|
Lv2PluginUiPortGroup(Lv2PortGroup *pPortGroup)
|
||||||
: symbol_(pPortGroup->symbol()), name_(pPortGroup->name())
|
: symbol_(pPortGroup->symbol())
|
||||||
|
, name_(pPortGroup->name())
|
||||||
|
, uri_(pPortGroup->uri())
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
Lv2PluginUiPortGroup(
|
Lv2PluginUiPortGroup(
|
||||||
@@ -488,21 +493,25 @@ namespace pipedal
|
|||||||
{
|
{
|
||||||
// Use symbols to index port groups, instead of uris.
|
// Use symbols to index port groups, instead of uris.
|
||||||
// symbols are guaranteed to be unique.
|
// symbols are guaranteed to be unique.
|
||||||
auto &portGroup = pPort->port_group();
|
const auto &portGroup = pPort->port_group();
|
||||||
|
if (portGroup.length() != 0)
|
||||||
|
{
|
||||||
for (int i = 0; i < pPlugin->port_groups().size(); ++i)
|
for (int i = 0; i < pPlugin->port_groups().size(); ++i)
|
||||||
{
|
{
|
||||||
|
|
||||||
auto &p = pPlugin->port_groups()[i];
|
auto &p = pPlugin->port_groups()[i];
|
||||||
|
if (p->symbol().length() == 0)
|
||||||
|
{
|
||||||
|
// supposed to be mandatory; but make up a synthetic symbol.
|
||||||
|
}
|
||||||
if (p->uri() == portGroup)
|
if (p->uri() == portGroup)
|
||||||
{
|
{
|
||||||
this->port_group_ = p->symbol();
|
this->port_group_ = p->symbol();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
is_bypass_ = name_ == "bypass"
|
}
|
||||||
|| name_ == "Bypass"
|
is_bypass_ = name_ == "bypass" || name_ == "Bypass" || symbol_ == "bypass" || symbol_ == "Bypass";
|
||||||
|| symbol_ == "bypass"
|
|
||||||
|| symbol_ == "Bypass";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -687,7 +696,6 @@ namespace pipedal
|
|||||||
|
|
||||||
AutoLilvNode patch__writable;
|
AutoLilvNode patch__writable;
|
||||||
AutoLilvNode patch__readable;
|
AutoLilvNode patch__readable;
|
||||||
|
|
||||||
};
|
};
|
||||||
LilvUris lilvUris;
|
LilvUris lilvUris;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user