【文件属性】:
文件名称:theremin:webaudio 简单的乐器
文件大小:2KB
文件格式:ZIP
更新时间:2021-06-04 06:01:11
JavaScript
特雷门
网络音频特雷门
var freq = 100
var gain = 0.5
var theremin = require ( './' ) ( { gain : gain , freq : freq } )
setInterval ( function ( ) {
freq ++
theremin . setFreq ( freq )
} , 30 )
setInterval ( function ( ) {
gain /= 1.3
theremin . setGain ( gain )
} , 200 )
设置频率(频率)
以赫兹为单位设置频率
设置增益(增益)
设置音量,值应在 0 到 1 之间,其中 0 为静音
写({频率:频率,增益:增益})
用对象设置频率和增益。 这是一种流兼容的写入方法。
【文件预览】:
theremin-master
----example.js(227B)
----.gitignore(13B)
----index.js(1KB)
----readme.md(596B)
----package.json(552B)