Small JS library using the audio API for basic bleeps and bloops π€π€
include in your HTML via script:
<script src="./path/to/chime.js"></script>
<script src="https://unpkg.com/@mog13/chime"></script>
Plays a sound with the given frequency,volume, type for the duration.
frequency: int 0-MAX
duration: int 0-MAX - (seconds)
volume: float 0-1
type: ["sine","square","triangle","sawtooth"]
Defaults Defaults are used when not specified. You can change the defaults via Chime.default[parameter]
Syntactic sugar for PlayNote
with the type set to "Sine"
Syntactic sugar for PlayNote
with the type set to "square"
Syntactic sugar for PlayNote
with the type set to "triangle"
Syntactic sugar for PlayNote
with the type set to "sawtooth"
contributions welcome.
npm run build
to build