Raspberry Pi DJ Audio Player

About: Hello I am Jonathan Eeckhout I am a embedded software engineer by trade and like to make projects in my spare time. Beside programming I also like to ride my bikes and play with my dog.

Somewhere in my past I was a DJ, playing music at parties/bars. During this time I always dreamed of making my own audio player. Well today is the day and I just went for it and tried to make one.

The first question I asked myself was: "What are the most basic controls needed for a DJ to have?". For the answer I looked at the old technics turntables. They have 2 controls: play/stop and increase/decrease the playback speed. This was my goal for this project. To have an audio player on the raspberry that is able to play/stop and speed up/down a song.

This instructable will guide you how to make this basic audio player.

Step 1: Connecting the Sensors to the Raspberry Pi

First things first, we need to be able to control the song. We need to connect buttons/sliders/joysticks/... to the raspberry pi. I used 2 buttons and a joystick. The buttons can be directly connected to the raspberry pi but the joystick can't. This is because the joystick consists of 2 potentiometers, one for the x-axis and one for the y-axis, and have analog output values and the rbpi is lacking a ADC (analog to digital converter). That is why I used an arduino atmega 2560 which does have a ADC and let it convert the analog reading value to a I2C data stream which the rbpi is capable of reading.


You can find the code at:

https://github.com/jonathaneeckhout/arduino_sensor...

Note that you need to switch the vcc (red) and gnd (black) cables to the buttons (I made a mistake when drawing the image :p).

Upload it to the arduino and connect the I2C to the I2C of the raspberry pi.

Step 2: Building the Software on the RBPI

Next we need to get our code from github and compile the code.

So get the code from and place it on the raspberry pi:

https://github.com/jonathaneeckhout/rbpi_dj_player

Install the dependencies:

sudo apt-get install libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-pulseaudio

enter the directory and enter "make".

Now you can run the audio player with

./audio_player .

Check out the video for a small demo and enjoy your audio player!

Don't forget to check my site for my other projects:

https://www.jonathaneeckhout.com/html/projects.html

Toys Contest

Participated in the
Toys Contest

Share

    Recommendations

    • Frozen Treats Challenge

      Frozen Treats Challenge
    • Fandom Contest

      Fandom Contest
    • Growing Beyond Earth Maker Contest

      Growing Beyond Earth Maker Contest

    Discussions

    0
    None
    DIY Hacks and How Tos

    5 months ago

    Welcome to Instructables. Thanks for sharing with the community.