Constructor
new ApplyEffectDialog(chains, callbacks)
Parameters:
| Name | Type | Description | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
chains | Array.<object> | Effect chain metadata from GET /api/effect-chains. | ||||||||||||||||||||||||||||
callbacks | object | Lifecycle callbacks for the dialog.Properties
|
Example
new ApplyEffectDialog(chains, {
fetchPreview: ({ chainId, controls }) => server.previewEffect(...),
onApply: ({ chainId, controls }) => { ... },
onDismiss: () => { ... },
});
// Edit mode — pre-select chain and populate existing control values:
new ApplyEffectDialog(chains, {
title: 'Edit Effect',
initialChainId: 'voice_changer',
initialControls: { pitch: -4, formant_compensation: 2 },
...
});Classes
Methods
close()
Removes the dialog from the DOM and stops any in-progress preview.