Music Instrument Syncing Router - Questions

Hello everyone,

I want to design a device that helps keeping several other electronic music instruments synchronized.
For many years, and still today, MIDI clock signals where the most common way to synchronize drum machines, synthesizers, digital audio workstations and other musical gear. But MIDI clock is rather unreliable, and after a while some audible drift happens between different devices.

Fortunately, in recent years, syncing became a lot easier, with the help of modern networking technology.
First of all, there's Ableton Link, a protocol that makes syncing between modern devices a lot easier, but until now it is restricted to modern hardware like PCs oder iPads (devices that have a proper OS).
On the other hand, modern DJ CD players like the top Pioneer products also rely on network protocols to sync to each other.

My idea is now to create a box that connects to other PCs or DJ players via WIFI or ethernet, and syncs them to each other, but also outputs a corresponding MIDI clock signal.

In the beginning I intended to use a simple arduino with a connected Ethernet IC to sniff on the communication between DJ players and generate a MIDI clock signal, as this was my first idea. Later on, I wanted to include Ableton Link, too, which would require another device with Linux, as Ableton Link is not available for such low level devices. Now I want to use a SoC that offers all I need in one chip.

I am planning to use the QCA4531, as it offers all I need, and it has an I2C interface, which can be used to communicate with another MCU (like a STM32F103), which could control the user interface like buttons and encoders, and for a display and LEDs.

Unfortunately, I can't find a datasheet to the QCA4531. Does anyone have it and could send it to me?

Another question I have is about processing power: The device should behave like a normal router, providing connections between all connected devices. Features like firewall etc. are not necessary, as the device normally should not be connected to the internet, but connect to another router for internet access. Is it possible to estimate how much processing power the additional functions I intend to include will need? MIDI clock generation should be simple, and the syncing of DJ players is some simple packet sniffing, so that should not be that difficult, too.
How high is the CPU usage of a QCA4531 router when there are only simple tasks like network routing involved? Is it mostly idling, or is there already some power needed?

Is it possible to use the QCA4531 as some kind of WIFI bridge, so it can connect to the WIFI from another router, an provide internet to the connected devices?

Cheers,

Bastian

How is this related to OpenWrt?

1 Like

I would do this using a raspberry pi or similar ARM single board computer. I'd run an NTP server, and synchronize time to either a GPS or a stratum 1 time server, and then output a MIDI clock from there.

1 Like

GPS will only give 1PPS (one pulse per second )

1 Like

Yes but the PPS will let you calibrate the clock oscillator, and then you can determine precise timing down to microseconds from the CPU clock and this won't drift with temperature or accumulated error because you constantly recalibrate from the PPS

1 Like

Also I agree with @tmomas this seems pretty far off topic, I'd suggest looking for a music forum or a rpi type forum or better yet one specializing in use of SBCs for music purposes.

1 Like

The additional modules shall be released as packages for OpenWRT. So I want to know about the performance of OpenWRT in general and if there's enough processing power left to use my addons as intended.

Also, the SoC I'm looking at works with OpenWRT.

1 Like

Thanks for this clarification!

1 Like

https://www.qualcomm.com/documents/low-power-wi-fi-qca4531

Also:

https://wikidevi.com/wiki/Qualcomm_Atheros#WiSoC

Unfortunately, neither of these is a proper datasheet, just some specs on a colorful paper...

MHz_Available - MHz to run system - MHz to run your software = processing_power_left

Are you trying to re-register a hardware value???
What is the datasheet missing???

If it's WiFi, its likely not possible on the current Kernels, and illegal.

Sorry, but what are you talking about? What is illegal?

The Datasheet is missing everything. Mechanical dimension, pinout, electrical specifications etc. For comparison, the datasheet of the AR9331, a similar chip, has 320 pages... Typing the name of the chip in Google and post the first three results is no help at all, sorry.

And I think that's not how performance estimates work...

Certain WiFi hardware values...you refer to timing and mentioned a more specified datasheet other that the MHz of the processor. Apologies for any misunderstanding.

On your software?
For something it wasn't designed for?

Perhaps this is way off, I agree:

Okay, let me rephrase, I should not have talked about musical instruments...

I want to build a router. This router should be able to connect several devices via Ethernet or WiFi, and be able to connect to another router via WiFi for a connection to the Internet (Bridge AP), as this router does not have the software usually needed for connecting to the Internet (PPPoE, Firewall etc.). The gateway to the Internet is removed in software and hardware (no WAN port).

