Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

audio-node-suite

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

audio-node-suite - npm Package Compare versions

Comparing version 0.9.9 to 1.0.0

etc-eslint.yaml

76

package.json
{
"name": "audio-node-suite",
"version": "0.9.9",
"description": "Audio-Node-Suite -- Web Audio API AudioNode Suite",
"keywords": [ "web", "audio", "api", "audionode", "suite" ],
"browser": "lib/audio-node-suite.js",
"main": "lib/audio-node-suite.js",
"license": "MIT",
"name": "audio-node-suite",
"version": "1.0.0",
"description": "Audio-Node-Suite -- Web Audio API AudioNode Suite",
"keywords": [ "web", "audio", "api", "audionode", "suite" ],
"license": "MIT",
"homepage": "https://github.com/rse/audio-node-suite",
"bugs": "https://github.com/rse/audio-node-suite/issues",
"repository": {
"type": "git",
"url": "https://github.com/rse/audio-node-suite.git"
"type": "git",
"url": "https://github.com/rse/audio-node-suite.git"
},
"author": {
"name": "Dr. Ralf S. Engelschall",
"email": "rse@engelschall.com",
"url": "http://engelschall.com"
"name": "Dr. Ralf S. Engelschall",
"email": "rse@engelschall.com",
"url": "http://engelschall.com"
},
"homepage": "https://github.com/rse/audio-node-suite",
"bugs": "https://github.com/rse/audio-node-suite/issues",
"type": "module",
"types": "lib/audio-node-suite.d.ts",
"browser": "lib/audio-node-suite.umd.js",
"main": "lib/audio-node-suite.cjs.js",
"module": "lib/audio-node-suite.es.js",
"exports": {
".": {
"import": "lib/audio-node-suite.es.js",
"require": "lib/audio-node-suite.cjs.js",
"default": "lib/audio-node-suite.umd.js"
}
},
"dependencies": {
},
"devDependencies": {
"grunt": "1.5.3",
"grunt-cli": "1.4.3",
"grunt-contrib-clean": "2.0.1",
"grunt-browserify": "6.0.0",
"grunt-eslint": "24.0.1",
"@babel/core": "7.20.12",
"eslint": "8.31.0",
"eslint-config-standard": "17.0.0",
"eslint-plugin-promise": "6.1.1",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-node": "11.1.0",
"babelify": "10.0.0",
"@babel/preset-env": "7.20.2",
"uglifyify": "5.0.2",
"browserify-header": "1.1.0",
"browserify-derequire": "1.1.1"
"npm-run-all": "4.1.5",
"vite": "4.0.4",
"eslint": "8.31.0",
"eslint-config-standard": "17.0.0",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-node": "11.1.0",
"@typescript-eslint/parser": "5.48.1",
"@typescript-eslint/eslint-plugin": "5.48.1",
"typescript": "4.9.4",
"rimraf": "3.0.2"
},
"engines": {
"node": ">=12.0.0"
"node": ">=14.0.0"
},
"scripts": {
"prepublishOnly": "grunt default",
"build": "grunt default"
"prepublishOnly": "npm run lint",
"lint": "npm-run-all --print-label --silent --sequential lint:tsc lint:eslint",
"lint:tsc": "tsc --project etc-tsc.json --noEmit",
"lint:eslint": "eslint --config etc-eslint.yaml --ext ts src/*.ts",
"build": "vite --config etc-vite.ts build --logLevel info --mode production",
"build:dev": "vite --config etc-vite.ts build --logLevel info --mode development",
"clean": "rimraf lib",
"clean:dist": "rimraf lib node_modules"
}
}

@@ -29,2 +29,7 @@

- `AudioNodeNoise`: this is a white or pink noise generator which
can be used for testing purposes.
- `AudioNodeMute`: this is a simple node for muting the audio stream.
- `AudioNodeGain`, `AudioNodeCompressor`, `AudioNodeLimiter`: these

