SoundTouch-TS
A port of a port to TypeScript. Pitchshift and Timestretch in JS/TS. This library is LGPL2.1 due to SoundTouch. A more tested port of this library, with more utilities, is available in soundtouch-js. This TS port exists because I wanted the types, and didn't know soundtouch-js existed until recently.
However, as long as you allow a user, at runtime, to swap out this library, it should fall under section 6b of https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html. But JS/TS and LGPL are legally ambiguous, so use at your own risk.
Usage
// It's TS, but JS is fine too!;; ; // Audio will take 2x as long to play with no pitch changesst.tempo = tempo; ; fetch"http://test-audio.somewhere.mp3" .thenres.arrayBuffer .thenctx.decodeAudioab .then;
Publishing
$ npm version [xxx]$ npx pack build && pushd pkg && npm publish$ git push origin HEAD --tags
History
This port was modified from the following:
- Original Port (LGPL 2.1): https://github.com/also/soundtouch-js/tree/master/src/js
- Modularized / Expanded (MIT): https://github.com/jakubfiala/soundtouch-js
- Modified and included in a UI (MIT): https://github.com/ZVK/stretcher (http://zackzukowski.com/TAP-audio-player/)
- Converted to TypeScript: src/index.ts.