@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,798 @@
|
|
|
1
|
+
import { Session } from '../domain/Session';
|
|
2
|
+
import { TrackType } from '../domain/Track';
|
|
3
|
+
import { Region } from '../domain/Region';
|
|
4
|
+
import { MidiRegion } from '../domain/MidiRegion';
|
|
5
|
+
import { MidiNote } from '../domain/MidiNote';
|
|
6
|
+
import { MidiInput } from '../midi/MidiInput';
|
|
7
|
+
import { GainProcessor } from '../processing/GainProcessor';
|
|
8
|
+
import { PanProcessor } from '../processing/PanProcessor';
|
|
9
|
+
import { PolarityProcessor } from '../processing/PolarityProcessor';
|
|
10
|
+
import { SendProcessor } from '../processing/SendProcessor';
|
|
11
|
+
import { MeterProcessor } from '../processing/MeterProcessor';
|
|
12
|
+
import { PluginInsert } from '../processing/PluginInsert';
|
|
13
|
+
export class AudioEngine {
|
|
14
|
+
constructor(backend) {
|
|
15
|
+
this.midiRecordingNotes = new Map();
|
|
16
|
+
this.midiRecordedNotes = [];
|
|
17
|
+
this.midiNoteOnSub = null;
|
|
18
|
+
this.midiNoteOffSub = null;
|
|
19
|
+
this.syncId = null;
|
|
20
|
+
this.session = new Session(crypto.randomUUID(), 'Untitled Session');
|
|
21
|
+
this.backend = backend;
|
|
22
|
+
this.midiInput = MidiInput.getInstance();
|
|
23
|
+
this.setupSessionListeners();
|
|
24
|
+
}
|
|
25
|
+
static getInstance(backend) {
|
|
26
|
+
if (!AudioEngine.instance) {
|
|
27
|
+
if (!backend)
|
|
28
|
+
throw new Error('AudioEngine requires a backend on first initialization');
|
|
29
|
+
AudioEngine.instance = new AudioEngine(backend);
|
|
30
|
+
}
|
|
31
|
+
return AudioEngine.instance;
|
|
32
|
+
}
|
|
33
|
+
/** Reset the singleton instance. For testing only. */
|
|
34
|
+
static resetInstance() {
|
|
35
|
+
AudioEngine.instance = undefined;
|
|
36
|
+
}
|
|
37
|
+
setBackend(backend) {
|
|
38
|
+
this.backend = backend;
|
|
39
|
+
// Re-setup listeners/state if backend changes (omitted for brevity)
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Pre-cache a decoded AudioBuffer so subsequent addSource/getAudioBuffer
|
|
43
|
+
* calls for the same URL hit the cache instead of re-fetching.
|
|
44
|
+
* Useful when the source was loaded from a blob URL that will be revoked.
|
|
45
|
+
*/
|
|
46
|
+
precacheAudioBuffer(url, buffer) {
|
|
47
|
+
this.backend.addAudioBuffer(url, buffer);
|
|
48
|
+
}
|
|
49
|
+
getEngineType() {
|
|
50
|
+
return this.backend.getEngineType();
|
|
51
|
+
}
|
|
52
|
+
getCurrentTime() {
|
|
53
|
+
return this.backend.getCurrentTime();
|
|
54
|
+
}
|
|
55
|
+
getCurrentFrame() {
|
|
56
|
+
return this.backend.getCurrentFrame();
|
|
57
|
+
}
|
|
58
|
+
seek(time) {
|
|
59
|
+
this.backend.seek(time);
|
|
60
|
+
// Sync session transport frame immediately
|
|
61
|
+
// This ensures that commands (like SplitAtPlayhead) relying on session.transportFrame
|
|
62
|
+
// have the correct position even when the transport is paused.
|
|
63
|
+
const frame = Math.floor(time * this.session.sampleRate);
|
|
64
|
+
this.session.locateTransport(frame);
|
|
65
|
+
}
|
|
66
|
+
updateRegion(trackId, region) {
|
|
67
|
+
const _dto = Object.assign(Object.assign({}, region), { end: region.end || (region.start + region.length), timeDomain: region.timeDomain });
|
|
68
|
+
// Re-sync all regions for the track to ensure consistency
|
|
69
|
+
const track = this.session.getTrack(trackId);
|
|
70
|
+
if (track) {
|
|
71
|
+
const regions = track.playlist.getRegions();
|
|
72
|
+
const regionsDTO = regions.map(r => (Object.assign(Object.assign({}, r), { end: r.end, timeDomain: r.timeDomain })));
|
|
73
|
+
this.backend.updateRegions(trackId, regionsDTO);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
setupSessionListeners() {
|
|
77
|
+
// Register Master Bus IO with backend
|
|
78
|
+
const masterBus = this.session.masterBus;
|
|
79
|
+
this.backend.registerMasterIO(masterBus.input.id, masterBus.output.id);
|
|
80
|
+
// Sync master bus processors
|
|
81
|
+
masterBus.processors.forEach((proc, index) => {
|
|
82
|
+
const type = this.getProcessorType(proc);
|
|
83
|
+
this.backend.addMasterProcessor(proc.id, type, index);
|
|
84
|
+
this.connectMasterProcessorSignals(proc);
|
|
85
|
+
});
|
|
86
|
+
masterBus.processorAdded.connect((proc) => {
|
|
87
|
+
const index = masterBus.processors.indexOf(proc);
|
|
88
|
+
const type = this.getProcessorType(proc);
|
|
89
|
+
this.backend.addMasterProcessor(proc.id, type, index);
|
|
90
|
+
this.connectMasterProcessorSignals(proc);
|
|
91
|
+
});
|
|
92
|
+
masterBus.processorRemoved.connect((procId) => {
|
|
93
|
+
this.backend.removeMasterProcessor(procId);
|
|
94
|
+
});
|
|
95
|
+
// Track Added: Sync backend and subscribe to processor signals
|
|
96
|
+
this.session.trackAdded.connect((track) => {
|
|
97
|
+
// Use the appropriate backend method based on track type
|
|
98
|
+
if (track.type === TrackType.AUX) {
|
|
99
|
+
this.backend.createAuxTrack(track.id, track.name, track.route.input.id, track.route.output.id);
|
|
100
|
+
}
|
|
101
|
+
else if (track.type === TrackType.BUS) {
|
|
102
|
+
this.backend.createBusTrack(track.id, track.name, track.route.input.id, track.route.output.id);
|
|
103
|
+
}
|
|
104
|
+
else if (track.type === TrackType.MIDI) {
|
|
105
|
+
this.backend.createMidiTrack(track.id, track.name, track.route.input.id, track.route.output.id);
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
this.backend.createTrack(track.id, track.name, track.route.input.id, track.route.output.id);
|
|
109
|
+
}
|
|
110
|
+
// Sync initial processors
|
|
111
|
+
track.route.processors.forEach((proc, index) => {
|
|
112
|
+
const type = this.getProcessorType(proc);
|
|
113
|
+
this.backend.addProcessor(track.id, proc.id, type, index);
|
|
114
|
+
this.connectProcessorSignals(track.id, proc);
|
|
115
|
+
});
|
|
116
|
+
// Listen for Processor Graph Changes
|
|
117
|
+
track.route.processorAdded.connect((proc) => {
|
|
118
|
+
// Find index
|
|
119
|
+
const index = track.route.processors.indexOf(proc);
|
|
120
|
+
const type = this.getProcessorType(proc);
|
|
121
|
+
this.backend.addProcessor(track.id, proc.id, type, index);
|
|
122
|
+
this.connectProcessorSignals(track.id, proc);
|
|
123
|
+
});
|
|
124
|
+
track.route.processorRemoved.connect((procId) => {
|
|
125
|
+
this.backend.removeProcessor(track.id, procId);
|
|
126
|
+
});
|
|
127
|
+
// Listen for Playlist Changes
|
|
128
|
+
track.playlist.regionAdded.connect((region) => {
|
|
129
|
+
const dto = Object.assign(Object.assign({}, region), { end: region.end, timeDomain: region.timeDomain });
|
|
130
|
+
this.backend.scheduleRegion(track.id, dto);
|
|
131
|
+
});
|
|
132
|
+
track.playlist.regionRemoved.connect((regionId) => {
|
|
133
|
+
// this.backend.removeRegion(track.id, regionId);
|
|
134
|
+
// Note: ToneAudioProvider implementation of removeRegion is empty/TODO, but we should call it.
|
|
135
|
+
this.backend.removeRegion(track.id, regionId);
|
|
136
|
+
});
|
|
137
|
+
// Fix 4: Region changed (ripple edit, move, resize, etc.)
|
|
138
|
+
track.playlist.regionChanged.connect((region) => {
|
|
139
|
+
this.updateRegion(track.id, region);
|
|
140
|
+
});
|
|
141
|
+
// Listen for MIDI Playlist Changes
|
|
142
|
+
track.playlist.midiRegionAdded.connect((midiRegion) => {
|
|
143
|
+
const dto = {
|
|
144
|
+
id: midiRegion.id,
|
|
145
|
+
name: midiRegion.name,
|
|
146
|
+
start: midiRegion.start,
|
|
147
|
+
length: midiRegion.length,
|
|
148
|
+
end: midiRegion.end,
|
|
149
|
+
muted: midiRegion.muted,
|
|
150
|
+
notes: midiRegion.getNotes().map(n => ({
|
|
151
|
+
id: n.id,
|
|
152
|
+
pitch: n.pitch,
|
|
153
|
+
velocity: n.velocity,
|
|
154
|
+
startFrame: n.startFrame,
|
|
155
|
+
durationFrames: n.durationFrames,
|
|
156
|
+
channel: n.channel,
|
|
157
|
+
})),
|
|
158
|
+
};
|
|
159
|
+
this.backend.scheduleMidiRegion(track.id, dto);
|
|
160
|
+
});
|
|
161
|
+
track.playlist.midiRegionRemoved.connect((regionId) => {
|
|
162
|
+
this.backend.removeMidiRegion(track.id, regionId);
|
|
163
|
+
});
|
|
164
|
+
this.bindTrackSignals(track);
|
|
165
|
+
});
|
|
166
|
+
// Track Removed: Sync backend
|
|
167
|
+
this.session.trackRemoved.connect((trackId) => {
|
|
168
|
+
this.backend.deleteTrack(trackId);
|
|
169
|
+
});
|
|
170
|
+
// Metronome Signals
|
|
171
|
+
this.session.metronomeChanged.connect((enabled) => {
|
|
172
|
+
this.backend.enableMetronome(enabled);
|
|
173
|
+
});
|
|
174
|
+
this.session.metronomeVolumeChanged.connect((volume) => {
|
|
175
|
+
this.backend.setMetronomeVolume(volume);
|
|
176
|
+
});
|
|
177
|
+
// Tempo Signal
|
|
178
|
+
this.session.tempoChanged.connect((bpm) => {
|
|
179
|
+
this.backend.setTempo(bpm);
|
|
180
|
+
// Update all regions on all tracks with new DTO (includes playbackRate)
|
|
181
|
+
this.session.tracks.forEach(track => {
|
|
182
|
+
const regions = track.playlist.getRegions();
|
|
183
|
+
const regionsDTO = regions.map(r => (Object.assign(Object.assign({}, r), { end: r.end, timeDomain: r.timeDomain })));
|
|
184
|
+
this.backend.updateRegions(track.id, regionsDTO);
|
|
185
|
+
});
|
|
186
|
+
});
|
|
187
|
+
// Source Added
|
|
188
|
+
this.session.sourceAdded.connect((source) => {
|
|
189
|
+
this.backend.addSource(source);
|
|
190
|
+
});
|
|
191
|
+
// Send Bus Signals
|
|
192
|
+
this.session.sendBusAdded.connect((sendBus) => {
|
|
193
|
+
this.backend.addSendBus(sendBus.id, sendBus.sourceTrackId, sendBus.destId, sendBus.level, sendBus.preFader);
|
|
194
|
+
// Subscribe to level changes
|
|
195
|
+
sendBus.levelChanged.connect((levelDb) => {
|
|
196
|
+
this.backend.setSendBusLevel(sendBus.id, levelDb);
|
|
197
|
+
});
|
|
198
|
+
// Subscribe to preFader changes
|
|
199
|
+
sendBus.preFaderChanged.connect((preFader) => {
|
|
200
|
+
this.backend.setSendBusPreFader(sendBus.id, preFader);
|
|
201
|
+
});
|
|
202
|
+
// Subscribe to active changes
|
|
203
|
+
sendBus.activeChanged.connect((active) => {
|
|
204
|
+
this.backend.setSendBusActive(sendBus.id, active);
|
|
205
|
+
});
|
|
206
|
+
});
|
|
207
|
+
this.session.sendBusRemoved.connect((sendBusId) => {
|
|
208
|
+
this.backend.removeSendBus(sendBusId);
|
|
209
|
+
});
|
|
210
|
+
// Monitor Changed Setup (Initial tracks)
|
|
211
|
+
this.session.tracks.forEach(t => {
|
|
212
|
+
this.bindTrackSignals(t);
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
bindTrackSignals(track) {
|
|
216
|
+
if (track.monitorChanged) {
|
|
217
|
+
track.monitorChanged.connect((enabled) => {
|
|
218
|
+
this.backend.setMonitor(track.id, enabled);
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
// Mute / Solo
|
|
222
|
+
track.muteChanged.connect((muted) => {
|
|
223
|
+
this.backend.setTrackMute(track.id, muted);
|
|
224
|
+
});
|
|
225
|
+
track.soloChanged.connect((soloed) => {
|
|
226
|
+
this.backend.setTrackSolo(track.id, soloed);
|
|
227
|
+
});
|
|
228
|
+
// Solo Isolate / Solo Safe
|
|
229
|
+
track.soloIsolateChanged.connect((isolate) => {
|
|
230
|
+
this.backend.setTrackSoloIsolate(track.id, isolate);
|
|
231
|
+
});
|
|
232
|
+
track.soloSafeChanged.connect((safe) => {
|
|
233
|
+
this.backend.setTrackSoloSafe(track.id, safe);
|
|
234
|
+
});
|
|
235
|
+
// Monitor Mode
|
|
236
|
+
track.monitorModeChanged.connect((mode) => {
|
|
237
|
+
this.backend.setMonitorMode(track.id, mode);
|
|
238
|
+
});
|
|
239
|
+
// IO Signals
|
|
240
|
+
if (track.route) {
|
|
241
|
+
const route = track.route;
|
|
242
|
+
// Listen to Input connections (if Input acts as a destination, it might not emit connected? Input usually IS a destination)
|
|
243
|
+
// IO.connected emits when *this* IO connects TO something.
|
|
244
|
+
// Output connects TO Input.
|
|
245
|
+
// So we listen to output.connected.
|
|
246
|
+
if (route.output && route.output.connected) {
|
|
247
|
+
route.output.connected.connect((destId) => {
|
|
248
|
+
this.backend.connectIO(route.output.id, destId);
|
|
249
|
+
});
|
|
250
|
+
route.output.disconnected.connect((destId) => {
|
|
251
|
+
this.backend.disconnectIO(route.output.id, destId);
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
// If we allow Input to connect to something (e.g. internal routing?), listen there too.
|
|
255
|
+
// But usually Input is a sink.
|
|
256
|
+
// However, IO class is generic.
|
|
257
|
+
if (route.input && route.input.connected) {
|
|
258
|
+
route.input.connected.connect((destId) => {
|
|
259
|
+
this.backend.connectIO(route.input.id, destId);
|
|
260
|
+
});
|
|
261
|
+
route.input.disconnected.connect((destId) => {
|
|
262
|
+
this.backend.disconnectIO(route.input.id, destId);
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
getProcessorType(proc) {
|
|
268
|
+
if (proc instanceof GainProcessor) {
|
|
269
|
+
return proc.name === 'Trim' ? 'Trim' : 'Fader';
|
|
270
|
+
}
|
|
271
|
+
if (proc instanceof PanProcessor)
|
|
272
|
+
return 'Panner';
|
|
273
|
+
if (proc instanceof PolarityProcessor)
|
|
274
|
+
return 'Polarity';
|
|
275
|
+
if (proc instanceof SendProcessor)
|
|
276
|
+
return 'Send';
|
|
277
|
+
if (proc instanceof MeterProcessor)
|
|
278
|
+
return 'Meter';
|
|
279
|
+
if (proc instanceof PluginInsert)
|
|
280
|
+
return `Insert: ${proc.plugin.name}`;
|
|
281
|
+
return 'Unknown';
|
|
282
|
+
}
|
|
283
|
+
connectMasterProcessorSignals(proc) {
|
|
284
|
+
if (proc instanceof GainProcessor) {
|
|
285
|
+
proc.gainChanged.connect((val) => {
|
|
286
|
+
this.backend.setMasterGain(val);
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
if (proc instanceof PluginInsert && proc.plugin && proc.plugin.parameterChanged) {
|
|
290
|
+
proc.plugin.parameterChanged.connect(({ id, value }) => {
|
|
291
|
+
this.backend.setMasterProcessorParameter(proc.id, id, value);
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
connectProcessorSignals(trackId, proc) {
|
|
296
|
+
if (proc instanceof GainProcessor) {
|
|
297
|
+
proc.gainChanged.connect((val) => {
|
|
298
|
+
this.backend.setProcessorParameter(trackId, proc.id, 'gain', val);
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
if (proc instanceof PanProcessor) {
|
|
302
|
+
proc.panChanged.connect((val) => {
|
|
303
|
+
this.backend.setProcessorParameter(trackId, proc.id, 'pan', val);
|
|
304
|
+
});
|
|
305
|
+
proc.widthChanged.connect((val) => {
|
|
306
|
+
this.backend.setProcessorParameter(trackId, proc.id, 'width', val);
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
if (proc instanceof PolarityProcessor) {
|
|
310
|
+
proc.polarityChanged.connect((inverted) => {
|
|
311
|
+
this.backend.setProcessorParameter(trackId, proc.id, 'polarity', inverted ? 1 : 0);
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
if (proc instanceof SendProcessor) {
|
|
315
|
+
proc.levelChanged.connect((val) => {
|
|
316
|
+
this.backend.setProcessorParameter(trackId, proc.id, 'level', val);
|
|
317
|
+
});
|
|
318
|
+
proc.preFaderChanged.connect((preFader) => {
|
|
319
|
+
this.backend.setProcessorParameter(trackId, proc.id, 'preFader', preFader ? 1 : 0);
|
|
320
|
+
});
|
|
321
|
+
proc.muteChanged.connect((muted) => {
|
|
322
|
+
this.backend.setProcessorParameter(trackId, proc.id, 'muted', muted ? 1 : 0);
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
// Plugin Signals
|
|
326
|
+
if (proc instanceof PluginInsert && proc.plugin && proc.plugin.parameterChanged) {
|
|
327
|
+
proc.plugin.parameterChanged.connect(({ id, value }) => {
|
|
328
|
+
this.backend.setProcessorParameter(trackId, proc.id, id, value);
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
// Listen for Automation Changes
|
|
332
|
+
if (proc.automations) {
|
|
333
|
+
proc.automations.forEach((list, param) => {
|
|
334
|
+
this.bindAutomationList(trackId, proc.id, param, list);
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
// Listen for future automations (Lazy creation)
|
|
338
|
+
if (proc.automationAdded) {
|
|
339
|
+
proc.automationAdded.connect(({ paramName, list }) => {
|
|
340
|
+
this.bindAutomationList(trackId, proc.id, paramName, list);
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
bindAutomationList(trackId, procId, param, list) {
|
|
345
|
+
if (list.changed) {
|
|
346
|
+
list.changed.connect(() => {
|
|
347
|
+
console.log(`[AudioEngine] Automation changed for ${trackId}:${procId}:${param}`);
|
|
348
|
+
const points = list.getPoints();
|
|
349
|
+
this.backend.setProcessorAutomation(trackId, procId, param, points);
|
|
350
|
+
});
|
|
351
|
+
// Initial sync if not empty
|
|
352
|
+
const points = list.getPoints();
|
|
353
|
+
if (points.length > 0) {
|
|
354
|
+
this.backend.setProcessorAutomation(trackId, procId, param, points);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
async initialize() {
|
|
359
|
+
await this.backend.initialize();
|
|
360
|
+
}
|
|
361
|
+
// Transport
|
|
362
|
+
// Transport
|
|
363
|
+
async start() {
|
|
364
|
+
this.scheduleAutomations();
|
|
365
|
+
this.backend.setTempo(this.session.tempo);
|
|
366
|
+
this.session.startTransport();
|
|
367
|
+
await this.backend.start();
|
|
368
|
+
this.startTransportSync();
|
|
369
|
+
}
|
|
370
|
+
requestFrame(cb) {
|
|
371
|
+
if (typeof requestAnimationFrame !== 'undefined') {
|
|
372
|
+
return requestAnimationFrame(cb);
|
|
373
|
+
}
|
|
374
|
+
return setTimeout(cb, 16);
|
|
375
|
+
}
|
|
376
|
+
cancelFrame(id) {
|
|
377
|
+
if (typeof cancelAnimationFrame !== 'undefined') {
|
|
378
|
+
cancelAnimationFrame(id);
|
|
379
|
+
}
|
|
380
|
+
else {
|
|
381
|
+
clearTimeout(id);
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
startTransportSync() {
|
|
385
|
+
if (this.syncId)
|
|
386
|
+
this.cancelFrame(this.syncId);
|
|
387
|
+
const loop = () => {
|
|
388
|
+
if (!this.session.isPlaying)
|
|
389
|
+
return;
|
|
390
|
+
// Get current time from Backend
|
|
391
|
+
const currentFrame = this.backend.getCurrentFrame();
|
|
392
|
+
// Check punch range during recording
|
|
393
|
+
if (this.session.isRecording && this.session.punchEnabled && this.session.punchRangeId) {
|
|
394
|
+
const punchRange = this.session.getPunchRange();
|
|
395
|
+
if (punchRange) {
|
|
396
|
+
const isInPunchRange = currentFrame >= punchRange.start && currentFrame < punchRange.end;
|
|
397
|
+
const armedTracks = this.session.tracks.filter(t => t.armed);
|
|
398
|
+
// Mute/unmute recording based on whether we are inside the punch range
|
|
399
|
+
armedTracks.forEach(t => {
|
|
400
|
+
this.backend.setRecordingMuted(t.id, !isInPunchRange);
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
// Check loop
|
|
405
|
+
if (this.session.loopEnabled && this.session.loopRangeId) {
|
|
406
|
+
const loopRange = this.session.getLoopRange();
|
|
407
|
+
if (loopRange && currentFrame >= loopRange.end) {
|
|
408
|
+
// Handle loop recording: save current take before looping
|
|
409
|
+
if (this.session.isRecording && this.session.loopRecordingEnabled) {
|
|
410
|
+
this.handleLoopRecordingTake(currentFrame).catch(err => {
|
|
411
|
+
console.error('[AudioEngine] Error handling loop recording take:', err);
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
// Loop back to start
|
|
415
|
+
console.log(`[AudioEngine] Loop: ${currentFrame} >= ${loopRange.end}, seeking to ${loopRange.start}`);
|
|
416
|
+
this.backend.seek(loopRange.start / this.session.sampleRate);
|
|
417
|
+
this.session.locateTransport(loopRange.start);
|
|
418
|
+
}
|
|
419
|
+
else {
|
|
420
|
+
this.session.locateTransport(currentFrame);
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
else {
|
|
424
|
+
this.session.locateTransport(currentFrame);
|
|
425
|
+
}
|
|
426
|
+
this.syncId = this.requestFrame(loop);
|
|
427
|
+
};
|
|
428
|
+
this.syncId = this.requestFrame(loop);
|
|
429
|
+
}
|
|
430
|
+
scheduleAutomations() {
|
|
431
|
+
this.session.tracks.forEach(track => {
|
|
432
|
+
track.route.processors.forEach((proc) => {
|
|
433
|
+
if (proc.automations) {
|
|
434
|
+
proc.automations.forEach((automationList, paramName) => {
|
|
435
|
+
const points = automationList.getPoints();
|
|
436
|
+
if (points.length > 0) {
|
|
437
|
+
this.backend.setProcessorAutomation(track.id, proc.id, paramName, points);
|
|
438
|
+
}
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
});
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
stop() {
|
|
445
|
+
this.session.stopTransport();
|
|
446
|
+
this.backend.stop();
|
|
447
|
+
}
|
|
448
|
+
pause() {
|
|
449
|
+
this.session.isPlaying = false;
|
|
450
|
+
this.backend.pause();
|
|
451
|
+
}
|
|
452
|
+
// Punch Recording
|
|
453
|
+
enablePunchRecording(enabled) {
|
|
454
|
+
this.session.setPunchEnabled(enabled);
|
|
455
|
+
// Sync punch range to backend
|
|
456
|
+
if (enabled && this.session.punchRangeId) {
|
|
457
|
+
const punchRange = this.session.getPunchRange();
|
|
458
|
+
if (punchRange) {
|
|
459
|
+
this.backend.enablePunchRecording(true);
|
|
460
|
+
this.backend.setPunchRange(punchRange.start, punchRange.end);
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
else {
|
|
464
|
+
this.backend.enablePunchRecording(false);
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
// Monitor with effects
|
|
468
|
+
setMonitorWithEffects(trackId, enabled) {
|
|
469
|
+
this.backend.setMonitorWithEffects(trackId, enabled);
|
|
470
|
+
}
|
|
471
|
+
// Input Latency
|
|
472
|
+
getInputLatencyMs() {
|
|
473
|
+
return this.backend.getInputLatencyMs();
|
|
474
|
+
}
|
|
475
|
+
/**
|
|
476
|
+
* Handle loop recording take: stop current recording, save take as a region on a new layer,
|
|
477
|
+
* then restart recording for the next pass.
|
|
478
|
+
*/
|
|
479
|
+
async handleLoopRecordingTake(_endFrame) {
|
|
480
|
+
const armedTracks = this.session.tracks.filter(t => t.armed);
|
|
481
|
+
const takeNumber = this.session.incrementTakeCount();
|
|
482
|
+
const loopRange = this.session.getLoopRange();
|
|
483
|
+
if (!loopRange)
|
|
484
|
+
return;
|
|
485
|
+
console.log(`[AudioEngine] Loop recording: completing take ${takeNumber}`);
|
|
486
|
+
for (const track of armedTracks) {
|
|
487
|
+
// Stop current recording and collect blob
|
|
488
|
+
const blob = await this.backend.stopRecording(track.id);
|
|
489
|
+
if (blob.size > 0) {
|
|
490
|
+
const url = URL.createObjectURL(blob);
|
|
491
|
+
await this.backend.cacheBlob(url, blob);
|
|
492
|
+
const startFrame = loopRange.start;
|
|
493
|
+
const durationFrames = loopRange.end - loopRange.start;
|
|
494
|
+
if (durationFrames > 0) {
|
|
495
|
+
const regionId = crypto.randomUUID();
|
|
496
|
+
// Each take goes on a different layer
|
|
497
|
+
const region = new Region(regionId, url, startFrame, durationFrames, 0, `Take ${takeNumber}`, takeNumber // layer = take number
|
|
498
|
+
);
|
|
499
|
+
track.playlist.addRegion(region);
|
|
500
|
+
console.log(`[AudioEngine] Loop take ${takeNumber}: Region created on layer ${takeNumber}`);
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
// Restart recording for next take
|
|
504
|
+
await this.backend.prepareRecording(track.id);
|
|
505
|
+
this.backend.startRecording(track.id);
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
// ─── MIDI Input ─────────────────────────────────────────────────────────
|
|
509
|
+
/**
|
|
510
|
+
* Initialize MIDI input subsystem.
|
|
511
|
+
*/
|
|
512
|
+
async initializeMidiInput() {
|
|
513
|
+
return this.midiInput.initialize();
|
|
514
|
+
}
|
|
515
|
+
/**
|
|
516
|
+
* Get available MIDI input devices.
|
|
517
|
+
*/
|
|
518
|
+
getMidiInputDevices() {
|
|
519
|
+
return this.midiInput.getInputDevices();
|
|
520
|
+
}
|
|
521
|
+
/**
|
|
522
|
+
* Set the active MIDI input device.
|
|
523
|
+
*/
|
|
524
|
+
setMidiInputDevice(inputId) {
|
|
525
|
+
this.midiInput.setActiveInput(inputId);
|
|
526
|
+
}
|
|
527
|
+
/**
|
|
528
|
+
* Get the MidiInput singleton for external consumers.
|
|
529
|
+
*/
|
|
530
|
+
getMidiInput() {
|
|
531
|
+
return this.midiInput;
|
|
532
|
+
}
|
|
533
|
+
// ─── MIDI Recording Helpers ──────────────────────────────────────────────
|
|
534
|
+
startMidiRecording() {
|
|
535
|
+
this.midiRecordingNotes.clear();
|
|
536
|
+
this.midiRecordedNotes = [];
|
|
537
|
+
// Subscribe to MIDI note events
|
|
538
|
+
this.midiNoteOnSub = this.midiInput.noteOn.connect((event) => {
|
|
539
|
+
if (!this.session.isRecording)
|
|
540
|
+
return;
|
|
541
|
+
const currentFrame = this.backend.getCurrentFrame();
|
|
542
|
+
const key = `${event.channel}-${event.pitch}`;
|
|
543
|
+
this.midiRecordingNotes.set(key, {
|
|
544
|
+
pitch: event.pitch,
|
|
545
|
+
velocity: event.velocity,
|
|
546
|
+
channel: event.channel,
|
|
547
|
+
startFrame: currentFrame,
|
|
548
|
+
});
|
|
549
|
+
});
|
|
550
|
+
this.midiNoteOffSub = this.midiInput.noteOff.connect((event) => {
|
|
551
|
+
if (!this.session.isRecording)
|
|
552
|
+
return;
|
|
553
|
+
const currentFrame = this.backend.getCurrentFrame();
|
|
554
|
+
const key = `${event.channel}-${event.pitch}`;
|
|
555
|
+
const pending = this.midiRecordingNotes.get(key);
|
|
556
|
+
if (pending) {
|
|
557
|
+
const durationFrames = Math.max(1, currentFrame - pending.startFrame);
|
|
558
|
+
const note = new MidiNote(crypto.randomUUID(), pending.pitch, pending.velocity, pending.startFrame, durationFrames, pending.channel);
|
|
559
|
+
this.midiRecordedNotes.push(note);
|
|
560
|
+
this.midiRecordingNotes.delete(key);
|
|
561
|
+
}
|
|
562
|
+
});
|
|
563
|
+
}
|
|
564
|
+
stopMidiRecording() {
|
|
565
|
+
var _a, _b;
|
|
566
|
+
// Close any still-held notes at the current position
|
|
567
|
+
const currentFrame = this.backend.getCurrentFrame();
|
|
568
|
+
for (const [_key, pending] of this.midiRecordingNotes) {
|
|
569
|
+
const durationFrames = Math.max(1, currentFrame - pending.startFrame);
|
|
570
|
+
const note = new MidiNote(crypto.randomUUID(), pending.pitch, pending.velocity, pending.startFrame, durationFrames, pending.channel);
|
|
571
|
+
this.midiRecordedNotes.push(note);
|
|
572
|
+
}
|
|
573
|
+
this.midiRecordingNotes.clear();
|
|
574
|
+
// Unsubscribe
|
|
575
|
+
(_a = this.midiNoteOnSub) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
576
|
+
(_b = this.midiNoteOffSub) === null || _b === void 0 ? void 0 : _b.dispose();
|
|
577
|
+
this.midiNoteOnSub = null;
|
|
578
|
+
this.midiNoteOffSub = null;
|
|
579
|
+
}
|
|
580
|
+
finalizeMidiRecording() {
|
|
581
|
+
if (this.midiRecordedNotes.length === 0)
|
|
582
|
+
return;
|
|
583
|
+
const armedMidiTracks = this.session.tracks.filter(t => t.armed && t.type === TrackType.MIDI);
|
|
584
|
+
for (const track of armedMidiTracks) {
|
|
585
|
+
const startFrame = this.session.recordingStartFrame;
|
|
586
|
+
// Find the extent of recorded notes
|
|
587
|
+
let minStart = Infinity;
|
|
588
|
+
let maxEnd = 0;
|
|
589
|
+
for (const note of this.midiRecordedNotes) {
|
|
590
|
+
if (note.startFrame < minStart)
|
|
591
|
+
minStart = note.startFrame;
|
|
592
|
+
if (note.endFrame > maxEnd)
|
|
593
|
+
maxEnd = note.endFrame;
|
|
594
|
+
}
|
|
595
|
+
const regionStart = Math.min(startFrame, minStart);
|
|
596
|
+
const regionLength = maxEnd - regionStart;
|
|
597
|
+
if (regionLength <= 0)
|
|
598
|
+
continue;
|
|
599
|
+
const regionId = crypto.randomUUID();
|
|
600
|
+
const region = new MidiRegion(regionId, 'MIDI Recording', regionStart, regionLength);
|
|
601
|
+
// Make note positions relative to region start
|
|
602
|
+
for (const note of this.midiRecordedNotes) {
|
|
603
|
+
const relativeNote = new MidiNote(note.id, note.pitch, note.velocity, note.startFrame - regionStart, note.durationFrames, note.channel);
|
|
604
|
+
region.addNote(relativeNote);
|
|
605
|
+
}
|
|
606
|
+
track.playlist.addMidiRegion(region);
|
|
607
|
+
console.log(`[AudioEngine] MIDI recording finalized: ${this.midiRecordedNotes.length} notes in region ${regionId}`);
|
|
608
|
+
}
|
|
609
|
+
this.midiRecordedNotes = [];
|
|
610
|
+
}
|
|
611
|
+
// Recording
|
|
612
|
+
async startRecording() {
|
|
613
|
+
const armedTracks = this.session.tracks.filter(t => t.armed);
|
|
614
|
+
console.log(`[AudioEngine] Starting recording. Armed tracks: ${armedTracks.length}`);
|
|
615
|
+
// Setup punch recording if enabled
|
|
616
|
+
if (this.session.punchEnabled && this.session.punchRangeId) {
|
|
617
|
+
const punchRange = this.session.getPunchRange();
|
|
618
|
+
if (punchRange) {
|
|
619
|
+
console.log(`[AudioEngine] Punch recording enabled: ${punchRange.name} (${punchRange.start} - ${punchRange.end})`);
|
|
620
|
+
this.backend.enablePunchRecording(true);
|
|
621
|
+
this.backend.setPunchRange(punchRange.start, punchRange.end);
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
// Reset loop recording take count
|
|
625
|
+
if (this.session.loopRecordingEnabled) {
|
|
626
|
+
this.session.loopRecordingTakeCount = 0;
|
|
627
|
+
console.log('[AudioEngine] Loop recording mode active');
|
|
628
|
+
}
|
|
629
|
+
// Prepare audio recording for non-MIDI armed tracks
|
|
630
|
+
const armedAudioTracks = armedTracks.filter(t => t.type !== TrackType.MIDI);
|
|
631
|
+
await Promise.all(armedAudioTracks.map(t => this.backend.prepareRecording(t.id)));
|
|
632
|
+
// Start all prepared audio tracks
|
|
633
|
+
armedAudioTracks.forEach(t => this.backend.startRecording(t.id));
|
|
634
|
+
// Start MIDI recording if any armed MIDI tracks
|
|
635
|
+
const armedMidiTracks = armedTracks.filter(t => t.type === TrackType.MIDI);
|
|
636
|
+
if (armedMidiTracks.length > 0) {
|
|
637
|
+
this.startMidiRecording();
|
|
638
|
+
}
|
|
639
|
+
this.session.startRecording();
|
|
640
|
+
// Handle pre-roll: if pre-roll is set, start playback with metronome first
|
|
641
|
+
if (this.session.preRollBars > 0) {
|
|
642
|
+
const preRollSeconds = this.session.getPreRollDurationSeconds();
|
|
643
|
+
console.log(`[AudioEngine] Pre-roll: ${this.session.preRollBars} bars (${preRollSeconds.toFixed(2)}s)`);
|
|
644
|
+
// Enable metronome for pre-roll if not already enabled
|
|
645
|
+
const wasMetronomeEnabled = this.session.metronomeEnabled;
|
|
646
|
+
if (!wasMetronomeEnabled) {
|
|
647
|
+
this.backend.enableMetronome(true);
|
|
648
|
+
}
|
|
649
|
+
// Mute recording during pre-roll
|
|
650
|
+
armedTracks.forEach(t => this.backend.setRecordingMuted(t.id, true));
|
|
651
|
+
// Start transport
|
|
652
|
+
await this.start();
|
|
653
|
+
// After pre-roll duration, unmute recording
|
|
654
|
+
setTimeout(() => {
|
|
655
|
+
armedTracks.forEach(t => this.backend.setRecordingMuted(t.id, false));
|
|
656
|
+
// Restore metronome state
|
|
657
|
+
if (!wasMetronomeEnabled) {
|
|
658
|
+
this.backend.enableMetronome(false);
|
|
659
|
+
}
|
|
660
|
+
// Update recording start frame to after pre-roll
|
|
661
|
+
this.session.recordingStartFrame = this.backend.getCurrentFrame();
|
|
662
|
+
console.log('[AudioEngine] Pre-roll complete, recording active');
|
|
663
|
+
}, preRollSeconds * 1000);
|
|
664
|
+
}
|
|
665
|
+
else {
|
|
666
|
+
// No pre-roll, start immediately
|
|
667
|
+
await this.start();
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
async stopRecording() {
|
|
671
|
+
const armedTracks = this.session.tracks.filter(t => t.armed);
|
|
672
|
+
console.log(`[AudioEngine] Stopping recording. Armed tracks: ${armedTracks.length}`);
|
|
673
|
+
// Capture end frame BEFORE stopping transport (which resets to 0)
|
|
674
|
+
// using backend for precision or session for consistency.
|
|
675
|
+
// Backend is the source of truth for time.
|
|
676
|
+
const endFrame = this.backend.getCurrentFrame();
|
|
677
|
+
// Stop MIDI recording first (before transport stop resets frame)
|
|
678
|
+
this.stopMidiRecording();
|
|
679
|
+
this.finalizeMidiRecording();
|
|
680
|
+
// Stop Transport
|
|
681
|
+
this.stop();
|
|
682
|
+
// Stop all audio armed tracks and collect blobs
|
|
683
|
+
const armedAudioTracks = armedTracks.filter(t => t.type !== TrackType.MIDI);
|
|
684
|
+
for (const track of armedAudioTracks) {
|
|
685
|
+
const blob = await this.backend.stopRecording(track.id);
|
|
686
|
+
if (blob.size > 0) {
|
|
687
|
+
// Create Region
|
|
688
|
+
console.log(`Recorded blob for track ${track.id}, size: ${blob.size}`);
|
|
689
|
+
const url = URL.createObjectURL(blob);
|
|
690
|
+
// Cache the blob as AudioBuffer immediately for Waveform rendering
|
|
691
|
+
await this.backend.cacheBlob(url, blob);
|
|
692
|
+
// Calculate duration
|
|
693
|
+
const startFrame = this.session.recordingStartFrame;
|
|
694
|
+
const durationFrames = endFrame - startFrame;
|
|
695
|
+
// Create Region in Playlist
|
|
696
|
+
if (durationFrames > 0) {
|
|
697
|
+
const regionId = crypto.randomUUID();
|
|
698
|
+
const region = new Region(regionId, url, startFrame, durationFrames, 0, 'Recording');
|
|
699
|
+
track.playlist.addRegion(region);
|
|
700
|
+
console.log(`Created Region: ${url}, Start: ${startFrame}, Dur: ${durationFrames}`);
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
this.session.stopRecording();
|
|
705
|
+
}
|
|
706
|
+
// Track Management - Proxy to Session
|
|
707
|
+
addTrack(name, type = TrackType.AUDIO, id) {
|
|
708
|
+
return this.session.addTrack(name, type, id);
|
|
709
|
+
}
|
|
710
|
+
removeTrack(trackId) {
|
|
711
|
+
this.session.removeTrack(trackId);
|
|
712
|
+
}
|
|
713
|
+
// Direct Parameter Control - Now updates Domain, which signals Backend
|
|
714
|
+
setTrackGain(trackId, gain) {
|
|
715
|
+
const track = this.session.getTrack(trackId);
|
|
716
|
+
if (track) {
|
|
717
|
+
track.route.volume = gain; // Updates Route -> Signal -> Backend
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
setTrackPan(trackId, pan) {
|
|
721
|
+
const track = this.session.getTrack(trackId);
|
|
722
|
+
if (track) {
|
|
723
|
+
track.route.pan = pan; // Updates Route -> Signal -> Backend
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
// Export
|
|
727
|
+
getExportConfig() {
|
|
728
|
+
return this.session.getExportConfig();
|
|
729
|
+
}
|
|
730
|
+
getExportStatus() {
|
|
731
|
+
return this.session.getExportStatus();
|
|
732
|
+
}
|
|
733
|
+
async exportAudio(config, _status) {
|
|
734
|
+
const trackIds = config.exportMasterOnly
|
|
735
|
+
? this.session.tracks.map(t => t.id)
|
|
736
|
+
: config.trackIds;
|
|
737
|
+
const _buffer = await this.backend.exportAudio(config.startFrame, config.endFrame, config.sampleRate, trackIds);
|
|
738
|
+
// This is now handled by OfflineExporter in ExportCommand
|
|
739
|
+
// But we keep this method for potential direct use
|
|
740
|
+
return;
|
|
741
|
+
}
|
|
742
|
+
async renderRegionsToBuffer(trackId, regionIds) {
|
|
743
|
+
return this.backend.renderRegionsToBuffer(trackId, regionIds);
|
|
744
|
+
}
|
|
745
|
+
// Metering
|
|
746
|
+
getMeterData(trackId) {
|
|
747
|
+
return this.backend.getMeterData(trackId);
|
|
748
|
+
}
|
|
749
|
+
getMasterMeterData() {
|
|
750
|
+
return this.backend.getMasterMeterData();
|
|
751
|
+
}
|
|
752
|
+
getAnalyserNode(trackId) {
|
|
753
|
+
return this.backend.getAnalyserNode(trackId);
|
|
754
|
+
}
|
|
755
|
+
// Region Audition
|
|
756
|
+
auditionRegion(trackId, regionId) {
|
|
757
|
+
this.backend.auditionRegion(trackId, regionId);
|
|
758
|
+
}
|
|
759
|
+
stopAudition() {
|
|
760
|
+
this.backend.stopAudition();
|
|
761
|
+
}
|
|
762
|
+
// MIDI Instrument
|
|
763
|
+
setMidiInstrument(trackId, instrumentType) {
|
|
764
|
+
this.backend.setMidiInstrument(trackId, instrumentType);
|
|
765
|
+
}
|
|
766
|
+
// Strip Silence
|
|
767
|
+
async stripSilence(trackId, regionId, thresholdDb, minLengthFrames) {
|
|
768
|
+
return this.backend.stripSilence(trackId, regionId, thresholdDb, minLengthFrames);
|
|
769
|
+
}
|
|
770
|
+
// Normalize Region
|
|
771
|
+
async normalizeRegion(trackId, regionId, targetDb) {
|
|
772
|
+
return this.backend.normalizeRegion(trackId, regionId, targetDb);
|
|
773
|
+
}
|
|
774
|
+
// MIDI Panic
|
|
775
|
+
midiPanic() {
|
|
776
|
+
this.backend.midiPanic();
|
|
777
|
+
}
|
|
778
|
+
// Stereo Master Metering
|
|
779
|
+
getMasterStereoMeterData() {
|
|
780
|
+
return this.backend.getMasterStereoMeterData();
|
|
781
|
+
}
|
|
782
|
+
// Region Reverse
|
|
783
|
+
async reverseRegionBuffer(trackId, regionId) {
|
|
784
|
+
return this.backend.reverseRegionBuffer(trackId, regionId);
|
|
785
|
+
}
|
|
786
|
+
// Session Management
|
|
787
|
+
loadSession(newSession) {
|
|
788
|
+
this.stop();
|
|
789
|
+
this.session = newSession;
|
|
790
|
+
this.setupSessionListeners();
|
|
791
|
+
}
|
|
792
|
+
loadSessionFromSnapshot(snapshot) {
|
|
793
|
+
this.stop();
|
|
794
|
+
this.session = Session.fromJSON(snapshot);
|
|
795
|
+
this.setupSessionListeners();
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
//# sourceMappingURL=AudioEngine.js.map
|