On the software side of things, this router has four additional modules:

  1. The first module connects to other devices in the same network, as they rely on the same protocol (Ableton Link) to share specific data.
  2. The second module analyzes incoming packets on certain ports, and triggers certain actions, when those packets match certain pattern. (Sync between DJ players)
  3. The third module outputs certain data on the UART TX pin of the SoC, depending on information gathered by module 1 and 2.
  4. The fourth module communicates with an external microcontroller, to give information to the user, and to receive certain settings, for example what exactly the other modules should listen to.

Furthermore, modules 1 and 2 can communicate between each other and their actions are depending on each other. Module 3 is either depending on module 1 or 2.

On the hardware side of things, the router has one additional output port, which is connected to the UART of the SoC, and an additional microcontroller, which is connected to the SoC via I²C. The microcontroller also is connected to a display and several LEDs and buttons / encoders.

I intend to use the QCA4531, as it has all I need on the hardware side of things (WiFi, 4 Ethernet, UART, I²C), and is more modern than the widely used AR9331 (Arduino Yun).
On the software side, it is compatible to OpenWRT, so I don't have to worry about the router part of the firmware, and can instead concentrate on the modules that I want to add.

So my question is: Will the SoC be able to handle the normal usage of a router plus the modules a want to install additionally?

In the end, this shall be a commercial product, with the software under GNUGPL, but the hardware designed and sold by me...

Cheers,

Bastian

Your question is pretty vague and reads like you want someone else to do some hardware engineering for you. If you're just wondering about speed.. it depends a lot on the bandwidth you need to route, the network QoS behavior you want, and the CPU your auxiliary functions require. Too vague to really answer.

@Spatz

You really want a real-time OS, not a Linux kernel, if you're trying to get much better than 100-250 ms.

FreeRTOS was recently re-licensed under MIT License. I'd look at that and any of the many wireless-enabled microprocessors.

By your own admission, you don't want to build a router. And since that's the case...I won't post the sysctl command to disable routing, in fear others may misread this thread somehow and turn off routing capabilities. The switch in most devices are also software based, so the port labeled WAN can simply be moved to LAN, making the device a managed switch.

It really does seem:

Perhaps Ubuntu Studio on x86_64 may be a good choice for you:

You're right, I don't want to build a router... I tried to make it easier to understand for you guys...

What I want to build is not an instrument, there's no audio coming out of it. So directing me to music boards is useless. This is a packet analyzer that connects to certain devices and sends certain packets via TCP/UDP or UART at certain events. There is no music thing going on.
And because this is only packet analyzing, I decided to ask my questions here. Seems like I was wrong...

FreeRTOS is no option, as Ableton Link is only available for Win, OSX and Linux.

Ubuntu Studio is designed for multimedia applications. What I want to do is not multimedia. No audio, no video, no images.

Just pure packet analyzing... See:
When DJ player x hits a beat, it broadcasts a packet, about 0x60 bytes, via UDP.
This packet contains, among other (useless) information, the information wether it is the momentary master (in regards of tempo), and the time to the next beat and the beat after that.
The device should check if the incoming packet is from the current master or another player, as all players send packages when they hit a beat, and if so, divide the time to the next beat by 24 (as MIDI clock is 24 pulses per quarter), and send the pulses via UART/MIDI according to the calculated times; and give this information to Ableton Link.

This is what I want to do. There's no music involved. Just: If incoming packet matches these criteria, do this! And because of that, I thought, hmm... maybe the guys programming software for routers do know something about packet analyzing and stuff, especially if a router SoC offers almost everything else I need...

Also, what happens here is far from hardware engineering. I was just asking if it is generally possible. but I think I will ask elsewhere...

Bye!

Sounds very musical to me, just because you are not rendering the music doesn't mean it is not music.
FreeRTOS is only one option, Linux can handle real-time you just need to look a little further ( one example https://www.linuxfoundation.org/blog/2013/03/intro-to-real-time-linux-for-embedded-developers )

Your best path is to develop your software/system prototype on standard PC or SBC until you get to the stage you are ready to move to COTS hardware

PS
This way you will know the requirements of your system and will be able to choose your hardware wisely.

1 Like

I agree with @mbo2o ...it seems we completely understand; and all the software you describe exists in some form or fashion...except for portion of software that continues to describe "keeping musical state" or "determining musical timing" or some sort:

I would call this some sort of "musical network switch."

Unfortunatly, you must not understand hardware engineering. Theres no way to benchmark software that doesn't exist on hardware not in a configuration that you describe.

From my quick search, it doesn't appear available for Linux. So, this isn't possible on OpenWrt.

:wave:
Hoped the information everyone provided regarding the Qualcomm SoC regarding performance helped you.