Installation
npm install wave-generator --save
API
All
Parameters
- size: Generated array size
- f: wave frequency
- fs: sample frequency
- [amplitude = 1]
- [useCounter = true]: If false all calls will start from the beginning of the array, true (default) will give continuous data
Sawtoothwave
Extra Parameters
Usage
// import constructorsconst Sinewave Squarewave Trianglewave Sawtoothwave = const sine440 = console // Array with 100 pointsconsole // Array with the next 100 points const square220 = console // Array with 100 pointsconsole // Array with the same 100 points
TODO
- Tests