tonescript

tonescript parser, can play tonescript tones with baudio

npm install tonescript
2 downloads in the last week
4 downloads in the last month

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.

npm loves you