Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

Server for wasm-synth to stream data in web-compatible format.

License

Notifications You must be signed in to change notification settings

social-dist0rtion-protocol/wasm-stream

Repository files navigation

WASM-STREAM

Server for wasm-synth to stream data in web-compatible format.

Why

This year's chaos communication congress is hosted in the rc3 world. A RPG-inspired virtual environment called workadventure. Users can build their own maps within workadventure, and so SDP is building their own map too. Within a map, audio streams can be added using HTML tags like <audio>.

As I've been eagerly hacking on wasm-synth since many congresses, I saw this as a chance to build a mobile stage, artists can perform on the wasm-synth.

What Is WASM-STREAM?

WASM-STREAM is an attempt to plug an instrument into the internet. It's simply a web-based synthesizer that renders Float32Arrays using the AudioWorklet and WebAssembly and sends this data to a user's sound card. When I saw that this year's congress is happening remote, I thought, why not stream the sound it makes to everybody on the map. Like a concert.

Architectural Overview

Installation

$ cp .env_copy .env
$ vim .env
$ npm i
$ npm run dev

Icecast configuration

When installing icecast, this tutorial is helpful. It automatically prompts the user to add some data. Additionally, it creates a configuration file at /etc/icecast2/icecast.xml. The following is necessary to add into the config file:

<mount>
    <username>user</username>
    <password>pass</password>
    <mount-name>/stream</mount-name>
    <max-listeners>100000</max-listeners>
    <public>1</public>
    <fallback-mount>stream2.ogg</fallback-mount>
</mount>

That allows a user to connect at /stream and broadcast to any listener.

Production

We're using PM2 for deploying and managing the server in production. An ecosystem.config.js file is provided.

About

Server for wasm-synth to stream data in web-compatible format.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published