@drop-ai/core 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +316 -0
- package/dist/actions/ActionRegistry.d.ts +33 -0
- package/dist/actions/ActionRegistry.d.ts.map +1 -0
- package/dist/actions/ActionRegistry.js +96 -0
- package/dist/actions/ActionRegistry.js.map +1 -0
- package/dist/actions/types.d.ts +31 -0
- package/dist/actions/types.d.ts.map +1 -0
- package/dist/actions/types.js +11 -0
- package/dist/actions/types.js.map +1 -0
- package/dist/analysis/TransientDetector.d.ts +28 -0
- package/dist/analysis/TransientDetector.d.ts.map +1 -0
- package/dist/analysis/TransientDetector.js +109 -0
- package/dist/analysis/TransientDetector.js.map +1 -0
- package/dist/audio/AudioEngine.d.ts +107 -0
- package/dist/audio/AudioEngine.d.ts.map +1 -0
- package/dist/audio/AudioEngine.js +798 -0
- package/dist/audio/AudioEngine.js.map +1 -0
- package/dist/audio/AudioProvider.d.ts +96 -0
- package/dist/audio/AudioProvider.d.ts.map +1 -0
- package/dist/audio/AudioProvider.js +2 -0
- package/dist/audio/AudioProvider.js.map +1 -0
- package/dist/audio/BufferPool.d.ts +92 -0
- package/dist/audio/BufferPool.d.ts.map +1 -0
- package/dist/audio/BufferPool.js +172 -0
- package/dist/audio/BufferPool.js.map +1 -0
- package/dist/audio/LoudnessUtils.d.ts +18 -0
- package/dist/audio/LoudnessUtils.d.ts.map +1 -0
- package/dist/audio/LoudnessUtils.js +91 -0
- package/dist/audio/LoudnessUtils.js.map +1 -0
- package/dist/audio/MeterUtils.d.ts +37 -0
- package/dist/audio/MeterUtils.d.ts.map +1 -0
- package/dist/audio/MeterUtils.js +71 -0
- package/dist/audio/MeterUtils.js.map +1 -0
- package/dist/audio/OfflineExporter.d.ts +48 -0
- package/dist/audio/OfflineExporter.d.ts.map +1 -0
- package/dist/audio/OfflineExporter.js +202 -0
- package/dist/audio/OfflineExporter.js.map +1 -0
- package/dist/audio/ProcessingGraph.d.ts +152 -0
- package/dist/audio/ProcessingGraph.d.ts.map +1 -0
- package/dist/audio/ProcessingGraph.js +360 -0
- package/dist/audio/ProcessingGraph.js.map +1 -0
- package/dist/audio/SourceCache.d.ts +124 -0
- package/dist/audio/SourceCache.d.ts.map +1 -0
- package/dist/audio/SourceCache.js +205 -0
- package/dist/audio/SourceCache.js.map +1 -0
- package/dist/audio/dto.d.ts +50 -0
- package/dist/audio/dto.d.ts.map +1 -0
- package/dist/audio/dto.js +2 -0
- package/dist/audio/dto.js.map +1 -0
- package/dist/audio/engine/PlaylistEngine.d.ts +19 -0
- package/dist/audio/engine/PlaylistEngine.d.ts.map +1 -0
- package/dist/audio/engine/PlaylistEngine.js +83 -0
- package/dist/audio/engine/PlaylistEngine.js.map +1 -0
- package/dist/automation/AutomationCurve.d.ts +61 -0
- package/dist/automation/AutomationCurve.d.ts.map +1 -0
- package/dist/automation/AutomationCurve.js +198 -0
- package/dist/automation/AutomationCurve.js.map +1 -0
- package/dist/automation/AutomationList.d.ts +185 -0
- package/dist/automation/AutomationList.d.ts.map +1 -0
- package/dist/automation/AutomationList.js +459 -0
- package/dist/automation/AutomationList.js.map +1 -0
- package/dist/automation/AutomationMode.d.ts +17 -0
- package/dist/automation/AutomationMode.d.ts.map +1 -0
- package/dist/automation/AutomationMode.js +18 -0
- package/dist/automation/AutomationMode.js.map +1 -0
- package/dist/automation/ParameterDescriptor.d.ts +65 -0
- package/dist/automation/ParameterDescriptor.d.ts.map +1 -0
- package/dist/automation/ParameterDescriptor.js +113 -0
- package/dist/automation/ParameterDescriptor.js.map +1 -0
- package/dist/automation/PointThinning.d.ts +14 -0
- package/dist/automation/PointThinning.d.ts.map +1 -0
- package/dist/automation/PointThinning.js +52 -0
- package/dist/automation/PointThinning.js.map +1 -0
- package/dist/automation/types.d.ts +14 -0
- package/dist/automation/types.d.ts.map +1 -0
- package/dist/automation/types.js +9 -0
- package/dist/automation/types.js.map +1 -0
- package/dist/commands/Command.d.ts +8 -0
- package/dist/commands/Command.d.ts.map +1 -0
- package/dist/commands/Command.js +2 -0
- package/dist/commands/Command.js.map +1 -0
- package/dist/commands/CommandExecutor.d.ts +36 -0
- package/dist/commands/CommandExecutor.d.ts.map +1 -0
- package/dist/commands/CommandExecutor.js +108 -0
- package/dist/commands/CommandExecutor.js.map +1 -0
- package/dist/commands/CommandHistory.d.ts +155 -0
- package/dist/commands/CommandHistory.d.ts.map +1 -0
- package/dist/commands/CommandHistory.js +316 -0
- package/dist/commands/CommandHistory.js.map +1 -0
- package/dist/commands/CommandRegistry.d.ts +110 -0
- package/dist/commands/CommandRegistry.d.ts.map +1 -0
- package/dist/commands/CommandRegistry.js +91 -0
- package/dist/commands/CommandRegistry.js.map +1 -0
- package/dist/commands/UndoTransaction.d.ts +54 -0
- package/dist/commands/UndoTransaction.d.ts.map +1 -0
- package/dist/commands/UndoTransaction.js +77 -0
- package/dist/commands/UndoTransaction.js.map +1 -0
- package/dist/commands/handlers/AutomationHandler.d.ts +14 -0
- package/dist/commands/handlers/AutomationHandler.d.ts.map +1 -0
- package/dist/commands/handlers/AutomationHandler.js +84 -0
- package/dist/commands/handlers/AutomationHandler.js.map +1 -0
- package/dist/commands/handlers/CommandHandler.d.ts +57 -0
- package/dist/commands/handlers/CommandHandler.d.ts.map +1 -0
- package/dist/commands/handlers/CommandHandler.js +22 -0
- package/dist/commands/handlers/CommandHandler.js.map +1 -0
- package/dist/commands/handlers/ExportHandler.d.ts +14 -0
- package/dist/commands/handlers/ExportHandler.d.ts.map +1 -0
- package/dist/commands/handlers/ExportHandler.js +166 -0
- package/dist/commands/handlers/ExportHandler.js.map +1 -0
- package/dist/commands/handlers/HistoryHandler.d.ts +29 -0
- package/dist/commands/handlers/HistoryHandler.d.ts.map +1 -0
- package/dist/commands/handlers/HistoryHandler.js +124 -0
- package/dist/commands/handlers/HistoryHandler.js.map +1 -0
- package/dist/commands/handlers/IOHandler.d.ts +14 -0
- package/dist/commands/handlers/IOHandler.d.ts.map +1 -0
- package/dist/commands/handlers/IOHandler.js +59 -0
- package/dist/commands/handlers/IOHandler.js.map +1 -0
- package/dist/commands/handlers/MarkerHandler.d.ts +13 -0
- package/dist/commands/handlers/MarkerHandler.d.ts.map +1 -0
- package/dist/commands/handlers/MarkerHandler.js +95 -0
- package/dist/commands/handlers/MarkerHandler.js.map +1 -0
- package/dist/commands/handlers/MidiHandler.d.ts +14 -0
- package/dist/commands/handlers/MidiHandler.d.ts.map +1 -0
- package/dist/commands/handlers/MidiHandler.js +153 -0
- package/dist/commands/handlers/MidiHandler.js.map +1 -0
- package/dist/commands/handlers/MixerSceneHandler.d.ts +12 -0
- package/dist/commands/handlers/MixerSceneHandler.d.ts.map +1 -0
- package/dist/commands/handlers/MixerSceneHandler.js +113 -0
- package/dist/commands/handlers/MixerSceneHandler.js.map +1 -0
- package/dist/commands/handlers/RangeHandler.d.ts +14 -0
- package/dist/commands/handlers/RangeHandler.d.ts.map +1 -0
- package/dist/commands/handlers/RangeHandler.js +108 -0
- package/dist/commands/handlers/RangeHandler.js.map +1 -0
- package/dist/commands/handlers/RegionHandler.d.ts +14 -0
- package/dist/commands/handlers/RegionHandler.d.ts.map +1 -0
- package/dist/commands/handlers/RegionHandler.js +313 -0
- package/dist/commands/handlers/RegionHandler.js.map +1 -0
- package/dist/commands/handlers/SendBusHandler.d.ts +14 -0
- package/dist/commands/handlers/SendBusHandler.d.ts.map +1 -0
- package/dist/commands/handlers/SendBusHandler.js +55 -0
- package/dist/commands/handlers/SendBusHandler.js.map +1 -0
- package/dist/commands/handlers/SessionHandler.d.ts +14 -0
- package/dist/commands/handlers/SessionHandler.d.ts.map +1 -0
- package/dist/commands/handlers/SessionHandler.js +80 -0
- package/dist/commands/handlers/SessionHandler.js.map +1 -0
- package/dist/commands/handlers/TrackGroupHandler.d.ts +18 -0
- package/dist/commands/handlers/TrackGroupHandler.d.ts.map +1 -0
- package/dist/commands/handlers/TrackGroupHandler.js +210 -0
- package/dist/commands/handlers/TrackGroupHandler.js.map +1 -0
- package/dist/commands/handlers/TrackHandler.d.ts +14 -0
- package/dist/commands/handlers/TrackHandler.d.ts.map +1 -0
- package/dist/commands/handlers/TrackHandler.js +241 -0
- package/dist/commands/handlers/TrackHandler.js.map +1 -0
- package/dist/commands/handlers/TransportHandler.d.ts +14 -0
- package/dist/commands/handlers/TransportHandler.d.ts.map +1 -0
- package/dist/commands/handlers/TransportHandler.js +117 -0
- package/dist/commands/handlers/TransportHandler.js.map +1 -0
- package/dist/commands/handlers/index.d.ts +18 -0
- package/dist/commands/handlers/index.d.ts.map +1 -0
- package/dist/commands/handlers/index.js +17 -0
- package/dist/commands/handlers/index.js.map +1 -0
- package/dist/commands/impl/AddAutomationPointCommand.d.ts +20 -0
- package/dist/commands/impl/AddAutomationPointCommand.d.ts.map +1 -0
- package/dist/commands/impl/AddAutomationPointCommand.js +45 -0
- package/dist/commands/impl/AddAutomationPointCommand.js.map +1 -0
- package/dist/commands/impl/AddAuxTrackCommand.d.ts +11 -0
- package/dist/commands/impl/AddAuxTrackCommand.d.ts.map +1 -0
- package/dist/commands/impl/AddAuxTrackCommand.js +23 -0
- package/dist/commands/impl/AddAuxTrackCommand.js.map +1 -0
- package/dist/commands/impl/AddBusTrackCommand.d.ts +11 -0
- package/dist/commands/impl/AddBusTrackCommand.d.ts.map +1 -0
- package/dist/commands/impl/AddBusTrackCommand.js +23 -0
- package/dist/commands/impl/AddBusTrackCommand.js.map +1 -0
- package/dist/commands/impl/AddMarkerCommand.d.ts +13 -0
- package/dist/commands/impl/AddMarkerCommand.d.ts.map +1 -0
- package/dist/commands/impl/AddMarkerCommand.js +25 -0
- package/dist/commands/impl/AddMarkerCommand.js.map +1 -0
- package/dist/commands/impl/AddMidiNoteCommand.d.ts +22 -0
- package/dist/commands/impl/AddMidiNoteCommand.d.ts.map +1 -0
- package/dist/commands/impl/AddMidiNoteCommand.js +45 -0
- package/dist/commands/impl/AddMidiNoteCommand.js.map +1 -0
- package/dist/commands/impl/AddPluginCommand.d.ts +19 -0
- package/dist/commands/impl/AddPluginCommand.d.ts.map +1 -0
- package/dist/commands/impl/AddPluginCommand.js +43 -0
- package/dist/commands/impl/AddPluginCommand.js.map +1 -0
- package/dist/commands/impl/AddRangeCommand.d.ts +19 -0
- package/dist/commands/impl/AddRangeCommand.d.ts.map +1 -0
- package/dist/commands/impl/AddRangeCommand.js +32 -0
- package/dist/commands/impl/AddRangeCommand.js.map +1 -0
- package/dist/commands/impl/AddRegionCommand.d.ts +19 -0
- package/dist/commands/impl/AddRegionCommand.d.ts.map +1 -0
- package/dist/commands/impl/AddRegionCommand.js +58 -0
- package/dist/commands/impl/AddRegionCommand.js.map +1 -0
- package/dist/commands/impl/AddSendBusCommand.d.ts +23 -0
- package/dist/commands/impl/AddSendBusCommand.d.ts.map +1 -0
- package/dist/commands/impl/AddSendBusCommand.js +30 -0
- package/dist/commands/impl/AddSendBusCommand.js.map +1 -0
- package/dist/commands/impl/AddSourceCommand.d.ts +12 -0
- package/dist/commands/impl/AddSourceCommand.d.ts.map +1 -0
- package/dist/commands/impl/AddSourceCommand.js +16 -0
- package/dist/commands/impl/AddSourceCommand.js.map +1 -0
- package/dist/commands/impl/AddTempoChangeCommand.d.ts +15 -0
- package/dist/commands/impl/AddTempoChangeCommand.d.ts.map +1 -0
- package/dist/commands/impl/AddTempoChangeCommand.js +45 -0
- package/dist/commands/impl/AddTempoChangeCommand.js.map +1 -0
- package/dist/commands/impl/AddTrackCommand.d.ts +13 -0
- package/dist/commands/impl/AddTrackCommand.d.ts.map +1 -0
- package/dist/commands/impl/AddTrackCommand.js +26 -0
- package/dist/commands/impl/AddTrackCommand.js.map +1 -0
- package/dist/commands/impl/ConnectIOCommand.d.ts +13 -0
- package/dist/commands/impl/ConnectIOCommand.d.ts.map +1 -0
- package/dist/commands/impl/ConnectIOCommand.js +31 -0
- package/dist/commands/impl/ConnectIOCommand.js.map +1 -0
- package/dist/commands/impl/CopyRegionCommand.d.ts +12 -0
- package/dist/commands/impl/CopyRegionCommand.d.ts.map +1 -0
- package/dist/commands/impl/CopyRegionCommand.js +42 -0
- package/dist/commands/impl/CopyRegionCommand.js.map +1 -0
- package/dist/commands/impl/DisconnectIOCommand.d.ts +13 -0
- package/dist/commands/impl/DisconnectIOCommand.d.ts.map +1 -0
- package/dist/commands/impl/DisconnectIOCommand.js +24 -0
- package/dist/commands/impl/DisconnectIOCommand.js.map +1 -0
- package/dist/commands/impl/DuplicateRegionCommand.d.ts +15 -0
- package/dist/commands/impl/DuplicateRegionCommand.d.ts.map +1 -0
- package/dist/commands/impl/DuplicateRegionCommand.js +49 -0
- package/dist/commands/impl/DuplicateRegionCommand.js.map +1 -0
- package/dist/commands/impl/ExportCommand.d.ts +17 -0
- package/dist/commands/impl/ExportCommand.d.ts.map +1 -0
- package/dist/commands/impl/ExportCommand.js +92 -0
- package/dist/commands/impl/ExportCommand.js.map +1 -0
- package/dist/commands/impl/FreezeTrackCommand.d.ts +25 -0
- package/dist/commands/impl/FreezeTrackCommand.d.ts.map +1 -0
- package/dist/commands/impl/FreezeTrackCommand.js +94 -0
- package/dist/commands/impl/FreezeTrackCommand.js.map +1 -0
- package/dist/commands/impl/GroupRegionsCommand.d.ts +15 -0
- package/dist/commands/impl/GroupRegionsCommand.d.ts.map +1 -0
- package/dist/commands/impl/GroupRegionsCommand.js +28 -0
- package/dist/commands/impl/GroupRegionsCommand.js.map +1 -0
- package/dist/commands/impl/LoadSessionCommand.d.ts +24 -0
- package/dist/commands/impl/LoadSessionCommand.d.ts.map +1 -0
- package/dist/commands/impl/LoadSessionCommand.js +77 -0
- package/dist/commands/impl/LoadSessionCommand.js.map +1 -0
- package/dist/commands/impl/LockRegionCommand.d.ts +16 -0
- package/dist/commands/impl/LockRegionCommand.d.ts.map +1 -0
- package/dist/commands/impl/LockRegionCommand.js +37 -0
- package/dist/commands/impl/LockRegionCommand.js.map +1 -0
- package/dist/commands/impl/MergeRegionsCommand.d.ts +19 -0
- package/dist/commands/impl/MergeRegionsCommand.d.ts.map +1 -0
- package/dist/commands/impl/MergeRegionsCommand.js +85 -0
- package/dist/commands/impl/MergeRegionsCommand.js.map +1 -0
- package/dist/commands/impl/MoveAutomationPointCommand.d.ts +20 -0
- package/dist/commands/impl/MoveAutomationPointCommand.d.ts.map +1 -0
- package/dist/commands/impl/MoveAutomationPointCommand.js +73 -0
- package/dist/commands/impl/MoveAutomationPointCommand.js.map +1 -0
- package/dist/commands/impl/MoveMarkerCommand.d.ts +13 -0
- package/dist/commands/impl/MoveMarkerCommand.d.ts.map +1 -0
- package/dist/commands/impl/MoveMarkerCommand.js +29 -0
- package/dist/commands/impl/MoveMarkerCommand.js.map +1 -0
- package/dist/commands/impl/MoveMidiNoteCommand.d.ts +20 -0
- package/dist/commands/impl/MoveMidiNoteCommand.d.ts.map +1 -0
- package/dist/commands/impl/MoveMidiNoteCommand.js +55 -0
- package/dist/commands/impl/MoveMidiNoteCommand.js.map +1 -0
- package/dist/commands/impl/MoveRegionCommand.d.ts +22 -0
- package/dist/commands/impl/MoveRegionCommand.d.ts.map +1 -0
- package/dist/commands/impl/MoveRegionCommand.js +148 -0
- package/dist/commands/impl/MoveRegionCommand.js.map +1 -0
- package/dist/commands/impl/NewSessionCommand.d.ts +17 -0
- package/dist/commands/impl/NewSessionCommand.d.ts.map +1 -0
- package/dist/commands/impl/NewSessionCommand.js +88 -0
- package/dist/commands/impl/NewSessionCommand.js.map +1 -0
- package/dist/commands/impl/NormalizeRegionCommand.d.ts +24 -0
- package/dist/commands/impl/NormalizeRegionCommand.d.ts.map +1 -0
- package/dist/commands/impl/NormalizeRegionCommand.js +60 -0
- package/dist/commands/impl/NormalizeRegionCommand.js.map +1 -0
- package/dist/commands/impl/PasteRegionCommand.d.ts +18 -0
- package/dist/commands/impl/PasteRegionCommand.d.ts.map +1 -0
- package/dist/commands/impl/PasteRegionCommand.js +66 -0
- package/dist/commands/impl/PasteRegionCommand.js.map +1 -0
- package/dist/commands/impl/RemoveAutomationPointCommand.d.ts +17 -0
- package/dist/commands/impl/RemoveAutomationPointCommand.d.ts.map +1 -0
- package/dist/commands/impl/RemoveAutomationPointCommand.js +69 -0
- package/dist/commands/impl/RemoveAutomationPointCommand.js.map +1 -0
- package/dist/commands/impl/RemoveMarkerCommand.d.ts +14 -0
- package/dist/commands/impl/RemoveMarkerCommand.d.ts.map +1 -0
- package/dist/commands/impl/RemoveMarkerCommand.js +32 -0
- package/dist/commands/impl/RemoveMarkerCommand.js.map +1 -0
- package/dist/commands/impl/RemoveMidiNoteCommand.d.ts +16 -0
- package/dist/commands/impl/RemoveMidiNoteCommand.d.ts.map +1 -0
- package/dist/commands/impl/RemoveMidiNoteCommand.js +38 -0
- package/dist/commands/impl/RemoveMidiNoteCommand.js.map +1 -0
- package/dist/commands/impl/RemovePluginCommand.d.ts +17 -0
- package/dist/commands/impl/RemovePluginCommand.d.ts.map +1 -0
- package/dist/commands/impl/RemovePluginCommand.js +55 -0
- package/dist/commands/impl/RemovePluginCommand.js.map +1 -0
- package/dist/commands/impl/RemoveRangeCommand.d.ts +15 -0
- package/dist/commands/impl/RemoveRangeCommand.d.ts.map +1 -0
- package/dist/commands/impl/RemoveRangeCommand.js +34 -0
- package/dist/commands/impl/RemoveRangeCommand.js.map +1 -0
- package/dist/commands/impl/RemoveRegionCommand.d.ts +17 -0
- package/dist/commands/impl/RemoveRegionCommand.d.ts.map +1 -0
- package/dist/commands/impl/RemoveRegionCommand.js +58 -0
- package/dist/commands/impl/RemoveRegionCommand.js.map +1 -0
- package/dist/commands/impl/RemoveSendBusCommand.d.ts +17 -0
- package/dist/commands/impl/RemoveSendBusCommand.d.ts.map +1 -0
- package/dist/commands/impl/RemoveSendBusCommand.js +34 -0
- package/dist/commands/impl/RemoveSendBusCommand.js.map +1 -0
- package/dist/commands/impl/RemoveTempoChangeCommand.d.ts +11 -0
- package/dist/commands/impl/RemoveTempoChangeCommand.d.ts.map +1 -0
- package/dist/commands/impl/RemoveTempoChangeCommand.js +32 -0
- package/dist/commands/impl/RemoveTempoChangeCommand.js.map +1 -0
- package/dist/commands/impl/RemoveTrackCommand.d.ts +11 -0
- package/dist/commands/impl/RemoveTrackCommand.d.ts.map +1 -0
- package/dist/commands/impl/RemoveTrackCommand.js +28 -0
- package/dist/commands/impl/RemoveTrackCommand.js.map +1 -0
- package/dist/commands/impl/ReorderTrackCommand.d.ts +15 -0
- package/dist/commands/impl/ReorderTrackCommand.d.ts.map +1 -0
- package/dist/commands/impl/ReorderTrackCommand.js +25 -0
- package/dist/commands/impl/ReorderTrackCommand.js.map +1 -0
- package/dist/commands/impl/ResizeRegionCommand.d.ts +18 -0
- package/dist/commands/impl/ResizeRegionCommand.d.ts.map +1 -0
- package/dist/commands/impl/ResizeRegionCommand.js +65 -0
- package/dist/commands/impl/ResizeRegionCommand.js.map +1 -0
- package/dist/commands/impl/ReverseRegionCommand.d.ts +22 -0
- package/dist/commands/impl/ReverseRegionCommand.d.ts.map +1 -0
- package/dist/commands/impl/ReverseRegionCommand.js +50 -0
- package/dist/commands/impl/ReverseRegionCommand.js.map +1 -0
- package/dist/commands/impl/SaveSessionCommand.d.ts +11 -0
- package/dist/commands/impl/SaveSessionCommand.d.ts.map +1 -0
- package/dist/commands/impl/SaveSessionCommand.js +33 -0
- package/dist/commands/impl/SaveSessionCommand.js.map +1 -0
- package/dist/commands/impl/SaveSnapshotCommand.d.ts +15 -0
- package/dist/commands/impl/SaveSnapshotCommand.d.ts.map +1 -0
- package/dist/commands/impl/SaveSnapshotCommand.js +34 -0
- package/dist/commands/impl/SaveSnapshotCommand.js.map +1 -0
- package/dist/commands/impl/SetGridCommand.d.ts +20 -0
- package/dist/commands/impl/SetGridCommand.d.ts.map +1 -0
- package/dist/commands/impl/SetGridCommand.js +35 -0
- package/dist/commands/impl/SetGridCommand.js.map +1 -0
- package/dist/commands/impl/SetLoopRangeCommand.d.ts +18 -0
- package/dist/commands/impl/SetLoopRangeCommand.d.ts.map +1 -0
- package/dist/commands/impl/SetLoopRangeCommand.js +44 -0
- package/dist/commands/impl/SetLoopRangeCommand.js.map +1 -0
- package/dist/commands/impl/SetPluginParameterCommand.d.ts +16 -0
- package/dist/commands/impl/SetPluginParameterCommand.d.ts.map +1 -0
- package/dist/commands/impl/SetPluginParameterCommand.js +49 -0
- package/dist/commands/impl/SetPluginParameterCommand.js.map +1 -0
- package/dist/commands/impl/SetPunchRangeCommand.d.ts +18 -0
- package/dist/commands/impl/SetPunchRangeCommand.d.ts.map +1 -0
- package/dist/commands/impl/SetPunchRangeCommand.js +42 -0
- package/dist/commands/impl/SetPunchRangeCommand.js.map +1 -0
- package/dist/commands/impl/SetRangeCommand.d.ts +27 -0
- package/dist/commands/impl/SetRangeCommand.d.ts.map +1 -0
- package/dist/commands/impl/SetRangeCommand.js +66 -0
- package/dist/commands/impl/SetRangeCommand.js.map +1 -0
- package/dist/commands/impl/SetRegionFadesCommand.d.ts +16 -0
- package/dist/commands/impl/SetRegionFadesCommand.d.ts.map +1 -0
- package/dist/commands/impl/SetRegionFadesCommand.js +46 -0
- package/dist/commands/impl/SetRegionFadesCommand.js.map +1 -0
- package/dist/commands/impl/SetRegionPlaybackRateCommand.d.ts +23 -0
- package/dist/commands/impl/SetRegionPlaybackRateCommand.d.ts.map +1 -0
- package/dist/commands/impl/SetRegionPlaybackRateCommand.js +46 -0
- package/dist/commands/impl/SetRegionPlaybackRateCommand.js.map +1 -0
- package/dist/commands/impl/SetRegionTimeDomainCommand.d.ts +16 -0
- package/dist/commands/impl/SetRegionTimeDomainCommand.d.ts.map +1 -0
- package/dist/commands/impl/SetRegionTimeDomainCommand.js +42 -0
- package/dist/commands/impl/SetRegionTimeDomainCommand.js.map +1 -0
- package/dist/commands/impl/SetSendLevelCommand.d.ts +18 -0
- package/dist/commands/impl/SetSendLevelCommand.d.ts.map +1 -0
- package/dist/commands/impl/SetSendLevelCommand.js +35 -0
- package/dist/commands/impl/SetSendLevelCommand.js.map +1 -0
- package/dist/commands/impl/SetTrackMuteCommand.d.ts +15 -0
- package/dist/commands/impl/SetTrackMuteCommand.d.ts.map +1 -0
- package/dist/commands/impl/SetTrackMuteCommand.js +29 -0
- package/dist/commands/impl/SetTrackMuteCommand.js.map +1 -0
- package/dist/commands/impl/SetTrackPanCommand.d.ts +15 -0
- package/dist/commands/impl/SetTrackPanCommand.d.ts.map +1 -0
- package/dist/commands/impl/SetTrackPanCommand.js +29 -0
- package/dist/commands/impl/SetTrackPanCommand.js.map +1 -0
- package/dist/commands/impl/SetTrackSoloCommand.d.ts +15 -0
- package/dist/commands/impl/SetTrackSoloCommand.d.ts.map +1 -0
- package/dist/commands/impl/SetTrackSoloCommand.js +29 -0
- package/dist/commands/impl/SetTrackSoloCommand.js.map +1 -0
- package/dist/commands/impl/SetTrackVolumeCommand.d.ts +15 -0
- package/dist/commands/impl/SetTrackVolumeCommand.d.ts.map +1 -0
- package/dist/commands/impl/SetTrackVolumeCommand.js +29 -0
- package/dist/commands/impl/SetTrackVolumeCommand.js.map +1 -0
- package/dist/commands/impl/SplitAtPlayheadCommand.d.ts +32 -0
- package/dist/commands/impl/SplitAtPlayheadCommand.d.ts.map +1 -0
- package/dist/commands/impl/SplitAtPlayheadCommand.js +100 -0
- package/dist/commands/impl/SplitAtPlayheadCommand.js.map +1 -0
- package/dist/commands/impl/SplitRegionCommand.d.ts +22 -0
- package/dist/commands/impl/SplitRegionCommand.d.ts.map +1 -0
- package/dist/commands/impl/SplitRegionCommand.js +69 -0
- package/dist/commands/impl/SplitRegionCommand.js.map +1 -0
- package/dist/commands/impl/StripSilenceCommand.d.ts +26 -0
- package/dist/commands/impl/StripSilenceCommand.d.ts.map +1 -0
- package/dist/commands/impl/StripSilenceCommand.js +83 -0
- package/dist/commands/impl/StripSilenceCommand.js.map +1 -0
- package/dist/commands/impl/TimeStretchRegionCommand.d.ts +28 -0
- package/dist/commands/impl/TimeStretchRegionCommand.d.ts.map +1 -0
- package/dist/commands/impl/TimeStretchRegionCommand.js +55 -0
- package/dist/commands/impl/TimeStretchRegionCommand.js.map +1 -0
- package/dist/commands/impl/ToggleLoopCommand.d.ts +12 -0
- package/dist/commands/impl/ToggleLoopCommand.d.ts.map +1 -0
- package/dist/commands/impl/ToggleLoopCommand.js +27 -0
- package/dist/commands/impl/ToggleLoopCommand.js.map +1 -0
- package/dist/commands/impl/TrimRegionCommand.d.ts +22 -0
- package/dist/commands/impl/TrimRegionCommand.d.ts.map +1 -0
- package/dist/commands/impl/TrimRegionCommand.js +92 -0
- package/dist/commands/impl/TrimRegionCommand.js.map +1 -0
- package/dist/commands/impl/UngroupRegionsCommand.d.ts +14 -0
- package/dist/commands/impl/UngroupRegionsCommand.d.ts.map +1 -0
- package/dist/commands/impl/UngroupRegionsCommand.js +28 -0
- package/dist/commands/impl/UngroupRegionsCommand.js.map +1 -0
- package/dist/commands/types.d.ts +1895 -0
- package/dist/commands/types.d.ts.map +1 -0
- package/dist/commands/types.js +1338 -0
- package/dist/commands/types.js.map +1 -0
- package/dist/domain/ABComparison.d.ts +33 -0
- package/dist/domain/ABComparison.d.ts.map +1 -0
- package/dist/domain/ABComparison.js +78 -0
- package/dist/domain/ABComparison.js.map +1 -0
- package/dist/domain/CDMarker.d.ts +36 -0
- package/dist/domain/CDMarker.d.ts.map +1 -0
- package/dist/domain/CDMarker.js +78 -0
- package/dist/domain/CDMarker.js.map +1 -0
- package/dist/domain/ClockMode.d.ts +19 -0
- package/dist/domain/ClockMode.d.ts.map +1 -0
- package/dist/domain/ClockMode.js +65 -0
- package/dist/domain/ClockMode.js.map +1 -0
- package/dist/domain/CrossfadeEngine.d.ts +27 -0
- package/dist/domain/CrossfadeEngine.d.ts.map +1 -0
- package/dist/domain/CrossfadeEngine.js +47 -0
- package/dist/domain/CrossfadeEngine.js.map +1 -0
- package/dist/domain/DragManager.d.ts +21 -0
- package/dist/domain/DragManager.d.ts.map +1 -0
- package/dist/domain/DragManager.js +37 -0
- package/dist/domain/DragManager.js.map +1 -0
- package/dist/domain/EditMode.d.ts +15 -0
- package/dist/domain/EditMode.d.ts.map +1 -0
- package/dist/domain/EditMode.js +16 -0
- package/dist/domain/EditMode.js.map +1 -0
- package/dist/domain/ExportConfig.d.ts +55 -0
- package/dist/domain/ExportConfig.d.ts.map +1 -0
- package/dist/domain/ExportConfig.js +115 -0
- package/dist/domain/ExportConfig.js.map +1 -0
- package/dist/domain/ExportStatus.d.ts +46 -0
- package/dist/domain/ExportStatus.d.ts.map +1 -0
- package/dist/domain/ExportStatus.js +113 -0
- package/dist/domain/ExportStatus.js.map +1 -0
- package/dist/domain/FadeEnvelope.d.ts +31 -0
- package/dist/domain/FadeEnvelope.d.ts.map +1 -0
- package/dist/domain/FadeEnvelope.js +44 -0
- package/dist/domain/FadeEnvelope.js.map +1 -0
- package/dist/domain/GridSettings.d.ts +99 -0
- package/dist/domain/GridSettings.d.ts.map +1 -0
- package/dist/domain/GridSettings.js +213 -0
- package/dist/domain/GridSettings.js.map +1 -0
- package/dist/domain/Marker.d.ts +31 -0
- package/dist/domain/Marker.d.ts.map +1 -0
- package/dist/domain/Marker.js +56 -0
- package/dist/domain/Marker.js.map +1 -0
- package/dist/domain/MeterData.d.ts +26 -0
- package/dist/domain/MeterData.d.ts.map +1 -0
- package/dist/domain/MeterData.js +2 -0
- package/dist/domain/MeterData.js.map +1 -0
- package/dist/domain/MeterType.d.ts +22 -0
- package/dist/domain/MeterType.d.ts.map +1 -0
- package/dist/domain/MeterType.js +24 -0
- package/dist/domain/MeterType.js.map +1 -0
- package/dist/domain/MidiClip.d.ts +56 -0
- package/dist/domain/MidiClip.d.ts.map +1 -0
- package/dist/domain/MidiClip.js +119 -0
- package/dist/domain/MidiClip.js.map +1 -0
- package/dist/domain/MidiNote.d.ts +38 -0
- package/dist/domain/MidiNote.d.ts.map +1 -0
- package/dist/domain/MidiNote.js +82 -0
- package/dist/domain/MidiNote.js.map +1 -0
- package/dist/domain/MidiRegion.d.ts +65 -0
- package/dist/domain/MidiRegion.d.ts.map +1 -0
- package/dist/domain/MidiRegion.js +123 -0
- package/dist/domain/MidiRegion.js.map +1 -0
- package/dist/domain/MixerScene.d.ts +62 -0
- package/dist/domain/MixerScene.d.ts.map +1 -0
- package/dist/domain/MixerScene.js +131 -0
- package/dist/domain/MixerScene.js.map +1 -0
- package/dist/domain/MonitorMode.d.ts +15 -0
- package/dist/domain/MonitorMode.d.ts.map +1 -0
- package/dist/domain/MonitorMode.js +16 -0
- package/dist/domain/MonitorMode.js.map +1 -0
- package/dist/domain/MouseMode.d.ts +25 -0
- package/dist/domain/MouseMode.d.ts.map +1 -0
- package/dist/domain/MouseMode.js +26 -0
- package/dist/domain/MouseMode.js.map +1 -0
- package/dist/domain/OverlapType.d.ts +18 -0
- package/dist/domain/OverlapType.d.ts.map +1 -0
- package/dist/domain/OverlapType.js +19 -0
- package/dist/domain/OverlapType.js.map +1 -0
- package/dist/domain/Playlist.d.ts +83 -0
- package/dist/domain/Playlist.d.ts.map +1 -0
- package/dist/domain/Playlist.js +205 -0
- package/dist/domain/Playlist.js.map +1 -0
- package/dist/domain/Range.d.ts +35 -0
- package/dist/domain/Range.d.ts.map +1 -0
- package/dist/domain/Range.js +59 -0
- package/dist/domain/Range.js.map +1 -0
- package/dist/domain/RecordMode.d.ts +13 -0
- package/dist/domain/RecordMode.d.ts.map +1 -0
- package/dist/domain/RecordMode.js +14 -0
- package/dist/domain/RecordMode.js.map +1 -0
- package/dist/domain/Region.d.ts +96 -0
- package/dist/domain/Region.d.ts.map +1 -0
- package/dist/domain/Region.js +219 -0
- package/dist/domain/Region.js.map +1 -0
- package/dist/domain/RegionClipboard.d.ts +56 -0
- package/dist/domain/RegionClipboard.d.ts.map +1 -0
- package/dist/domain/RegionClipboard.js +70 -0
- package/dist/domain/RegionClipboard.js.map +1 -0
- package/dist/domain/RegionGroup.d.ts +16 -0
- package/dist/domain/RegionGroup.d.ts.map +1 -0
- package/dist/domain/RegionGroup.js +36 -0
- package/dist/domain/RegionGroup.js.map +1 -0
- package/dist/domain/Route.d.ts +104 -0
- package/dist/domain/Route.d.ts.map +1 -0
- package/dist/domain/Route.js +192 -0
- package/dist/domain/Route.js.map +1 -0
- package/dist/domain/RulerType.d.ts +21 -0
- package/dist/domain/RulerType.d.ts.map +1 -0
- package/dist/domain/RulerType.js +22 -0
- package/dist/domain/RulerType.js.map +1 -0
- package/dist/domain/SelectionHistory.d.ts +38 -0
- package/dist/domain/SelectionHistory.d.ts.map +1 -0
- package/dist/domain/SelectionHistory.js +70 -0
- package/dist/domain/SelectionHistory.js.map +1 -0
- package/dist/domain/SendBus.d.ts +28 -0
- package/dist/domain/SendBus.d.ts.map +1 -0
- package/dist/domain/SendBus.js +43 -0
- package/dist/domain/SendBus.js.map +1 -0
- package/dist/domain/Session.d.ts +347 -0
- package/dist/domain/Session.d.ts.map +1 -0
- package/dist/domain/Session.js +965 -0
- package/dist/domain/Session.js.map +1 -0
- package/dist/domain/SidechainConfig.d.ts +51 -0
- package/dist/domain/SidechainConfig.d.ts.map +1 -0
- package/dist/domain/SidechainConfig.js +84 -0
- package/dist/domain/SidechainConfig.js.map +1 -0
- package/dist/domain/Source.d.ts +11 -0
- package/dist/domain/Source.d.ts.map +1 -0
- package/dist/domain/Source.js +11 -0
- package/dist/domain/Source.js.map +1 -0
- package/dist/domain/Take.d.ts +66 -0
- package/dist/domain/Take.d.ts.map +1 -0
- package/dist/domain/Take.js +106 -0
- package/dist/domain/Take.js.map +1 -0
- package/dist/domain/Track.d.ts +58 -0
- package/dist/domain/Track.d.ts.map +1 -0
- package/dist/domain/Track.js +124 -0
- package/dist/domain/Track.js.map +1 -0
- package/dist/domain/TrackGroup.d.ts +39 -0
- package/dist/domain/TrackGroup.d.ts.map +1 -0
- package/dist/domain/TrackGroup.js +86 -0
- package/dist/domain/TrackGroup.js.map +1 -0
- package/dist/domain/TransportFSM.d.ts +188 -0
- package/dist/domain/TransportFSM.d.ts.map +1 -0
- package/dist/domain/TransportFSM.js +412 -0
- package/dist/domain/TransportFSM.js.map +1 -0
- package/dist/domain/TransportMode.d.ts +23 -0
- package/dist/domain/TransportMode.d.ts.map +1 -0
- package/dist/domain/TransportMode.js +38 -0
- package/dist/domain/TransportMode.js.map +1 -0
- package/dist/domain/VCATrack.d.ts +48 -0
- package/dist/domain/VCATrack.d.ts.map +1 -0
- package/dist/domain/VCATrack.js +85 -0
- package/dist/domain/VCATrack.js.map +1 -0
- package/dist/domain/ZoomFocus.d.ts +21 -0
- package/dist/domain/ZoomFocus.d.ts.map +1 -0
- package/dist/domain/ZoomFocus.js +22 -0
- package/dist/domain/ZoomFocus.js.map +1 -0
- package/dist/domain/index.d.ts +11 -0
- package/dist/domain/index.d.ts.map +1 -0
- package/dist/domain/index.js +12 -0
- package/dist/domain/index.js.map +1 -0
- package/dist/domain/temporal/TempoMap.d.ts +68 -0
- package/dist/domain/temporal/TempoMap.d.ts.map +1 -0
- package/dist/domain/temporal/TempoMap.js +151 -0
- package/dist/domain/temporal/TempoMap.js.map +1 -0
- package/dist/domain/temporal/types.d.ts +34 -0
- package/dist/domain/temporal/types.d.ts.map +1 -0
- package/dist/domain/temporal/types.js +54 -0
- package/dist/domain/temporal/types.js.map +1 -0
- package/dist/domain/types.d.ts +26 -0
- package/dist/domain/types.d.ts.map +1 -0
- package/dist/domain/types.js +11 -0
- package/dist/domain/types.js.map +1 -0
- package/dist/errors/DAWErrors.d.ts +107 -0
- package/dist/errors/DAWErrors.d.ts.map +1 -0
- package/dist/errors/DAWErrors.js +159 -0
- package/dist/errors/DAWErrors.js.map +1 -0
- package/dist/index.d.ts +56 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +59 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/Signal.d.ts +28 -0
- package/dist/lib/Signal.d.ts.map +1 -0
- package/dist/lib/Signal.js +34 -0
- package/dist/lib/Signal.js.map +1 -0
- package/dist/midi/MidiInput.d.ts +61 -0
- package/dist/midi/MidiInput.d.ts.map +1 -0
- package/dist/midi/MidiInput.js +153 -0
- package/dist/midi/MidiInput.js.map +1 -0
- package/dist/plugins/AutomatableParameter.d.ts +28 -0
- package/dist/plugins/AutomatableParameter.d.ts.map +1 -0
- package/dist/plugins/AutomatableParameter.js +89 -0
- package/dist/plugins/AutomatableParameter.js.map +1 -0
- package/dist/plugins/Plugin.d.ts +31 -0
- package/dist/plugins/Plugin.d.ts.map +1 -0
- package/dist/plugins/Plugin.js +7 -0
- package/dist/plugins/Plugin.js.map +1 -0
- package/dist/plugins/PluginManager.d.ts +15 -0
- package/dist/plugins/PluginManager.d.ts.map +1 -0
- package/dist/plugins/PluginManager.js +199 -0
- package/dist/plugins/PluginManager.js.map +1 -0
- package/dist/plugins/PluginPreset.d.ts +50 -0
- package/dist/plugins/PluginPreset.d.ts.map +1 -0
- package/dist/plugins/PluginPreset.js +292 -0
- package/dist/plugins/PluginPreset.js.map +1 -0
- package/dist/plugins/impl/AutoPanPlugin.d.ts +28 -0
- package/dist/plugins/impl/AutoPanPlugin.d.ts.map +1 -0
- package/dist/plugins/impl/AutoPanPlugin.js +48 -0
- package/dist/plugins/impl/AutoPanPlugin.js.map +1 -0
- package/dist/plugins/impl/ConvolutionReverbPlugin.d.ts +35 -0
- package/dist/plugins/impl/ConvolutionReverbPlugin.d.ts.map +1 -0
- package/dist/plugins/impl/ConvolutionReverbPlugin.js +65 -0
- package/dist/plugins/impl/ConvolutionReverbPlugin.js.map +1 -0
- package/dist/plugins/impl/DeEsserPlugin.d.ts +35 -0
- package/dist/plugins/impl/DeEsserPlugin.d.ts.map +1 -0
- package/dist/plugins/impl/DeEsserPlugin.js +87 -0
- package/dist/plugins/impl/DeEsserPlugin.js.map +1 -0
- package/dist/plugins/impl/ExpanderPlugin.d.ts +42 -0
- package/dist/plugins/impl/ExpanderPlugin.d.ts.map +1 -0
- package/dist/plugins/impl/ExpanderPlugin.js +105 -0
- package/dist/plugins/impl/ExpanderPlugin.js.map +1 -0
- package/dist/plugins/impl/GenericPlugin.d.ts +20 -0
- package/dist/plugins/impl/GenericPlugin.d.ts.map +1 -0
- package/dist/plugins/impl/GenericPlugin.js +37 -0
- package/dist/plugins/impl/GenericPlugin.js.map +1 -0
- package/dist/plugins/impl/MultibandCompressorPlugin.d.ts +33 -0
- package/dist/plugins/impl/MultibandCompressorPlugin.d.ts.map +1 -0
- package/dist/plugins/impl/MultibandCompressorPlugin.js +169 -0
- package/dist/plugins/impl/MultibandCompressorPlugin.js.map +1 -0
- package/dist/plugins/impl/ParametricEQPlugin.d.ts +25 -0
- package/dist/plugins/impl/ParametricEQPlugin.d.ts.map +1 -0
- package/dist/plugins/impl/ParametricEQPlugin.js +79 -0
- package/dist/plugins/impl/ParametricEQPlugin.js.map +1 -0
- package/dist/plugins/impl/PhaserPlugin.d.ts +29 -0
- package/dist/plugins/impl/PhaserPlugin.d.ts.map +1 -0
- package/dist/plugins/impl/PhaserPlugin.js +50 -0
- package/dist/plugins/impl/PhaserPlugin.js.map +1 -0
- package/dist/plugins/impl/SyncDelayPlugin.d.ts +52 -0
- package/dist/plugins/impl/SyncDelayPlugin.d.ts.map +1 -0
- package/dist/plugins/impl/SyncDelayPlugin.js +95 -0
- package/dist/plugins/impl/SyncDelayPlugin.js.map +1 -0
- package/dist/plugins/impl/TapeSaturationPlugin.d.ts +35 -0
- package/dist/plugins/impl/TapeSaturationPlugin.d.ts.map +1 -0
- package/dist/plugins/impl/TapeSaturationPlugin.js +87 -0
- package/dist/plugins/impl/TapeSaturationPlugin.js.map +1 -0
- package/dist/plugins/impl/TremoloPlugin.d.ts +29 -0
- package/dist/plugins/impl/TremoloPlugin.d.ts.map +1 -0
- package/dist/plugins/impl/TremoloPlugin.js +50 -0
- package/dist/plugins/impl/TremoloPlugin.js.map +1 -0
- package/dist/plugins/impl/VibratoPlugin.d.ts +28 -0
- package/dist/plugins/impl/VibratoPlugin.d.ts.map +1 -0
- package/dist/plugins/impl/VibratoPlugin.js +48 -0
- package/dist/plugins/impl/VibratoPlugin.js.map +1 -0
- package/dist/preferences/KeyBindings.d.ts +38 -0
- package/dist/preferences/KeyBindings.d.ts.map +1 -0
- package/dist/preferences/KeyBindings.js +83 -0
- package/dist/preferences/KeyBindings.js.map +1 -0
- package/dist/preferences/Preferences.d.ts +49 -0
- package/dist/preferences/Preferences.d.ts.map +1 -0
- package/dist/preferences/Preferences.js +93 -0
- package/dist/preferences/Preferences.js.map +1 -0
- package/dist/preferences/index.d.ts +4 -0
- package/dist/preferences/index.d.ts.map +1 -0
- package/dist/preferences/index.js +3 -0
- package/dist/preferences/index.js.map +1 -0
- package/dist/processing/GainProcessor.d.ts +10 -0
- package/dist/processing/GainProcessor.d.ts.map +1 -0
- package/dist/processing/GainProcessor.js +21 -0
- package/dist/processing/GainProcessor.js.map +1 -0
- package/dist/processing/IO.d.ts +15 -0
- package/dist/processing/IO.d.ts.map +1 -0
- package/dist/processing/IO.js +34 -0
- package/dist/processing/IO.js.map +1 -0
- package/dist/processing/MeterProcessor.d.ts +101 -0
- package/dist/processing/MeterProcessor.d.ts.map +1 -0
- package/dist/processing/MeterProcessor.js +195 -0
- package/dist/processing/MeterProcessor.js.map +1 -0
- package/dist/processing/PanProcessor.d.ts +15 -0
- package/dist/processing/PanProcessor.d.ts.map +1 -0
- package/dist/processing/PanProcessor.js +35 -0
- package/dist/processing/PanProcessor.js.map +1 -0
- package/dist/processing/PluginInsert.d.ts +9 -0
- package/dist/processing/PluginInsert.d.ts.map +1 -0
- package/dist/processing/PluginInsert.js +16 -0
- package/dist/processing/PluginInsert.js.map +1 -0
- package/dist/processing/PolarityProcessor.d.ts +25 -0
- package/dist/processing/PolarityProcessor.d.ts.map +1 -0
- package/dist/processing/PolarityProcessor.js +35 -0
- package/dist/processing/PolarityProcessor.js.map +1 -0
- package/dist/processing/Processor.d.ts +31 -0
- package/dist/processing/Processor.d.ts.map +1 -0
- package/dist/processing/Processor.js +45 -0
- package/dist/processing/Processor.js.map +1 -0
- package/dist/processing/SendProcessor.d.ts +55 -0
- package/dist/processing/SendProcessor.d.ts.map +1 -0
- package/dist/processing/SendProcessor.js +97 -0
- package/dist/processing/SendProcessor.js.map +1 -0
- package/dist/storage/AutoSave.d.ts +48 -0
- package/dist/storage/AutoSave.d.ts.map +1 -0
- package/dist/storage/AutoSave.js +108 -0
- package/dist/storage/AutoSave.js.map +1 -0
- package/dist/storage/SessionStorage.d.ts +74 -0
- package/dist/storage/SessionStorage.d.ts.map +1 -0
- package/dist/storage/SessionStorage.js +192 -0
- package/dist/storage/SessionStorage.js.map +1 -0
- package/dist/storage/SessionTemplate.d.ts +22 -0
- package/dist/storage/SessionTemplate.d.ts.map +1 -0
- package/dist/storage/SessionTemplate.js +77 -0
- package/dist/storage/SessionTemplate.js.map +1 -0
- package/dist/utils/AudioBufferToWav.d.ts +28 -0
- package/dist/utils/AudioBufferToWav.d.ts.map +1 -0
- package/dist/utils/AudioBufferToWav.js +110 -0
- package/dist/utils/AudioBufferToWav.js.map +1 -0
- package/dist/utils/DitherProcessor.d.ts +41 -0
- package/dist/utils/DitherProcessor.d.ts.map +1 -0
- package/dist/utils/DitherProcessor.js +78 -0
- package/dist/utils/DitherProcessor.js.map +1 -0
- package/dist/utils/FlacEncoder.d.ts +22 -0
- package/dist/utils/FlacEncoder.d.ts.map +1 -0
- package/dist/utils/FlacEncoder.js +196 -0
- package/dist/utils/FlacEncoder.js.map +1 -0
- package/dist/utils/OggEncoder.d.ts +40 -0
- package/dist/utils/OggEncoder.d.ts.map +1 -0
- package/dist/utils/OggEncoder.js +183 -0
- package/dist/utils/OggEncoder.js.map +1 -0
- package/package.json +67 -0
|
@@ -0,0 +1,965 @@
|
|
|
1
|
+
import { Track, TrackType } from './Track';
|
|
2
|
+
import { Route } from './Route';
|
|
3
|
+
import { Range } from './Range';
|
|
4
|
+
import { Region } from './Region';
|
|
5
|
+
import { MidiRegion } from './MidiRegion';
|
|
6
|
+
import { SendBus } from './SendBus';
|
|
7
|
+
import { Marker } from './Marker';
|
|
8
|
+
import { RegionGroup } from './RegionGroup';
|
|
9
|
+
import { Signal } from '../lib/Signal';
|
|
10
|
+
import { ExportConfig } from './ExportConfig';
|
|
11
|
+
import { ExportStatus } from './ExportStatus';
|
|
12
|
+
import { GridSettings } from './GridSettings';
|
|
13
|
+
import { TempoMap } from './temporal/TempoMap';
|
|
14
|
+
import { TimeDomain } from './temporal/types';
|
|
15
|
+
import { MixerSceneManager } from './MixerScene';
|
|
16
|
+
import { TrackGroup } from './TrackGroup';
|
|
17
|
+
import { CDMarker } from './CDMarker';
|
|
18
|
+
import { VCATrack } from './VCATrack';
|
|
19
|
+
import { ScrubState } from './TransportMode';
|
|
20
|
+
import { TransportFSM, MotionState } from './TransportFSM';
|
|
21
|
+
import { SidechainConfig } from './SidechainConfig';
|
|
22
|
+
import { Take, TakeLane } from './Take';
|
|
23
|
+
export class Session {
|
|
24
|
+
get isPlaying() { return this._isPlaying; }
|
|
25
|
+
set isPlaying(value) {
|
|
26
|
+
if (this._isPlaying !== value) {
|
|
27
|
+
this._isPlaying = value;
|
|
28
|
+
this.playingChanged.emit(value);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
constructor(name, id, sampleRate = 44100) {
|
|
32
|
+
// Transport State
|
|
33
|
+
this.tempo = 120.0;
|
|
34
|
+
this.timeSignature = [4, 4];
|
|
35
|
+
this.timecodeFps = 30;
|
|
36
|
+
this.transportFrame = 0;
|
|
37
|
+
this.recordingStartFrame = 0;
|
|
38
|
+
/**
|
|
39
|
+
* Transport Finite State Machine.
|
|
40
|
+
* Manages transport motion state (stopped/rolling/declick), direction,
|
|
41
|
+
* and variable-speed playback. See TransportFSM.ts for full documentation.
|
|
42
|
+
*/
|
|
43
|
+
this.transportFSM = new TransportFSM();
|
|
44
|
+
/**
|
|
45
|
+
* Backwards-compatible `isPlaying` accessor.
|
|
46
|
+
* Delegates to `transportFSM.isRolling()` for reads.
|
|
47
|
+
* Writing `true` enqueues a StartTransport event;
|
|
48
|
+
* writing `false` triggers an immediate stop (for legacy callers
|
|
49
|
+
* like AudioEngine.pause that bypass the FSM lifecycle).
|
|
50
|
+
*/
|
|
51
|
+
this._isPlaying = false;
|
|
52
|
+
this.loopEnabled = false;
|
|
53
|
+
this.punchEnabled = false;
|
|
54
|
+
// Loop Recording
|
|
55
|
+
this.loopRecordingEnabled = false;
|
|
56
|
+
this.loopRecordingTakeCount = 0;
|
|
57
|
+
// Pre-roll / Count-in
|
|
58
|
+
this.preRollBars = 0;
|
|
59
|
+
// Editing Mode
|
|
60
|
+
this.rippleEdit = false;
|
|
61
|
+
// Structure
|
|
62
|
+
this._tracks = new Map();
|
|
63
|
+
this._ranges = new Map();
|
|
64
|
+
this._sendBuses = new Map();
|
|
65
|
+
this._markers = new Map();
|
|
66
|
+
this._regionGroups = new Map();
|
|
67
|
+
// Selection State
|
|
68
|
+
this._selectedRegionIds = new Set();
|
|
69
|
+
this.selectionChanged = new Signal();
|
|
70
|
+
// Signals
|
|
71
|
+
this.trackAdded = new Signal();
|
|
72
|
+
this.trackRemoved = new Signal();
|
|
73
|
+
this.rangeAdded = new Signal();
|
|
74
|
+
this.rangeRemoved = new Signal();
|
|
75
|
+
this.loopRangeChanged = new Signal();
|
|
76
|
+
this.loopEnabledChanged = new Signal();
|
|
77
|
+
this.punchRangeChanged = new Signal();
|
|
78
|
+
this.punchEnabledChanged = new Signal();
|
|
79
|
+
this.playingChanged = new Signal();
|
|
80
|
+
this.recordingChanged = new Signal();
|
|
81
|
+
this.loopRecordingChanged = new Signal();
|
|
82
|
+
this.preRollChanged = new Signal();
|
|
83
|
+
this.metronomeChanged = new Signal();
|
|
84
|
+
this.metronomeVolumeChanged = new Signal();
|
|
85
|
+
this.transportPositionChanged = new Signal();
|
|
86
|
+
this.tempoChanged = new Signal();
|
|
87
|
+
this.timeSignatureChanged = new Signal();
|
|
88
|
+
this.sendBusAdded = new Signal();
|
|
89
|
+
this.sendBusRemoved = new Signal();
|
|
90
|
+
this.markerAdded = new Signal();
|
|
91
|
+
this.markerRemoved = new Signal();
|
|
92
|
+
this.markerChanged = new Signal();
|
|
93
|
+
this.trackReordered = new Signal();
|
|
94
|
+
this.rippleEditChanged = new Signal();
|
|
95
|
+
this.regionGroupAdded = new Signal();
|
|
96
|
+
this.regionGroupRemoved = new Signal();
|
|
97
|
+
this.isRecording = false;
|
|
98
|
+
this.metronomeEnabled = false;
|
|
99
|
+
this.metronomeVolume = 1.0;
|
|
100
|
+
// Grid & Snap settings
|
|
101
|
+
this.gridSettings = new GridSettings();
|
|
102
|
+
// Mixer Scenes
|
|
103
|
+
this.mixerSceneManager = new MixerSceneManager();
|
|
104
|
+
// Track Groups (Phase 10)
|
|
105
|
+
this._trackGroups = new Map();
|
|
106
|
+
this.trackGroupAdded = new Signal();
|
|
107
|
+
this.trackGroupRemoved = new Signal();
|
|
108
|
+
// CD Markers (Phase 12)
|
|
109
|
+
this._cdMarkers = new Map();
|
|
110
|
+
this.cdMarkerAdded = new Signal();
|
|
111
|
+
this.cdMarkerRemoved = new Signal();
|
|
112
|
+
// VCA Tracks (Phase 10-4)
|
|
113
|
+
this._vcaTracks = new Map();
|
|
114
|
+
this.vcaTrackAdded = new Signal();
|
|
115
|
+
this.vcaTrackRemoved = new Signal();
|
|
116
|
+
// Scrub/Shuttle (Phase 10-2)
|
|
117
|
+
this.scrubState = new ScrubState();
|
|
118
|
+
// Sidechain Configs (Phase 12-3)
|
|
119
|
+
this._sidechainConfigs = new Map();
|
|
120
|
+
// Take Lanes (Phase 9-4)
|
|
121
|
+
this._takeLanes = new Map();
|
|
122
|
+
// Source Management
|
|
123
|
+
this._sources = new Map();
|
|
124
|
+
this.sourceAdded = new Signal();
|
|
125
|
+
this.id = id || crypto.randomUUID();
|
|
126
|
+
this.name = name;
|
|
127
|
+
this.sampleRate = sampleRate;
|
|
128
|
+
this.gridSettings = new GridSettings(undefined, undefined, this.tempo);
|
|
129
|
+
this.gridSettings.setTimeSignature(this.timeSignature[0], this.timeSignature[1]);
|
|
130
|
+
this.tempoMap = new TempoMap(sampleRate);
|
|
131
|
+
// Initialize Master Bus
|
|
132
|
+
this.masterBus = new Route(crypto.randomUUID(), 'Master');
|
|
133
|
+
// Wire up FSM signals to keep legacy state in sync.
|
|
134
|
+
this.transportFSM.stateChanged.connect((state) => {
|
|
135
|
+
const rolling = state === MotionState.ROLLING;
|
|
136
|
+
// Sync the legacy _isPlaying flag when the FSM transitions.
|
|
137
|
+
if (this._isPlaying !== rolling) {
|
|
138
|
+
this._isPlaying = rolling;
|
|
139
|
+
this.playingChanged.emit(rolling);
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
this.transportFSM.locateRequested.connect((frame) => {
|
|
143
|
+
this.locateTransport(frame);
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
addTrack(name, type = TrackType.AUDIO, id) {
|
|
147
|
+
const trackId = id || crypto.randomUUID();
|
|
148
|
+
const track = new Track(trackId, name, type);
|
|
149
|
+
this._tracks.set(trackId, track);
|
|
150
|
+
this.trackAdded.emit(track);
|
|
151
|
+
return track;
|
|
152
|
+
}
|
|
153
|
+
addAuxTrack(name, id) {
|
|
154
|
+
return this.addTrack(name, TrackType.AUX, id);
|
|
155
|
+
}
|
|
156
|
+
addBusTrack(name, id) {
|
|
157
|
+
return this.addTrack(name, TrackType.BUS, id);
|
|
158
|
+
}
|
|
159
|
+
removeTrack(id) {
|
|
160
|
+
if (this._tracks.has(id)) {
|
|
161
|
+
this._tracks.delete(id);
|
|
162
|
+
this.trackRemoved.emit(id);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
getTrack(id) {
|
|
166
|
+
return this._tracks.get(id);
|
|
167
|
+
}
|
|
168
|
+
get tracks() {
|
|
169
|
+
return Array.from(this._tracks.values());
|
|
170
|
+
}
|
|
171
|
+
// Range Management
|
|
172
|
+
addRange(name, start, end, id, color) {
|
|
173
|
+
const rangeId = id || crypto.randomUUID();
|
|
174
|
+
const range = new Range(rangeId, name, start, end, color);
|
|
175
|
+
this._ranges.set(rangeId, range);
|
|
176
|
+
this.rangeAdded.emit(range);
|
|
177
|
+
return range;
|
|
178
|
+
}
|
|
179
|
+
removeRange(id) {
|
|
180
|
+
const range = this._ranges.get(id);
|
|
181
|
+
if (range) {
|
|
182
|
+
range.removed.emit();
|
|
183
|
+
this._ranges.delete(id);
|
|
184
|
+
this.rangeRemoved.emit(id);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
getRange(id) {
|
|
188
|
+
return this._ranges.get(id);
|
|
189
|
+
}
|
|
190
|
+
getRangeByName(name) {
|
|
191
|
+
return Array.from(this._ranges.values()).find(r => r.name === name);
|
|
192
|
+
}
|
|
193
|
+
get ranges() {
|
|
194
|
+
return Array.from(this._ranges.values());
|
|
195
|
+
}
|
|
196
|
+
// Loop Range Management
|
|
197
|
+
setLoopRange(rangeId) {
|
|
198
|
+
const range = this.getRange(rangeId);
|
|
199
|
+
if (!range) {
|
|
200
|
+
throw new Error(`Range not found: ${rangeId}`);
|
|
201
|
+
}
|
|
202
|
+
this.loopRangeId = rangeId;
|
|
203
|
+
this.loopRangeChanged.emit(rangeId);
|
|
204
|
+
}
|
|
205
|
+
clearLoopRange() {
|
|
206
|
+
this.loopRangeId = undefined;
|
|
207
|
+
this.loopEnabled = false;
|
|
208
|
+
this.loopRangeChanged.emit(undefined);
|
|
209
|
+
this.loopEnabledChanged.emit(false);
|
|
210
|
+
}
|
|
211
|
+
getLoopRange() {
|
|
212
|
+
return this.loopRangeId ? this.getRange(this.loopRangeId) : undefined;
|
|
213
|
+
}
|
|
214
|
+
setLoopEnabled(enabled) {
|
|
215
|
+
if (!this.loopRangeId && enabled) {
|
|
216
|
+
throw new Error('Cannot enable loop without setting loop range first');
|
|
217
|
+
}
|
|
218
|
+
this.loopEnabled = enabled;
|
|
219
|
+
this.loopEnabledChanged.emit(enabled);
|
|
220
|
+
}
|
|
221
|
+
toggleLoop() {
|
|
222
|
+
if (this.loopRangeId) {
|
|
223
|
+
this.setLoopEnabled(!this.loopEnabled);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
// Punch Range Management
|
|
227
|
+
setPunchRange(rangeId) {
|
|
228
|
+
const range = this.getRange(rangeId);
|
|
229
|
+
if (!range) {
|
|
230
|
+
throw new Error(`Range not found: ${rangeId}`);
|
|
231
|
+
}
|
|
232
|
+
this.punchRangeId = rangeId;
|
|
233
|
+
this.punchRangeChanged.emit(rangeId);
|
|
234
|
+
}
|
|
235
|
+
clearPunchRange() {
|
|
236
|
+
this.punchRangeId = undefined;
|
|
237
|
+
this.punchRangeChanged.emit(undefined);
|
|
238
|
+
}
|
|
239
|
+
getPunchRange() {
|
|
240
|
+
return this.punchRangeId ? this.getRange(this.punchRangeId) : undefined;
|
|
241
|
+
}
|
|
242
|
+
setPunchEnabled(enabled) {
|
|
243
|
+
if (!this.punchRangeId && enabled) {
|
|
244
|
+
throw new Error('Cannot enable punch without setting punch range first');
|
|
245
|
+
}
|
|
246
|
+
this.punchEnabled = enabled;
|
|
247
|
+
this.punchEnabledChanged.emit(enabled);
|
|
248
|
+
}
|
|
249
|
+
// Loop Recording
|
|
250
|
+
setLoopRecording(enabled) {
|
|
251
|
+
this.loopRecordingEnabled = enabled;
|
|
252
|
+
if (!enabled) {
|
|
253
|
+
this.loopRecordingTakeCount = 0;
|
|
254
|
+
}
|
|
255
|
+
this.loopRecordingChanged.emit(enabled);
|
|
256
|
+
}
|
|
257
|
+
incrementTakeCount() {
|
|
258
|
+
this.loopRecordingTakeCount++;
|
|
259
|
+
return this.loopRecordingTakeCount;
|
|
260
|
+
}
|
|
261
|
+
// Pre-roll / Count-in
|
|
262
|
+
setPreRollBars(bars) {
|
|
263
|
+
this.preRollBars = Math.max(0, Math.floor(bars));
|
|
264
|
+
this.preRollChanged.emit(this.preRollBars);
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Calculate pre-roll duration in seconds based on current tempo and time signature.
|
|
268
|
+
*/
|
|
269
|
+
getPreRollDurationSeconds() {
|
|
270
|
+
if (this.preRollBars <= 0)
|
|
271
|
+
return 0;
|
|
272
|
+
const beatsPerBar = this.timeSignature[0];
|
|
273
|
+
const totalBeats = this.preRollBars * beatsPerBar;
|
|
274
|
+
const secondsPerBeat = 60 / this.tempo;
|
|
275
|
+
return totalBeats * secondsPerBeat;
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Calculate pre-roll duration in frames.
|
|
279
|
+
*/
|
|
280
|
+
getPreRollDurationFrames() {
|
|
281
|
+
return Math.floor(this.getPreRollDurationSeconds() * this.sampleRate);
|
|
282
|
+
}
|
|
283
|
+
// Transport Control (Domain Level)
|
|
284
|
+
// These methods only update the 'Truth' state.
|
|
285
|
+
// The AudioProvider will observe these changes.
|
|
286
|
+
setTempo(bpm) {
|
|
287
|
+
if (bpm <= 0 || bpm === this.tempo)
|
|
288
|
+
return;
|
|
289
|
+
console.log(`[Session.setTempo] Changing tempo from ${this.tempo} to ${bpm}`);
|
|
290
|
+
const oldBpm = this.tempo;
|
|
291
|
+
const ratio = bpm / oldBpm;
|
|
292
|
+
this.tempo = bpm;
|
|
293
|
+
// Update grid settings
|
|
294
|
+
this.gridSettings.setBPM(bpm);
|
|
295
|
+
// Update regions based on their time domain
|
|
296
|
+
this.tracks.forEach(track => {
|
|
297
|
+
const regions = track.playlist.getRegions();
|
|
298
|
+
console.log(`[Session.setTempo] Track ${track.name} has ${regions.length} region(s)`);
|
|
299
|
+
regions.forEach(region => {
|
|
300
|
+
console.log(`[Session.setTempo] Region "${region.name}": timeDomain=${region.timeDomain} (0=Audio, 1=Beat)`);
|
|
301
|
+
if (region.timeDomain === TimeDomain.BeatTime) {
|
|
302
|
+
console.log(`[Session.setTempo] Updating Musical Mode region "${region.name}"`);
|
|
303
|
+
// Convert current frame position to beats at old BPM
|
|
304
|
+
const startBeats = this.tempoMap.framesToBeats(region.start, oldBpm);
|
|
305
|
+
const lengthBeats = this.tempoMap.framesToBeats(region.length, oldBpm);
|
|
306
|
+
console.log(`[Session.setTempo] - Old: start=${region.start} frames, length=${region.length} frames`);
|
|
307
|
+
console.log(`[Session.setTempo] - Beats: start=${startBeats.toNumber()}, length=${lengthBeats.toNumber()}`);
|
|
308
|
+
// Recalculate frames at new BPM
|
|
309
|
+
const newStart = this.tempoMap.beatsToFrames(startBeats, bpm);
|
|
310
|
+
const newLength = this.tempoMap.beatsToFrames(lengthBeats, bpm);
|
|
311
|
+
console.log(`[Session.setTempo] - New: start=${newStart} frames, length=${newLength} frames`);
|
|
312
|
+
console.log(`[Session.setTempo] - Playback rate: ${ratio}`);
|
|
313
|
+
region.move(newStart);
|
|
314
|
+
region.resize(newLength);
|
|
315
|
+
// Adjust playback rate to compensate for tempo change
|
|
316
|
+
region.playbackRate = ratio;
|
|
317
|
+
// Notify UI that region has changed
|
|
318
|
+
console.log(`[Session.setTempo] Emitting regionChanged signal for "${region.name}"`);
|
|
319
|
+
track.playlist.regionChanged.emit(region);
|
|
320
|
+
}
|
|
321
|
+
else {
|
|
322
|
+
console.log(`[Session.setTempo] Skipping Audio Mode region "${region.name}" (stays fixed)`);
|
|
323
|
+
}
|
|
324
|
+
// AudioTime regions stay fixed (do nothing)
|
|
325
|
+
});
|
|
326
|
+
});
|
|
327
|
+
console.log(`[Session.setTempo] Emitting tempoChanged signal with bpm=${bpm}`);
|
|
328
|
+
this.tempoChanged.emit(bpm);
|
|
329
|
+
}
|
|
330
|
+
setTimeSignature(numerator, denominator) {
|
|
331
|
+
if (numerator > 0 && denominator > 0) {
|
|
332
|
+
this.timeSignature = [numerator, denominator];
|
|
333
|
+
this.gridSettings.setTimeSignature(numerator, denominator);
|
|
334
|
+
this.timeSignatureChanged.emit(this.timeSignature);
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
startTransport() {
|
|
338
|
+
this.transportFSM.enqueue({ type: 'StartTransport' });
|
|
339
|
+
// Sync legacy flag so existing AudioEngine / UI code still works.
|
|
340
|
+
this.isPlaying = true;
|
|
341
|
+
}
|
|
342
|
+
stopTransport() {
|
|
343
|
+
this.transportFSM.enqueue({ type: 'StopTransport' });
|
|
344
|
+
// For rapid stop (no declick in domain layer), complete immediately.
|
|
345
|
+
// The audio backend handles its own declick ramp-down independently.
|
|
346
|
+
this.transportFSM.enqueue({ type: 'DeclickDone' });
|
|
347
|
+
this.isPlaying = false;
|
|
348
|
+
this.transportFrame = 0;
|
|
349
|
+
this.transportPositionChanged.emit(0);
|
|
350
|
+
}
|
|
351
|
+
locateTransport(frame) {
|
|
352
|
+
this.transportFrame = frame;
|
|
353
|
+
this.transportPositionChanged.emit(frame);
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* Locate via the FSM with proper declick handling.
|
|
357
|
+
* Use this when you want declick-aware relocation (e.g. from the timeline ruler).
|
|
358
|
+
*
|
|
359
|
+
* @param frame Target frame position.
|
|
360
|
+
* @param rollAfterLocate Whether to resume playback after the locate completes.
|
|
361
|
+
*/
|
|
362
|
+
locateTransportViaFSM(frame, rollAfterLocate = false) {
|
|
363
|
+
this.transportFSM.enqueue({
|
|
364
|
+
type: 'Locate',
|
|
365
|
+
target: frame,
|
|
366
|
+
rollAfterLocate,
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* Get the current playback speed from the transport FSM.
|
|
371
|
+
* Positive = forward, negative = reverse.
|
|
372
|
+
* Range: -8.0 to +8.0 (absolute minimum 0.0625 when non-zero).
|
|
373
|
+
*/
|
|
374
|
+
getSpeed() {
|
|
375
|
+
return this.transportFSM.getSpeed();
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* Set the playback speed via the transport FSM.
|
|
379
|
+
* If the sign changes while rolling, the FSM will handle
|
|
380
|
+
* the declick and direction reversal automatically.
|
|
381
|
+
*
|
|
382
|
+
* @param speed Desired speed. Negative = reverse. Range: -8.0 to +8.0.
|
|
383
|
+
*/
|
|
384
|
+
setSpeed(speed) {
|
|
385
|
+
this.transportFSM.setSpeed(speed);
|
|
386
|
+
}
|
|
387
|
+
startRecording() {
|
|
388
|
+
this.isRecording = true;
|
|
389
|
+
this.recordingStartFrame = this.transportFrame;
|
|
390
|
+
this.recordingChanged.emit(true);
|
|
391
|
+
this.startTransport();
|
|
392
|
+
}
|
|
393
|
+
stopRecording() {
|
|
394
|
+
this.isRecording = false;
|
|
395
|
+
this.recordingChanged.emit(false);
|
|
396
|
+
this.stopTransport(); // Usually stop recording stops transport too, or independent? standard DAW behavior is stop both.
|
|
397
|
+
}
|
|
398
|
+
// Metronome
|
|
399
|
+
toggleMetronome() {
|
|
400
|
+
this.metronomeEnabled = !this.metronomeEnabled;
|
|
401
|
+
this.metronomeChanged.emit(this.metronomeEnabled);
|
|
402
|
+
}
|
|
403
|
+
setMetronomeVolume(volume) {
|
|
404
|
+
this.metronomeVolume = Math.max(0, Math.min(1, volume));
|
|
405
|
+
this.metronomeVolumeChanged.emit(this.metronomeVolume);
|
|
406
|
+
}
|
|
407
|
+
addSource(source) {
|
|
408
|
+
if (!this._sources.has(source.id)) {
|
|
409
|
+
this._sources.set(source.id, source);
|
|
410
|
+
this.sourceAdded.emit(source);
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
removeSource(id) {
|
|
414
|
+
if (this._sources.has(id)) {
|
|
415
|
+
this._sources.delete(id);
|
|
416
|
+
// emit sourceRemoved?
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
getSource(id) {
|
|
420
|
+
return this._sources.get(id);
|
|
421
|
+
}
|
|
422
|
+
get sources() {
|
|
423
|
+
return this._sources;
|
|
424
|
+
}
|
|
425
|
+
getIO(id) {
|
|
426
|
+
// Check Master Bus
|
|
427
|
+
if (this.masterBus.input.id === id)
|
|
428
|
+
return this.masterBus.input;
|
|
429
|
+
if (this.masterBus.output.id === id)
|
|
430
|
+
return this.masterBus.output;
|
|
431
|
+
// Check Tracks
|
|
432
|
+
for (const track of this._tracks.values()) {
|
|
433
|
+
if (track.route.input.id === id)
|
|
434
|
+
return track.route.input;
|
|
435
|
+
if (track.route.output.id === id)
|
|
436
|
+
return track.route.output;
|
|
437
|
+
}
|
|
438
|
+
return undefined;
|
|
439
|
+
}
|
|
440
|
+
getExportConfig() {
|
|
441
|
+
if (!this._exportConfig) {
|
|
442
|
+
this._exportConfig = new ExportConfig();
|
|
443
|
+
this._exportConfig.sampleRate = this.sampleRate;
|
|
444
|
+
}
|
|
445
|
+
return this._exportConfig;
|
|
446
|
+
}
|
|
447
|
+
getExportStatus() {
|
|
448
|
+
if (!this._exportStatus) {
|
|
449
|
+
this._exportStatus = new ExportStatus();
|
|
450
|
+
}
|
|
451
|
+
return this._exportStatus;
|
|
452
|
+
}
|
|
453
|
+
getSessionDuration() {
|
|
454
|
+
let maxEnd = 0;
|
|
455
|
+
this.tracks.forEach(track => {
|
|
456
|
+
track.playlist.getRegions().forEach(region => {
|
|
457
|
+
maxEnd = Math.max(maxEnd, region.end);
|
|
458
|
+
});
|
|
459
|
+
track.playlist.getMidiRegions().forEach(midiRegion => {
|
|
460
|
+
maxEnd = Math.max(maxEnd, midiRegion.end);
|
|
461
|
+
});
|
|
462
|
+
});
|
|
463
|
+
return maxEnd;
|
|
464
|
+
}
|
|
465
|
+
// Region Selection
|
|
466
|
+
selectRegion(regionId, addToSelection = false) {
|
|
467
|
+
if (!addToSelection) {
|
|
468
|
+
this._selectedRegionIds.clear();
|
|
469
|
+
}
|
|
470
|
+
this._selectedRegionIds.add(regionId);
|
|
471
|
+
this.selectionChanged.emit(new Set(this._selectedRegionIds));
|
|
472
|
+
}
|
|
473
|
+
selectRegions(regionIds, addToSelection = false) {
|
|
474
|
+
if (!addToSelection) {
|
|
475
|
+
this._selectedRegionIds.clear();
|
|
476
|
+
}
|
|
477
|
+
for (const id of regionIds) {
|
|
478
|
+
this._selectedRegionIds.add(id);
|
|
479
|
+
}
|
|
480
|
+
this.selectionChanged.emit(new Set(this._selectedRegionIds));
|
|
481
|
+
}
|
|
482
|
+
deselectRegion(regionId) {
|
|
483
|
+
this._selectedRegionIds.delete(regionId);
|
|
484
|
+
this.selectionChanged.emit(new Set(this._selectedRegionIds));
|
|
485
|
+
}
|
|
486
|
+
clearSelection() {
|
|
487
|
+
this._selectedRegionIds.clear();
|
|
488
|
+
this.selectionChanged.emit(new Set(this._selectedRegionIds));
|
|
489
|
+
}
|
|
490
|
+
getSelectedRegionIds() {
|
|
491
|
+
return this._selectedRegionIds;
|
|
492
|
+
}
|
|
493
|
+
isRegionSelected(regionId) {
|
|
494
|
+
return this._selectedRegionIds.has(regionId);
|
|
495
|
+
}
|
|
496
|
+
// ─── Send Bus Management ──────────────────────────────────────────────────
|
|
497
|
+
addSendBus(sourceTrackId, destId, level = 0, preFader = false, id) {
|
|
498
|
+
const sendBusId = id !== null && id !== void 0 ? id : crypto.randomUUID();
|
|
499
|
+
const sendBus = new SendBus(sendBusId, sourceTrackId, destId, level, preFader);
|
|
500
|
+
this._sendBuses.set(sendBusId, sendBus);
|
|
501
|
+
this.sendBusAdded.emit(sendBus);
|
|
502
|
+
return sendBus;
|
|
503
|
+
}
|
|
504
|
+
removeSendBus(sendBusId) {
|
|
505
|
+
if (this._sendBuses.has(sendBusId)) {
|
|
506
|
+
this._sendBuses.delete(sendBusId);
|
|
507
|
+
this.sendBusRemoved.emit(sendBusId);
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
getSendBus(sendBusId) {
|
|
511
|
+
return this._sendBuses.get(sendBusId);
|
|
512
|
+
}
|
|
513
|
+
getSendBusesForTrack(sourceTrackId) {
|
|
514
|
+
return Array.from(this._sendBuses.values()).filter((sendBus) => sendBus.sourceTrackId === sourceTrackId);
|
|
515
|
+
}
|
|
516
|
+
get sendBuses() {
|
|
517
|
+
return Array.from(this._sendBuses.values());
|
|
518
|
+
}
|
|
519
|
+
// ─── Marker Management ─────────────────────────────────────────────────────
|
|
520
|
+
addMarker(name, position, color, id) {
|
|
521
|
+
const markerId = id !== null && id !== void 0 ? id : crypto.randomUUID();
|
|
522
|
+
const marker = new Marker(markerId, name, position, color);
|
|
523
|
+
this._markers.set(markerId, marker);
|
|
524
|
+
// Subscribe to marker changes
|
|
525
|
+
marker.changed.connect(() => {
|
|
526
|
+
this.markerChanged.emit(marker);
|
|
527
|
+
});
|
|
528
|
+
this.markerAdded.emit(marker);
|
|
529
|
+
return marker;
|
|
530
|
+
}
|
|
531
|
+
removeMarker(markerId) {
|
|
532
|
+
const marker = this._markers.get(markerId);
|
|
533
|
+
if (marker) {
|
|
534
|
+
marker.removed.emit();
|
|
535
|
+
this._markers.delete(markerId);
|
|
536
|
+
this.markerRemoved.emit(markerId);
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
getMarker(markerId) {
|
|
540
|
+
return this._markers.get(markerId);
|
|
541
|
+
}
|
|
542
|
+
get markers() {
|
|
543
|
+
return Array.from(this._markers.values()).sort((a, b) => a.position - b.position);
|
|
544
|
+
}
|
|
545
|
+
/**
|
|
546
|
+
* Find the next marker after the given position.
|
|
547
|
+
*/
|
|
548
|
+
getNextMarker(position) {
|
|
549
|
+
const sorted = this.markers;
|
|
550
|
+
return sorted.find(m => m.position > position);
|
|
551
|
+
}
|
|
552
|
+
/**
|
|
553
|
+
* Find the previous marker before the given position.
|
|
554
|
+
*/
|
|
555
|
+
getPreviousMarker(position) {
|
|
556
|
+
const sorted = this.markers;
|
|
557
|
+
for (let i = sorted.length - 1; i >= 0; i--) {
|
|
558
|
+
if (sorted[i].position < position)
|
|
559
|
+
return sorted[i];
|
|
560
|
+
}
|
|
561
|
+
return undefined;
|
|
562
|
+
}
|
|
563
|
+
// ─── Track Reorder ────────────────────────────────────────────────────────
|
|
564
|
+
reorderTrack(trackId, newIndex) {
|
|
565
|
+
const trackEntries = Array.from(this._tracks.entries());
|
|
566
|
+
const currentIndex = trackEntries.findIndex(([id]) => id === trackId);
|
|
567
|
+
if (currentIndex === -1) {
|
|
568
|
+
throw new Error(`Track not found: ${trackId}`);
|
|
569
|
+
}
|
|
570
|
+
if (newIndex < 0)
|
|
571
|
+
newIndex = 0;
|
|
572
|
+
if (newIndex >= trackEntries.length)
|
|
573
|
+
newIndex = trackEntries.length - 1;
|
|
574
|
+
if (currentIndex === newIndex)
|
|
575
|
+
return;
|
|
576
|
+
const [entry] = trackEntries.splice(currentIndex, 1);
|
|
577
|
+
trackEntries.splice(newIndex, 0, entry);
|
|
578
|
+
this._tracks.clear();
|
|
579
|
+
for (const [id, track] of trackEntries) {
|
|
580
|
+
this._tracks.set(id, track);
|
|
581
|
+
}
|
|
582
|
+
this.trackReordered.emit({ trackId, newIndex });
|
|
583
|
+
}
|
|
584
|
+
getTrackIndex(trackId) {
|
|
585
|
+
const keys = Array.from(this._tracks.keys());
|
|
586
|
+
return keys.indexOf(trackId);
|
|
587
|
+
}
|
|
588
|
+
// ─── Ripple Edit ──────────────────────────────────────────────────────────
|
|
589
|
+
setRippleEdit(enabled) {
|
|
590
|
+
if (this.rippleEdit === enabled)
|
|
591
|
+
return;
|
|
592
|
+
this.rippleEdit = enabled;
|
|
593
|
+
this.rippleEditChanged.emit(enabled);
|
|
594
|
+
}
|
|
595
|
+
// ─── Region Grouping ────────────────────────────────────────────────────
|
|
596
|
+
groupRegions(regionIds, name, id) {
|
|
597
|
+
const groupId = id !== null && id !== void 0 ? id : crypto.randomUUID();
|
|
598
|
+
const groupName = name !== null && name !== void 0 ? name : `Group ${this._regionGroups.size + 1}`;
|
|
599
|
+
const group = new RegionGroup(groupId, groupName, regionIds);
|
|
600
|
+
this._regionGroups.set(groupId, group);
|
|
601
|
+
this.regionGroupAdded.emit(group);
|
|
602
|
+
return groupId;
|
|
603
|
+
}
|
|
604
|
+
ungroupRegions(groupId) {
|
|
605
|
+
const group = this._regionGroups.get(groupId);
|
|
606
|
+
if (group) {
|
|
607
|
+
this._regionGroups.delete(groupId);
|
|
608
|
+
this.regionGroupRemoved.emit(groupId);
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
getRegionGroup(groupId) {
|
|
612
|
+
return this._regionGroups.get(groupId);
|
|
613
|
+
}
|
|
614
|
+
getRegionGroupForRegion(regionId) {
|
|
615
|
+
for (const group of this._regionGroups.values()) {
|
|
616
|
+
if (group.hasRegion(regionId))
|
|
617
|
+
return group;
|
|
618
|
+
}
|
|
619
|
+
return undefined;
|
|
620
|
+
}
|
|
621
|
+
get regionGroups() {
|
|
622
|
+
return Array.from(this._regionGroups.values());
|
|
623
|
+
}
|
|
624
|
+
// ─── Track Groups ────────────────────────────────────────────────────────
|
|
625
|
+
addTrackGroup(name, id) {
|
|
626
|
+
const groupId = id !== null && id !== void 0 ? id : crypto.randomUUID();
|
|
627
|
+
const group = new TrackGroup(groupId, name);
|
|
628
|
+
this._trackGroups.set(groupId, group);
|
|
629
|
+
this.trackGroupAdded.emit(group);
|
|
630
|
+
return group;
|
|
631
|
+
}
|
|
632
|
+
removeTrackGroup(groupId) {
|
|
633
|
+
const group = this._trackGroups.get(groupId);
|
|
634
|
+
if (group) {
|
|
635
|
+
// Clear groupId on member tracks
|
|
636
|
+
for (const trackId of group.memberTrackIds) {
|
|
637
|
+
const track = this.getTrack(trackId);
|
|
638
|
+
if (track)
|
|
639
|
+
track.groupId = null;
|
|
640
|
+
}
|
|
641
|
+
this._trackGroups.delete(groupId);
|
|
642
|
+
this.trackGroupRemoved.emit(groupId);
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
getTrackGroup(groupId) {
|
|
646
|
+
return this._trackGroups.get(groupId);
|
|
647
|
+
}
|
|
648
|
+
getTrackGroupForTrack(trackId) {
|
|
649
|
+
for (const group of this._trackGroups.values()) {
|
|
650
|
+
if (group.hasMember(trackId))
|
|
651
|
+
return group;
|
|
652
|
+
}
|
|
653
|
+
return undefined;
|
|
654
|
+
}
|
|
655
|
+
get trackGroups() {
|
|
656
|
+
return Array.from(this._trackGroups.values());
|
|
657
|
+
}
|
|
658
|
+
// ─── Folder Track Helpers ────────────────────────────────────────────────
|
|
659
|
+
getChildTracks(parentId) {
|
|
660
|
+
return this.tracks.filter(t => t.parentTrackId === parentId);
|
|
661
|
+
}
|
|
662
|
+
setTrackParent(trackId, parentId) {
|
|
663
|
+
const track = this.getTrack(trackId);
|
|
664
|
+
if (track) {
|
|
665
|
+
track.parentTrackId = parentId;
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
// ─── VCA Tracks ──────────────────────────────────────────────────────────
|
|
669
|
+
addVCATrack(name, id) {
|
|
670
|
+
const vcaId = id !== null && id !== void 0 ? id : crypto.randomUUID();
|
|
671
|
+
const vca = new VCATrack(vcaId, name);
|
|
672
|
+
this._vcaTracks.set(vcaId, vca);
|
|
673
|
+
this.vcaTrackAdded.emit(vca);
|
|
674
|
+
return vca;
|
|
675
|
+
}
|
|
676
|
+
removeVCATrack(vcaId) {
|
|
677
|
+
if (this._vcaTracks.has(vcaId)) {
|
|
678
|
+
this._vcaTracks.delete(vcaId);
|
|
679
|
+
this.vcaTrackRemoved.emit(vcaId);
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
getVCATrack(vcaId) {
|
|
683
|
+
return this._vcaTracks.get(vcaId);
|
|
684
|
+
}
|
|
685
|
+
get vcaTracks() {
|
|
686
|
+
return Array.from(this._vcaTracks.values());
|
|
687
|
+
}
|
|
688
|
+
// ─── Sidechain Configs ──────────────────────────────────────────────────
|
|
689
|
+
addSidechainConfig(targetTrackId, targetProcessorId, id) {
|
|
690
|
+
const configId = id !== null && id !== void 0 ? id : crypto.randomUUID();
|
|
691
|
+
const config = new SidechainConfig(configId, targetTrackId, targetProcessorId);
|
|
692
|
+
this._sidechainConfigs.set(configId, config);
|
|
693
|
+
return config;
|
|
694
|
+
}
|
|
695
|
+
removeSidechainConfig(configId) {
|
|
696
|
+
this._sidechainConfigs.delete(configId);
|
|
697
|
+
}
|
|
698
|
+
getSidechainConfig(configId) {
|
|
699
|
+
return this._sidechainConfigs.get(configId);
|
|
700
|
+
}
|
|
701
|
+
getSidechainConfigsForTrack(trackId) {
|
|
702
|
+
return Array.from(this._sidechainConfigs.values()).filter(c => c.targetTrackId === trackId);
|
|
703
|
+
}
|
|
704
|
+
// ─── Take Lanes ─────────────────────────────────────────────────────────
|
|
705
|
+
addTakeLane(trackId, id) {
|
|
706
|
+
const laneId = id !== null && id !== void 0 ? id : crypto.randomUUID();
|
|
707
|
+
const lane = new TakeLane(laneId, trackId);
|
|
708
|
+
this._takeLanes.set(laneId, lane);
|
|
709
|
+
return lane;
|
|
710
|
+
}
|
|
711
|
+
removeTakeLane(laneId) {
|
|
712
|
+
this._takeLanes.delete(laneId);
|
|
713
|
+
}
|
|
714
|
+
getTakeLane(laneId) {
|
|
715
|
+
return this._takeLanes.get(laneId);
|
|
716
|
+
}
|
|
717
|
+
getTakeLanesForTrack(trackId) {
|
|
718
|
+
return Array.from(this._takeLanes.values()).filter(l => l.trackId === trackId);
|
|
719
|
+
}
|
|
720
|
+
// ─── CD Markers ─────────────────────────────────────────────────────────
|
|
721
|
+
addCDMarker(index, title, position, performer, isrc, id) {
|
|
722
|
+
const markerId = id !== null && id !== void 0 ? id : crypto.randomUUID();
|
|
723
|
+
const marker = new CDMarker(markerId, index, title, position, performer, isrc);
|
|
724
|
+
this._cdMarkers.set(markerId, marker);
|
|
725
|
+
this.cdMarkerAdded.emit(marker);
|
|
726
|
+
return marker;
|
|
727
|
+
}
|
|
728
|
+
removeCDMarker(markerId) {
|
|
729
|
+
if (this._cdMarkers.has(markerId)) {
|
|
730
|
+
this._cdMarkers.delete(markerId);
|
|
731
|
+
this.cdMarkerRemoved.emit(markerId);
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
getCDMarker(markerId) {
|
|
735
|
+
return this._cdMarkers.get(markerId);
|
|
736
|
+
}
|
|
737
|
+
get cdMarkers() {
|
|
738
|
+
return Array.from(this._cdMarkers.values()).sort((a, b) => a.index - b.index);
|
|
739
|
+
}
|
|
740
|
+
// ─── Serialization ────────────────────────────────────────────────────────
|
|
741
|
+
/**
|
|
742
|
+
* 세션 전체 상태를 JSON-직렬화 가능한 객체로 변환합니다.
|
|
743
|
+
*/
|
|
744
|
+
toJSON() {
|
|
745
|
+
return {
|
|
746
|
+
id: this.id,
|
|
747
|
+
name: this.name,
|
|
748
|
+
sampleRate: this.sampleRate,
|
|
749
|
+
tempo: this.tempo,
|
|
750
|
+
timeSignature: this.timeSignature,
|
|
751
|
+
transportFrame: this.transportFrame,
|
|
752
|
+
tracks: this.tracks.map(t => ({
|
|
753
|
+
id: t.id,
|
|
754
|
+
name: t.name,
|
|
755
|
+
type: t.type,
|
|
756
|
+
armed: t.armed,
|
|
757
|
+
mute: t.mute,
|
|
758
|
+
solo: t.solo,
|
|
759
|
+
color: t.color,
|
|
760
|
+
soloIsolate: t.soloIsolate,
|
|
761
|
+
soloSafe: t.soloSafe,
|
|
762
|
+
monitorMode: t.monitorMode,
|
|
763
|
+
trimGain: t.trimGain,
|
|
764
|
+
comment: t.comment,
|
|
765
|
+
regions: t.playlist.getRegions().map(r => ({
|
|
766
|
+
id: r.id,
|
|
767
|
+
sourceId: r.sourceId,
|
|
768
|
+
name: r.name,
|
|
769
|
+
start: r.start,
|
|
770
|
+
length: r.length,
|
|
771
|
+
sourceStart: r.sourceStart,
|
|
772
|
+
gain: r.gain,
|
|
773
|
+
muted: r.muted,
|
|
774
|
+
layer: r.layer,
|
|
775
|
+
fadeIn: r.fadeIn,
|
|
776
|
+
fadeOut: r.fadeOut,
|
|
777
|
+
playbackRate: r.playbackRate,
|
|
778
|
+
timeDomain: r.timeDomain,
|
|
779
|
+
locked: r.locked,
|
|
780
|
+
})),
|
|
781
|
+
midiRegions: t.playlist.getMidiRegions().map(mr => mr.toJSON()),
|
|
782
|
+
})),
|
|
783
|
+
ranges: Array.from(this._ranges.values()).map(r => ({
|
|
784
|
+
id: r.id,
|
|
785
|
+
name: r.name,
|
|
786
|
+
start: r.start,
|
|
787
|
+
end: r.end,
|
|
788
|
+
})),
|
|
789
|
+
sendBuses: Array.from(this._sendBuses.values()).map(sb => ({
|
|
790
|
+
id: sb.id,
|
|
791
|
+
sourceTrackId: sb.sourceTrackId,
|
|
792
|
+
destId: sb.destId,
|
|
793
|
+
level: sb.level,
|
|
794
|
+
preFader: sb.preFader,
|
|
795
|
+
active: sb.active,
|
|
796
|
+
})),
|
|
797
|
+
markers: Array.from(this._markers.values()).map(m => ({
|
|
798
|
+
id: m.id,
|
|
799
|
+
name: m.name,
|
|
800
|
+
position: m.position,
|
|
801
|
+
color: m.color,
|
|
802
|
+
locked: m.locked,
|
|
803
|
+
})),
|
|
804
|
+
loopRangeId: this.loopRangeId,
|
|
805
|
+
loopEnabled: this.loopEnabled,
|
|
806
|
+
punchRangeId: this.punchRangeId,
|
|
807
|
+
punchEnabled: this.punchEnabled,
|
|
808
|
+
preRollBars: this.preRollBars,
|
|
809
|
+
loopRecordingEnabled: this.loopRecordingEnabled,
|
|
810
|
+
rippleEdit: this.rippleEdit,
|
|
811
|
+
regionGroups: Array.from(this._regionGroups.values()).map(g => ({
|
|
812
|
+
id: g.id,
|
|
813
|
+
name: g.name,
|
|
814
|
+
regionIds: g.getRegionIds(),
|
|
815
|
+
})),
|
|
816
|
+
tempoMapEvents: this.tempoMap.getAllEvents().map(e => ({
|
|
817
|
+
frame: e.frame,
|
|
818
|
+
bpm: e.bpm,
|
|
819
|
+
timeSigNum: e.timeSigNum,
|
|
820
|
+
timeSigDen: e.timeSigDen,
|
|
821
|
+
})),
|
|
822
|
+
mixerScenes: this.mixerSceneManager.toJSON(),
|
|
823
|
+
trackGroups2: Array.from(this._trackGroups.values()).map(g => g.toJSON()),
|
|
824
|
+
cdMarkers: Array.from(this._cdMarkers.values()).map(m => m.toJSON()),
|
|
825
|
+
vcaTracks: Array.from(this._vcaTracks.values()).map(v => v.toJSON()),
|
|
826
|
+
sidechainConfigs: Array.from(this._sidechainConfigs.values()).map(c => c.toJSON()),
|
|
827
|
+
takeLanes: Array.from(this._takeLanes.values()).map(lane => ({
|
|
828
|
+
id: lane.id,
|
|
829
|
+
trackId: lane.trackId,
|
|
830
|
+
takes: lane.takes.map(t => t.toJSON()),
|
|
831
|
+
})),
|
|
832
|
+
};
|
|
833
|
+
}
|
|
834
|
+
/**
|
|
835
|
+
* JSON 스냅샷으로부터 Session을 복원합니다.
|
|
836
|
+
* 트랙, 리전, Range, SendBus를 복원하지만 Signal 연결(AudioEngine)은 별도로 처리해야 합니다.
|
|
837
|
+
*/
|
|
838
|
+
static fromJSON(snapshot) {
|
|
839
|
+
var _a, _b, _c, _d;
|
|
840
|
+
const session = new Session(snapshot.name, snapshot.id, snapshot.sampleRate);
|
|
841
|
+
session.tempo = snapshot.tempo;
|
|
842
|
+
session.timeSignature = snapshot.timeSignature;
|
|
843
|
+
session.transportFrame = snapshot.transportFrame;
|
|
844
|
+
// Restore Tracks + Regions
|
|
845
|
+
for (const trackData of snapshot.tracks) {
|
|
846
|
+
const track = session.addTrack(trackData.name, trackData.type, trackData.id);
|
|
847
|
+
track.armed = trackData.armed;
|
|
848
|
+
track.mute = trackData.mute;
|
|
849
|
+
track.solo = trackData.solo;
|
|
850
|
+
if (trackData.color)
|
|
851
|
+
track.color = trackData.color;
|
|
852
|
+
if (trackData.soloIsolate)
|
|
853
|
+
track.setSoloIsolate(trackData.soloIsolate);
|
|
854
|
+
if (trackData.soloSafe)
|
|
855
|
+
track.setSoloSafe(trackData.soloSafe);
|
|
856
|
+
if (trackData.monitorMode)
|
|
857
|
+
track.setMonitorMode(trackData.monitorMode);
|
|
858
|
+
if (trackData.trimGain !== undefined)
|
|
859
|
+
track.setTrimGain(trackData.trimGain);
|
|
860
|
+
if (trackData.comment !== undefined)
|
|
861
|
+
track.comment = trackData.comment;
|
|
862
|
+
for (const regionData of trackData.regions) {
|
|
863
|
+
const region = new Region(regionData.id, regionData.sourceId, regionData.start, regionData.length, regionData.sourceStart, regionData.name, regionData.layer);
|
|
864
|
+
region.gain = regionData.gain;
|
|
865
|
+
region.muted = regionData.muted;
|
|
866
|
+
region.fadeIn = regionData.fadeIn;
|
|
867
|
+
region.fadeOut = regionData.fadeOut;
|
|
868
|
+
region.playbackRate = regionData.playbackRate;
|
|
869
|
+
region.timeDomain = regionData.timeDomain;
|
|
870
|
+
if (regionData.locked)
|
|
871
|
+
region.locked = regionData.locked;
|
|
872
|
+
track.playlist.addRegion(region);
|
|
873
|
+
}
|
|
874
|
+
// Restore MIDI Regions
|
|
875
|
+
if (trackData.midiRegions) {
|
|
876
|
+
for (const midiRegionData of trackData.midiRegions) {
|
|
877
|
+
const midiRegion = MidiRegion.fromJSON(midiRegionData);
|
|
878
|
+
track.playlist.addMidiRegion(midiRegion);
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
// Restore Ranges
|
|
883
|
+
for (const rangeData of snapshot.ranges) {
|
|
884
|
+
const range = new Range(rangeData.id, rangeData.name, rangeData.start, rangeData.end);
|
|
885
|
+
session._ranges.set(range.id, range);
|
|
886
|
+
}
|
|
887
|
+
// Restore SendBuses (no signal emission – backend will sync via re-add on session load)
|
|
888
|
+
for (const sbData of snapshot.sendBuses) {
|
|
889
|
+
const sb = new SendBus(sbData.id, sbData.sourceTrackId, sbData.destId, sbData.level, sbData.preFader);
|
|
890
|
+
session._sendBuses.set(sb.id, sb);
|
|
891
|
+
}
|
|
892
|
+
// Restore Markers
|
|
893
|
+
if (snapshot.markers) {
|
|
894
|
+
for (const markerData of snapshot.markers) {
|
|
895
|
+
const marker = new Marker(markerData.id, markerData.name, markerData.position, markerData.color, markerData.locked);
|
|
896
|
+
session._markers.set(marker.id, marker);
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
session.loopRangeId = snapshot.loopRangeId;
|
|
900
|
+
session.loopEnabled = snapshot.loopEnabled;
|
|
901
|
+
session.punchRangeId = snapshot.punchRangeId;
|
|
902
|
+
session.punchEnabled = (_a = snapshot.punchEnabled) !== null && _a !== void 0 ? _a : false;
|
|
903
|
+
session.preRollBars = (_b = snapshot.preRollBars) !== null && _b !== void 0 ? _b : 0;
|
|
904
|
+
session.loopRecordingEnabled = (_c = snapshot.loopRecordingEnabled) !== null && _c !== void 0 ? _c : false;
|
|
905
|
+
session.rippleEdit = (_d = snapshot.rippleEdit) !== null && _d !== void 0 ? _d : false;
|
|
906
|
+
// Restore Region Groups
|
|
907
|
+
if (snapshot.regionGroups) {
|
|
908
|
+
for (const groupData of snapshot.regionGroups) {
|
|
909
|
+
const group = new RegionGroup(groupData.id, groupData.name, groupData.regionIds);
|
|
910
|
+
session._regionGroups.set(group.id, group);
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
// Restore Tempo Map Events
|
|
914
|
+
if (snapshot.tempoMapEvents) {
|
|
915
|
+
for (const eventData of snapshot.tempoMapEvents) {
|
|
916
|
+
session.tempoMap.addTempoChange(eventData.frame, eventData.bpm, eventData.timeSigNum, eventData.timeSigDen);
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
// Restore Mixer Scenes
|
|
920
|
+
if (snapshot.mixerScenes) {
|
|
921
|
+
session.mixerSceneManager.loadFromJSON(snapshot.mixerScenes);
|
|
922
|
+
}
|
|
923
|
+
// Restore Track Groups (Phase 10)
|
|
924
|
+
if (snapshot.trackGroups2) {
|
|
925
|
+
for (const groupData of snapshot.trackGroups2) {
|
|
926
|
+
const group = TrackGroup.fromJSON(groupData);
|
|
927
|
+
session._trackGroups.set(group.id, group);
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
// Restore CD Markers (Phase 12)
|
|
931
|
+
if (snapshot.cdMarkers) {
|
|
932
|
+
for (const markerData of snapshot.cdMarkers) {
|
|
933
|
+
const cdMarker = CDMarker.fromJSON(markerData);
|
|
934
|
+
session._cdMarkers.set(cdMarker.id, cdMarker);
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
// Restore VCA Tracks (Phase 10-4)
|
|
938
|
+
if (snapshot.vcaTracks) {
|
|
939
|
+
for (const vcaData of snapshot.vcaTracks) {
|
|
940
|
+
const vca = VCATrack.fromJSON(vcaData);
|
|
941
|
+
session._vcaTracks.set(vca.id, vca);
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
// Restore Sidechain Configs (Phase 12-3)
|
|
945
|
+
if (snapshot.sidechainConfigs) {
|
|
946
|
+
for (const scData of snapshot.sidechainConfigs) {
|
|
947
|
+
const config = SidechainConfig.fromJSON(scData);
|
|
948
|
+
session._sidechainConfigs.set(config.id, config);
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
// Restore Take Lanes (Phase 9-4)
|
|
952
|
+
if (snapshot.takeLanes) {
|
|
953
|
+
for (const laneData of snapshot.takeLanes) {
|
|
954
|
+
const lane = new TakeLane(laneData.id, laneData.trackId);
|
|
955
|
+
for (const takeData of laneData.takes) {
|
|
956
|
+
const take = Take.fromJSON(takeData);
|
|
957
|
+
lane.addTake(take);
|
|
958
|
+
}
|
|
959
|
+
session._takeLanes.set(lane.id, lane);
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
return session;
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
//# sourceMappingURL=Session.js.map
|