GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - node-3d/webaudio: WebAudio for Node.js

BranchesTags
Open more actions menu

Latest commit

 

History

261 Commits
261 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.vscode
.vscode
 
 
examples
examples
 
 
src
src
 
 
test-consumer
test-consumer
 
 
ts
ts
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
install.js
install.js
 
 
oxfmt.config.ts
oxfmt.config.ts
 
 
oxlint.config.ts
oxlint.config.ts
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
rslib.config.ts
rslib.config.ts
 
 
tsconfig.build.json
tsconfig.build.json
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

WebAudio for Node.js

This is a part of Node3D project.

NPM Lint Test Cpplint

npm install @node-3d/webaudio

Node.js addon implementing the Web Audio Api.

Import any class you like from the module and then follow the doc:

import { AudioContext } from '@node-3d/webaudio'; // usually this is enough

Create a silent PCM buffer using the Web Audio arguments, then write samples:

const context = new AudioContext();
const buffer = context.createBuffer(1, context.sampleRate, context.sampleRate);
const samples = buffer.getChannelData(0);
samples[0] = 0.5;

new AudioBuffer({ length, sampleRate, numberOfChannels? }) is also supported. createBuffer() requires all three arguments. Invalid buffer dimensions and sample rates throw NotSupportedError; an invalid channel index throws IndexSizeError.

This module is WORK IN PROGRESS. Unimplemented or noncompliant Web Audio behavior remains work to fix.

Currently exported classes:

  • AudioBuffer
  • AudioContext
  • AudioParam
  • AnalyserNode
  • BiquadFilterNode
  • ConvolverNode
  • GainNode
  • PannerNode
  • AudioBufferSourceNode
  • OscillatorNode
  • AudioScheduledSourceNode

In examples directory, currently working examples are prepended with _.

Binary Origin

Release archives are built by this repository's public GitHub Actions workflows.

Attestations: https://github.com/node-3d/webaudio/attestations

To verify a downloaded archive:

gh release download <tag> -R node-3d/webaudio -p <platform>.gz
gh attestation verify <platform>.gz -R node-3d/webaudio

This addon is ABI-compatible across Node.js versions. There is no compilation during npm install.

About

WebAudio for Node.js

github.com/node-3d/node-3d

Topics

apiaudiocrossplatformnode-3dnode-addonnodejssoundweb-audioweb-audio-apiwebaudio

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

21 stars

Watchers

5 watching

Forks

4 forks
Report repository

Releases

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.