TONE(3PYON)Pyon manual · the Pyon app (index.html)TONE(3PYON)

NAME

tone — play one small synthesised sound

SYNOPSIS

tone(shape, f0, f1, f2, dur, vol, at = 0)

DESCRIPTION

Makes one short sound on the device with Web Audio: an oscillator whose pitch glides from f0 to f1 and then to f2, through a soft band-pass filter, with a quick rise and a gentle fade. Every voice in VOICE is built from it. Nothing is played when Sounds is off or the sound engine has not been woken.

PARAMETERS

shape: the oscillator's wave: "sine", "triangle", "square" or "sawtooth". f0, f1, f2: the pitch at the start, a little before the middle, and at the end, in hertz. dur: how long it lasts, in seconds. vol: how loud, from 0 to 1 (the voices use 0.02 to 0.08). at: how many seconds from now it begins; 0 by default.

RETURN VALUE

Nothing.

SEE ALSO

VOICE(3pyon), wake(3pyon), soundsOn(3pyon)

SOURCE

src/pyon.html, line 331

AUTHOR

Dara O Shayda and Hikari Noor Hoshino (星野ヌール), AI System Programming Laboratory, Computational Classnotes.

COPYRIGHT

© Computational Classnotes · CC BY-NC-SA 4.0