1.0.0 • Published 8 years ago

audio-table v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

Collection of common periodic audio signals.

npm install audio-table

var table = require('audio-table');

//get Float32Array of the length 1024 of the pure sine wave
var sin = table.sin(1024);
sin[0] === 0;
sin[256] === 1;
sin[512] === 0;

//API
table.<waveshape>( list|length, args... );

//signals
table.sin(list|length);
table.cos(list|length);
table.noise(list|length);
table.delta(list|length);
table.pulse(list|length, dutyRatio);
table.square(list|length); // table.pulse(list|length, 0.5);
table.triangle(list|length, scale);
table.saw(list|length); //table.triangle(length, 0);

Related

audio-buffer-utils — same functions but for audio buffers. Periodic functions — list of periodic functions on wiki.