@libraz/libsonare 1.5.1 → 1.5.2
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.ts +24 -3
- package/dist/index.js +76 -2
- package/dist/index.js.map +1 -1
- package/dist/sonare.wasm +0 -0
- package/dist/worklet.js +1 -1
- package/dist/worklet.js.map +1 -1
- package/package.json +1 -1
- package/src/feature_music.ts +105 -0
- package/src/features.ts +2 -0
- package/src/index.ts +3 -0
- package/src/mastering_core.ts +10 -0
- package/src/mixer.ts +1 -1
- package/src/public_types_music.ts +1 -0
- package/src/sonare.js.d.ts +25 -0
- package/src/stream_analyzer.ts +5 -1
- package/src/stream_types.ts +4 -0
package/dist/index.d.ts
CHANGED
|
@@ -538,6 +538,7 @@ interface KeyCandidate {
|
|
|
538
538
|
interface ChordDetectionOptions extends ValidateOptions {
|
|
539
539
|
minDuration?: number;
|
|
540
540
|
smoothingWindow?: number;
|
|
541
|
+
/** Final-template correlation threshold in [0, 1]; below it emits Unknown / N.C. */
|
|
541
542
|
threshold?: number;
|
|
542
543
|
useTriadsOnly?: boolean;
|
|
543
544
|
nFft?: number;
|
|
@@ -1357,6 +1358,16 @@ interface MasteringProcessorCatalogEntry {
|
|
|
1357
1358
|
realtimeInsertable: boolean;
|
|
1358
1359
|
/** True for processors with no mono implementation (stereo-only). */
|
|
1359
1360
|
stereoOnly: boolean;
|
|
1361
|
+
/**
|
|
1362
|
+
* Reported latency for the default 48 kHz / 512-sample probe configuration.
|
|
1363
|
+
* Zero for offline processors; configuration-dependent values are estimates.
|
|
1364
|
+
*/
|
|
1365
|
+
latencySamples: number;
|
|
1366
|
+
/**
|
|
1367
|
+
* Audible decay length for the same default prepared probe. Zero for
|
|
1368
|
+
* offline, dry-only, and no-tail processors.
|
|
1369
|
+
*/
|
|
1370
|
+
tailSamples: number;
|
|
1360
1371
|
/**
|
|
1361
1372
|
* How the mixer wraps the processor on a >2-channel (surround) bus insert:
|
|
1362
1373
|
* "multichannel" (one full-buffer call) or "stereoPairOnly" (front L/R pair,
|
|
@@ -2498,6 +2509,7 @@ declare function synthPresetNames(): string[];
|
|
|
2498
2509
|
declare function synthPresetPatch(name: string): SynthPatch;
|
|
2499
2510
|
declare function synthEnumTables(): SynthEnumTables;
|
|
2500
2511
|
|
|
2512
|
+
type ExternalMidiEvent = WasmExternalMidiEvent;
|
|
2501
2513
|
type EngineClip = WasmEngineClip;
|
|
2502
2514
|
type ClipPageRequest = WasmClipPageRequest;
|
|
2503
2515
|
type EngineParameterInfo = WasmEngineParameterInfo;
|
|
@@ -3094,6 +3106,10 @@ declare function hybridCqt(samples: Float32Array, sampleRate?: number, hopLength
|
|
|
3094
3106
|
* @returns VQT magnitude result (same shape as CQT)
|
|
3095
3107
|
*/
|
|
3096
3108
|
declare function vqt(samples: Float32Array, sampleRate?: number, hopLength?: number, fmin?: number, nBins?: number, binsPerOctave?: number, gamma?: number, options?: GuardedOptions$2): CqtResult;
|
|
3109
|
+
/** Reconstruct mono audio from row-major CQT magnitude via Griffin-Lim. */
|
|
3110
|
+
declare function cqtToAudio(magnitude: Float32Array, nBins: number, nFrames: number, sampleRate?: number, hopLength?: number, fmin?: number, binsPerOctave?: number, nIter?: number, options?: GuardedOptions$2): Float32Array;
|
|
3111
|
+
/** Reconstruct mono audio from row-major VQT magnitude via Griffin-Lim. */
|
|
3112
|
+
declare function vqtToAudio(magnitude: Float32Array, nBins: number, nFrames: number, sampleRate?: number, hopLength?: number, fmin?: number, binsPerOctave?: number, gamma?: number, nIter?: number, options?: GuardedOptions$2): Float32Array;
|
|
3097
3113
|
/**
|
|
3098
3114
|
* Detect song-structure sections (intro/verse/chorus/...).
|
|
3099
3115
|
*
|
|
@@ -4494,6 +4510,8 @@ interface AnalyzerStats {
|
|
|
4494
4510
|
durationSeconds: number;
|
|
4495
4511
|
pendingFrames: number;
|
|
4496
4512
|
droppedOutputFrames: number;
|
|
4513
|
+
droppedChordProgressionEntries: number;
|
|
4514
|
+
droppedBarProgressionEntries: number;
|
|
4497
4515
|
estimate: ProgressiveEstimate;
|
|
4498
4516
|
}
|
|
4499
4517
|
/**
|
|
@@ -4586,6 +4604,8 @@ interface StreamConfig {
|
|
|
4586
4604
|
magnitudeDownsample?: number;
|
|
4587
4605
|
/** Maximum unread frames; overflow drops the oldest frame. */
|
|
4588
4606
|
maxPendingFrames?: number;
|
|
4607
|
+
/** Maximum retained chord and bar progression entries; overflow drops oldest. */
|
|
4608
|
+
maxProgressionEntries?: number;
|
|
4589
4609
|
keyUpdateIntervalSec?: number;
|
|
4590
4610
|
bpmUpdateIntervalSec?: number;
|
|
4591
4611
|
window?: number;
|
|
@@ -4630,7 +4650,8 @@ declare class StreamAnalyzer {
|
|
|
4630
4650
|
*/
|
|
4631
4651
|
process(samples: Float32Array): void;
|
|
4632
4652
|
/**
|
|
4633
|
-
* Process audio samples with explicit sample offset.
|
|
4653
|
+
* Process audio samples with a contiguous explicit sample offset. A gap,
|
|
4654
|
+
* seek, or switch from `process()` requires `reset()` first.
|
|
4634
4655
|
*
|
|
4635
4656
|
* @param samples - Audio samples (mono, float32)
|
|
4636
4657
|
* @param sampleOffset - Cumulative sample count at start of this chunk
|
|
@@ -4975,7 +4996,7 @@ declare class Mixer {
|
|
|
4975
4996
|
/** Serialize the current scene (strips, buses, sends, connections) to JSON. */
|
|
4976
4997
|
toSceneJson(): string;
|
|
4977
4998
|
/**
|
|
4978
|
-
*
|
|
4999
|
+
* Longest audible serial processor-tail path to the master, in samples. Lazily
|
|
4979
5000
|
* compiles the routing graph if the topology is dirty.
|
|
4980
5001
|
*/
|
|
4981
5002
|
tailSamples(): number;
|
|
@@ -5414,4 +5435,4 @@ declare function voiceCharacterPresetId(preset: VoicePresetId | number): string
|
|
|
5414
5435
|
*/
|
|
5415
5436
|
declare function realtimeVoiceChangerPresetConfig(preset: VoicePresetId | number): RealtimeVoiceChangerPodConfig | null;
|
|
5416
5437
|
|
|
5417
|
-
export { type AcousticOptions, type AcousticResult, type AnalysisResult, type AnalyzeBpmOptions, type AnalyzeDynamicsOptions, type AnalyzeRhythmOptions, type AnalyzeSectionsOptions, type AnalyzeTimbreOptions, type AnalyzerStats, Audio, type AutomationCurve, type BarChord, type Beat, type BindMicrophoneInputOptions, type BindWebMidiOptions, type BpmAnalysisResult, type BpmCandidate, type BrowserAudioDecodeOptions, type BuiltinSynthBinding, type BuiltinSynthConfig, type BuiltinSynthWaveform, type Chord, type ChordAnalysisResult, type ChordChange, type ChordDetectionOptions, ChordQuality, type ChromaResult, type ClipPageStreamSource, ClipPageStreamer, type ClipPageStreamerEngine, type ClipPageStreamerOptions, type ClippingRegion, type ClippingReport, type CompressorDetector, type CompressorOptions, type CqtResult, type DeclickOptions, type DeclipOptions, type DecomposeResult, type DecrackleMode, type DecrackleOptions, type DehumOptions, type DenoiseClassicalMode, type DenoiseClassicalNoiseEstimator, type DenoiseClassicalOptions, type DereverbClassicalOptions, type DynamicRangeReport, type Dynamics, type DynamicsAnalysisResult, type DynamicsResult, EXPECTED_ENGINE_ABI_VERSION, EXPECTED_PROJECT_ABI_VERSION, type EngineAutomationPoint, type EngineBounceOptions, type EngineBounceResult, type EngineBus, type EngineCapabilities, type EngineCaptureStatus, type EngineClip, type EngineFreezeOptions, type EngineFreezeResult, type EngineGraphSpec, type EngineMarker, type EngineMeterTelemetry, type EngineMeterTelemetryWide, type EngineMetronomeConfig, type EngineMidiClipSchedule, type EngineMidiEvent, type EngineParameterInfo, type EngineScopeTelemetry, type EngineTelemetry, type EngineTempoSegment, type EngineTimeSignatureSegment, type EngineTrackLane, type EngineTrackSend, type EngineTransportState, type EqBand, type EqBandPhase, type EqBandType, type EqCoeffMode, type EqMatchOptions, type EqSpectrumSnapshot, type EqStereoPlacement, ErrorCode, type FrameBuffer, type GateOptions, type GoniometerPoint, type HpssResult, type HpssWithResidualResult, type Key, type KeyCandidate, type KeyDetectionOptions, KeyProfile, type KeyProfileName, type LufsResult, MarkerKind, type MasteringChainConfig, type MasteringChainResult, type MasteringChannelPolicy, type MasteringInsertParamInfo, type MasteringOptions, type MasteringPreset, type MasteringProcessorCatalogEntry, type MasteringProcessorParams, type MasteringResult, type MasteringStereoChainResult, type MasteringStereoResult, type Matrix2dResult, type MelPowerResult, type MelSpectrogramResult, type MelodyOptions, type MelodyPoint, type MelodyResult, type MeterTap, type MeteringDetectClippingOptions, type MeteringDynamicRangeOptions, type MfccResult, type MicrophoneInputBinding, type MidiCcBindOptions, type MidiCcLearnOptions, type MixMeterSnapshot, type MixOptions, type MixResult, Mixer, type MixerProcessResult, type MixerRealtimeBuffer, Mode, type NoteStretchOptions, type OpfsClipPageProviderBinding, type OpfsClipPageProviderOptions, type OpfsClipStream, type OpfsClipStreamOptions, type PairAnalysis, type PairProcessor, type PanLaw, type PanMode, type PatternScore, type PhaseScopeReport, PitchClass as Pitch, PitchClass, type PitchCorrectOptions, type PitchResult, type ProgressiveEstimate, Project, type ProjectAssistSidecar, type ProjectAutomationCurve, type ProjectAutomationLaneDesc, type ProjectAutomationPoint, type ProjectBounceOptions, type ProjectChordSymbol, type ProjectClipCompSegment, type ProjectClipDesc, type ProjectClipFade, type ProjectClipTake, type ProjectCompileResult, type ProjectFadeCurve, type ProjectKeySegment, type ProjectLoopMode, type ProjectLoopRecordingDesc, type ProjectLoopRecordingResult, type ProjectMarker, type ProjectMidiClipResult, type ProjectMidiEvent, type ProjectNotePairValidation, type ProjectTrackDesc, type ProjectTrackKind, type ProjectWarpAnchor, type ProjectWarpMapDesc, RealtimeEngine, RealtimeVoiceChanger, type RealtimeVoiceChangerConfigInput, type RealtimeVoiceChangerInterleavedBuffer, type RealtimeVoiceChangerMonoBuffer, type RealtimeVoiceChangerPlanarBuffer, type RealtimeVoiceChangerPodConfig, type RhythmAnalysisResult, type RhythmFeatures, type RirResult, type RirSynthOptions, type RoomEstimateOptions, type RoomEstimateResult, type RoomGeometryOptions, type RoomMorphOptions, SYNTH_BODY_TYPES, SYNTH_ENGINE_MODES, SYNTH_FILTER_MODELS, SYNTH_FILTER_OUTPUTS, SYNTH_MOD_DESTINATIONS, SYNTH_MOD_SOURCES, SYNTH_OSC_WAVEFORMS, type Section, SectionType, type SendTiming, type Sf2InstrumentConfig, type Sf2ProgramStatus, type SoloProcessor, SonareError, type SourceBackend, type SpectralEditMode, type SpectralEditOptions, type SpectralEditWindow, type SpectralRegionOp, type SpectrumOptions, type SpectrumReport, type StereoAnalysis, type StftPowerResult, type StftResult, StreamAnalyzer, type StreamConfig, type StreamConfigDefaults, type StreamFramesI16, type StreamFramesU8, type StreamQuantizeConfig, StreamingEqualizer, type StreamingEqualizerConfig, StreamingMasteringChain, type StreamingMasteringChainConfig, type StreamingPlatform, StreamingRetune, type StreamingRetuneConfig, type SynthBodyType, type SynthEngineMode, type SynthEnumTables, type SynthFilterModel, type SynthFilterOutput, type SynthModDestination, type SynthModRouting, type SynthModSource, type SynthOscWaveform, type SynthPatch, type TempogramMode, type Timbre, type TimbreAnalysisResult, type TimbreFrame, type TimeSignature, type TransientShaperOptions, type TrimSilenceMode, type TrimSilenceOptions, type ValidateOptions, type VectorscopeReport, type VoiceChangeOptions, type VoiceChangeRealtimeOptions, type VoicePresetId, type WaveformPeakPyramidOptions, type WaveformPeaksOptions, type WaveformPeaksReport, type WebMidiBinding, type WebMidiCcBinding, type WebMidiInputInfo, abiVersion, amplitudeToDb, analyze, analyzeBpm, analyzeDynamics, analyzeImpulseResponse, analyzeMelody, analyzeRhythm, analyzeSections, analyzeTimbre, analyzeWithProgress, attachOpfsClipStream, bassChroma, bindMicrophoneInput, bindWebMidi, chordFunctionalAnalysis, chroma, chromaCens, chromaCqt, cqt, createOpfsClipPageProvider, createOpfsClipPageWorker, cyclicTempogram, dbToAmplitude, dbToPower, decompose, decomposeWithInit, deemphasis, detectAcoustic, detectBeats, detectBpm, detectChords, detectDownbeats, detectKey, detectKeyCandidates, detectOnsets, ebur128LoudnessRange, engineAbiVersion, engineCapabilities, estimateRoom, estimateTuning, fixFrames, fixLength, fourierTempogram, frameSignal, framesToSamples, framesToTime, harmonic, hasFfmpegSupport, hpss, hpssWithResidual, hybridCqt, hzToMel, hzToMidi, hzToNote, init, isInitialized, isSonareError, isWebMidiAvailable, lufs, lufsInterleaved, masterAudio, masterAudioStereo, masterAudioStereoWithProgress, masterAudioWithProgress, mastering, masteringAssistantSuggest, masteringAudioProfile, masteringChain, masteringChainStereo, masteringChainStereoWithProgress, masteringChainWithProgress, masteringDynamicsCompressor, masteringDynamicsGate, masteringDynamicsTransientShaper, masteringInsertNames, masteringInsertParamInfo, masteringInsertParamNames, masteringPairAnalysisNames, masteringPairAnalyze, masteringPairProcess, masteringPairProcessorNames, masteringPresetNames, masteringProcess, masteringProcessStereo, masteringProcessorCatalog, masteringProcessorNames, masteringRepairDeclick, masteringRepairDeclip, masteringRepairDecrackle, masteringRepairDehum, masteringRepairDenoiseClassical, masteringRepairDereverbClassical, masteringRepairTrimSilence, masteringStereoAnalysisNames, masteringStereoAnalyze, masteringStreamingPreview, melSpectrogram, melToAudio, melToHz, melToStft, meteringCrestFactorDb, meteringDcOffset, meteringDetectClipping, meteringDynamicRange, meteringPeakDb, meteringPhaseScope, meteringPhaseScopeDecimated, meteringRmsDb, meteringSpectrum, meteringSpectrumFrame, meteringStereoCorrelation, meteringStereoWidth, meteringTruePeakDb, meteringVectorscope, meteringVectorscopeDecimated, mfcc, mfccToAudio, mfccToMel, midiToHz, mixStereo, mixingScenePresetJson, mixingScenePresetNames, momentaryLufs, nnFilter, nnlsChroma, normalize, noteStretch, noteToHz, onsetEnvelope, onsetStrengthMulti, opfsClipPageWorkerSource, padCenter, pcen, peakPick, percussive, phaseVocoder, pitchCorrectTimevarying, pitchCorrectToMidi, pitchCorrectToMidiTimevarying, pitchPyin, pitchShift, pitchTuning, pitchYin, plp, polyFeatures, powerToDb, preemphasis, projectAbiVersion, pseudoCqt, realtimeVoiceChangerPresetConfig, realtimeVoiceChangerPresetJson, realtimeVoiceChangerPresetNames, remix, resample, rmsEnergy, roomMorph, samplesToFrames, scaleCorrectionSemitones, scalePitchClassEnabled, scaleQuantizeMidi, shortTermLufs, spectralBandwidth, spectralCentroid, spectralContrast, spectralEdit, spectralFlatness, spectralRolloff, splitSilence, stft, stftDb, streamAnalyzerConfigDefaults, synthEnumTables, synthPresetNames, synthPresetPatch, synthesizeRir, tempogram, tempogramRatio, timeStretch, timeToFrames, tonnetz, trim, trimSilence, validateRealtimeVoiceChangerPresetJson, vectorNormalize, version, voiceChange, voiceChangeRealtime, voiceChangerAbiVersion, voiceCharacterPresetId, vqt, waveformPeakPyramid, waveformPeaks, zeroCrossingRate, zeroCrossings };
|
|
5438
|
+
export { type AcousticOptions, type AcousticResult, type AnalysisResult, type AnalyzeBpmOptions, type AnalyzeDynamicsOptions, type AnalyzeRhythmOptions, type AnalyzeSectionsOptions, type AnalyzeTimbreOptions, type AnalyzerStats, Audio, type AutomationCurve, type BarChord, type Beat, type BindMicrophoneInputOptions, type BindWebMidiOptions, type BpmAnalysisResult, type BpmCandidate, type BrowserAudioDecodeOptions, type BuiltinSynthBinding, type BuiltinSynthConfig, type BuiltinSynthWaveform, type Chord, type ChordAnalysisResult, type ChordChange, type ChordDetectionOptions, ChordQuality, type ChromaResult, type ClipPageStreamSource, ClipPageStreamer, type ClipPageStreamerEngine, type ClipPageStreamerOptions, type ClippingRegion, type ClippingReport, type CompressorDetector, type CompressorOptions, type CqtResult, type DeclickOptions, type DeclipOptions, type DecomposeResult, type DecrackleMode, type DecrackleOptions, type DehumOptions, type DenoiseClassicalMode, type DenoiseClassicalNoiseEstimator, type DenoiseClassicalOptions, type DereverbClassicalOptions, type DynamicRangeReport, type Dynamics, type DynamicsAnalysisResult, type DynamicsResult, EXPECTED_ENGINE_ABI_VERSION, EXPECTED_PROJECT_ABI_VERSION, type EngineAutomationPoint, type EngineBounceOptions, type EngineBounceResult, type EngineBus, type EngineCapabilities, type EngineCaptureStatus, type EngineClip, type EngineFreezeOptions, type EngineFreezeResult, type EngineGraphSpec, type EngineMarker, type EngineMeterTelemetry, type EngineMeterTelemetryWide, type EngineMetronomeConfig, type EngineMidiClipSchedule, type EngineMidiEvent, type EngineParameterInfo, type EngineScopeTelemetry, type EngineTelemetry, type EngineTempoSegment, type EngineTimeSignatureSegment, type EngineTrackLane, type EngineTrackSend, type EngineTransportState, type EqBand, type EqBandPhase, type EqBandType, type EqCoeffMode, type EqMatchOptions, type EqSpectrumSnapshot, type EqStereoPlacement, ErrorCode, type ExternalMidiEvent, type FrameBuffer, type GateOptions, type GoniometerPoint, type HpssResult, type HpssWithResidualResult, type Key, type KeyCandidate, type KeyDetectionOptions, KeyProfile, type KeyProfileName, type LufsResult, MarkerKind, type MasteringChainConfig, type MasteringChainResult, type MasteringChannelPolicy, type MasteringInsertParamInfo, type MasteringOptions, type MasteringPreset, type MasteringProcessorCatalogEntry, type MasteringProcessorParams, type MasteringResult, type MasteringStereoChainResult, type MasteringStereoResult, type Matrix2dResult, type MelPowerResult, type MelSpectrogramResult, type MelodyOptions, type MelodyPoint, type MelodyResult, type MeterTap, type MeteringDetectClippingOptions, type MeteringDynamicRangeOptions, type MfccResult, type MicrophoneInputBinding, type MidiCcBindOptions, type MidiCcLearnOptions, type MixMeterSnapshot, type MixOptions, type MixResult, Mixer, type MixerProcessResult, type MixerRealtimeBuffer, Mode, type NoteStretchOptions, type OpfsClipPageProviderBinding, type OpfsClipPageProviderOptions, type OpfsClipStream, type OpfsClipStreamOptions, type PairAnalysis, type PairProcessor, type PanLaw, type PanMode, type PatternScore, type PhaseScopeReport, PitchClass as Pitch, PitchClass, type PitchCorrectOptions, type PitchResult, type ProgressiveEstimate, Project, type ProjectAssistSidecar, type ProjectAutomationCurve, type ProjectAutomationLaneDesc, type ProjectAutomationPoint, type ProjectBounceOptions, type ProjectChordSymbol, type ProjectClipCompSegment, type ProjectClipDesc, type ProjectClipFade, type ProjectClipTake, type ProjectCompileResult, type ProjectFadeCurve, type ProjectKeySegment, type ProjectLoopMode, type ProjectLoopRecordingDesc, type ProjectLoopRecordingResult, type ProjectMarker, type ProjectMidiClipResult, type ProjectMidiEvent, type ProjectNotePairValidation, type ProjectTrackDesc, type ProjectTrackKind, type ProjectWarpAnchor, type ProjectWarpMapDesc, RealtimeEngine, RealtimeVoiceChanger, type RealtimeVoiceChangerConfigInput, type RealtimeVoiceChangerInterleavedBuffer, type RealtimeVoiceChangerMonoBuffer, type RealtimeVoiceChangerPlanarBuffer, type RealtimeVoiceChangerPodConfig, type RhythmAnalysisResult, type RhythmFeatures, type RirResult, type RirSynthOptions, type RoomEstimateOptions, type RoomEstimateResult, type RoomGeometryOptions, type RoomMorphOptions, SYNTH_BODY_TYPES, SYNTH_ENGINE_MODES, SYNTH_FILTER_MODELS, SYNTH_FILTER_OUTPUTS, SYNTH_MOD_DESTINATIONS, SYNTH_MOD_SOURCES, SYNTH_OSC_WAVEFORMS, type Section, SectionType, type SendTiming, type Sf2InstrumentConfig, type Sf2ProgramStatus, type SoloProcessor, SonareError, type SourceBackend, type SpectralEditMode, type SpectralEditOptions, type SpectralEditWindow, type SpectralRegionOp, type SpectrumOptions, type SpectrumReport, type StereoAnalysis, type StftPowerResult, type StftResult, StreamAnalyzer, type StreamConfig, type StreamConfigDefaults, type StreamFramesI16, type StreamFramesU8, type StreamQuantizeConfig, StreamingEqualizer, type StreamingEqualizerConfig, StreamingMasteringChain, type StreamingMasteringChainConfig, type StreamingPlatform, StreamingRetune, type StreamingRetuneConfig, type SynthBodyType, type SynthEngineMode, type SynthEnumTables, type SynthFilterModel, type SynthFilterOutput, type SynthModDestination, type SynthModRouting, type SynthModSource, type SynthOscWaveform, type SynthPatch, type TempogramMode, type Timbre, type TimbreAnalysisResult, type TimbreFrame, type TimeSignature, type TransientShaperOptions, type TrimSilenceMode, type TrimSilenceOptions, type ValidateOptions, type VectorscopeReport, type VoiceChangeOptions, type VoiceChangeRealtimeOptions, type VoicePresetId, type WaveformPeakPyramidOptions, type WaveformPeaksOptions, type WaveformPeaksReport, type WebMidiBinding, type WebMidiCcBinding, type WebMidiInputInfo, abiVersion, amplitudeToDb, analyze, analyzeBpm, analyzeDynamics, analyzeImpulseResponse, analyzeMelody, analyzeRhythm, analyzeSections, analyzeTimbre, analyzeWithProgress, attachOpfsClipStream, bassChroma, bindMicrophoneInput, bindWebMidi, chordFunctionalAnalysis, chroma, chromaCens, chromaCqt, cqt, cqtToAudio, createOpfsClipPageProvider, createOpfsClipPageWorker, cyclicTempogram, dbToAmplitude, dbToPower, decompose, decomposeWithInit, deemphasis, detectAcoustic, detectBeats, detectBpm, detectChords, detectDownbeats, detectKey, detectKeyCandidates, detectOnsets, ebur128LoudnessRange, engineAbiVersion, engineCapabilities, estimateRoom, estimateTuning, fixFrames, fixLength, fourierTempogram, frameSignal, framesToSamples, framesToTime, harmonic, hasFfmpegSupport, hpss, hpssWithResidual, hybridCqt, hzToMel, hzToMidi, hzToNote, init, isInitialized, isSonareError, isWebMidiAvailable, lufs, lufsInterleaved, masterAudio, masterAudioStereo, masterAudioStereoWithProgress, masterAudioWithProgress, mastering, masteringAssistantSuggest, masteringAudioProfile, masteringChain, masteringChainStereo, masteringChainStereoWithProgress, masteringChainWithProgress, masteringDynamicsCompressor, masteringDynamicsGate, masteringDynamicsTransientShaper, masteringInsertNames, masteringInsertParamInfo, masteringInsertParamNames, masteringPairAnalysisNames, masteringPairAnalyze, masteringPairProcess, masteringPairProcessorNames, masteringPresetNames, masteringProcess, masteringProcessStereo, masteringProcessorCatalog, masteringProcessorNames, masteringRepairDeclick, masteringRepairDeclip, masteringRepairDecrackle, masteringRepairDehum, masteringRepairDenoiseClassical, masteringRepairDereverbClassical, masteringRepairTrimSilence, masteringStereoAnalysisNames, masteringStereoAnalyze, masteringStreamingPreview, melSpectrogram, melToAudio, melToHz, melToStft, meteringCrestFactorDb, meteringDcOffset, meteringDetectClipping, meteringDynamicRange, meteringPeakDb, meteringPhaseScope, meteringPhaseScopeDecimated, meteringRmsDb, meteringSpectrum, meteringSpectrumFrame, meteringStereoCorrelation, meteringStereoWidth, meteringTruePeakDb, meteringVectorscope, meteringVectorscopeDecimated, mfcc, mfccToAudio, mfccToMel, midiToHz, mixStereo, mixingScenePresetJson, mixingScenePresetNames, momentaryLufs, nnFilter, nnlsChroma, normalize, noteStretch, noteToHz, onsetEnvelope, onsetStrengthMulti, opfsClipPageWorkerSource, padCenter, pcen, peakPick, percussive, phaseVocoder, pitchCorrectTimevarying, pitchCorrectToMidi, pitchCorrectToMidiTimevarying, pitchPyin, pitchShift, pitchTuning, pitchYin, plp, polyFeatures, powerToDb, preemphasis, projectAbiVersion, pseudoCqt, realtimeVoiceChangerPresetConfig, realtimeVoiceChangerPresetJson, realtimeVoiceChangerPresetNames, remix, resample, rmsEnergy, roomMorph, samplesToFrames, scaleCorrectionSemitones, scalePitchClassEnabled, scaleQuantizeMidi, shortTermLufs, spectralBandwidth, spectralCentroid, spectralContrast, spectralEdit, spectralFlatness, spectralRolloff, splitSilence, stft, stftDb, streamAnalyzerConfigDefaults, synthEnumTables, synthPresetNames, synthPresetPatch, synthesizeRir, tempogram, tempogramRatio, timeStretch, timeToFrames, tonnetz, trim, trimSilence, validateRealtimeVoiceChangerPresetJson, vectorNormalize, version, voiceChange, voiceChangeRealtime, voiceChangerAbiVersion, voiceCharacterPresetId, vqt, vqtToAudio, waveformPeakPyramid, waveformPeaks, zeroCrossingRate, zeroCrossings };
|
package/dist/index.js
CHANGED
|
@@ -732,7 +732,7 @@ var Mixer = class _Mixer {
|
|
|
732
732
|
return this.mixer.toSceneJson();
|
|
733
733
|
}
|
|
734
734
|
/**
|
|
735
|
-
*
|
|
735
|
+
* Longest audible serial processor-tail path to the master, in samples. Lazily
|
|
736
736
|
* compiles the routing graph if the topology is dirty.
|
|
737
737
|
*/
|
|
738
738
|
tailSamples() {
|
|
@@ -1592,6 +1592,74 @@ function vqt(samples, sampleRate = 22050, hopLength = 512, fmin = 32.70319566257
|
|
|
1592
1592
|
}
|
|
1593
1593
|
return requireModule9().vqt(samples, sampleRate, hopLength, fmin, nBins, binsPerOctave, gamma);
|
|
1594
1594
|
}
|
|
1595
|
+
function validateCqtInverse(fnName, magnitude, nBins, nFrames, sampleRate, hopLength, fmin, binsPerOctave, nIter, options) {
|
|
1596
|
+
assertSampleRate(fnName, sampleRate);
|
|
1597
|
+
validatePositiveIntegers(fnName, { nBins, nFrames, hopLength, binsPerOctave, nIter });
|
|
1598
|
+
if (nIter > 256) {
|
|
1599
|
+
throw new RangeError(`${fnName}: nIter must be at most 256`);
|
|
1600
|
+
}
|
|
1601
|
+
validateFrequencyBounds(fnName, fmin);
|
|
1602
|
+
if (fmin === 0) {
|
|
1603
|
+
throw new RangeError(`${fnName}: fmin must be positive`);
|
|
1604
|
+
}
|
|
1605
|
+
if (magnitude.length !== nBins * nFrames) {
|
|
1606
|
+
throw new RangeError(`${fnName}: magnitude length must equal nBins * nFrames`);
|
|
1607
|
+
}
|
|
1608
|
+
assertSamples(fnName, magnitude, options.validate !== false);
|
|
1609
|
+
}
|
|
1610
|
+
function cqtToAudio(magnitude, nBins, nFrames, sampleRate = 22050, hopLength = 512, fmin = 32.70319566257483, binsPerOctave = 12, nIter = 32, options = {}) {
|
|
1611
|
+
validateCqtInverse(
|
|
1612
|
+
"cqtToAudio",
|
|
1613
|
+
magnitude,
|
|
1614
|
+
nBins,
|
|
1615
|
+
nFrames,
|
|
1616
|
+
sampleRate,
|
|
1617
|
+
hopLength,
|
|
1618
|
+
fmin,
|
|
1619
|
+
binsPerOctave,
|
|
1620
|
+
nIter,
|
|
1621
|
+
options
|
|
1622
|
+
);
|
|
1623
|
+
return requireModule9().cqtToAudio(
|
|
1624
|
+
magnitude,
|
|
1625
|
+
nBins,
|
|
1626
|
+
nFrames,
|
|
1627
|
+
sampleRate,
|
|
1628
|
+
hopLength,
|
|
1629
|
+
fmin,
|
|
1630
|
+
binsPerOctave,
|
|
1631
|
+
nIter
|
|
1632
|
+
);
|
|
1633
|
+
}
|
|
1634
|
+
function vqtToAudio(magnitude, nBins, nFrames, sampleRate = 22050, hopLength = 512, fmin = 32.70319566257483, binsPerOctave = 12, gamma = 0, nIter = 32, options = {}) {
|
|
1635
|
+
validateCqtInverse(
|
|
1636
|
+
"vqtToAudio",
|
|
1637
|
+
magnitude,
|
|
1638
|
+
nBins,
|
|
1639
|
+
nFrames,
|
|
1640
|
+
sampleRate,
|
|
1641
|
+
hopLength,
|
|
1642
|
+
fmin,
|
|
1643
|
+
binsPerOctave,
|
|
1644
|
+
nIter,
|
|
1645
|
+
options
|
|
1646
|
+
);
|
|
1647
|
+
assertFiniteScalar("vqtToAudio", gamma, "gamma");
|
|
1648
|
+
if (gamma < 0) {
|
|
1649
|
+
throw new RangeError("vqtToAudio: gamma must be non-negative");
|
|
1650
|
+
}
|
|
1651
|
+
return requireModule9().vqtToAudio(
|
|
1652
|
+
magnitude,
|
|
1653
|
+
nBins,
|
|
1654
|
+
nFrames,
|
|
1655
|
+
sampleRate,
|
|
1656
|
+
hopLength,
|
|
1657
|
+
fmin,
|
|
1658
|
+
binsPerOctave,
|
|
1659
|
+
gamma,
|
|
1660
|
+
nIter
|
|
1661
|
+
);
|
|
1662
|
+
}
|
|
1595
1663
|
function analyzeSections(samples, sampleRate = 22050, options = {}) {
|
|
1596
1664
|
validateMusicSamples("analyzeSections", samples, sampleRate, options);
|
|
1597
1665
|
validatePositiveIntegers("analyzeSections", {
|
|
@@ -4580,6 +4648,7 @@ var StreamAnalyzer = class {
|
|
|
4580
4648
|
config.emitEveryNFrames ?? defaults.emitEveryNFrames,
|
|
4581
4649
|
config.magnitudeDownsample ?? defaults.magnitudeDownsample,
|
|
4582
4650
|
config.maxPendingFrames ?? defaults.maxPendingFrames,
|
|
4651
|
+
config.maxProgressionEntries ?? defaults.maxProgressionEntries,
|
|
4583
4652
|
config.keyUpdateIntervalSec ?? defaults.keyUpdateIntervalSec,
|
|
4584
4653
|
config.bpmUpdateIntervalSec ?? defaults.bpmUpdateIntervalSec,
|
|
4585
4654
|
config.window ?? defaults.window,
|
|
@@ -4595,7 +4664,8 @@ var StreamAnalyzer = class {
|
|
|
4595
4664
|
this.analyzer.process(samples);
|
|
4596
4665
|
}
|
|
4597
4666
|
/**
|
|
4598
|
-
* Process audio samples with explicit sample offset.
|
|
4667
|
+
* Process audio samples with a contiguous explicit sample offset. A gap,
|
|
4668
|
+
* seek, or switch from `process()` requires `reset()` first.
|
|
4599
4669
|
*
|
|
4600
4670
|
* @param samples - Audio samples (mono, float32)
|
|
4601
4671
|
* @param sampleOffset - Cumulative sample count at start of this chunk
|
|
@@ -4665,6 +4735,8 @@ var StreamAnalyzer = class {
|
|
|
4665
4735
|
durationSeconds: s.durationSeconds,
|
|
4666
4736
|
pendingFrames: s.pendingFrames,
|
|
4667
4737
|
droppedOutputFrames: s.droppedOutputFrames,
|
|
4738
|
+
droppedChordProgressionEntries: s.droppedChordProgressionEntries,
|
|
4739
|
+
droppedBarProgressionEntries: s.droppedBarProgressionEntries,
|
|
4668
4740
|
estimate: {
|
|
4669
4741
|
bpm: s.estimate.bpm,
|
|
4670
4742
|
bpmConfidence: s.estimate.bpmConfidence,
|
|
@@ -5123,6 +5195,7 @@ export {
|
|
|
5123
5195
|
chromaCens,
|
|
5124
5196
|
chromaCqt,
|
|
5125
5197
|
cqt,
|
|
5198
|
+
cqtToAudio,
|
|
5126
5199
|
createOpfsClipPageProvider,
|
|
5127
5200
|
createOpfsClipPageWorker,
|
|
5128
5201
|
cyclicTempogram,
|
|
@@ -5294,6 +5367,7 @@ export {
|
|
|
5294
5367
|
voiceChangerAbiVersion,
|
|
5295
5368
|
voiceCharacterPresetId,
|
|
5296
5369
|
vqt,
|
|
5370
|
+
vqtToAudio,
|
|
5297
5371
|
waveformPeakPyramid,
|
|
5298
5372
|
waveformPeaks,
|
|
5299
5373
|
zeroCrossingRate,
|