GithubHelp home page GithubHelp logo

arjunkm / web-audio-examples Goto Github PK

View Code? Open in Web Editor NEW

This project forked from appgeo/web-audio-examples

0.0 1.0 0.0 2.3 MB

Web Audio API examples from a presentation given to AppGeo Developers on July 13, 2016.

Home Page: https://appgeo.github.io/web-audio-examples/

License: MIT License

HTML 92.58% CSS 0.92% JavaScript 6.50%

web-audio-examples's Introduction

Web Audio Examples

additive.html

  • Additive Synthesis, in which complex tones can be created by a stack of sine oscillators running at whole number multiples (harmonics) of a fundamental frequency.
  • Only useful for explaining theory. Running a sufficient number of oscillators for most audio applications would be too computationally expense. Approaches such as subtractive and FM synthesis are much more efficient.

button.html

  • Demonstrates how to load small audio samples and associate them with user interface events.
  • Adds a popping aluminum can sound to a button's mousedown and mouseup events.
  • Also provides alternative code (commented out) that demonstrates the use of an audio sprite.

envelope.html

  • Demonstrates how to modulate the initial volume and harmonics of a note to simulate the attack and decay dynamics of a real musical instrument.
  • Shows how to schedule events on the AudioContext timeline.

fm.html

  • FM Synthesis, which generates complex tones via frequency modulation, quickly varying the frequency of one oscillator with another.
  • Also Vibrato, a slow oscillation in frequency that adds richness to a tone.
  • Shows how the output from one AudioNode can be fed into an AudioParam of another AudioNode, causing its value to vary over time.

formant.html

  • Emulates a male singing a set of vowel sounds.
  • Demonstrates how a set of bandpass filters can model the human vocal tract.
  • Vowel formants are defined as parallel arrays of frequencies, Q-values (which define the width of bandpass) and amplitudes.
  • A slider smoothly transitions from one vowel to the next.

hearing.html

  • A simple hearing test. Generates a sine wave with a frequency that can be set between 20 Hz and 20,000 Hz, the range of human hearing.
  • Demonstrates that humans perceive frequency logarithmically.

keyboard.html

  • The same audio processing chain as envelope.html except with a musical keyboard rendered in HTML instead of a frequency slider.
  • A note can be sustained by dragging off the key before the mouseup event. Click on that key to cancel the note.
  • Shows how to convert a MIDI note number to an oscillator frequency.

loop.html

  • Loads various audio loops and demonstrates the effect of high pass and low pass filters.
  • Can switch the visualization between frequency bars and a spectrogram.

microphone.html

  • Visualizes the input from the microphone as frequency bars or a spectrogram.

noise.html

  • Generates various types of noise:
    • White - Equal power across all frequencies.
    • Pink - Power decreases as frequency increases, favoring lower frequencies. This noise sounds more balanced and natural to human hearing.
    • Brown - Favors lower frequencies even more strongly than pink noise.
  • Demonstrates the use of ScriptProcessorNode.

subtractive.html

  • Subtractive Synthesis, in which the output from an oscillator with high frequency harmonic content (square, triangle and sawtooth waves) is modified using filters to create complex tones.

web-audio-examples's People

Contributors

pgirard avatar

Watchers

 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.