feat: add mixer scene API methods to PiPedalModel

This commit is contained in:
2026-06-20 15:57:40 -04:00
parent 0316e4b37f
commit e4e7cd1ca2
+33
View File
@@ -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;