@@ -36,8 +41,9 @@ are just convenient wrappers for the regular functionality provided

- `AudioNodeEqualizer`: this is based on the Web Audio API `BiquadFilterNode`
class and provides a convenient multi-band parametric equalizer `AudioNode`.
class and provides a convenient parametric multi-band equalizer `AudioNode`.
- `AudioNodeMeter`: this is based on the Web Audio API `AnalyzerNode`
class and continuously tracks and measures the overall volume in
decibel of the audio stream. It is also the internal base building
block for the `AudioNodeGate` and `AudioNodeSpectrum` classes.
class and continuously tracks and measures the overall volume
in decibel of the audio stream. It is also the internal base
building block for the `AudioNodeGate`, `AudioNodeAmplitude` and
`AudioNodeSpectrum` classes.

@@ -49,2 +55,7 @@ - `AudioNodeGate`: this is based on the Web Audio API `GainNode`

- `AudioNodeAmplitude`: this is based on `AudioNodeMeter` and
hence the Web Audio API `AnalyzerNode` class to analyze the
volume level of the audio stream and continuously render
it into a `Canvas` element in the DOM.
- `AudioNodeSpectrum`: this is based on `AudioNodeMeter` and

@@ -56,7 +67,7 @@ hence the Web Audio API `AnalyzerNode` class to analyze the

- `AudioNodeVoice`: this is based on `AudioNodeEqualizer`,
- `AudioNodeVoice`: this is based on `AudioNodeMute`, `AudioNodeEqualizer`,
`AudioNodeGate`, `AudioNodeCompressor`, `AudioNodeGain` and
`AudioNodeLimiter` to provide a convenient single `AudioNode`
which acts as a reasonable filter chain for voice. Its opinionated
parameters are intentionally hard-coded and are just based on some
parameters are intentionally hard-coded and are just based on
experiences of the author.

@@ -80,5 +91,8 @@

Although **Audio-Node-Suite** is written in ECMAScript 2020, it is transpiled to older
environments and this way runs in really all current (as of 2020)
JavaScript environments, of course.
**Audio-Node-Suite** is written in TypeScript 4 (ECMAScript 2022) and
is transpiled to plain JavaScript (ECMAScript 2022) and this way runs
in all current (as of 2023/Q1) JavaScript environments, of course. To
support different loader environment, the transpiled output is provided
in three distinct variants for ESM (ECMAScript 2022), CommonJS (Node)
and UMD (Legacy Browser).

@@ -85,0 +99,0 @@ License

