All Projects â†’ fritzo â†’ wavencoderjs

fritzo / wavencoderjs

Licence: other
A fast cross-browser riff wave encoder for real-time audio synthesis in HTML5

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to wavencoderjs

Stockroom
🗃 Offload your store management to a worker easily.
Stars: ✭ 1,745 (+7831.82%)
Mutual labels:  web-worker
Preact Worker Demo
Demo of preact rendering an entire app in a Web Worker.
Stars: ✭ 204 (+827.27%)
Mutual labels:  web-worker
super-workers
🐮 Distribute load on front-end via parallelism
Stars: ✭ 93 (+322.73%)
Mutual labels:  web-worker
Vuex Search
Vuex binding for client-side search with indexers and Web Workers 📗🔍
Stars: ✭ 147 (+568.18%)
Mutual labels:  web-worker
Workerize Loader
đŸ—ïž Automatically move a module into a Web Worker (Webpack loader)
Stars: ✭ 2,135 (+9604.55%)
Mutual labels:  web-worker
Web Worker Proxy
A better way of working with web workers
Stars: ✭ 218 (+890.91%)
Mutual labels:  web-worker
Webworkify Webpack
launch a web worker at runtime that can require() in the browser with webpack
Stars: ✭ 105 (+377.27%)
Mutual labels:  web-worker
vlitejs
🩋 vLitejs is a fast and lightweight Javascript library for customizing video and audio player in Javascript with a minimalist theme (HTML5, Youtube, Vimeo, Dailymotion)
Stars: ✭ 162 (+636.36%)
Mutual labels:  html5-audio
Useworker
⚛ useWorker() - A React Hook for Blocking-Free Background Tasks
Stars: ✭ 2,233 (+10050%)
Mutual labels:  web-worker
Websockets Streaming Audio
Stream audio to a Web Audio API enabled browser from Node.js server side using Web Worker and Web Socket
Stars: ✭ 230 (+945.45%)
Mutual labels:  web-worker
Vue In Web Worker
Vue.js in Web Worker
Stars: ✭ 149 (+577.27%)
Mutual labels:  web-worker
Redux In Worker
Entire Redux in Web Worker
Stars: ✭ 168 (+663.64%)
Mutual labels:  web-worker
Jsdom Worker
đŸ‘·â€â™€ïž Use Web Workers in Jest / JSDOM 🌈
Stars: ✭ 218 (+890.91%)
Mutual labels:  web-worker
Worker Plugin
đŸ‘©â€đŸ­ Adds native Web Worker bundling support to Webpack.
Stars: ✭ 1,840 (+8263.64%)
Mutual labels:  web-worker
typography-karaoke
Demonstrating Typography via Karaoke-style cues using HTML5 Audio/Video and WebVTT
Stars: ✭ 15 (-31.82%)
Mutual labels:  html5-audio
Pokemon63
「みんăȘた63 - ă‚čクăƒȘăƒŒăƒłă‚·ăƒ§ăƒƒăƒˆă‹ă‚‰è‡Șć‹•è§Łæžă§ăă‚‹ăƒă‚±ăƒąăƒłăźéžć‡șæŠ•çšżă‚”ă‚€ăƒˆă€ăźă‚œăƒŒă‚čă‚łăƒŒăƒ‰
Stars: ✭ 107 (+386.36%)
Mutual labels:  web-worker
Wasm Worker
Move a WebAssembly module into its own thread
Stars: ✭ 215 (+877.27%)
Mutual labels:  web-worker
urmusic
An application to make your own music visualizer, easily and for free!
Stars: ✭ 52 (+136.36%)
Mutual labels:  html5-audio
cnode-react
a web app for cnode.org with react + react-router + react-redux
Stars: ✭ 23 (+4.55%)
Mutual labels:  web-worker
React Worker Image
React component to fetch image resources via web workers đŸ€–đŸ€–
Stars: ✭ 226 (+927.27%)
Mutual labels:  web-worker

WavEncoder

WavEncoder is a fast cross-browser riff wave encoder for real-time audio synthesis in HTML5. Works in Web Workers and in the main window (in contrast to encoders using window.btoa).

Dual licensed under the MIT or GPL Version 2 licenses.

Examples

To play 1 sec of noise in the main window, we can

<script type='text/javascript' src='wavencoder.js'></script>
<script type='text/javascript'>

  var samples = [];
  for (var t = 0; t < 22050; ++t) {
    samples[t] = 2 * Math.random() - 1;  // in the interval [-1,1]
  }

  var datauri = WavEncoder.encode(samples);
  var audio = new Audio(datauri);

  document.onload(function(){ audio.play(); });

</script>

WavEncoder objects are optimized to create many samples of the same length. A typical use case is to generate a set of tones, say in a web worker

includeScripts('wavencoder.js');

var sampleRateHz = 44100;
var numSamples = 1 * sampleRateHz;                 // 1 sec
var baseFreq = 2 * Math.PI * 27.5 / sampleRateHz;  // A0

var wavEncoder = new WavEncoder(numSamples, {sampleRateHz: sampleRateHz});

var tones = [];
var samples = [];
for (var n = 0; n < 88; ++n) {

  var freq = baseFreq * Math.pow(2, n/12);
  for (var t = 0; t < numSamples; ++t) {
    samples[t] = Math.sin(freq * t);
  }

  tones[n] = wavEncoder.encode(samples);
}

postMessage(tones);
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].