Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
pseudo-audio-param
Advanced tools
Simulate scheduled AudioParam values
$ npm install pseudo-audio-param
constructor(defaultValue: number)
getValueAtTime(time: number): number
time
applyTo(audioParam: AudioParam, [ reset: boolean ]): self
audioParam
reset
is true, cancel all events of AudioParam before applyingevents: object[]
.type: string
.time: number
compatible interfaces with AudioParam
setValueAtTime(value: number, time: number): self
linearRampToValueAtTime(value: number, time: number): self
exponentialRampToValueAtTime(value: number, time: number): self
setTargetAtTime(value: number, time: number: timeConstant: number): self
setValueCurveAtTime(values: Float32Array, time: number, duration: number): self
cancelScheduledValues(time: number): self
cancelAndHoldAtTime(time: number): self
https://www.w3.org/TR/webaudio/#example1-AudioParam
var PseudoAudioParam = require("pseudo-audio-param");
var param = new PseudoAudioParam();
var curveLength = 44100;
var curve = new Float32Array(curveLength);
for (var i = 0; i < curveLength; i++)
curve[i] = Math.sin(Math.PI * i / curveLength);
var t0 = 0;
var t1 = 0.1;
var t2 = 0.2;
var t3 = 0.3;
var t4 = 0.325;
var t5 = 0.5;
var t6 = 0.6;
var t7 = 0.7;
var t8 = 1.0;
var timeConstant = 0.1;
param.setValueAtTime(0.2, t0);
param.setValueAtTime(0.3, t1);
param.setValueAtTime(0.4, t2);
param.linearRampToValueAtTime(1, t3);
param.linearRampToValueAtTime(0.8, t4);
param.setTargetAtTime(0.5, t4, timeConstant);
param.setValueAtTime(param.getValueAtTime(t5), t5);
param.exponentialRampToValueAtTime(0.75, t6);
param.exponentialRampToValueAtTime(0.05, t7);
param.setValueCurveAtTime(curve, t7, t8 - t7);
for (var j = 0; j < 1000; j++) {
console.log(param.getValueAtTime(j / 1000));
}
MIT
FAQs
Simulate scheduled AudioParam values
The npm package pseudo-audio-param receives a total of 13 weekly downloads. As such, pseudo-audio-param popularity was classified as not popular.
We found that pseudo-audio-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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.