Name: musync
Owner: Resin.io
Description: Play your music in sync!
Created: 2015-02-20 13:20:47.0
Updated: 2017-12-18 05:56:34.0
Pushed: 2015-04-24 11:08:21.0
Homepage: null
Size: 304
Language: CoffeeScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Play your favourite music in sync with your Raspberry Pis.
You'll need:
Register to Resin.io, create a Raspberry Pi application, and initialize all your MuSync clients with resin.To do this follow our comprehensive getting started guide.
Clone this project:
t clone https://github.com/resin-io/musync.git
t remote add resin git@git.resin.io:USERNAME/APPNAME.git
t push resin
The MuSync Frontend allows users to add a song by artist and song name, this is is synced to the Firebase datastore. The datastore holds the list of songs to play, which one is the current song, and the start time for the current song (in milliseconds).
Each devices watches the firebase datastore. When the MuSync clients receive a song to play, they search for that song in Grooveshark (see the Customisation section to learn how to change the backend) and play it accordingly.
MuSync includes an audio skew correction mechanism to ensure the song is played in sync between all your clients.
You can customise the following aspects of MuSync with their corresponding environment variables.
You are highly encouraged to specifically tweak GRACE
and SETUP_GRACE
to match your internet connection capabilities. The defaults are based on a fairly slow internet speed (less than 10mb/s). If you have a faster connection, decrease the values for improved performance.
Defaults to 250.
The maximum skew, in milliseconds, between track time and expected time in the track.
Defaults to https://musync.firebaseio.com.
The Firebase URL.
Defaults to 5000.
Delay, in milliseconds, before starting to play to allow devices to synchronise.
Defaults to 8000.
The time given for initial playback to be setup, preventing the track from starting behind schedule.
Defaults to grooveshark.
MuSync currently works with Grooveshark, but you can easily change the backend to get the audio streams from another sources.
To do this, you must create an NPM package called musync-backend-<your backend name>
that exposes a search()
function that returns a readable stream to the callback:
song
is an object containing an artist
and a title
.callback
is a function callback with either an error, or an audio stream.After you have your backend module installed to your MuSync application, you can change the BACKEND
environment variable to match your backend name, without the musync-backend-
prefix.
Take a look at the default musync-backend-grooveshark for an example.
Run the test suite by doing:
lp test
Before submitting a PR, please make sure that you include tests, and that coffeelint runs without any warning:
lp lint
If you're having any problem, please raise an issue on GitHub.
The project is licensed under the MIT license.