@waveform-playlist/core 13.0.0-next.5 → 13.0.0-next.7
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/dist/index.d.mts +13 -12
- package/dist/index.d.ts +13 -12
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -81,17 +81,6 @@ type SpectrogramDisplayConfig = Pick<SpectrogramConfig, 'frequencyScale' | 'minF
|
|
|
81
81
|
* mode: it is always drawn as a piano roll.
|
|
82
82
|
*/
|
|
83
83
|
type RenderMode = 'waveform' | 'spectrogram' | 'both';
|
|
84
|
-
/**
|
|
85
|
-
* Per-track overrides for spectrogram rendering, each set only when the user
|
|
86
|
-
* chose it: a render mode from the track menu, a config and colour map from
|
|
87
|
-
* the settings. A field left out falls back to the track's own value.
|
|
88
|
-
*/
|
|
89
|
-
interface TrackSpectrogramOverrides {
|
|
90
|
-
/** Absent until a mode is chosen; the track's own `renderMode` applies meanwhile. */
|
|
91
|
-
renderMode?: RenderMode;
|
|
92
|
-
config?: SpectrogramConfig;
|
|
93
|
-
colorMap?: ColorMapValue;
|
|
94
|
-
}
|
|
95
84
|
|
|
96
85
|
/**
|
|
97
86
|
* Clip-Based Model Types
|
|
@@ -240,6 +229,18 @@ interface LoadingClip {
|
|
|
240
229
|
/** Pre-computed peaks, drawn while the audio loads */
|
|
241
230
|
waveformData?: WaveformDataObject;
|
|
242
231
|
}
|
|
232
|
+
/**
|
|
233
|
+
* The fields of a track that say how it is drawn, not how it plays. An
|
|
234
|
+
* adapter is never given them (`PlayoutTrack`), and the engine makes no
|
|
235
|
+
* adapter call for a change of these fields alone: on the native transport an
|
|
236
|
+
* `updateTrack` stops the track's playing sources (silent until its next
|
|
237
|
+
* clip), so a render-mode choice during playback silenced it (review of #930). The one list; the engine reads it.
|
|
238
|
+
*/
|
|
239
|
+
declare const TRACK_VIEW_FIELDS: readonly ["name", "color", "height", "renderMode", "spectrogramConfig", "spectrogramColorMap"];
|
|
240
|
+
/** A field of `TRACK_VIEW_FIELDS`. */
|
|
241
|
+
type TrackViewField = (typeof TRACK_VIEW_FIELDS)[number];
|
|
242
|
+
/** A track as a playout adapter is given it: a `ClipTrack` without the view fields. */
|
|
243
|
+
type PlayoutTrack = Omit<ClipTrack, TrackViewField>;
|
|
243
244
|
/** A track whose clips are loaded (`AudioClip`) or not loaded yet (`LoadingClip`). */
|
|
244
245
|
type ArrangementTrack = Omit<ClipTrack, 'clips'> & {
|
|
245
246
|
clips: (AudioClip | LoadingClip)[];
|
|
@@ -1731,4 +1732,4 @@ declare function needsPrepare(type: string, audioContext: BaseAudioContext): boo
|
|
|
1731
1732
|
declare function ensureEffectPrepared(type: string, audioContext: BaseAudioContext): Promise<void>;
|
|
1732
1733
|
declare function createEffectInstance(type: string, audioContext: BaseAudioContext, params?: Record<string, number>): CreatedNativeEffect;
|
|
1733
1734
|
|
|
1734
|
-
export { ANNOTATION_LINK_THRESHOLD_TICKS, type AnnotationAction, type AnnotationActionOptions, type AnnotationBoundaryOptions, type AnnotationBoundaryUpdate, type AnnotationBoundsChange, type AnnotationData, type AnnotationEventMap, type AnnotationFormat, type AnnotationListOptions, type AnnotationShortcutAction, type AnnotationShortcutMap, type AnnotationStore, type AnnotationStoreOptions, type ArrangementTrack, type AudioBuffer$1 as AudioBuffer, type AudioClip, type AudioTrackOptions, type Bits, type ClipSource, type ClipTrack, type ColorMapEntry, type ColorMapName, type ColorMapValue, type CreateClipOptions, type CreateClipOptionsSeconds, type CreateClipOptionsTicks, type CreateTrackOptions, type CreatedNativeEffect, DEFAULT_ANNOTATION_SHORTCUTS, DEFAULT_SPECTROGRAM_COLOR_MAP, type EffectParamDef, type FFTSize, type Fade, type FadeConfig, type FadeType, type Gap, InteractionState, type KeyBinding, type KeyboardShortcut, LINK_THRESHOLD, type LoadingClip, MAX_CANVAS_WIDTH, METER_PEAK_DECAY, MIN_ANNOTATION_DURATION, MIN_PIXELS_PER_UNIT, type MeterEntry, type MeterLevels, type MeterReading, type MeterSource, type MicrophoneDeviceInfo, type MicrophoneEnumeration, type MidiNoteData, type MixerGesture, type MusicalTick, type MusicalTickData, type MusicalTickParams, type NativeEffectDefinition, type NativeEffectInstance, PPQN, type PanMatrix, type PanStage, type PanStageContext, type PeakData, type Peaks, type PlaylistConfig, type PlayoutState, type RangeSupport, type ReadMeterMessageParams, type RecordingProgress, type RecordingProgressSource, type RenderAnnotationItemProps, type RenderMode, SPECTROGRAM_DEFAULTS, type SnapTo, type SourceLoader, type SourceState, type SpectrogramCanvasIdParts, type SpectrogramCanvasRegistration, type SpectrogramComputeConfig, type SpectrogramConfig, type SpectrogramData, type SpectrogramDisplayConfig, type TickType, type TimeSelection, type Timeline, type Track, type TrackChannelSource, type TrackKind, type
|
|
1735
|
+
export { ANNOTATION_LINK_THRESHOLD_TICKS, type AnnotationAction, type AnnotationActionOptions, type AnnotationBoundaryOptions, type AnnotationBoundaryUpdate, type AnnotationBoundsChange, type AnnotationData, type AnnotationEventMap, type AnnotationFormat, type AnnotationListOptions, type AnnotationShortcutAction, type AnnotationShortcutMap, type AnnotationStore, type AnnotationStoreOptions, type ArrangementTrack, type AudioBuffer$1 as AudioBuffer, type AudioClip, type AudioTrackOptions, type Bits, type ClipSource, type ClipTrack, type ColorMapEntry, type ColorMapName, type ColorMapValue, type CreateClipOptions, type CreateClipOptionsSeconds, type CreateClipOptionsTicks, type CreateTrackOptions, type CreatedNativeEffect, DEFAULT_ANNOTATION_SHORTCUTS, DEFAULT_SPECTROGRAM_COLOR_MAP, type EffectParamDef, type FFTSize, type Fade, type FadeConfig, type FadeType, type Gap, InteractionState, type KeyBinding, type KeyboardShortcut, LINK_THRESHOLD, type LoadingClip, MAX_CANVAS_WIDTH, METER_PEAK_DECAY, MIN_ANNOTATION_DURATION, MIN_PIXELS_PER_UNIT, type MeterEntry, type MeterLevels, type MeterReading, type MeterSource, type MicrophoneDeviceInfo, type MicrophoneEnumeration, type MidiNoteData, type MixerGesture, type MusicalTick, type MusicalTickData, type MusicalTickParams, type NativeEffectDefinition, type NativeEffectInstance, PPQN, type PanMatrix, type PanStage, type PanStageContext, type PeakData, type Peaks, type PlaylistConfig, type PlayoutState, type PlayoutTrack, type RangeSupport, type ReadMeterMessageParams, type RecordingProgress, type RecordingProgressSource, type RenderAnnotationItemProps, type RenderMode, SPECTROGRAM_DEFAULTS, type SnapTo, type SourceLoader, type SourceState, type SpectrogramCanvasIdParts, type SpectrogramCanvasRegistration, type SpectrogramComputeConfig, type SpectrogramConfig, type SpectrogramData, type SpectrogramDisplayConfig, TRACK_VIEW_FIELDS, type TickType, type TimeSelection, type Timeline, type Track, type TrackChannelSource, type TrackKind, type TrackViewField, type ValueSource, type ValueSourceHandle, type WaveformConfig, type WaveformDataObject, type ZoomLevel, annotationMinDurationTicks, appendPeaks, appendToAudioBuffer, applyAnnotationBounds, applyFadeIn, applyFadeOut, assertTrackKind, audibleLatencySamples, audioTrack, buildSpectrogramCanvasId, calculateDuration, carveClipRange, clipDurationTime, clipEndTime, clipKind, clipOffsetTime, clipPixelWidth, clipStartTime, clipsOverlap, computeMusicalTicks, concatenateAudioData, createAnnotationStore, createAudioBuffer, createClip, createClipFromSeconds, createClipFromTicks, createEffectInstance, createMixerGesture, createPanStage, createSourceLoader, createTimeline, createTrack, createValueSource, dBToNormalized, detectMeterChanges, ensureEffectPrepared, enumerateMicrophones, exponentialCurve, findGaps, gainToDb, gainToNormalized, generateCurve, generatePeaks, getClipsAtSample, getClipsInRange, getEffectDefinitions, handleKeyboardEvent, isLoadingClip, keyBelongsToFocusedControl, linearCurve, logarithmicCurve, matchesKeyBinding, needsPrepare, normalizedToDb, panMatrix, parseSpectrogramCanvasId, pixelsToSamples, pixelsToSeconds, prepareEffect, probeRangeSupport, readMeterMessage, registerEffect, resolveAnnotationShortcuts, resolveRecordingOffsetSamples, sCurveCurve, samplesToPixels, samplesToSeconds, samplesToTicks, secondsToPixels, secondsToSamples, silentMeterLevels, snapTickToGrid, snapToGrid, snapToTicks, sortClipsByTime, splitTrackByKind, ticksPerBar, ticksPerBeat, ticksToBarBeat, ticksToSamples, trackChannelCount, trackKind, unregisterEffect, updateAnnotationBoundaries, watchMicrophoneDevices };
|
package/dist/index.d.ts
CHANGED
|
@@ -81,17 +81,6 @@ type SpectrogramDisplayConfig = Pick<SpectrogramConfig, 'frequencyScale' | 'minF
|
|
|
81
81
|
* mode: it is always drawn as a piano roll.
|
|
82
82
|
*/
|
|
83
83
|
type RenderMode = 'waveform' | 'spectrogram' | 'both';
|
|
84
|
-
/**
|
|
85
|
-
* Per-track overrides for spectrogram rendering, each set only when the user
|
|
86
|
-
* chose it: a render mode from the track menu, a config and colour map from
|
|
87
|
-
* the settings. A field left out falls back to the track's own value.
|
|
88
|
-
*/
|
|
89
|
-
interface TrackSpectrogramOverrides {
|
|
90
|
-
/** Absent until a mode is chosen; the track's own `renderMode` applies meanwhile. */
|
|
91
|
-
renderMode?: RenderMode;
|
|
92
|
-
config?: SpectrogramConfig;
|
|
93
|
-
colorMap?: ColorMapValue;
|
|
94
|
-
}
|
|
95
84
|
|
|
96
85
|
/**
|
|
97
86
|
* Clip-Based Model Types
|
|
@@ -240,6 +229,18 @@ interface LoadingClip {
|
|
|
240
229
|
/** Pre-computed peaks, drawn while the audio loads */
|
|
241
230
|
waveformData?: WaveformDataObject;
|
|
242
231
|
}
|
|
232
|
+
/**
|
|
233
|
+
* The fields of a track that say how it is drawn, not how it plays. An
|
|
234
|
+
* adapter is never given them (`PlayoutTrack`), and the engine makes no
|
|
235
|
+
* adapter call for a change of these fields alone: on the native transport an
|
|
236
|
+
* `updateTrack` stops the track's playing sources (silent until its next
|
|
237
|
+
* clip), so a render-mode choice during playback silenced it (review of #930). The one list; the engine reads it.
|
|
238
|
+
*/
|
|
239
|
+
declare const TRACK_VIEW_FIELDS: readonly ["name", "color", "height", "renderMode", "spectrogramConfig", "spectrogramColorMap"];
|
|
240
|
+
/** A field of `TRACK_VIEW_FIELDS`. */
|
|
241
|
+
type TrackViewField = (typeof TRACK_VIEW_FIELDS)[number];
|
|
242
|
+
/** A track as a playout adapter is given it: a `ClipTrack` without the view fields. */
|
|
243
|
+
type PlayoutTrack = Omit<ClipTrack, TrackViewField>;
|
|
243
244
|
/** A track whose clips are loaded (`AudioClip`) or not loaded yet (`LoadingClip`). */
|
|
244
245
|
type ArrangementTrack = Omit<ClipTrack, 'clips'> & {
|
|
245
246
|
clips: (AudioClip | LoadingClip)[];
|
|
@@ -1731,4 +1732,4 @@ declare function needsPrepare(type: string, audioContext: BaseAudioContext): boo
|
|
|
1731
1732
|
declare function ensureEffectPrepared(type: string, audioContext: BaseAudioContext): Promise<void>;
|
|
1732
1733
|
declare function createEffectInstance(type: string, audioContext: BaseAudioContext, params?: Record<string, number>): CreatedNativeEffect;
|
|
1733
1734
|
|
|
1734
|
-
export { ANNOTATION_LINK_THRESHOLD_TICKS, type AnnotationAction, type AnnotationActionOptions, type AnnotationBoundaryOptions, type AnnotationBoundaryUpdate, type AnnotationBoundsChange, type AnnotationData, type AnnotationEventMap, type AnnotationFormat, type AnnotationListOptions, type AnnotationShortcutAction, type AnnotationShortcutMap, type AnnotationStore, type AnnotationStoreOptions, type ArrangementTrack, type AudioBuffer$1 as AudioBuffer, type AudioClip, type AudioTrackOptions, type Bits, type ClipSource, type ClipTrack, type ColorMapEntry, type ColorMapName, type ColorMapValue, type CreateClipOptions, type CreateClipOptionsSeconds, type CreateClipOptionsTicks, type CreateTrackOptions, type CreatedNativeEffect, DEFAULT_ANNOTATION_SHORTCUTS, DEFAULT_SPECTROGRAM_COLOR_MAP, type EffectParamDef, type FFTSize, type Fade, type FadeConfig, type FadeType, type Gap, InteractionState, type KeyBinding, type KeyboardShortcut, LINK_THRESHOLD, type LoadingClip, MAX_CANVAS_WIDTH, METER_PEAK_DECAY, MIN_ANNOTATION_DURATION, MIN_PIXELS_PER_UNIT, type MeterEntry, type MeterLevels, type MeterReading, type MeterSource, type MicrophoneDeviceInfo, type MicrophoneEnumeration, type MidiNoteData, type MixerGesture, type MusicalTick, type MusicalTickData, type MusicalTickParams, type NativeEffectDefinition, type NativeEffectInstance, PPQN, type PanMatrix, type PanStage, type PanStageContext, type PeakData, type Peaks, type PlaylistConfig, type PlayoutState, type RangeSupport, type ReadMeterMessageParams, type RecordingProgress, type RecordingProgressSource, type RenderAnnotationItemProps, type RenderMode, SPECTROGRAM_DEFAULTS, type SnapTo, type SourceLoader, type SourceState, type SpectrogramCanvasIdParts, type SpectrogramCanvasRegistration, type SpectrogramComputeConfig, type SpectrogramConfig, type SpectrogramData, type SpectrogramDisplayConfig, type TickType, type TimeSelection, type Timeline, type Track, type TrackChannelSource, type TrackKind, type
|
|
1735
|
+
export { ANNOTATION_LINK_THRESHOLD_TICKS, type AnnotationAction, type AnnotationActionOptions, type AnnotationBoundaryOptions, type AnnotationBoundaryUpdate, type AnnotationBoundsChange, type AnnotationData, type AnnotationEventMap, type AnnotationFormat, type AnnotationListOptions, type AnnotationShortcutAction, type AnnotationShortcutMap, type AnnotationStore, type AnnotationStoreOptions, type ArrangementTrack, type AudioBuffer$1 as AudioBuffer, type AudioClip, type AudioTrackOptions, type Bits, type ClipSource, type ClipTrack, type ColorMapEntry, type ColorMapName, type ColorMapValue, type CreateClipOptions, type CreateClipOptionsSeconds, type CreateClipOptionsTicks, type CreateTrackOptions, type CreatedNativeEffect, DEFAULT_ANNOTATION_SHORTCUTS, DEFAULT_SPECTROGRAM_COLOR_MAP, type EffectParamDef, type FFTSize, type Fade, type FadeConfig, type FadeType, type Gap, InteractionState, type KeyBinding, type KeyboardShortcut, LINK_THRESHOLD, type LoadingClip, MAX_CANVAS_WIDTH, METER_PEAK_DECAY, MIN_ANNOTATION_DURATION, MIN_PIXELS_PER_UNIT, type MeterEntry, type MeterLevels, type MeterReading, type MeterSource, type MicrophoneDeviceInfo, type MicrophoneEnumeration, type MidiNoteData, type MixerGesture, type MusicalTick, type MusicalTickData, type MusicalTickParams, type NativeEffectDefinition, type NativeEffectInstance, PPQN, type PanMatrix, type PanStage, type PanStageContext, type PeakData, type Peaks, type PlaylistConfig, type PlayoutState, type PlayoutTrack, type RangeSupport, type ReadMeterMessageParams, type RecordingProgress, type RecordingProgressSource, type RenderAnnotationItemProps, type RenderMode, SPECTROGRAM_DEFAULTS, type SnapTo, type SourceLoader, type SourceState, type SpectrogramCanvasIdParts, type SpectrogramCanvasRegistration, type SpectrogramComputeConfig, type SpectrogramConfig, type SpectrogramData, type SpectrogramDisplayConfig, TRACK_VIEW_FIELDS, type TickType, type TimeSelection, type Timeline, type Track, type TrackChannelSource, type TrackKind, type TrackViewField, type ValueSource, type ValueSourceHandle, type WaveformConfig, type WaveformDataObject, type ZoomLevel, annotationMinDurationTicks, appendPeaks, appendToAudioBuffer, applyAnnotationBounds, applyFadeIn, applyFadeOut, assertTrackKind, audibleLatencySamples, audioTrack, buildSpectrogramCanvasId, calculateDuration, carveClipRange, clipDurationTime, clipEndTime, clipKind, clipOffsetTime, clipPixelWidth, clipStartTime, clipsOverlap, computeMusicalTicks, concatenateAudioData, createAnnotationStore, createAudioBuffer, createClip, createClipFromSeconds, createClipFromTicks, createEffectInstance, createMixerGesture, createPanStage, createSourceLoader, createTimeline, createTrack, createValueSource, dBToNormalized, detectMeterChanges, ensureEffectPrepared, enumerateMicrophones, exponentialCurve, findGaps, gainToDb, gainToNormalized, generateCurve, generatePeaks, getClipsAtSample, getClipsInRange, getEffectDefinitions, handleKeyboardEvent, isLoadingClip, keyBelongsToFocusedControl, linearCurve, logarithmicCurve, matchesKeyBinding, needsPrepare, normalizedToDb, panMatrix, parseSpectrogramCanvasId, pixelsToSamples, pixelsToSeconds, prepareEffect, probeRangeSupport, readMeterMessage, registerEffect, resolveAnnotationShortcuts, resolveRecordingOffsetSamples, sCurveCurve, samplesToPixels, samplesToSeconds, samplesToTicks, secondsToPixels, secondsToSamples, silentMeterLevels, snapTickToGrid, snapToGrid, snapToTicks, sortClipsByTime, splitTrackByKind, ticksPerBar, ticksPerBeat, ticksToBarBeat, ticksToSamples, trackChannelCount, trackKind, unregisterEffect, updateAnnotationBoundaries, watchMicrophoneDevices };
|
package/dist/index.js
CHANGED
|
@@ -31,6 +31,7 @@ __export(index_exports, {
|
|
|
31
31
|
MIN_PIXELS_PER_UNIT: () => MIN_PIXELS_PER_UNIT,
|
|
32
32
|
PPQN: () => PPQN,
|
|
33
33
|
SPECTROGRAM_DEFAULTS: () => SPECTROGRAM_DEFAULTS,
|
|
34
|
+
TRACK_VIEW_FIELDS: () => TRACK_VIEW_FIELDS,
|
|
34
35
|
annotationMinDurationTicks: () => annotationMinDurationTicks,
|
|
35
36
|
appendPeaks: () => appendPeaks,
|
|
36
37
|
appendToAudioBuffer: () => appendToAudioBuffer,
|
|
@@ -123,6 +124,14 @@ module.exports = __toCommonJS(index_exports);
|
|
|
123
124
|
var MAX_CANVAS_WIDTH = 1e3;
|
|
124
125
|
|
|
125
126
|
// src/types/clip.ts
|
|
127
|
+
var TRACK_VIEW_FIELDS = [
|
|
128
|
+
"name",
|
|
129
|
+
"color",
|
|
130
|
+
"height",
|
|
131
|
+
"renderMode",
|
|
132
|
+
"spectrogramConfig",
|
|
133
|
+
"spectrogramColorMap"
|
|
134
|
+
];
|
|
126
135
|
function isLoadingClip(clip) {
|
|
127
136
|
return !("sampleRate" in clip) || clip.sampleRate == null;
|
|
128
137
|
}
|
|
@@ -1903,6 +1912,7 @@ function createEffectInstance(type, audioContext, params = {}) {
|
|
|
1903
1912
|
MIN_PIXELS_PER_UNIT,
|
|
1904
1913
|
PPQN,
|
|
1905
1914
|
SPECTROGRAM_DEFAULTS,
|
|
1915
|
+
TRACK_VIEW_FIELDS,
|
|
1906
1916
|
annotationMinDurationTicks,
|
|
1907
1917
|
appendPeaks,
|
|
1908
1918
|
appendToAudioBuffer,
|