feat: add mixer scene API methods to PiPedalModel
This commit is contained in:
@@ -3986,6 +3986,39 @@ export class PiPedalModel //implements PiPedalModel
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
// Mixer Scene Management
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the full mixer state as a JSON string.
|
||||||
|
*/
|
||||||
|
async getMixerState(): Promise<string> {
|
||||||
|
return await this.getWebSocket().request<string>("mixerGetState");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Save the current mixer state as a named scene.
|
||||||
|
* Returns {id, name} from the backend.
|
||||||
|
*/
|
||||||
|
async saveMixerScene(name: string): Promise<{ id: number; name: string }> {
|
||||||
|
return await this.getWebSocket().request<{ id: number; name: string }>("mixerSaveScene", { name });
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load a scene by its backend ID. Returns true on success.
|
||||||
|
*/
|
||||||
|
async loadMixerScene(sceneId: number): Promise<boolean> {
|
||||||
|
return await this.getWebSocket().request<boolean>("mixerLoadScene", { sceneId });
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get list of saved scenes from backend. Returns raw JSON string.
|
||||||
|
*/
|
||||||
|
async getMixerScenes(): Promise<string> {
|
||||||
|
return await this.getWebSocket().request<string>("mixerGetScenes");
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
let instance: PiPedalModel | undefined = undefined;
|
let instance: PiPedalModel | undefined = undefined;
|
||||||
|
|||||||
Reference in New Issue
Block a user