tonescript parser, useful for making annoying sounds
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
README.md
busy
call-forward
comfort
conference
dial
dial2
dialo
holding
howler
mwi
package.json
prompt
reorder
ringback
sit1
sit2
sit3
sit4
tonescript.js

README.md

tonescript

What is tonescript:

this is tonescript.

example:

var toneScript = require('tonescript');

toneScript('985@-16,1428@-16,1777@-16;20(.380/0/1,.380/0/2,.380/0/3,0/4/0)').play();

API

var toneScript = require('tonescript');
toneScript(script, A0);

toneScript returns a baudio object. Use the A0 parameter to adjust volume. Defaults to 0.2. See this article for more on what this number actually means.

toneScript.toneGenerator(script, A0)

toneGenerator returns a function (t) {}, where t is in seconds, which returns A(t) with sin wave generators.

toneScript.parse(script)

This will return an object representing the tones specified in your tonescript. This is used by the toneGenerator and by the baudio player to generate tones.

license

MIT/X11.