@audio/stretch 2.0.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 +25 -0
- package/README.md +297 -0
- package/index.d.ts +26 -0
- package/index.js +12 -0
- package/package.json +80 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Dmitry Iv
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
This work is offered under the Krishnized License (https://github.com/krishnized/license).
|
package/README.md
ADDED
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
# @audio/stretch [](https://github.com/audiojs/stretch/actions/workflows/test.yml) [](https://www.npmjs.com/package/@audio/stretch) [](https://github.com/audiojs/stretch/blob/main/LICENSE)
|
|
2
|
+
|
|
3
|
+
Time stretching algorithms — umbrella over `@audio/stretch-*` atoms.
|
|
4
|
+
|
|
5
|
+
| Atom | Algorithm | Domain | Quality | CPU | Best for |
|
|
6
|
+
|---|---|---|---|---|---|
|
|
7
|
+
| [`@audio/stretch-wsola`](#wsola) | WSOLA | time | ★★★ | low | speech, real-time |
|
|
8
|
+
| [`@audio/stretch-psola`](#psola) | PSOLA | time | ★★★★ | medium | speech, monophonic instruments |
|
|
9
|
+
| [`@audio/stretch-pvoc`](#pvoc) | plain phase vocoder | freq | ★★ | medium | educational baseline |
|
|
10
|
+
| [`@audio/stretch-pvoc-lock`](#pvoc-lock) | phase-locked vocoder | freq | ★★★★ | medium | general music |
|
|
11
|
+
| [`@audio/stretch-pghi`](#pghi) | phase-gradient vocoder | freq | ★★★★ | medium | vibrato, glides, chirps |
|
|
12
|
+
| [`@audio/stretch-transient`](#transient) | transient-aware vocoder | freq | ★★★★★ | medium | music with percussion |
|
|
13
|
+
| [`@audio/stretch-hybrid`](#hybrid) | HPSS hybrid | freq+time | ★★★★ | high | full mixes — drums over tonal |
|
|
14
|
+
| [`@audio/stretch-paulstretch`](#paulstretch) | PaulStretch | freq | — | medium | extreme stretch (ambient, drones) |
|
|
15
|
+
| [`@audio/stretch-sms`](#sms) | Sinusoidal Modeling | sinusoidal | ★★★★ | high | harmonic / tonal material |
|
|
16
|
+
|
|
17
|
+
For pitch shifting, see the `@audio/shift-*` family.
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
Install the umbrella (all atoms):
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
npm install @audio/stretch
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
```js
|
|
29
|
+
import { transient, wsola } from '@audio/stretch'
|
|
30
|
+
|
|
31
|
+
let slower = transient(samples, { factor: 2 }) // 2× slower, same pitch
|
|
32
|
+
let fast = wsola(samples, { factor: 0.75 }) // 1.33× faster
|
|
33
|
+
|
|
34
|
+
let write = transient({ factor: 1.5 }) // real-time streaming
|
|
35
|
+
write(block1)
|
|
36
|
+
write(block2)
|
|
37
|
+
write() // → remaining samples
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Or install just the atom you need — each is self-contained:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
npm install @audio/stretch-transient
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
```js
|
|
47
|
+
import transient from '@audio/stretch-transient'
|
|
48
|
+
let out = transient(samples, { factor: 2 })
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
> Mono `Float32Array` in/out. For stereo, process channels independently. Output sizes may be variable — small or empty early chunks are normal in streaming.
|
|
52
|
+
|
|
53
|
+
## Time domain
|
|
54
|
+
|
|
55
|
+
### `wsola` — `@audio/stretch-wsola`
|
|
56
|
+
|
|
57
|
+
Waveform Similarity Overlap-Add. Divides signal into overlapping frames and places them at new synthesis positions, but before placing each frame searches ±delta samples for the read position that maximizes cross-correlation with the natural progression of the previous grain through the input — eliminating the phase cancellation (flanging) of plain OLA. No FFT overhead.
|
|
58
|
+
|
|
59
|
+
```js
|
|
60
|
+
import wsola from '@audio/stretch-wsola'
|
|
61
|
+
|
|
62
|
+
wsola(data, { factor: 1.5 })
|
|
63
|
+
wsola(data, { factor: 0.5, delta: 512 })
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
| Param | Default | |
|
|
67
|
+
|---|---|---|
|
|
68
|
+
| `factor` | `1` | Time stretch ratio |
|
|
69
|
+
| `frameSize` | `2048` | Window size |
|
|
70
|
+
| `hopSize` | `frameSize/4` | Hop between frames |
|
|
71
|
+
| `delta` | `frameSize/4` | Search range (±samples) |
|
|
72
|
+
|
|
73
|
+
**Use when:** Speech, real-time with tight CPU budgets, moderate ratios (0.5–2×).<br>
|
|
74
|
+
**Not for:** Polyphonic music with sustained tones — frequency-domain methods handle harmonics better.
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
### `psola` — `@audio/stretch-psola`
|
|
78
|
+
|
|
79
|
+
Pitch-Synchronous Overlap-Add. Detects pitch period via autocorrelation, then windows grains at pitch cycle boundaries. Because grains align with the pitch cycle there are no phase discontinuities at overlaps — cleaner than WSOLA for monophonic pitched signals.
|
|
80
|
+
|
|
81
|
+
```js
|
|
82
|
+
import psola from '@audio/stretch-psola'
|
|
83
|
+
|
|
84
|
+
psola(data, { factor: 1.5 })
|
|
85
|
+
psola(data, { factor: 0.75, sampleRate: 48000 })
|
|
86
|
+
psola(data, { factor: 2, minFreq: 100, maxFreq: 400 }) // male voice range
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
| Param | Default | |
|
|
90
|
+
|---|---|---|
|
|
91
|
+
| `factor` | `1` | Time stretch ratio |
|
|
92
|
+
| `sampleRate` | `44100` | For pitch detection frequency range |
|
|
93
|
+
| `minFreq` | `80` | Lowest expected pitch (Hz) |
|
|
94
|
+
| `maxFreq` | `500` | Highest expected pitch (Hz) |
|
|
95
|
+
|
|
96
|
+
**Use when:** Speech, solo vocals, monophonic instruments, factors 0.5–2×.<br>
|
|
97
|
+
**Not for:** Polyphonic material — autocorrelation finds one pitch period so chords get mangled. Extreme ratios (>2×) cause gaps.
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
## Frequency domain
|
|
101
|
+
|
|
102
|
+
### `pvoc` — `@audio/stretch-pvoc`
|
|
103
|
+
|
|
104
|
+
Plain phase vocoder. Each bin's phase advances at its instantaneous frequency independently. Magnitudes are preserved but incoherent inter-harmonic phase relationships give complex signals a diffuse, "underwater" quality.
|
|
105
|
+
|
|
106
|
+
```js
|
|
107
|
+
import pvoc from '@audio/stretch-pvoc'
|
|
108
|
+
pvoc(data, { factor: 2 })
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
| Param | Default | |
|
|
112
|
+
|---|---|---|
|
|
113
|
+
| `factor` | `1` | Time stretch ratio |
|
|
114
|
+
| `frameSize` | `2048` | FFT size (power of 2) |
|
|
115
|
+
| `hopSize` | `frameSize/4` | Hop between frames |
|
|
116
|
+
|
|
117
|
+
**Use when:** Educational baseline, simple tonal signals.<br>
|
|
118
|
+
**Not for:** General music — use [`pvoc-lock`](#pvoc-lock) or [`transient`](#transient).
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
### `pvoc-lock` — `@audio/stretch-pvoc-lock`
|
|
122
|
+
|
|
123
|
+
Phase-locked vocoder (Laroche & Dolson, 1999). After propagating phases, locks non-peak bins to their nearest spectral peak's rotation. Restores harmonic phase coherence, eliminating phasiness.
|
|
124
|
+
|
|
125
|
+
```js
|
|
126
|
+
import pvocLock from '@audio/stretch-pvoc-lock'
|
|
127
|
+
pvocLock(data, { factor: 2 })
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Same options as [`pvoc`](#pvoc).
|
|
131
|
+
|
|
132
|
+
**Use when:** General music — tonal/ambient material where transient resets aren't needed.<br>
|
|
133
|
+
**Not for:** Percussive material where attacks matter — use [`transient`](#transient).
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
### `pghi` — `@audio/stretch-pghi`
|
|
137
|
+
|
|
138
|
+
Phase Gradient Heap Integration — "Phase Vocoder Done Right" (Průša & Holighaus, 2017). Synthesis phase is integrated from the analysis phase gradients, visiting bins in magnitude order via a max-heap: no peak picking, no transient heuristics; chirps, vibrato and glides stay coherent by construction.
|
|
139
|
+
|
|
140
|
+
```js
|
|
141
|
+
import pghi from '@audio/stretch-pghi'
|
|
142
|
+
|
|
143
|
+
pghi(data, { factor: 2 })
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
| Param | Default | |
|
|
147
|
+
|---|---|---|
|
|
148
|
+
| `factor` | `1` | Time stretch ratio |
|
|
149
|
+
| `frameSize` | `2048` | FFT size (power of 2) |
|
|
150
|
+
| `hopSize` | `frameSize/8` | Hop — gradient integration wants dense frames |
|
|
151
|
+
| `tolerance` | `1e-6` | Bins below `tolerance×max` get random phase |
|
|
152
|
+
|
|
153
|
+
**Use when:** modulated material — vibrato, glissandi, pitch-unstable sources.<br>
|
|
154
|
+
**Not for:** steady polyphony — [`pvoc-lock`](#pvoc-lock)'s identity locking reproduces intra-partial phases exactly where gradient integration only approximates them.
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
### `transient` — `@audio/stretch-transient`
|
|
158
|
+
|
|
159
|
+
Transient-aware phase-locked vocoder (Röbel, 2003). Measures spectral flux between frames; on a sharp onset it resets to the original analysis phase instead of propagating it, preserving attack sharpness on drums and plucks. Implies phase locking.
|
|
160
|
+
|
|
161
|
+
```js
|
|
162
|
+
import transient from '@audio/stretch-transient'
|
|
163
|
+
|
|
164
|
+
transient(data, { factor: 2 })
|
|
165
|
+
transient(data, { factor: 1.5, transientThreshold: 2.0 }) // less sensitive detection
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
| Param | Default | |
|
|
169
|
+
|---|---|---|
|
|
170
|
+
| `factor` | `1` | Time stretch ratio |
|
|
171
|
+
| `frameSize` | `2048` | FFT size (power of 2) |
|
|
172
|
+
| `hopSize` | `frameSize/4` | Hop between frames |
|
|
173
|
+
| `transientThreshold` | `1.5` | Spectral flux threshold (higher = fewer resets) |
|
|
174
|
+
|
|
175
|
+
**Use when:** The right default for most music — percussion, mixed sources.<br>
|
|
176
|
+
**Not for:** Voice/speech — use [`psola`](#psola). Extreme stretch — use [`paulstretch`](#paulstretch).
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
### `hybrid` — `@audio/stretch-hybrid`
|
|
180
|
+
|
|
181
|
+
Harmonic/percussive hybrid (Driedger & Müller). Median-filter HPSS splits the spectrogram into two layers; the harmonic layer goes through the phase-locked vocoder, the percussive layer through short-frame OLA — chords stay coherent and attacks stay sharp, where one algorithm must trade one for the other.
|
|
182
|
+
|
|
183
|
+
```js
|
|
184
|
+
import hybrid from '@audio/stretch-hybrid'
|
|
185
|
+
|
|
186
|
+
hybrid(data, { factor: 2 })
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
| Param | Default | |
|
|
190
|
+
|---|---|---|
|
|
191
|
+
| `factor` | `1` | Time stretch ratio |
|
|
192
|
+
| `frameSize` | `2048` | FFT size for HPSS + harmonic path |
|
|
193
|
+
| `percFrame` | `512` | OLA frame for the percussive layer |
|
|
194
|
+
| `harmMedian` | `17` | Median filter across time (frames) |
|
|
195
|
+
| `percMedian` | `17` | Median filter across frequency (bins) |
|
|
196
|
+
|
|
197
|
+
**Use when:** full mixes — drums over tonal material.<br>
|
|
198
|
+
**Cost:** separation + two stretches ≈ 4–6× the CPU of [`pvoc-lock`](#pvoc-lock) alone.
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
### `paulstretch` — `@audio/stretch-paulstretch`
|
|
202
|
+
|
|
203
|
+
Extreme time stretching via phase randomization (Nasca, 2006). Preserves magnitudes but replaces all phases with random values, producing smooth, dreamlike textures. Designed for large factors.
|
|
204
|
+
|
|
205
|
+
```js
|
|
206
|
+
import paulstretch from '@audio/stretch-paulstretch'
|
|
207
|
+
|
|
208
|
+
paulstretch(data, { factor: 8 })
|
|
209
|
+
paulstretch(data, { factor: 100, frameSize: 8192 })
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
| Param | Default | |
|
|
213
|
+
|---|---|---|
|
|
214
|
+
| `factor` | `8` | Time stretch ratio (best >2×) |
|
|
215
|
+
| `frameSize` | `4096` | FFT size (larger = smoother) |
|
|
216
|
+
| `seed` | `0x1f123bb5` | PRNG seed (deterministic output) |
|
|
217
|
+
|
|
218
|
+
**Use when:** Ambient music, sound design, drone generation, 8×–1000× stretch.<br>
|
|
219
|
+
**Not for:** Small ratios (<2×) — sounds washed out. Not for preserving rhythm or transients.
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
## Sinusoidal
|
|
223
|
+
|
|
224
|
+
### `sms` — `@audio/stretch-sms`
|
|
225
|
+
|
|
226
|
+
Sinusoidal Modeling Synthesis (Serra 1989, McAulay-Quatieri 1986). Decomposes audio into individually tracked sinusoidal partials and resynthesizes at the new time rate. Each partial's frequency and magnitude are interpolated independently — no phase spreading or bin-by-bin artifacts.
|
|
227
|
+
|
|
228
|
+
```js
|
|
229
|
+
import sms from '@audio/stretch-sms'
|
|
230
|
+
|
|
231
|
+
sms(data, { factor: 2 })
|
|
232
|
+
sms(data, { factor: 0.5, maxTracks: 80 })
|
|
233
|
+
sms(data, { factor: 3, frameSize: 4096 })
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
| Param | Default | |
|
|
237
|
+
|---|---|---|
|
|
238
|
+
| `factor` | `1` | Time stretch ratio |
|
|
239
|
+
| `frameSize` | `2048` | FFT frame size |
|
|
240
|
+
| `hopSize` | `frameSize/4` | Hop between frames |
|
|
241
|
+
| `maxTracks` | `60` | Max simultaneous sinusoidal tracks |
|
|
242
|
+
| `minMag` | `1e-4` | Peak detection threshold (linear) |
|
|
243
|
+
| `freqDev` | `3` | Max frequency deviation (bins) for track continuation |
|
|
244
|
+
| `residualMix` | `1` | Stochastic residual blended into the sinusoidal output |
|
|
245
|
+
|
|
246
|
+
**Use when:** Harmonic / tonal content — instruments, chords, vocals — where the phase vocoder introduces smearing. Default `residualMix=1` blends breath, noise, and transient energy alongside the sinusoidal model.<br>
|
|
247
|
+
**Not for:** Noise-dominated material.
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
## Shared — `@audio/stretch-core`
|
|
251
|
+
|
|
252
|
+
Helpers and quality metrics shared across atoms:
|
|
253
|
+
|
|
254
|
+
```js
|
|
255
|
+
import { hannWindow, wrapPhase, resample, writer, makeStreamBufs } from '@audio/stretch-core'
|
|
256
|
+
import { lsd, spectralSim, chordBalance, chordRetention, modulationDepth } from '@audio/stretch-core/quality'
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
`lsd` (log-spectral distance), `spectralSim` (cosine similarity), `chordBalance`, `chordRetention`, and `modulationDepth` (AM depth per partial) evaluate algorithm output against a reference.
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
## Research & comparison
|
|
263
|
+
|
|
264
|
+
| Command | What it does |
|
|
265
|
+
|---|---|
|
|
266
|
+
| `node scripts/compare.js` | writes `compare.html` — interactive waveforms, playback, internal-vs-external comparisons |
|
|
267
|
+
| `node scripts/bench.js` | throughput and ×realtime numbers for batch and streaming |
|
|
268
|
+
| `node scripts/diagnose.js` | targeted diagnostics for specific algorithm behaviors |
|
|
269
|
+
|
|
270
|
+
[Demo](https://audiojs.github.io/time-stretch/) for a lightweight browser listening matrix.
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
## See also
|
|
274
|
+
|
|
275
|
+
* [fourier-transform](https://github.com/audiojs/fourier-transform) — FFT + STFT kernels
|
|
276
|
+
* [@audio/shift-*](https://github.com/audiojs/shift) — pitch shifting family
|
|
277
|
+
* [@audio/filter](https://github.com/audiojs/filter) — audio filters
|
|
278
|
+
* [digital-filter](https://github.com/audiojs/digital-filter) — filter design
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
## References
|
|
282
|
+
|
|
283
|
+
* Verhelst, W. & Roelands, M. (1993). "An overlap-add technique based on waveform similarity (WSOLA)." _ICASSP_.
|
|
284
|
+
* Laroche, J. & Dolson, M. (1999). "Improved phase vocoder time-scale modification of audio." _IEEE Trans. Speech Audio Processing_.
|
|
285
|
+
* Röbel, A. (2003). "A new approach to transient processing in the phase vocoder." _DAFx_.
|
|
286
|
+
* Nasca, P. (2006). "PaulStretch — extreme time stretching." _paulnasca.com_.
|
|
287
|
+
* Moulines, E. & Charpentier, F. (1990). "Pitch-synchronous waveform processing techniques for text-to-speech synthesis using diphones." _Speech Communication_, 9(5-6).
|
|
288
|
+
* Driedger, J. & Müller, M. (2016). "A review of time-scale modification of music signals." _Applied Sciences_, 6(2).
|
|
289
|
+
* Serra, X. (1989). "A System for Sound Analysis/Transformation/Synthesis Based on a Deterministic plus Stochastic Decomposition." PhD thesis, Stanford.
|
|
290
|
+
* McAulay, R.J. & Quatieri, T.F. (1986). "Speech analysis/synthesis based on a sinusoidal representation." _IEEE Trans. ASSP_, 34(4).
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
<div align="center">
|
|
294
|
+
|
|
295
|
+
[MIT](https://github.com/audiojs/stretch/blob/main/LICENSE) [ॐ](https://github.com/krishnized/license)
|
|
296
|
+
|
|
297
|
+
</div>
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export { default as wsola } from '@audio/stretch-wsola'
|
|
2
|
+
export type { WsolaOpts } from '@audio/stretch-wsola'
|
|
3
|
+
|
|
4
|
+
export { default as pvoc } from '@audio/stretch-pvoc'
|
|
5
|
+
export type { PvocOpts } from '@audio/stretch-pvoc'
|
|
6
|
+
|
|
7
|
+
export { default as pvocLock } from '@audio/stretch-pvoc-lock'
|
|
8
|
+
export type { PvocLockOpts } from '@audio/stretch-pvoc-lock'
|
|
9
|
+
|
|
10
|
+
export { default as pghi } from '@audio/stretch-pghi'
|
|
11
|
+
export type { PghiOpts } from '@audio/stretch-pghi'
|
|
12
|
+
|
|
13
|
+
export { default as transient } from '@audio/stretch-transient'
|
|
14
|
+
export type { TransientOpts } from '@audio/stretch-transient'
|
|
15
|
+
|
|
16
|
+
export { default as hybrid } from '@audio/stretch-hybrid'
|
|
17
|
+
export type { HybridOpts } from '@audio/stretch-hybrid'
|
|
18
|
+
|
|
19
|
+
export { default as paulstretch } from '@audio/stretch-paulstretch'
|
|
20
|
+
export type { PaulstretchOpts } from '@audio/stretch-paulstretch'
|
|
21
|
+
|
|
22
|
+
export { default as psola } from '@audio/stretch-psola'
|
|
23
|
+
export type { PsolaOpts } from '@audio/stretch-psola'
|
|
24
|
+
|
|
25
|
+
export { default as sms } from '@audio/stretch-sms'
|
|
26
|
+
export type { SmsOpts } from '@audio/stretch-sms'
|
package/index.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// @audio/stretch — umbrella re-exporting every sub-package.
|
|
2
|
+
// For smaller bundles, depend directly on the individual @audio/stretch-* atom.
|
|
3
|
+
|
|
4
|
+
export { default as wsola } from '@audio/stretch-wsola'
|
|
5
|
+
export { default as pvoc } from '@audio/stretch-pvoc'
|
|
6
|
+
export { default as pvocLock } from '@audio/stretch-pvoc-lock'
|
|
7
|
+
export { default as pghi } from '@audio/stretch-pghi'
|
|
8
|
+
export { default as transient } from '@audio/stretch-transient'
|
|
9
|
+
export { default as hybrid } from '@audio/stretch-hybrid'
|
|
10
|
+
export { default as paulstretch } from '@audio/stretch-paulstretch'
|
|
11
|
+
export { default as psola } from '@audio/stretch-psola'
|
|
12
|
+
export { default as sms } from '@audio/stretch-sms'
|
package/package.json
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@audio/stretch",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"types": "index.d.ts",
|
|
6
|
+
"description": "Time stretching — umbrella for @audio/stretch-* atoms (WSOLA, phase vocoder variants, PaulStretch, PSOLA, SMS)",
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"main": "index.js",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": "./index.js",
|
|
11
|
+
"./package.json": "./package.json"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"index.js",
|
|
15
|
+
"index.d.ts",
|
|
16
|
+
"LICENSE"
|
|
17
|
+
],
|
|
18
|
+
"workspaces": [
|
|
19
|
+
"packages/*"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"test": "node test.js",
|
|
23
|
+
"test:browser": "node test/browser.js",
|
|
24
|
+
"test:all": "npm test --workspaces --if-present && npm test && npm run test:browser",
|
|
25
|
+
"publish:all": "npm publish --workspaces && npm publish"
|
|
26
|
+
},
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "git+https://github.com/audiojs/stretch.git"
|
|
30
|
+
},
|
|
31
|
+
"keywords": [
|
|
32
|
+
"time-stretch",
|
|
33
|
+
"time-stretching",
|
|
34
|
+
"wsola",
|
|
35
|
+
"phase-vocoder",
|
|
36
|
+
"phase-locking",
|
|
37
|
+
"pghi",
|
|
38
|
+
"transient",
|
|
39
|
+
"hpss",
|
|
40
|
+
"hybrid",
|
|
41
|
+
"paulstretch",
|
|
42
|
+
"psola",
|
|
43
|
+
"sms",
|
|
44
|
+
"sinusoidal",
|
|
45
|
+
"tempo",
|
|
46
|
+
"audio",
|
|
47
|
+
"dsp",
|
|
48
|
+
"signal-processing"
|
|
49
|
+
],
|
|
50
|
+
"author": "Dmitry Iv. <dfcreative@gmail.com>",
|
|
51
|
+
"license": "MIT",
|
|
52
|
+
"bugs": {
|
|
53
|
+
"url": "https://github.com/audiojs/stretch/issues"
|
|
54
|
+
},
|
|
55
|
+
"homepage": "https://github.com/audiojs/stretch#readme",
|
|
56
|
+
"engines": {
|
|
57
|
+
"node": ">=18"
|
|
58
|
+
},
|
|
59
|
+
"dependencies": {
|
|
60
|
+
"@audio/stretch-core": "^1.0.0",
|
|
61
|
+
"@audio/stretch-hybrid": "^1.0.0",
|
|
62
|
+
"@audio/stretch-paulstretch": "^1.0.0",
|
|
63
|
+
"@audio/stretch-pghi": "^1.0.0",
|
|
64
|
+
"@audio/stretch-psola": "^1.0.0",
|
|
65
|
+
"@audio/stretch-pvoc": "^1.0.0",
|
|
66
|
+
"@audio/stretch-pvoc-lock": "^1.0.0",
|
|
67
|
+
"@audio/stretch-sms": "^1.0.0",
|
|
68
|
+
"@audio/stretch-transient": "^1.0.0",
|
|
69
|
+
"@audio/stretch-wsola": "^1.0.0"
|
|
70
|
+
},
|
|
71
|
+
"devDependencies": {
|
|
72
|
+
"audio-lena": "^3.0.0",
|
|
73
|
+
"playwright": "^1.59.1",
|
|
74
|
+
"tst": "^9.4.0",
|
|
75
|
+
"wavefont": "^3.5.0"
|
|
76
|
+
},
|
|
77
|
+
"publishConfig": {
|
|
78
|
+
"access": "public"
|
|
79
|
+
}
|
|
80
|
+
}
|