All Projects → shamadee → Web Dsp

shamadee / Web Dsp

Licence: mit
A client-side signal processing library utilizing the power of WebAssembly (.wasm)

Projects that are alternatives of or similar to Web Dsp

Denoflate
WebAssembly powered Deflate/Gzip/Zlib compression for Deno, written in Rust
Stars: ✭ 80 (-93.74%)
Mutual labels:  webassembly, wasm
Veracruz
Main repository for the Veracruz privacy-preserving compute project.
Stars: ✭ 71 (-94.44%)
Mutual labels:  webassembly, wasm
Muze
Composable data visualisation library for web with a data-first approach now powered by WebAssembly
Stars: ✭ 1,153 (-9.78%)
Mutual labels:  webassembly, wasm
Disable Webassembly
Browser hacks to disable WebAssembly (WASM)
Stars: ✭ 63 (-95.07%)
Mutual labels:  webassembly, wasm
Doomfire
DOOM fire implementation written in rust
Stars: ✭ 80 (-93.74%)
Mutual labels:  webassembly, wasm
Wasmer Python
🐍🕸 WebAssembly runtime for Python
Stars: ✭ 1,131 (-11.5%)
Mutual labels:  webassembly, wasm
Fastq.bio
An interactive web tool for quality control of DNA sequencing data
Stars: ✭ 76 (-94.05%)
Mutual labels:  webassembly, wasm
Wasmjit
Small Embeddable WebAssembly Runtime
Stars: ✭ 1,063 (-16.82%)
Mutual labels:  webassembly, wasm
Opus Stream Decoder
Instantly decode Ogg Opus audio streams in chunks with JavaScript & WebAssembly (Wasm)
Stars: ✭ 80 (-93.74%)
Mutual labels:  webassembly, wasm
Pulsefft
A WebAssembly implementation of the C Fast Fourier Transform library kissFFT
Stars: ✭ 76 (-94.05%)
Mutual labels:  webassembly, wasm
Blazor Wasm Identity Grpc
Blazor WASM, IdentityServer4, Kestrel Web Server, Entity Framework Code First SQLite Database with Multiple Roles, Additional User Claims & gRPC with Roles Authorization.
Stars: ✭ 61 (-95.23%)
Mutual labels:  webassembly, wasm
Wasm To Oci
Use OCI registries to distribute WASM modules
Stars: ✭ 83 (-93.51%)
Mutual labels:  webassembly, wasm
Vxformgenerator
The library contains a component, that nests itself into the Blazor EditForm instead of a wrapper around the EditForm. The component is able to generate a form based on a POCO or a ExpandoObject. Because of this architecture the library provides the developer flexibility and direct usage of the EditForm.
Stars: ✭ 60 (-95.31%)
Mutual labels:  webassembly, wasm
Dockerdot
🐳 dockerdot shows dockerfile dependenciy graph. This is useful to understand how build dockerfile. This uses Go WebAssembly + BuildKit package.
Stars: ✭ 65 (-94.91%)
Mutual labels:  webassembly, wasm
Proxy Wasm Cpp Sdk
WebAssembly for Proxies (C++ SDK)
Stars: ✭ 55 (-95.7%)
Mutual labels:  webassembly, wasm
Web Audio Javascript Webassembly Sdk Interactive Audio
🌐 Superpowered Web Audio JavaScript and WebAssembly SDK for modern web browsers. Allows developers to implement low-latency interactive audio features into web sites and web apps with a friendly Javascript API. https://superpowered.com
Stars: ✭ 68 (-94.68%)
Mutual labels:  webassembly, wasm
Hvue
A GopherJS & go/wasm binding for Vue.js
Stars: ✭ 50 (-96.09%)
Mutual labels:  webassembly, wasm
Aioli
Framework for building fast genomics web tools with WebAssembly and WebWorkers
Stars: ✭ 51 (-96.01%)
Mutual labels:  webassembly, wasm
Wagi
Write HTTP handlers in WebAssembly with a minimal amount of work
Stars: ✭ 75 (-94.13%)
Mutual labels:  webassembly, wasm
Draw App
In browser drawing app built in rust / wasm
Stars: ✭ 87 (-93.19%)
Mutual labels:  webassembly, wasm

