Audio and Networking – When Passions Collide
A Brief Update
Hello! It’s been a few months since my last post, but I’ve been plenty busy with lots of projects. From working on harnessing my tools that help me in my duties as an audio engineer, to exploring depths of complexity that were born out of pure spontaneity (like checking for audio plugin deals and stumbling on a discovery of a new tool that just came out with a developer that is well respected, and just knowing that you HAVE to stay up and play around with it. That kind of thing.)
To sum up a lot of the past few months, I will probably touch on these topics with more depth in other posts, but I’ve:
- Researched in-depth utility on audio equipment, both hardware and software.
- Had the pleasure of utilizing an analog mixing chain worth $20,000+.
- Upgraded audio/visual/networking equipment for my church where I volunteer.
- Achieved my long-awaited goal of 160 Words Per Minute on a 60 second typing test! (Using the QWERTY keyboard format)
- Closed a deal with a client of mine, for a anticipated and exciting project.
- Reconnected with friends, ignited new relationships, and focused on self-improvement through the lens of how I can effectively continue to improve on the value I can provide to others.
My Latest Highlight-Project
The Discovery: VBAudioMatrix
So, with the discovery I had for a software by the name of VBAudioMatrix, created by Vincent Burel at VB-Audio, I opened a potential that I was never aware of. I realized the moment I started playing with audio matrix routing how useful being able to manipulate audio inputs and outputs, and the use-cases it would provide me. At first, I thought I would be doing it out of simplicity of practicing to gain a better insight into the complexities of audio engineering, adding complexity to my audio setup for no apparent reason otherwise, but I was wrong.
VBAN Protocol and Audio Transportation
I was at church sharing the discovery I had with this software, where a special network protocol, VBAN (also created by Vincent Burel), allows audio to be transported over a network connection, and then to a phone application that can receive it (VBAN Receptor in this case).
Implementing VBAN over a VPN
After briefing the idea of how useful it could be to be able to locally route audio over the network, I started communicating the idea I had to make a reality, mainly for the sake of challenge and seeing how far I could push the limits of this protocol. So, as a result, I took a laptop that had a VPN client, (Tailscale), and I facilitated a connection miles away to my desktop computer from a remote location. I installed VBAudioMatrix on both devices, and I made sure both clients were on the same “Tailnet”, which is just a special name for the Tailscale VPN network. After both devices were on the same network, I configured the VBAN streams with the proper IP addresses, and I was incredibly shocked when I was able to pull the audio from a place, miles away, streaming audio from a firefox browser, all the way to my desktop at home.
The Realization!
This was a lightbulb moment for me, as I was explaining this to our drummer who works in radio, and he immediately caught on to the potential use-case of being able to implement this in other ways with our church infrastructure. This then began the investigation into how I could create an affordable solution that could compete against a wireless speaker costing hundreds of dollars.
Raspberry Pi and VBAN: A Breakthrough
My first thought was using one of my Raspberry Pis, so I did a quick google search for VBAN functionality with linux/Raspberry Pi devices, and I stumbled upon an amazing blog post by Stanley Solutions. He was able to get a stream from Voicemeeter, (also created by Vincent Burel, and has VBAN transmission) to his Raspberry Pi.
With instructions that weren’t so complicated and fairly straight-forward. I took it upon myself to play around and try it get it working, and it was surprisingly simple!! I had a working stream in my test environment, where I could send audio from my desktop PC, and walk around with a battery-powered Raspberry Pi, plugged into some cheap test speakers at the 3.5mm headphone jack. I was able to walk surprisingly far away from the house outside before starting to get a noticeable degradation of the audio quality. This was amazing, and I was so happy to see this working after all the research I did. Furthermore, it was out of pure spontaneity from the seed that was planted with my experimentation with VBAudioMatrix and, quite thankfully, I have good friends who don’t mind me rambling about my technical concepts.. most times!
Improving the Test Setup
So, seeking to improve my test-setup for my church’s use-case, I knew there might be some potential problems. Ideally I imagine the Raspberry Pi on the wall, being the brains for the audio, and having a speaker plugged into it, somewhere in a nursery or a bathroom, for example. With this, there’s a chance that a shiny Raspberry Pi may fall victim to a child or gravity. That is going to be an interesting layer to this, so stay posted on that as this develops.
The other problem, I was able to resolve with a script I started and drafted up pretty quickly with the help of ChatGPT and my personal linux experience! This problem would be the inevitable DHCP errors and manual configuration required by having to configure the Raspberry Pi device from a new network with a new private subnet range.
Automating Stream Discovery
For example, if my home network is 172.22.22.0/24, and the church network is 192.168.0.0/24, evidently, when you start the VBAN audio stream, you’re going to have to adjust the device IP address. I didn’t want to have to keep doing this as it would require me to remote into the Raspberry Pi to start/edit the script.
My first solution to this problem was a bash script to manually set an IP address, quickly changing the target device for the service I created that boots on start-up. This was a brief solution until I had a better idea which would be to see if there was potentially a way to automate this. In other words, the image I had in my head was that the Raspberry Pi device would automatically discover the stream from the transmission device, in some fashion.
I prompted away at ChatGPT for some ideas, and I was blown away when I saw a script that was suggested to me which used TCPDump and Scapy to filter for the VBAN stream on port 6980, and finding the transmission device IP through that approach. It was genius, and all I had left to do was iterate through the script and optimize it manually, wrinkling out any issues I would later inevitably discover.
Excitement of Blending Networking and Audio
After creating the script, I was finally able to fully unplug the Raspberry Pi, power it with a battery bank, and plug in a speaker, and the service at start-up would initiate the Python script that would probe for communication on port 6980 with TCPDump, and from then on, automatically fill in the required information for the stream target IP. This would mean the only steps required by the user would be satisfied without the need for command line or a computer nearby. The only caveat is that I had to edit the WPA_Supplicant.conf file to include the appropriate SSID of the wireless network I knew I was going to be on, in advance. This is the only initial set-up required on top of all the scripting and steps provided from Stanley Solutions’ blog post, and in theory, allows the network stream to automatically work without much fuss by simply being in range of the target network, and access to power.
Now, maybe you can see why I’m excited. It has been amazing to work on a project like this, now available for others on GitHub. It is the first project of mine that blends my love for networking and audio together, and is completely changing my world. It was niche, and I loved how the resources were more scarce, allowing me to be more resourceful. I’m thankful to be alive in a time where resources are at our accessibility any time of the day, and while I know I could be better at scripting manually, the heavy lifting with AI has allowed me to tackle challenges or create scripts I would not have otherwise had the morale to pursue the creation of. It has been a successful catalyst for me to tackle things with less excuses, and to solve everyday problems as they arise. It is a true blessing.
Embracing Resources and Problem-Solving
Thank you for reading and following me on this blog post. It’s a longer one but I am thrilled to have people join me in my season of life. Let this be a motivation that you can tackle problems just as I did, and that none of us have a special super power for any of this. It is a combination of team work and load-balancing of resources, in addition to a mindset to problem solve and reject complacency, with the aim to provide value to others and change the world.
Credits and Resources:
Stanley Solutions Blog Post – https://blog.stanleysolutionsnw.com/networked-audio-using-vban-and-rpi.html
VB-Audio – https://vb-audio.com/
VBAN Stream Detect Script – https://github.com/davidinfosec/VBAN-Stream-Detect