@@ -29,13 +29,3 @@ /*!

input node). The `AudioContext` for the node is taken over from the
input node.
As an `AudioNode` is an `EventEmitter`, this composite node emits the
following `CustomEvent` instances for the calls `result = node.[dis]connect(target)`:
`CustomEvent("[dis]connect-before", { detail: { target } })` and
`CustomEvent("[dis]connect-after", { detail: { result, target } })`.
Similar, for the `node.bypass(enable)` calls, it emits:
`CustomEvent("bypass-enable-before")`,
`CustomEvent("bypass-enable-after")`,
`CustomEvent("bypass-disable-before")`, or
`CustomEvent("bypass-disable-after")`. */
input node. */
export class AudioNodeComposite extends AudioNode {

@@ -49,4 +39,19 @@ public constructor(

): void
get input(): AudioNode /* getter for underlying input node */
get output(): AudioNode /* getter for underlying output node */
static factory (
nodes: Array<AudioNode> /* (still unlinked) list of nodes to chain sequentially */
): AudioNodeComposite
}
/* `AudioNode` for convenient silence generation. */
export class AudioNodeSilence extends AudioNodeComposite {
public constructor(
context: AudioContext, /* context to associate */
params?: {
channels?: number /* number of audio channels (default: 1) */
}
)
}
/* `AudioNode` for convenient noise generation.

@@ -56,3 +61,3 @@ White noise is random amplitudes across the entire frequency range, and

where the amplitudes of the higher frequences are less strong than the low frequences. */
export class AudioNodeNoise extends AudioNode {
export class AudioNodeNoise extends AudioNodeComposite {
public constructor(

@@ -67,5 +72,21 @@ context: AudioContext, /* context to associate */

/* `AudioNode` for convenient Mute control */
export class AudioNodeMute extends AudioNodeComposite {
public constructor(
context: AudioContext, /* context to associate */
params?: {
mute?: boolean /* whether to mute initially (default: false) */
}
)
mute(
mute: boolean, /* whether to mute or unmute */
ms?: number /* linear adjust time in milliseconds (default: 10) */
): void
muted(
): boolean
}
/* `AudioNode` for convenient Gain control
which acts on decibels instead of ampliture gain. */
export class AudioNodeGain extends AudioNode {
export class AudioNodeGain extends AudioNodeComposite {
public constructor(

@@ -79,3 +100,3 @@ context: AudioContext, /* context to associate */

db: number, /* target decibel */
ms?: number /* linear adjust time in milliseconds */
ms?: number /* linear adjust time in milliseconds (default: 10) */
): void

@@ -85,3 +106,3 @@ }

/* `AudioNode` for convenient Compressor effect. */
export class AudioNodeCompressor extends AudioNode {
export class AudioNodeCompressor extends AudioNodeComposite {
public constructor(

@@ -101,3 +122,3 @@ context: AudioContext, /* context to associate */

(effectively, a maximum Compressor near the clipping zone) */
export class AudioNodeLimiter extends AudioNode {
export class AudioNodeLimiter extends AudioNodeComposite {
public constructor(

@@ -131,3 +152,3 @@ context: AudioContext, /* context to associate */

/* `AudioNode` for meter, measuring the amplitude. */
export class AudioNodeMeter extends AudioNode {
export class AudioNodeMeter extends AudioNodeComposite {
public constructor(

@@ -147,3 +168,3 @@ context: AudioContext, /* context to associate */

/* `AudioNode` for noise gate. */
export class AudioNodeGate extends AudioNode {
export class AudioNodeGate extends AudioNodeComposite {
public constructor(

@@ -164,3 +185,3 @@ context: AudioContext, /* context to associate */

/* `AudioNode` for amplitude visualization. */
export class AudioNodeAmplitude extends AudioNode {
export class AudioNodeAmplitude extends AudioNodeComposite {
public constructor(

@@ -174,3 +195,3 @@ context: AudioContext, /* context to associate */

intervalTime?: number, /* interval time in milliseconds to act (default: 1000 / 60) */
intervalLength?: number /* interval length for average calculations (default: 300 / (1000 / 60)) */
intervalCount?: number /* interval length for average calculations (default: 300 / (1000 / 60)) */
decibelBars?: number[], /* list of decibel layers to draw (default: [ -60, -45, -21, -6 ]) */

@@ -187,3 +208,3 @@ colorBars?: string[], /* list of color layers to draw (default: [ "#306090", "#00b000", "#e0d000", "#e03030" ]) */

/* `AudioNode` for spectrum visualization ("spectrogram" style). */
export class AudioNodeSpectrum extends AudioNode {
export class AudioNodeSpectrum extends AudioNodeComposite {
public constructor(

@@ -211,5 +232,9 @@ context: AudioContext, /* context to associate */

public constructor(
context: AudioContext, /* context to associate */
context: AudioContext, /* context to associate */
params?: {
gain?: number /* additional decibel to change the gain after processing (default: 0) */
equalizer?: boolean, /* whether to enable equalizer */
noisegate?: boolean, /* whether to enable noise gate (expander) */
compressor?: boolean, /* whether to enable compressor */
limiter?: boolean, /* whether to enable limiter (hard compressor) */
gain?: number /* additional decibel to change the gain after processing (default: 0) */
}

@@ -216,0 +241,0 @@ )

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc