Giter Site home page Giter Site logo

audio-pong's Introduction

What is audio pong?

This is a small nodejs server for your raspberry 3.

It serves a sound board to your phone, you click on a tile to play a sound on you phone and another sound will be played on the raspberry, making a fun effect like ping pong, reload and fire, smash and cry...

![Screenshot](./Screenshot from 2016-08-02 12-54-24.png)

Install on a raspberry 3

on your raspberry, install these libs for audio and nodejs

sudo apt-get update

# install nodejs
sudo apt-get install -y npm wget
sudo npm install -g n
sudo n latest

# setup audio
sudo apt-get install -y mpg321

then start the server (you can add use these techniques to start the server on startup boot)

$ npm i
$ npm start

then open http://[raspberry IP]:8080 on your phone and enjoy the sound on the 2 devices

tip: you may need to type amixer cset numid=3 1 to force the raspberry to output audio on the "analog" output instead of hdmi

tip: you can use this command to test your audio: speaker-test -t sine -f 440 -c 2 -s 1

add sounds to the board

You will need 2 mp3 sounds, one for ping (played by the phone) and one for pong (played by the raspberry)

Feel free to contribute your sounds here, only creative commons one please (home made or not) ;)



Notes on Doccker

$ sudo docker build . lexoyo/audio-pong $ sudo docker run -p 8080:8080 lexoyo/audio-pong

sudo docker run -i -t -p 8080:8080 lexoyo/audio-pong /bin/bash

alsa :

-v /dev/snd:/dev/snd --lxc-conf='lxc.cgroup.devices.allow = c 116:* rwm' -v /dev/shm:/dev/shm
-v /etc/machine-id:/etc/machine-id
-v /run/user/$uid/pulse:/run/user/$uid/pulse
-v /var/lib/dbus:/var/lib/dbus
-v ~/.pulse:/home/$dockerUsername/.pulse \

audio-pong's People

Contributors

lexoyo avatar singchan avatar

Stargazers

 avatar

Watchers

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