Audiolib.js:更改现有&QUOT值;对象" [英] Audiolib.js: Changing values of existing "objects"

查看:192
本文介绍了Audiolib.js:更改现有&QUOT值;对象"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我看着Audiolib.js,可以做出一些基本的东西,但我不知道也不可能通过互联网搜索弄清楚。

so I looked into Audiolib.js and can make some basic stuff but what I don't know and can't figure out by searching through the internet.

问题是我如何可以改变一些物的具体数值没有再追加吧。例如:

The question is how I can change specific values of some "objects" without "re-appending" it. For example:

var osc;
osc = audioLib.Oscillator(44100 /*or some other samplerate */ , 400 );

function changefrequency(freq)
osc.frequency = freq; /* is there a way to do stuff like this? */

(顺便说一下,与物我的意思是振荡器,LFO的,过滤器等)。
由于还有很多,我想改变的值,而不会中断整个过程中的其他情况下,我会真的喜欢做这样的东西。

(Btw. with "objects" I mean oscillators, lfo's, filters and so on.) Since there are many other situations where I would like to change values without interrupting the whole process, I would realy like to do stuff like this.

推荐答案

它看起来像这个库允许你修改它的对象的属性。例如,本教程正在修改振荡器的频率属性更改笔记。它还使用了重置的方法改变音符时重置其阶段。

It looks like this library allows you to modify the properties of its objects. For example, this tutorial is modifying the "frequency" property of the Oscillator to change notes. It also uses the "reset" method to reset its phase when changing notes.

这篇关于Audiolib.js:更改现有&QUOT值;对象"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