GithubHelp home page GithubHelp logo

node-multi's Introduction

node-multi

Distributed audio performance using node.js, socket.io and the HTML5 WebAudio API.

Install

 npm install
 mkdir static
 mkdir static/audio

Note that you'll have to put your IP address in master.html, slave.html and slave_mobile.html (this will be templated in the future). You can either edit the included config file to point to remote mp3 files or drop your own mp3 files in static/audio that will be served with Express (see issues).

Web Audio is currently supported in Google Chrome, desktop Safari, Mobile Safari (on iOS 6) and the WebKit nightlies, I believe.

TODO: fix latency issues (possibly via multiple ping and latency compensation), use nginx to serve static content

Issues

Latency

There are significant issues with clients beginning play at different times, sometimes up to 500 ms. I'm actively working on this. Currently, when a client loads the page it will phone home to the server 10 times and calculate the average latency. When the master sends a play event, each client requests a latency-adjusted play event from the server, which is currently 1000 ms minus the individual recorded client latency. Currently nothing is being done to account for latency. Working on it.

Static file serving

I had some problems with Express getting overwhelmed serving large mp3s to many clients. Might be better to use remote files, hence the included config.example.js.

License

node-multi's People

Stargazers

Nikita avatar Simon Johansson avatar Jelle Akkerman avatar Feras Alnatsheh avatar Andrey Popp avatar

Watchers

James Cloos avatar drew harris avatar

node-multi's Issues

Figure out a way to account for server to master/slave latency

Currently setting up events at 1000ms-determined latency to be executed clientside using setTimeout.

This is bad, for a number of reason. setTimeout queues a function to be executed some time after the time specified, which is not what we need at all.

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.