@drop-ai/core 0.2.0 → 0.3.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/README.md +655 -237
- package/dist/actions/ActionRegistry.d.ts.map +1 -1
- package/dist/actions/ActionRegistry.js +7 -2
- package/dist/actions/ActionRegistry.js.map +1 -1
- package/dist/actions/types.d.ts +7 -1
- package/dist/actions/types.d.ts.map +1 -1
- package/dist/analysis/AudioAnalyzer.d.ts +71 -0
- package/dist/analysis/AudioAnalyzer.d.ts.map +1 -0
- package/dist/analysis/AudioAnalyzer.js +569 -0
- package/dist/analysis/AudioAnalyzer.js.map +1 -0
- package/dist/audio/AudioEngine.d.ts +14 -1
- package/dist/audio/AudioEngine.d.ts.map +1 -1
- package/dist/audio/AudioEngine.js +115 -35
- package/dist/audio/AudioEngine.js.map +1 -1
- package/dist/audio/Auditioner.d.ts +104 -0
- package/dist/audio/Auditioner.d.ts.map +1 -0
- package/dist/audio/Auditioner.js +239 -0
- package/dist/audio/Auditioner.js.map +1 -0
- package/dist/audio/BWFMetadata.d.ts +116 -0
- package/dist/audio/BWFMetadata.d.ts.map +1 -0
- package/dist/audio/BWFMetadata.js +394 -0
- package/dist/audio/BWFMetadata.js.map +1 -0
- package/dist/audio/ChannelSplitter.d.ts +37 -0
- package/dist/audio/ChannelSplitter.d.ts.map +1 -0
- package/dist/audio/ChannelSplitter.js +82 -0
- package/dist/audio/ChannelSplitter.js.map +1 -0
- package/dist/audio/ExportAnalyzer.d.ts +39 -0
- package/dist/audio/ExportAnalyzer.d.ts.map +1 -0
- package/dist/audio/ExportAnalyzer.js +76 -0
- package/dist/audio/ExportAnalyzer.js.map +1 -0
- package/dist/audio/LufsNormalizer.d.ts +37 -0
- package/dist/audio/LufsNormalizer.d.ts.map +1 -0
- package/dist/audio/LufsNormalizer.js +217 -0
- package/dist/audio/LufsNormalizer.js.map +1 -0
- package/dist/audio/OfflineExporter.d.ts +1 -6
- package/dist/audio/OfflineExporter.d.ts.map +1 -1
- package/dist/audio/OfflineExporter.js +31 -10
- package/dist/audio/OfflineExporter.js.map +1 -1
- package/dist/audio/RoutingGraph.d.ts +134 -0
- package/dist/audio/RoutingGraph.d.ts.map +1 -0
- package/dist/audio/RoutingGraph.js +547 -0
- package/dist/audio/RoutingGraph.js.map +1 -0
- package/dist/audio/SampleRateConverter.d.ts +21 -0
- package/dist/audio/SampleRateConverter.d.ts.map +1 -0
- package/dist/audio/SampleRateConverter.js +84 -0
- package/dist/audio/SampleRateConverter.js.map +1 -0
- package/dist/audio/SilencePadding.d.ts +29 -0
- package/dist/audio/SilencePadding.d.ts.map +1 -0
- package/dist/audio/SilencePadding.js +86 -0
- package/dist/audio/SilencePadding.js.map +1 -0
- package/dist/audio/SourceCache.d.ts +13 -16
- package/dist/audio/SourceCache.d.ts.map +1 -1
- package/dist/audio/SourceCache.js +21 -33
- package/dist/audio/SourceCache.js.map +1 -1
- package/dist/audio/engine/Declick.d.ts +98 -0
- package/dist/audio/engine/Declick.d.ts.map +1 -0
- package/dist/audio/engine/Declick.js +204 -0
- package/dist/audio/engine/Declick.js.map +1 -0
- package/dist/audio/engine/DiskIO.d.ts +172 -0
- package/dist/audio/engine/DiskIO.d.ts.map +1 -0
- package/dist/audio/engine/DiskIO.js +384 -0
- package/dist/audio/engine/DiskIO.js.map +1 -0
- package/dist/audio/engine/LatencyCompensator.d.ts +46 -0
- package/dist/audio/engine/LatencyCompensator.d.ts.map +1 -0
- package/dist/audio/engine/LatencyCompensator.js +84 -0
- package/dist/audio/engine/LatencyCompensator.js.map +1 -0
- package/dist/audio/engine/MultiTrackRecorder.d.ts +146 -0
- package/dist/audio/engine/MultiTrackRecorder.d.ts.map +1 -0
- package/dist/audio/engine/MultiTrackRecorder.js +359 -0
- package/dist/audio/engine/MultiTrackRecorder.js.map +1 -0
- package/dist/audio/engine/PlaylistEngine.d.ts.map +1 -1
- package/dist/audio/engine/PlaylistEngine.js +9 -2
- package/dist/audio/engine/PlaylistEngine.js.map +1 -1
- package/dist/audio/engine/PunchRecordManager.d.ts +113 -0
- package/dist/audio/engine/PunchRecordManager.d.ts.map +1 -0
- package/dist/audio/engine/PunchRecordManager.js +191 -0
- package/dist/audio/engine/PunchRecordManager.js.map +1 -0
- package/dist/audio/engine/RoutingGraph.d.ts +135 -0
- package/dist/audio/engine/RoutingGraph.d.ts.map +1 -0
- package/dist/audio/engine/RoutingGraph.js +436 -0
- package/dist/audio/engine/RoutingGraph.js.map +1 -0
- package/dist/audio/engine/SidechainRouter.d.ts +139 -0
- package/dist/audio/engine/SidechainRouter.d.ts.map +1 -0
- package/dist/audio/engine/SidechainRouter.js +292 -0
- package/dist/audio/engine/SidechainRouter.js.map +1 -0
- package/dist/audio/engine/XrunTracker.d.ts +71 -0
- package/dist/audio/engine/XrunTracker.d.ts.map +1 -0
- package/dist/audio/engine/XrunTracker.js +118 -0
- package/dist/audio/engine/XrunTracker.js.map +1 -0
- package/dist/audio/export/CDMarkerExporter.d.ts +62 -0
- package/dist/audio/export/CDMarkerExporter.d.ts.map +1 -0
- package/dist/audio/export/CDMarkerExporter.js +164 -0
- package/dist/audio/export/CDMarkerExporter.js.map +1 -0
- package/dist/audio/export/ExportGraphBuilder.d.ts +121 -0
- package/dist/audio/export/ExportGraphBuilder.d.ts.map +1 -0
- package/dist/audio/export/ExportGraphBuilder.js +522 -0
- package/dist/audio/export/ExportGraphBuilder.js.map +1 -0
- package/dist/audio/export/ExportPresetManager.d.ts +87 -0
- package/dist/audio/export/ExportPresetManager.d.ts.map +1 -0
- package/dist/audio/export/ExportPresetManager.js +306 -0
- package/dist/audio/export/ExportPresetManager.js.map +1 -0
- package/dist/commands/handlers/RegionHandler.d.ts.map +1 -1
- package/dist/commands/handlers/RegionHandler.js +25 -1
- package/dist/commands/handlers/RegionHandler.js.map +1 -1
- package/dist/commands/handlers/TrackHandler.js +1 -1
- package/dist/commands/handlers/TrackHandler.js.map +1 -1
- package/dist/commands/impl/FreezeTrackCommand.d.ts.map +1 -1
- package/dist/commands/impl/FreezeTrackCommand.js +37 -36
- package/dist/commands/impl/FreezeTrackCommand.js.map +1 -1
- package/dist/commands/impl/SetRegionTimeDomainCommand.d.ts.map +1 -1
- package/dist/commands/impl/SetRegionTimeDomainCommand.js +3 -3
- package/dist/commands/impl/SetRegionTimeDomainCommand.js.map +1 -1
- package/dist/commands/impl/ToggleLoopCommand.d.ts +1 -0
- package/dist/commands/impl/ToggleLoopCommand.d.ts.map +1 -1
- package/dist/commands/impl/ToggleLoopCommand.js +10 -0
- package/dist/commands/impl/ToggleLoopCommand.js.map +1 -1
- package/dist/commands/impl/TrimRegionCommand.d.ts +14 -1
- package/dist/commands/impl/TrimRegionCommand.d.ts.map +1 -1
- package/dist/commands/impl/TrimRegionCommand.js +138 -33
- package/dist/commands/impl/TrimRegionCommand.js.map +1 -1
- package/dist/commands/impl/TrimRegionToPlayheadCommand.d.ts +27 -0
- package/dist/commands/impl/TrimRegionToPlayheadCommand.d.ts.map +1 -0
- package/dist/commands/impl/TrimRegionToPlayheadCommand.js +69 -0
- package/dist/commands/impl/TrimRegionToPlayheadCommand.js.map +1 -0
- package/dist/commands/impl/TrimRegionToRangeCommand.d.ts +28 -0
- package/dist/commands/impl/TrimRegionToRangeCommand.d.ts.map +1 -0
- package/dist/commands/impl/TrimRegionToRangeCommand.js +69 -0
- package/dist/commands/impl/TrimRegionToRangeCommand.js.map +1 -0
- package/dist/commands/impl/TrimToAdjacentRegionCommand.d.ts +27 -0
- package/dist/commands/impl/TrimToAdjacentRegionCommand.d.ts.map +1 -0
- package/dist/commands/impl/TrimToAdjacentRegionCommand.js +77 -0
- package/dist/commands/impl/TrimToAdjacentRegionCommand.js.map +1 -0
- package/dist/commands/types.d.ts +19 -0
- package/dist/commands/types.d.ts.map +1 -1
- package/dist/commands/types.js +21 -0
- package/dist/commands/types.js.map +1 -1
- package/dist/domain/Crossfade.d.ts +78 -0
- package/dist/domain/Crossfade.d.ts.map +1 -0
- package/dist/domain/Crossfade.js +216 -0
- package/dist/domain/Crossfade.js.map +1 -0
- package/dist/domain/ExportConfig.d.ts +98 -1
- package/dist/domain/ExportConfig.d.ts.map +1 -1
- package/dist/domain/ExportConfig.js +154 -1
- package/dist/domain/ExportConfig.js.map +1 -1
- package/dist/domain/ExportPreset.d.ts +62 -0
- package/dist/domain/ExportPreset.d.ts.map +1 -0
- package/dist/domain/ExportPreset.js +79 -0
- package/dist/domain/ExportPreset.js.map +1 -0
- package/dist/domain/ImportStatus.d.ts +40 -0
- package/dist/domain/ImportStatus.d.ts.map +1 -0
- package/dist/domain/ImportStatus.js +86 -0
- package/dist/domain/ImportStatus.js.map +1 -0
- package/dist/domain/Playlist.d.ts +72 -0
- package/dist/domain/Playlist.d.ts.map +1 -1
- package/dist/domain/Playlist.js +231 -6
- package/dist/domain/Playlist.js.map +1 -1
- package/dist/domain/Region.d.ts +76 -0
- package/dist/domain/Region.d.ts.map +1 -1
- package/dist/domain/Region.js +234 -1
- package/dist/domain/Region.js.map +1 -1
- package/dist/domain/Route.d.ts +43 -3
- package/dist/domain/Route.d.ts.map +1 -1
- package/dist/domain/Route.js +92 -6
- package/dist/domain/Route.js.map +1 -1
- package/dist/domain/Session.d.ts +31 -0
- package/dist/domain/Session.d.ts.map +1 -1
- package/dist/domain/Session.js +70 -0
- package/dist/domain/Session.js.map +1 -1
- package/dist/domain/Source.d.ts +145 -1
- package/dist/domain/Source.d.ts.map +1 -1
- package/dist/domain/Source.js +144 -1
- package/dist/domain/Source.js.map +1 -1
- package/dist/domain/ThawList.d.ts +37 -0
- package/dist/domain/ThawList.d.ts.map +1 -0
- package/dist/domain/ThawList.js +73 -0
- package/dist/domain/ThawList.js.map +1 -0
- package/dist/domain/Track.d.ts +93 -1
- package/dist/domain/Track.d.ts.map +1 -1
- package/dist/domain/Track.js +136 -0
- package/dist/domain/Track.js.map +1 -1
- package/dist/domain/TriggerBox.d.ts +123 -0
- package/dist/domain/TriggerBox.d.ts.map +1 -0
- package/dist/domain/TriggerBox.js +430 -0
- package/dist/domain/TriggerBox.js.map +1 -0
- package/dist/domain/VCATrack.d.ts +64 -1
- package/dist/domain/VCATrack.d.ts.map +1 -1
- package/dist/domain/VCATrack.js +128 -1
- package/dist/domain/VCATrack.js.map +1 -1
- package/dist/domain/VideoExportConfig.d.ts +117 -0
- package/dist/domain/VideoExportConfig.d.ts.map +1 -0
- package/dist/domain/VideoExportConfig.js +244 -0
- package/dist/domain/VideoExportConfig.js.map +1 -0
- package/dist/domain/VideoExportStatus.d.ts +89 -0
- package/dist/domain/VideoExportStatus.d.ts.map +1 -0
- package/dist/domain/VideoExportStatus.js +192 -0
- package/dist/domain/VideoExportStatus.js.map +1 -0
- package/dist/domain/VideoMetadata.d.ts +46 -0
- package/dist/domain/VideoMetadata.d.ts.map +1 -0
- package/dist/domain/VideoMetadata.js +2 -0
- package/dist/domain/VideoMetadata.js.map +1 -0
- package/dist/domain/index.d.ts +5 -0
- package/dist/domain/index.d.ts.map +1 -1
- package/dist/domain/index.js +5 -0
- package/dist/domain/index.js.map +1 -1
- package/dist/domain/temporal/TempoMap.d.ts +199 -2
- package/dist/domain/temporal/TempoMap.d.ts.map +1 -1
- package/dist/domain/temporal/TempoMap.js +464 -30
- package/dist/domain/temporal/TempoMap.js.map +1 -1
- package/dist/index.d.ts +43 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +32 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/ThawList.d.ts +100 -0
- package/dist/lib/ThawList.d.ts.map +1 -0
- package/dist/lib/ThawList.js +153 -0
- package/dist/lib/ThawList.js.map +1 -0
- package/dist/midi/MidiFileParser.d.ts +33 -0
- package/dist/midi/MidiFileParser.d.ts.map +1 -0
- package/dist/midi/MidiFileParser.js +246 -0
- package/dist/midi/MidiFileParser.js.map +1 -0
- package/dist/midi/MidiFileWriter.d.ts +31 -0
- package/dist/midi/MidiFileWriter.d.ts.map +1 -0
- package/dist/midi/MidiFileWriter.js +160 -0
- package/dist/midi/MidiFileWriter.js.map +1 -0
- package/dist/midi/MidiImporter.d.ts +37 -0
- package/dist/midi/MidiImporter.d.ts.map +1 -0
- package/dist/midi/MidiImporter.js +62 -0
- package/dist/midi/MidiImporter.js.map +1 -0
- package/dist/plugins/PluginPresetManager.d.ts +86 -0
- package/dist/plugins/PluginPresetManager.d.ts.map +1 -0
- package/dist/plugins/PluginPresetManager.js +140 -0
- package/dist/plugins/PluginPresetManager.js.map +1 -0
- package/dist/processing/IO.d.ts +15 -1
- package/dist/processing/IO.d.ts.map +1 -1
- package/dist/processing/IO.js +29 -1
- package/dist/processing/IO.js.map +1 -1
- package/dist/processing/InternalSend.d.ts +104 -0
- package/dist/processing/InternalSend.d.ts.map +1 -0
- package/dist/processing/InternalSend.js +175 -0
- package/dist/processing/InternalSend.js.map +1 -0
- package/dist/processing/MeterDSP.d.ts +166 -0
- package/dist/processing/MeterDSP.d.ts.map +1 -0
- package/dist/processing/MeterDSP.js +754 -0
- package/dist/processing/MeterDSP.js.map +1 -0
- package/dist/processing/Panner.d.ts +145 -0
- package/dist/processing/Panner.d.ts.map +1 -0
- package/dist/processing/Panner.js +281 -0
- package/dist/processing/Panner.js.map +1 -0
- package/dist/processing/PluginInsert.d.ts +56 -1
- package/dist/processing/PluginInsert.d.ts.map +1 -1
- package/dist/processing/PluginInsert.js +180 -2
- package/dist/processing/PluginInsert.js.map +1 -1
- package/dist/processing/Processor.d.ts +38 -0
- package/dist/processing/Processor.d.ts.map +1 -1
- package/dist/processing/Processor.js +60 -1
- package/dist/processing/Processor.js.map +1 -1
- package/dist/processing/SurroundPanner.d.ts +122 -0
- package/dist/processing/SurroundPanner.d.ts.map +1 -0
- package/dist/processing/SurroundPanner.js +376 -0
- package/dist/processing/SurroundPanner.js.map +1 -0
- package/dist/processing/TruePeakLimiter.d.ts +34 -0
- package/dist/processing/TruePeakLimiter.d.ts.map +1 -0
- package/dist/processing/TruePeakLimiter.js +144 -0
- package/dist/processing/TruePeakLimiter.js.map +1 -0
- package/dist/storage/ExportPresetStorage.d.ts +33 -0
- package/dist/storage/ExportPresetStorage.d.ts.map +1 -0
- package/dist/storage/ExportPresetStorage.js +121 -0
- package/dist/storage/ExportPresetStorage.js.map +1 -0
- package/dist/storage/SessionArchive.d.ts +73 -0
- package/dist/storage/SessionArchive.d.ts.map +1 -0
- package/dist/storage/SessionArchive.js +211 -0
- package/dist/storage/SessionArchive.js.map +1 -0
- package/dist/storage/SessionTemplate.d.ts +74 -5
- package/dist/storage/SessionTemplate.d.ts.map +1 -1
- package/dist/storage/SessionTemplate.js +247 -53
- package/dist/storage/SessionTemplate.js.map +1 -1
- package/dist/utils/BwfMetadataWriter.d.ts +42 -0
- package/dist/utils/BwfMetadataWriter.d.ts.map +1 -0
- package/dist/utils/BwfMetadataWriter.js +131 -0
- package/dist/utils/BwfMetadataWriter.js.map +1 -0
- package/dist/utils/FilenameTemplate.d.ts +40 -0
- package/dist/utils/FilenameTemplate.d.ts.map +1 -0
- package/dist/utils/FilenameTemplate.js +78 -0
- package/dist/utils/FilenameTemplate.js.map +1 -0
- package/dist/utils/Logger.d.ts +28 -0
- package/dist/utils/Logger.d.ts.map +1 -0
- package/dist/utils/Logger.js +46 -0
- package/dist/utils/Logger.js.map +1 -0
- package/dist/utils/Mp4ChapterGenerator.d.ts +17 -0
- package/dist/utils/Mp4ChapterGenerator.d.ts.map +1 -0
- package/dist/utils/Mp4ChapterGenerator.js +33 -0
- package/dist/utils/Mp4ChapterGenerator.js.map +1 -0
- package/dist/utils/OggEncoder.d.ts +20 -20
- package/dist/utils/OggEncoder.d.ts.map +1 -1
- package/dist/utils/OggEncoder.js +114 -50
- package/dist/utils/OggEncoder.js.map +1 -1
- package/dist/utils/TocGenerator.d.ts +17 -0
- package/dist/utils/TocGenerator.d.ts.map +1 -0
- package/dist/utils/TocGenerator.js +47 -0
- package/dist/utils/TocGenerator.js.map +1 -0
- package/package.json +7 -8
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import { Signal } from '../lib/Signal';
|
|
2
|
+
/**
|
|
3
|
+
* Auditioner provides solo preview playback of audio sources.
|
|
4
|
+
*
|
|
5
|
+
* Ardour reference: libs/ardour/auditioner.cc
|
|
6
|
+
*
|
|
7
|
+
* Used to preview audio files before importing, or to audition
|
|
8
|
+
* regions/clips without affecting the main transport.
|
|
9
|
+
* Plays through a dedicated output path that bypasses the mixer.
|
|
10
|
+
*/
|
|
11
|
+
export var AuditionerState;
|
|
12
|
+
(function (AuditionerState) {
|
|
13
|
+
AuditionerState["IDLE"] = "IDLE";
|
|
14
|
+
AuditionerState["LOADING"] = "LOADING";
|
|
15
|
+
AuditionerState["PLAYING"] = "PLAYING";
|
|
16
|
+
AuditionerState["PAUSED"] = "PAUSED";
|
|
17
|
+
})(AuditionerState || (AuditionerState = {}));
|
|
18
|
+
export class Auditioner {
|
|
19
|
+
constructor() {
|
|
20
|
+
this._state = AuditionerState.IDLE;
|
|
21
|
+
this._currentSourceId = null;
|
|
22
|
+
this._currentUrl = null;
|
|
23
|
+
this._position = 0;
|
|
24
|
+
this._duration = 0;
|
|
25
|
+
this._gain = 1.0;
|
|
26
|
+
this._looping = false;
|
|
27
|
+
// Region preview: play a specific portion of a source
|
|
28
|
+
this._regionStart = 0;
|
|
29
|
+
this._regionLength = 0;
|
|
30
|
+
this.stateChanged = new Signal();
|
|
31
|
+
this.positionChanged = new Signal();
|
|
32
|
+
this.finished = new Signal();
|
|
33
|
+
}
|
|
34
|
+
// ---------------------------------------------------------------
|
|
35
|
+
// Getters
|
|
36
|
+
// ---------------------------------------------------------------
|
|
37
|
+
get state() {
|
|
38
|
+
return this._state;
|
|
39
|
+
}
|
|
40
|
+
get isPlaying() {
|
|
41
|
+
return this._state === AuditionerState.PLAYING;
|
|
42
|
+
}
|
|
43
|
+
get position() {
|
|
44
|
+
return this._position;
|
|
45
|
+
}
|
|
46
|
+
get duration() {
|
|
47
|
+
return this._duration;
|
|
48
|
+
}
|
|
49
|
+
get currentSourceId() {
|
|
50
|
+
return this._currentSourceId;
|
|
51
|
+
}
|
|
52
|
+
// ---------------------------------------------------------------
|
|
53
|
+
// Audition API
|
|
54
|
+
// ---------------------------------------------------------------
|
|
55
|
+
/**
|
|
56
|
+
* Audition an entire source by URL.
|
|
57
|
+
*
|
|
58
|
+
* Cancels any currently active audition, then begins playback of the
|
|
59
|
+
* full source from the beginning.
|
|
60
|
+
*/
|
|
61
|
+
auditSource(sourceId, url, duration) {
|
|
62
|
+
this.cancel();
|
|
63
|
+
this._currentSourceId = sourceId;
|
|
64
|
+
this._currentUrl = url;
|
|
65
|
+
this._duration = duration;
|
|
66
|
+
this._position = 0;
|
|
67
|
+
this._regionStart = 0;
|
|
68
|
+
this._regionLength = duration;
|
|
69
|
+
this.setState(AuditionerState.LOADING);
|
|
70
|
+
// Transition to PLAYING — in a real implementation this would wait for
|
|
71
|
+
// the audio backend to signal readiness, but for the domain model we
|
|
72
|
+
// treat the source as immediately available once loaded by the cache.
|
|
73
|
+
this.setState(AuditionerState.PLAYING);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Audition a specific region of a source.
|
|
77
|
+
*
|
|
78
|
+
* Useful for previewing a trimmed region or a clip without
|
|
79
|
+
* having to play the full underlying source.
|
|
80
|
+
*/
|
|
81
|
+
auditRegion(sourceId, url, start, length) {
|
|
82
|
+
this.cancel();
|
|
83
|
+
this._currentSourceId = sourceId;
|
|
84
|
+
this._currentUrl = url;
|
|
85
|
+
this._duration = length;
|
|
86
|
+
this._position = 0;
|
|
87
|
+
this._regionStart = start;
|
|
88
|
+
this._regionLength = length;
|
|
89
|
+
this.setState(AuditionerState.LOADING);
|
|
90
|
+
this.setState(AuditionerState.PLAYING);
|
|
91
|
+
}
|
|
92
|
+
// ---------------------------------------------------------------
|
|
93
|
+
// Transport controls
|
|
94
|
+
// ---------------------------------------------------------------
|
|
95
|
+
/**
|
|
96
|
+
* Resume or start playback of the current audition.
|
|
97
|
+
*/
|
|
98
|
+
play() {
|
|
99
|
+
if (this._state === AuditionerState.PAUSED ||
|
|
100
|
+
this._state === AuditionerState.LOADING) {
|
|
101
|
+
this.setState(AuditionerState.PLAYING);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Pause the current audition. Position is preserved so playback
|
|
106
|
+
* can be resumed with {@link play}.
|
|
107
|
+
*/
|
|
108
|
+
pause() {
|
|
109
|
+
if (this._state === AuditionerState.PLAYING) {
|
|
110
|
+
this.setState(AuditionerState.PAUSED);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Stop playback and reset position to the beginning.
|
|
115
|
+
*/
|
|
116
|
+
stop() {
|
|
117
|
+
if (this._state === AuditionerState.IDLE) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
this._position = 0;
|
|
121
|
+
this.positionChanged.emit(this._position);
|
|
122
|
+
this.setState(AuditionerState.IDLE);
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Seek to an absolute frame position within the auditioned region.
|
|
126
|
+
* The position is clamped to [0, duration).
|
|
127
|
+
*/
|
|
128
|
+
seek(frame) {
|
|
129
|
+
if (this._currentSourceId === null) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
this._position = Math.max(0, Math.min(frame, this._regionLength - 1));
|
|
133
|
+
this.positionChanged.emit(this._position);
|
|
134
|
+
}
|
|
135
|
+
// ---------------------------------------------------------------
|
|
136
|
+
// Settings
|
|
137
|
+
// ---------------------------------------------------------------
|
|
138
|
+
/**
|
|
139
|
+
* Set the auditioner output gain.
|
|
140
|
+
* @param gain Linear gain value (0.0 = silence, 1.0 = unity).
|
|
141
|
+
*/
|
|
142
|
+
setGain(gain) {
|
|
143
|
+
this._gain = Math.max(0, gain);
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Enable or disable looping for the current audition.
|
|
147
|
+
*/
|
|
148
|
+
setLooping(loop) {
|
|
149
|
+
this._looping = loop;
|
|
150
|
+
}
|
|
151
|
+
// ---------------------------------------------------------------
|
|
152
|
+
// Audio processing
|
|
153
|
+
// ---------------------------------------------------------------
|
|
154
|
+
/**
|
|
155
|
+
* Called by the audio engine on each render cycle to advance the
|
|
156
|
+
* auditioner position and produce an output descriptor.
|
|
157
|
+
*
|
|
158
|
+
* Returns `null` when the auditioner is not actively playing.
|
|
159
|
+
* When playback reaches the end of the region and looping is
|
|
160
|
+
* disabled, emits the {@link finished} signal and transitions
|
|
161
|
+
* to IDLE.
|
|
162
|
+
*
|
|
163
|
+
* @param blockSize Number of frames in this render block.
|
|
164
|
+
* @param _sampleRate Current engine sample rate (reserved for
|
|
165
|
+
* future sample-rate conversion).
|
|
166
|
+
*/
|
|
167
|
+
processBlock(blockSize, _sampleRate) {
|
|
168
|
+
if (this._state !== AuditionerState.PLAYING) {
|
|
169
|
+
return null;
|
|
170
|
+
}
|
|
171
|
+
if (this._currentSourceId === null || this._currentUrl === null) {
|
|
172
|
+
return null;
|
|
173
|
+
}
|
|
174
|
+
// Calculate how many frames we can actually render this block
|
|
175
|
+
const remaining = this._regionLength - this._position;
|
|
176
|
+
if (remaining <= 0) {
|
|
177
|
+
if (this._looping) {
|
|
178
|
+
this._position = 0;
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
this.setState(AuditionerState.IDLE);
|
|
182
|
+
this._position = 0;
|
|
183
|
+
this.positionChanged.emit(this._position);
|
|
184
|
+
this.finished.emit(undefined);
|
|
185
|
+
return null;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
const framesToRender = Math.min(blockSize, this._regionLength - this._position);
|
|
189
|
+
const output = {
|
|
190
|
+
sourceId: this._currentSourceId,
|
|
191
|
+
url: this._currentUrl,
|
|
192
|
+
startInSource: this._regionStart + this._position,
|
|
193
|
+
blockSize: framesToRender,
|
|
194
|
+
gain: this._gain,
|
|
195
|
+
};
|
|
196
|
+
this._position += framesToRender;
|
|
197
|
+
this.positionChanged.emit(this._position);
|
|
198
|
+
// Handle end-of-region
|
|
199
|
+
if (this._position >= this._regionLength) {
|
|
200
|
+
if (this._looping) {
|
|
201
|
+
this._position = 0;
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
this.setState(AuditionerState.IDLE);
|
|
205
|
+
this._position = 0;
|
|
206
|
+
this.positionChanged.emit(this._position);
|
|
207
|
+
this.finished.emit(undefined);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
return output;
|
|
211
|
+
}
|
|
212
|
+
// ---------------------------------------------------------------
|
|
213
|
+
// Cancel
|
|
214
|
+
// ---------------------------------------------------------------
|
|
215
|
+
/**
|
|
216
|
+
* Cancel the current audition and reset all state.
|
|
217
|
+
*/
|
|
218
|
+
cancel() {
|
|
219
|
+
this._currentSourceId = null;
|
|
220
|
+
this._currentUrl = null;
|
|
221
|
+
this._position = 0;
|
|
222
|
+
this._duration = 0;
|
|
223
|
+
this._regionStart = 0;
|
|
224
|
+
this._regionLength = 0;
|
|
225
|
+
if (this._state !== AuditionerState.IDLE) {
|
|
226
|
+
this.setState(AuditionerState.IDLE);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
// ---------------------------------------------------------------
|
|
230
|
+
// Private helpers
|
|
231
|
+
// ---------------------------------------------------------------
|
|
232
|
+
setState(state) {
|
|
233
|
+
if (this._state !== state) {
|
|
234
|
+
this._state = state;
|
|
235
|
+
this.stateChanged.emit(state);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
//# sourceMappingURL=Auditioner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Auditioner.js","sourceRoot":"","sources":["../../src/audio/Auditioner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAGvC;;;;;;;;GAQG;AAEH,MAAM,CAAN,IAAY,eAKX;AALD,WAAY,eAAe;IACvB,gCAAa,CAAA;IACb,sCAAmB,CAAA;IACnB,sCAAmB,CAAA;IACnB,oCAAiB,CAAA;A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eAAe,CAAC,IAAI,CAAC,CAAC;gBACpC,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;gBACnB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;gBAC1C,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,SAA4B,CAAC,CAAC;YACrD,CAAC;QACL,CAAC;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,kEAAkE;IAClE,SAAS;IACT,kEAAkE;IAElE;;OAEG;IACH,MAAM;QACF,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;QAC7B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxB,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;QACnB,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;QACnB,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;QACtB,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC;QAEvB,IAAI,IAAI,CAAC,MAAM,KAAK,eAAe,CAAC,IAAI,EAAE,CAAC;YACvC,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QACxC,CAAC;IACL,CAAC;IAED,kEAAkE;IAClE,kBAAkB;IAClB,kEAAkE;IAE1D,QAAQ,CAAC,KAAsB;QACnC,IAAI,IAAI,CAAC,MAAM,KAAK,KAAK,EAAE,CAAC;YACxB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;YACpB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAClC,CAAC;IACL,CAAC;CACJ"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BWF (Broadcast Wave Format) metadata handler.
|
|
3
|
+
*
|
|
4
|
+
* Ardour reference: libs/ardour/broadcast_info.cc
|
|
5
|
+
*
|
|
6
|
+
* BWF extends standard WAV with a 'bext' chunk containing:
|
|
7
|
+
* - Description (256 chars)
|
|
8
|
+
* - Originator (32 chars)
|
|
9
|
+
* - OriginatorReference (32 chars)
|
|
10
|
+
* - OriginationDate (10 chars, YYYY-MM-DD)
|
|
11
|
+
* - OriginationTime (8 chars, HH:MM:SS)
|
|
12
|
+
* - TimeReference (64-bit sample count)
|
|
13
|
+
* - Version (2 bytes)
|
|
14
|
+
* - UMID (64 bytes)
|
|
15
|
+
* - LoudnessValue, LoudnessRange, MaxTruePeakLevel, etc.
|
|
16
|
+
* - CodingHistory (variable length)
|
|
17
|
+
*
|
|
18
|
+
* Specification: EBU Tech 3285 (v2)
|
|
19
|
+
*/
|
|
20
|
+
export interface BWFData {
|
|
21
|
+
description: string;
|
|
22
|
+
originator: string;
|
|
23
|
+
originatorReference: string;
|
|
24
|
+
originationDate: string;
|
|
25
|
+
originationTime: string;
|
|
26
|
+
timeReference: bigint;
|
|
27
|
+
version: number;
|
|
28
|
+
umid: Uint8Array;
|
|
29
|
+
loudnessValue: number;
|
|
30
|
+
loudnessRange: number;
|
|
31
|
+
maxTruePeakLevel: number;
|
|
32
|
+
maxMomentaryLoudness: number;
|
|
33
|
+
maxShortTermLoudness: number;
|
|
34
|
+
codingHistory: string;
|
|
35
|
+
}
|
|
36
|
+
export declare class BWFMetadata {
|
|
37
|
+
/**
|
|
38
|
+
* Parse BWF metadata from a WAV file ArrayBuffer.
|
|
39
|
+
*
|
|
40
|
+
* Scans the RIFF/WAVE structure for a 'bext' chunk and decodes the
|
|
41
|
+
* fields according to EBU Tech 3285 v2. Returns `null` when no bext
|
|
42
|
+
* chunk is found.
|
|
43
|
+
*/
|
|
44
|
+
static parse(wavData: ArrayBuffer): BWFData | null;
|
|
45
|
+
/**
|
|
46
|
+
* Serialise {@link BWFData} into a standalone bext chunk (including
|
|
47
|
+
* the 8-byte chunk header: 'bext' + uint32 size).
|
|
48
|
+
*/
|
|
49
|
+
static createBextChunk(data: BWFData): ArrayBuffer;
|
|
50
|
+
/**
|
|
51
|
+
* Inject a bext chunk into an existing WAV file.
|
|
52
|
+
*
|
|
53
|
+
* If the WAV already contains a bext chunk it is replaced.
|
|
54
|
+
* The returned ArrayBuffer is a new, valid RIFF/WAVE file.
|
|
55
|
+
*/
|
|
56
|
+
static injectBWF(wavData: ArrayBuffer, bwfData: BWFData): ArrayBuffer;
|
|
57
|
+
/**
|
|
58
|
+
* Create default BWF data suitable for a new recording.
|
|
59
|
+
*
|
|
60
|
+
* Populates the origination date/time from the current wall clock and
|
|
61
|
+
* sets all other fields to sensible defaults.
|
|
62
|
+
*/
|
|
63
|
+
static createDefault(options?: {
|
|
64
|
+
description?: string;
|
|
65
|
+
originator?: string;
|
|
66
|
+
timeReference?: bigint;
|
|
67
|
+
sampleRate?: number;
|
|
68
|
+
}): BWFData;
|
|
69
|
+
/**
|
|
70
|
+
* Validate BWF data according to EBU Tech 3285 constraints.
|
|
71
|
+
*
|
|
72
|
+
* @returns An array of human-readable error strings (empty = valid).
|
|
73
|
+
*/
|
|
74
|
+
static validate(data: BWFData): string[];
|
|
75
|
+
/**
|
|
76
|
+
* Read a fixed-length ASCII string from a DataView, trimming NUL
|
|
77
|
+
* padding from the right.
|
|
78
|
+
*/
|
|
79
|
+
private static readFixedString;
|
|
80
|
+
/**
|
|
81
|
+
* Write a string into a fixed-length field, padding with NUL bytes.
|
|
82
|
+
*/
|
|
83
|
+
private static writeFixedString;
|
|
84
|
+
/**
|
|
85
|
+
* Locate a RIFF chunk by its four-character ID.
|
|
86
|
+
*
|
|
87
|
+
* Returns the offset of the chunk *data* (after the 8-byte header)
|
|
88
|
+
* and the data size. Returns `null` if the chunk is not found.
|
|
89
|
+
*/
|
|
90
|
+
private static findChunk;
|
|
91
|
+
/**
|
|
92
|
+
* Internal chunk finder that also returns the header offset (for
|
|
93
|
+
* replacement scenarios in {@link injectBWF}).
|
|
94
|
+
*/
|
|
95
|
+
private static findChunkRaw;
|
|
96
|
+
/**
|
|
97
|
+
* Read a four-character chunk ID from a DataView.
|
|
98
|
+
*/
|
|
99
|
+
private static readChunkId;
|
|
100
|
+
/**
|
|
101
|
+
* Write a four-character chunk ID into a DataView.
|
|
102
|
+
*/
|
|
103
|
+
private static writeChunkId;
|
|
104
|
+
/**
|
|
105
|
+
* Encode a string to a Uint8Array using ASCII (Latin-1 subset).
|
|
106
|
+
*/
|
|
107
|
+
private static encodeString;
|
|
108
|
+
/**
|
|
109
|
+
* Generate a unique originator reference string.
|
|
110
|
+
*
|
|
111
|
+
* EBU R99-1999 recommends a format based on country code, org code,
|
|
112
|
+
* and a serial number. We use a simplified random approach.
|
|
113
|
+
*/
|
|
114
|
+
private static generateOriginatorReference;
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=BWFMetadata.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BWFMetadata.d.ts","sourceRoot":"","sources":["../../src/audio/BWFMetadata.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,WAAW,OAAO;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,UAAU,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;CACzB;AA+CD,qBAAa,WAAW;IAKpB;;;;;;OAMG;IACH,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,GAAG,IAAI;IA0DlD;;;OAGG;IACH,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE,OAAO,GAAG,WAAW;IAuDlD;;;;;OAK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