Refine piano recording controls and stop behavior

This commit is contained in:
Jage9
2026-02-23 02:00:01 -05:00
parent 92aabd54ef
commit ccbe41e618
11 changed files with 106 additions and 23 deletions

View File

@@ -243,6 +243,8 @@ export function createOnMessageHandler(deps: MessageHandlerDeps): (message: Inco
case 'item_action_result': {
const pianoStatusMessages = new Set([
'record',
'pause',
'resume',
'play',
'stop',
'No recording saved on this piano.',

View File

@@ -199,7 +199,7 @@ export type OutgoingMessage =
| { type: 'item_delete'; itemId: string }
| { type: 'item_use'; itemId: string }
| { type: 'item_piano_note'; itemId: string; keyId: string; midi: number; on: boolean }
| { type: 'item_piano_recording'; itemId: string; action: 'toggle_record' | 'playback' | 'stop_playback' }
| { type: 'item_piano_recording'; itemId: string; action: 'toggle_record' | 'playback' | 'stop_playback' | 'stop_record' }
| {
type: 'item_update';
itemId: string;