Create a Jamstud.io Enabled External Soundcard
by jamstudio in Circuits > Audio
3379 Views, 12 Favorites, 0 Comments
Create a Jamstud.io Enabled External Soundcard
Jamstud.io is a free software that allows you to play music online with minimal or no latency. As Jamstud.io developer but also regular user, I wanted to simplify my setup to remove the need for a dedicated PC or Mac. To achieve this, I decided to use a Bheringer U-Phoria UMC22 and integrate a Nano PI NEO3 directly in it. This way, I could have a compact, simple and dedicated device that allows me to play music online.
As I still have a regular Windows based setup, I also did not want to lose the possibility to connect my beloved external soundcard to my PC for other uses.
Be aware that this hack will void the warranty of your Behringer UMC22
Supplies
- Behringer U-Phoria UMC22
- USB B Female connector 180°
- 4PDT switch
- Nano PI NEO3
- Micro SD Card
- Micro Cutters (for plastic & metal)
- Soldering iron
- Rosin Core Solder
- Thin electrical wires (x 12)
- Breadboard jumper wires (x 4)
- Heat Shrink Tube Wire Wrap Cable Sleeve
- A 3D printer ( or a friend with one :) )
- 2 M3 computer screws
Remove the Original USB Port and Solder Cables
The Behringer card is very straightforward to open. Once opened only a few screws are holding the PCB on the case. Once the PCB removed, the first thing to do is to remove the existing USB port and add a new one on the other side of the U-Phoria PCB. To do this, I removed the old port, soldered four electrical cables and reused an existing hole that was previously used to screw the PCB on the Behringer case. Here it is very well advised to use four different colors for your cables (more on that later)
Solder the Switch and New USB Port
Now the tricky part, linking all the cables together with the switch in between (now comes the colors). I did it by :
- Twisting raw electrical wires in the 4PDT switch pins tom make it easier than trying to solder the tips but to solder the twisted part until they are firmly connected to each of the 4PDT pins
- Soldering the upper row of the switch to the wires coming from the USB B female connector
- Soldering the middle row to the wires coming from the U-Phoria PCB to match the initial USB B pins
- Soldering the the lower row of the switch to the wires ending with a female pin connector and connect them to the USB pins of the Nano pi Neo 3 USB 2 pin
- Optional : burn myself a few time. Be careful, soldering is done with high heat, it hurts !
If you followed my advice regarding colors, this should go very easily, only make sure that you keep the same color on each rows and it will be easy when going from the USB port to the NanoPi board (look at the colors on the attached picture).
Don't forget to use the Heat Shrink Tubing on each connection to avoid any contact between wires and follow the same color coding.
3D Print a Custom Back Plate
It is now time to 3D print your back plate. You'll find here below the STL file that I adapted to add
- a few holes for the Nano PI ports (USB, ethernet, ...)
- a hole for the switch
- some extension to screw the Nano PI on the back plate
- some extension to securely fix the extended U-Phori USB port
Depending on your printer, this phase can be long, so it is the perfect timing to go and get something to drink or, for the impatient, to jump to next step and prepare the required software.
Downloads
Install and Run Jamstud.io Software
Jamstud.io requires a working jack setup and Java installed on the Nano PI. To have it running, I followed the next steps:
- Using the tutorial available on https://www.armbian.com/nanopineo3/ I installed armbian on a SD card.
- Once the basic system is setup, I started the Nano PI with the SD card
- Logged in as root (optional : change root password, it is always a good practice)
- Run apt-get update
- Run apt get install jack2 wget
- Run wget https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7/OpenJDK15U-jdk_aarch64_linux_hotspot_15.0.2_7.tar.gz
- run tar-zxvf OpenJDK15U-jdk_aarch64_linux_hotspot_15.0.2_7.tar.gz
Now that the basic elements are there, I created a script named run-jamstudio.sh and added as content
#!/bin/bash sleep 15s cd /home/pi set JACK_NO_AUDIO_RESERVATION=1 wget -N https://storage.googleapis.com/prod_vband_java/jamstudio.jar ./jdk-15.0.2+7/bin/java \ -XX:+UnlockExperimentalVMOptions \ -XX:ConcGCThreads=2 \ -XX:ParallelGCThreads=2 \ -XX:+UseZGC \ -Xms128m \ -Xmx128m \ -jar jamstudio.jar
This scripts automatically downloads the latest version of Jamstu.dio client software on each startup and starts it with the correct parameters to allow the smoothest experience and lowest latency
Now, run this script automatically at startup as a service following this tutorial https://www.raspberrypi.org/documentation/linux/usage/systemd.md
And this service file:
[Unit] Description=Jamstudio Service After=network.target [Service] Environment="JACK_NO_AUDIO_RESERVATION=1" ExecStart=/home/pi/jamstudio.sh WorkingDirectory=/home/pi Restart=always User=pi [Install] WantedBy=multi-user.target
Mount Everything Together and Play
The 3D printed backplate should now be printed, you can mount everything together by screwing the nanopi to the back plate (heat sink facing up), screw the 4PDT to fit the whole in the middle of the plate. snap tje USB port into it's housing arms (should sound like a click).
To play I connect my device a network cable plug the micro USB port to a power source and connect to https://jamstud.io on a phone or tablet on the same network. After a little while my device appears as available and i can join or create a session and play with my friends.
If you want to use your UMC22 soundcard as a regular USB Sound car, install the following Behringer USB ASIO Drivers and Just flip the 4PDT switch to use the regular USB connector.