Skip to main content

Nimble Rumble, a library to play wireless(WiFi) sound in perfect synch, for private use and evaluation

Project description

image

nimRum (Nimble Rumble)

What this is

This is an implementation of the www.abtaudio.tech solution. Free for private use and evaluation purposes.

It is a SW written i C, with a python wrapper enabling wireless audio transport.

What it does

A program/library to transmit wireless audio over WiFi/Ethernet.

One device reads up to 32 audio channels, either from a file or from an audio input.
(The included ALSA capture library, also supporting encoded S/PDIF is limited to max 8 channels / 48kHz sample rate)
It will transmit these audio channels to at most 16 receivers.
What channel going to what receiver is easily configurable.

The receiving speakers will play the audio perfectly synchronized, just as if you connected them with wires, ..without mixing up polarity, create echoes or other weird audio phenomena.

In other words, this solution is good enough for putting multiple wireless speakers in the same room, and let them play together, either for music, or as surround speakers.

This maybe sounds obvious, but this is NOT what most wireless speakers does today.

It also include

  • Test signal generator
  • Scripts for analyzing synchronization performance
  • Virtual audio channels (like mixing in left/right channel to your LFE)
  • Indicator for bad network
  • Support for optional remote control (like volume/mute)
  • Support for optional rotary encoder (like volume)
  • Static volume adjustment in dB per receiver
  • Static delay adjustment in microseconds per receiver
  • LED status indicator

Limitations

This implementation is limited to: Raspberry Pi 2,3,4 and Zero 2 W

What you need

  • A couple of Raspberry Pis with

    • Debian based OS (Like Raspberry Pi OS)

    • All connected through a local network

      • Requires at least Wi-Fi 5(802.11 AC). External antenna with a few extra dBi is also recommended
      • 5GHz WiFi has the perfect balance between range and radio interference for this purpose
      • Ethernet cables works as well
    • As sound source, either use a local file or the Line-In|S/PDIF input from a sound card.

    • If transmitter has IR-sensor/LIRC, then volume/mute can be controlled from a remote.

    • The ones configured as receivers should have a sound card with either line-out or direct speaker output

      • The built in line-out on RPI is very noisy
      • The transmitter can also be a receiver at the same time as long as the HW supports it
  • Recommended sound cards?

    • HifiBerry, IQAudio, JustBoom, pHat-HiFi, ..., with or without built in amplifier

    • Just a kind remark
      If using line-in on a Bluetooth speaker from a line-out sound card, be aware that these probably adds something like 20-60ms delay. This is ok for nimRum, you just need to adjust for it. ...the problem is that sometimes this delay is not always constant.

Getting started

sudo apt-get install libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libasound-dev flac screen libflac-dev
sudo systemctl disable systemd-timesyncd.service

Note: All units should have NTP turned off:
(Some parts of RPi/Linux implementation use CLOCK_REALTIME, even though it is the 'wrong' clock)

The TX part (On the RPi being AP):

pip3 install nimRum
runNimRumTx aFileWithSound.wav # This will play this file repeatedly, forever

First time you will get a message telling you to create a txConfig.yaml file. It will also tell where you find an example, with instructions, to copy. Most important to add are the hostnames of the RX devices and map correct audio channels to them.

The RX part

pip3 install nimRum
runNimRumRx

First time it will use default settings. When you close (Ctrl-C) the program, it will store an example rxConfig.last file for you. Rename it to rxConfig.yaml to alter the default settings if needed.

Note: Set the hostnames to all clients to xxxDD , where 'DD' is a number. The current python wrappers use the hostname to get a unique ID for all speaker nodes.
Note: It will use the first 'hw:' sound device it finds. Please disable the others.
Hint:
dtparam=audio=off
dtoverlay=vc4-kms-v3d -> dtoverlay=vc4-kms-v3d,noaudio

Support

You will need some background knowledge to set this up. I am not saying it is hard, it is actually far from it. But you probably need some previous experience.

Please look in the provided python files, I've tried to make them readable.
'which runNimRumTx.py' and 'pip show nimRum' will tell you where your installation is located.
'ldd libNimRum...so' will show what librraries dynamically linked.

Getting further

Streaming from Line-In|S/PDIF input

Start runNimRumTx.py without providing any input sound file. It will then look for the first 'hw:' input sound device it finds.

Start at boot

runNimRumForever.sh can be used to start automatically at boot. The file is located next to runNimRumTx.py and runNimRumRx.py. Instructions are found inside.

Getting involved

Any bug report is more then welcome!

It is not possible to get unlimited support to whatever question from AbtAudio. If anyone like this to the level they would like to help others to install, improve the scripts, improve documentation, moderate some chat/forum, or in any other way get involved, then those questions will be prioritized.

BR,
www.abtaudio.tech

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

nimrum-1.1.2-py3-none-linux_armv7l.whl (129.1 kB view details)

Uploaded Python 3

nimrum-1.1.2-py3-none-linux_armv6l.whl (116.4 kB view details)

Uploaded Python 3

File details

Details for the file nimrum-1.1.2-py3-none-linux_armv7l.whl.

File metadata

File hashes

Hashes for nimrum-1.1.2-py3-none-linux_armv7l.whl
Algorithm Hash digest
SHA256 e72f8061461e8630e2f45edafca5615de7ca89b8c93b75c8ae965a6db468e10f
MD5 4172977d319ac60a6b7bb2e375fdb62f
BLAKE2b-256 91b4b47c7278dadb48e9a1cf15e7bc2177b605ac15fdc28eb1f16fa35a8aba4b

See more details on using hashes here.

File details

Details for the file nimrum-1.1.2-py3-none-linux_armv6l.whl.

File metadata

File hashes

Hashes for nimrum-1.1.2-py3-none-linux_armv6l.whl
Algorithm Hash digest
SHA256 7788320f6434bd0f8555f530388988922e0e93c062de2704ca8d23f28b3cf8d4
MD5 9c71e8b9f45925082ae27c7bad74b0ce
BLAKE2b-256 517d79910fd4de30c7566db4b3682ed179b2d61982df5d6fee2faee9612d55d3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page