webDSP Logo

A client-side DSP library utilizing the power of WebAssembly (.wasm)

WebDSP is a collection of highly performant algorithms, which are designed to be building blocks for web applications that aim to operate on media data. The methods are written in C++ and compiled to WASM, and exposed as simple vanilla Javascript functions developers can run on the client side.

WebAssembly is very young, and this is the first .wasm based library designed to be dropped in to existing production level JS code bases. With that in mind, there was an explicit goal to optimize and simplify how JS developers can load and use .wasm functionality. Just as important, was our goal to lay the groundwork for future open source WebAssembly module developers.

Demo & Starter Kit

Check out the demo video editor and corresponding repo.

To quickly start working with WebAssembly and to build your own modules, please see our started WebAssembly work environment you can npm install and launch wasm-init.

Install

Clone this repo and drop only the 'lib' folder into your project. Simply load our library file in a script tag. You can also get the module via npm install web-dsp, which comes with a built-in npm executable (get-dsp), which will copy the lib folder into your project directory.

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

Loading the WebAssembly Module

Use loadWASM() to fetch the WebAssembly module as a promise object. Use jsFallback() in the catch block to handle browsers that don't support .wasm

var webdsp = {};
loadWASM().then(module => {
  webdsp = module;
  // things to execute on page load only after module is loaded
});

Note WebAssembly modules need to be loaded with an HTTP request (fetch). Chrome does not support local file access via HTTP, so the files must be loaded using a server. In Firefox, it is possible to load the module without a server as a plain HTML file.
After loading, a WebAssembly method can be called with plain JS:

//get image data from canvas
pixels = context.getImageData(0,0,width,height);
button.addEventListener('click', () => {
  pixels.data.set(webdsp.invert(pixels.data));
});

Video and Image Filter Methods

These modular filters can execute on an array of RGBA pixel data:

webdsp.grayScale(pixelData)
webdsp.brighten(pixelData)
webdsp.invert(pixelData)
webdsp.noise(pixelData)
webdsp.sobelFilter(pixelData, width, height, invert=false)
webdsp.convFilter(pixelData, width, height, kernel, divisor, bias=0, count=1)
webdsp.multiFilter(pixelData, width, filterType, mag, multiplier, adjacent)

Filter templates:

webdsp.sunset(pixelData, width)
webdsp.analogTV(pixelData, width)
webdsp.emboss(pixelData, width)
webdsp.blur(pixelData, width, height)
webdsp.sharpen(pixelData, width, height))
webdsp.strongSharpen(pixelData, width, height)
webdsp.clarity(pixelData, width, height)
webdsp.goodMorning(pixelData, width, height)
webdsp.acid(pixelData, width, height)
webdsp.urple(pixelData, width)
webdsp.forest(pixelData, width)
webdsp.romance(pixelData, width)
webdsp.hippo(pixelData, width)
webdsp.longhorn(pixelData, width)
webdsp.underground(pixelData, width)
webdsp.rooster(pixelData, width)
webdsp.mist(pixelData, width)
webdsp.tingle(pixelData, width)
webdsp.bacteria(pixelData, width)
webdsp.dewdrops(pixelData, width, height)
webdsp.destruction(pixelData, width, height)
webdsp.hulk(pixelData, width)
webdsp.ghost(pixelData, width)
webdsp.twisted(pixelData, width)
webdsp.security(pixelData, width)

For production level environments, it's important to note that all available methods have JavaScript fallback functions that are automatically exported with the module so older browsers can still run your code. However, note that the more intensive convolution and edge detection filters will run very slowly or hang the browser completely without WebAssembly support.

TODO:

The following filter fallback implementations need to be properly matched with their C++ counterparts: underground, rooster, mist, kaleidoscope, bacteria, hulk edge, ghost, twisted.
Cache .wasm module on client

Collaborators: Deep Pulusani, Shahrod Khalkhali, Matthias Wagner

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].