GithubHelp home page GithubHelp logo

xi-yang-23 / webaudio-examples Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mdn/webaudio-examples

0.0 0.0 0.0 7.96 MB

Code examples that accompany the MDN Web Audio documentation

Home Page: https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API

License: Creative Commons Zero v1.0 Universal

HTML 48.26% JavaScript 29.93% CSS 21.81%

webaudio-examples's Introduction

webaudio-examples

Code examples that accompany the MDN Web Audio documentation https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API

Audio analyser

The audio-analyser directory contains a very simple example showing a graphical visualization of an audio signal drawn with data taken from an AnalyserNode interface. Run the demo live.

Audio basics

The audio-basics directory contains a fun example showing a retro-style "boombox" that allows audio to be played, stereo-panned, and volume-adjusted. Run the demo live.

Audio buffer

The audio-buffer directory contains a very simple example showing how to use an AudioBuffer interface in the Web Audio API. Run the demo live.

Audio param

The audio-param directory contains some simple examples showing how to use the methods of the Web Audio API AudioParam interface. Run example live.

Audio context states

The audiocontext-states directory contains a simple demo of the new Web Audio API AudioContext methods, including the states property and the close(), resume(), and suspend() methods. Run the demo live.

Audio worklet

The audioworklet directory contains an example showing how to use the AudioWorklet interface. See also the guide on background audio processing using AudioWorklet. Run the example live.

Compressor example

The compressor-example directory contains a simple demo to show usage of the Web Audio API BaseAudioContext.createDynamicsCompressor() method and DynamicsCompressorNode interface. Run the example live.

Create media stream destination

The create-media-stream-destination directory contains a simple example showing how the Web Audio API AudioContext.createMediaStreamDestination() method can be used to output a stream - in this case to a MediaRecorder instance - to output a sinewave to an opus file. Run the demo live.

Decode audio data

The decode-audio-data directory contains a simple example demonstrating usage of the Web Audio API BaseAudioContext.decodeAudioData() method. View example live.

IIR filter node

The iirfilter-node directory contains an example showing usage of an IIRFilterNode interface. Run the demo live.

Media source buffer

The media-source-buffer directory contains a simple example demonstrating usage of the Web Audio API AudioContext.createMediaElementSource() method. View the demo live.

Multi track

The multi-track directory contains an example of connecting separate independently-playable audio tracks to a single AudioDestinationNode interface. Run the example live.

Offline audio context

The offline-audio-context directory contains a simple example to show how a Web Audio API OfflineAudioContext interface can be used to rapidly process/render audio in the background to create a buffer, which can then be used in any way you please. For more information, see https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext. Run example live.

Offline audio context promise

The offline-audio-context-promise directory contains a simple example to show how a Web Audio API OfflineAudioContext interface can be used to rapidly process/render audio in the background to create a buffer, which can then be used in any way you please. Run the example live.

Output timestamp

The output-timestamp directory contains an example of how the AudioContext.getOutputTimestamp() property can be used to log contextTime and performanceTime to the console. Try the demo live.

Panner node

The panner-node directory contains a demo to show basic usage of the Web Audio API BaseAudioContext.createPanner() method to control audio spatialization. Run the example live.

Script processor node

The script-processor-node directory contains a simple demo showing how to use the Web Audio API's ScriptProcessorNode interface to process a loaded audio track, adding a little bit of white noise to each audio sample. See the live demo.

Spacialization

The spacialization directory contains an example of how the various properties of a PannerNode interface can be adjusted to emulate sound in a three-dimensional space. For more information see Web audio spatialization basics. Try the live demo.

Step sequencer

The step-sequencer directory contains a simple step-sequencer that loops and manipulates sounds based on a dial-up modem. For more information see Advanced techniques: creating sound, sequencing, timing, scheduling. See the live demo also.

Stereo panner node

The stereo-panner-node directory contains a simple example to show how the Web Audio API StereoPannerNode interface can be used to pan an audio stream. Run the example live.

Stream source buffer

The stream-source-buffer directory contains a simple example demonstrating usage of the Web Audio API AudioContext.createMediaElementSource() method. View example live.

webaudio-examples's People

Contributors

chrisdavidmills avatar rumyra avatar elchi3 avatar matt-development-work avatar wbamberg avatar michaelbartnett avatar guest271314 avatar jan-ivar avatar perrinjerome avatar kchapelier avatar mozilla-github-standards avatar sanxofon avatar stephendwolff avatar stoyan avatar nbriz avatar sbungartz avatar teoli2003 avatar wahengchang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.