Code Monkey home page Code Monkey logo

beatboxer's Introduction

Beatboxer

Introduction

This is an application able to make drum beats' sound just like a beatboxer. This application consist of two parts, a server build on Node.js and the executable C program. Two piece of hardware are required to run this application, BeagleBone and Zen cape. Zen cape is a hardware that could be inserted to BeagleBone's GPIO directly like a cape. The hardware is custom made.

Features

Here are the features that was build

  • Loop beats sound from the Cape's headphone jack
  • Receive input from JoyStick and change the tempo and the volume; up-increase volume, down-decrease-volume, right-increase tempo by 5 BPM, left-decrease by 5 BPM, center-cycle thru pre-determined beats
  • Play additional beats based on accelerometer x,y,z input, each direction would play different sound
  • User would be able to interact with the application thru the web interface, it would be able to support all the features mentioned above, except that it would be able to switch around the pre-determined beats without cycling thru everything

Hardware setup

As the BeagleBone has no wifi chip, you would have to attach eth cable to the eth port. It is possible to set static IP on your BeagleBone, but that would not be covered in this README. For this application, the BeagleBone IP was set to static to 192.168.2.2. I used bridge virtual network on my Mac to allow my BeagleBone to talk to the outside world. If you're using other IP Address, please change the IP in the udp_server.js.

Building and Running

To build and run this application, mounting the beaglebone using NFS is very recommended. There are a lot of ways to deploy the application (such as using SCP), but this seems to be a easiest way. The following command will build all the application, and transfer all the required executable and sound files from the host.

Dependency (Ubuntu/Debian based)

$ sudo apt install gcc-arm-linux-gnueabi
$ sudo apt-get install libasound2-dev
  • ARM ALSA library
# get armel lib on target:
#   # apt-get install libasound2:armel
# Copy target's /usr/lib/arm-linux-gnueabi/libasound.so.2.0.0
#      to host  ~/public/asound_lib_BBB/libasound.so
# Copy to just base library

To build the project:

$ make    #on top directory

The Makefile will

  1. Cross compile the application beatbox for the BeagleBone
  2. Send the node server files, beatbox executable, and wave files
  3. Install the required Node Modules in the BeagleBone

To run the whole application, both the beatbox executable and the Node server have to be run on BeagleBone. SSH to the BeagleBone would be the easiest way to access the device. Interacting using UART is also an option, but that would require more hardware.

$ <path_to_beatbox>/beatbox & #run in background
$ cd <path_to_node>/beatbox-server-copy
$ node server.js

beatboxer's People

Contributors

dependabot[bot] avatar jmardjuki avatar

Watchers

 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.