Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
audio-aggregate-param
Advanced tools
Readme
Group multiple AudioParam
s into a single aggregate parameter for centralised manipulation.
$ npm install audio-aggregate-param
// some code yadda yadda
var osc1 = context.createOscillator();
var osc2 = context.createOscillator();
var osc3 = context.createOscillator();
var AudioAggregateParam = require('audio-aggregate-param');
var param = new AudioAggregateParam();
param.add(osc1.frequency);
param.add(osc2.frequency, 2);
param.add(osc3.frequency, 4);
// set frequency of osc1, osc2 and osc3
// osc1 = 220, osc2 = 440, osc3 = 880
param.cancelScheduledValues(context.currentTime);
param.setValueAtTime(220, context.currentTime);
// ramp oscillator frequencies over the next 2 seconds
// osc -> 440, osc2 -> 880, osc3 -> 1760
param.exponentialRampToValueAtTime(context.currentTime + 2, 440);
osc1.connect(context.destination);
osc2.connect(context.destination);
osc3.connect(context.destination);
osc1.start(0);
osc2.start(0);
osc3.start(0);
aggregate = new AudioAggregateParam()
aggregate.add(param, [scaleFactor])
Add a new AudioParam
instance to this aggregate. If specified, all values assigned to this parameter - either directly or via one of the ramping/curve functions - will be multiplied by scaleFactor
.
AudioParam
methodsThe following are proxied to the corresponding method of each aggregated AudioParam
:
aggregate.value = newValue
aggregate.setValueAtTime(value, startTime)
aggregate.linearRampToValueAtTime(value, endTime)
aggregate.exponentialRampToValueAtTime(value, endTime)
aggregate.setTargetAtTime(timeConstant, target, startTime)
aggregate.setValueCurveAtTime(values, startTime, duration)
aggregate.cancelScheduledValues(time)
ISC
FAQs
Aggregate multiple AudioParam instances into a single object
The npm package audio-aggregate-param receives a total of 5 weekly downloads. As such, audio-aggregate-param popularity was classified as not popular.
We found that audio-aggregate-param demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.