danigb/timestretch

View on GitHub
README.md

Summary

Maintainability
Test Coverage
# timestretch [![npm](https://img.shields.io/npm/v/timestretch.svg)](https://www.npmjs.com/package/timestretch)

[![Build Status](https://travis-ci.org/danigb/timestretch.svg?branch=master)](https://travis-ci.org/danigb/timestretch) [![Code Climate](https://codeclimate.com/github/danigb/timestretch/badges/gpa.svg)](https://codeclimate.com/github/danigb/timestretch) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard) [![license](https://img.shields.io/npm/l/timestretch.svg)](https://www.npmjs.com/package/timestretch)

Yet another library to timestretch audio on the browser.

The focus of this implementaion is to make the code easy to understand. There will be examples of how to:

- Pitchshift an audio buffer
- Perform pitchshifting using a webworker
- Realtime pitchshifting of an audio source

This is not the best implementation if you're looking for sound quality and/or performance (see FAQ).

__This is work in progress__

## (FA)Q

__Are other implementations available?__

Yes, a lot:
- https://github.com/sebpiq/paulstretch.js
- https://github.com/echo66/OLA-TS.js
- https://github.com/echo66/PhaseVocoderJS
- https://github.com/Infinity/Kali

And pitch shifting:
- https://github.com/mikolalysenko/pitch-shift
- https://github.com/GTCMT/pitchshiftjs

And probably more...

__Which one should I use?__

I don't know by experiencie, but [@echo66](https://github.com/echo66) projects looks promising.

__Then, why?__

Because I want to learn.

## Resources

You can read about OLA algorithms here:

- http://www.surina.net/article/time-and-pitch-scaling.html
- https://github.com/martijnvogten/timestretch/wiki/Basic-Time-Stretching-(that-sounds-remarkably-well)
- https://github.com/echo66/time-stretch-wac-article/blob/master/ts-ps-wac.pdf

In fact, this implementation follow close the first explanation.


## License

MIT License