GithubHelp home page GithubHelp logo

musicserver's Introduction

Sound Server via Clojure

A Clojure app designed to allow coworkers to share music.

Usage

Listen to music with coworkers and friends! On the computer with speakers start the server:

$ lein run server

To add clients to the server have each client run something like:

$ lein run client --port 10100 --file example.txt \
                  --server http://localhost:3131 \
                  --bind <ip address of client>

Specify a file of "-" to read the playlist from stdin

The client will ping the server and start playing music. Any number of clients can connect to the music server. As songs complete each server is queried in a round-robin fashion for the next song to play.

Right now clients aren't really dynamic; you provide them a "--file" argument with that contains a bunch of paths to music files (separated by newlines)

Frontend

To run the webserver and see info about the currently playing songs compile the cljs files

$ lein cljsbuild once

And start a webserver

$ python -m SimpleHTTPServer 8888

And go to town!

To install the netty websocket server you'll have to compile it yourself since it isn't in maven central (yet? Just got to v1.0 on June 7th)

git clone https://github.com/mrniko/netty-socketio
mvn install

TODO

  • Clients that exit wont get removed--- doesn't cause issues but is annoying

  • Using mplayer to play the music to avoid downloading a ton of java junk. Probably should download java junk to avoid the dependency

License

Copyright © 2013 Adam Hinz

MIT License

musicserver's People

Contributors

ahinz avatar

Watchers

 avatar James Cloos avatar

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.