Live data from Hacker News

Fully Featured Audio DSP Firmware for the Raspberry Pi Pico

github.com

71–80 of 95 posts

Re: Fully Featured Audio DSP Firmware for the Raspberry Pi Pico

#71

I wonder if you could do the same thing in reverse and have a cheap way to get multiple inputs. I would love a cheap way to add 8–16 inputs to my PC; all the audio interfaces I found cost quite a bit.

A Behringer UMC1820 does that combination of things (cheap, lots of analog IO, PC interface) very well. It provides 8 inputs OOTB.

For more inputs, a Behringer ADA8200 can be connected with a garden-variety TOSLINK cable, bringing the total of 16.

Or: Two UMC1820s, clocked together using that same TOSLINK cable. That provides 16 inputs that are all identical and also operating in lock-step.

In terms of cost: A smart way to play with this stuff is to buy used gear, and treat eBay as a long-term rental program. Just buy it, use it, and when you want to try something different: Sell it. It works because the depreciation on stuff like this is basically a straight line once the initial hit of turning "new" into "used" gear is over with.

The long-term rental cost then is mostly a combination of time, shipping expense, and seller fees. Keep it as long as you want. :)

edit: alright. so the UMC1820 is apparently having production issues right now, which constrains supply, so prices are higher than normal. On a normal day, they sell for $229 new. I've bought them for ~$100 used. Things will go back to normal soon enough.

Re: Fully Featured Audio DSP Firmware for the Raspberry Pi Pico

#72
post #66

Any chance of supporting 192kHz?

Just wondering, why? This is for carrying 96kHz frequencies in the signal?

A sampling rate of 192kHz is overkill. And 192KHz exists as a sample rate in audio world because it is overkill.

With a Nyquist frequency of ~96KHz, all of the arguments about whether a person can hear up to eg 22.05KHz, 24KHz, or if there's something meaningful all the way up at 48KHz, become completely and totally ameliorated.

Those arguments were always such tiresome ordeals.

The cost of dissolving those arguments is just some some bandwidth and CPU cycles -- which is to say, it costs approximately nothing.

Please let the man cook. :)

Re: Fully Featured Audio DSP Firmware for the Raspberry Pi Pico

#73
post #19

Earlier quoted context omitted.

Ouch, thats pretty average, what a pity ..

Why? This is a device more for home audio/audiophile uses it seems? Why does latency matter there?

Audio systems get used for more than playing back music and film soundtracks.

People use audio system at home to play electronic instruments. People also play video games. People do all kinds of stuff.

Latency is an important factor in these things.

Even videoconferencing and podcasting: With a microphone pointed at your face and a set of headphones used for monitoring that microphone, latency matters.

(It matters more to some people than others -- some people can tolerate hearing themselves later and continue to speak just fine, while some others increasingly sound like they're having a stroke as monitoring latency goes up and eventually become unable to produce coherent strings of phonemes.)

Re: Fully Featured Audio DSP Firmware for the Raspberry Pi Pico

#74
post #49

Earlier quoted context omitted.

In the meantime, what would you recommend (if there's anything off-the-shelf that would work in a plug-and-play manner?) I had a project in mind that was waiting for something like this! :)

For USB input and SPDIF output, all that you need is a TOSLINK TX module(s) or a couple of capacitors and a resistor if you want coaxial SPDIF. For I2S output, the PCM5102A modules that you find on Amazon work very well, with very reasonable performance (SNR >100dB, THD+N ~95dB). For 2.1 configurations in a pinch, the firmware includes a software DAC that's more than adequate to drive a subwoofer, so only one externa…

Maybe start by omitting the part in the first paragraph about how it acts as a USB sound card. :)

I mean, I know what you meant, but that's pretty misleading phrasing for many people.

It's not much of a stretch to think that most people interpret a "USB sound card" as a thing with analog audio on one side and USB on the other side. But other than the subwoofer output, we don't have any analog IO on a Pico running this firmware.

Re: Fully Featured Audio DSP Firmware for the Raspberry Pi Pico

#75
post #72
post #66

Earlier quoted context omitted.

Just wondering, why? This is for carrying 96kHz frequencies in the signal?

A sampling rate of 192kHz is overkill. And 192KHz exists as a sample rate in audio world because it is overkill. With a Nyquist frequency of ~96KHz, all of the arguments about whether a person can hear up to eg 22.05KHz, 24KHz, or if there's something meaningful all the way up at 48KHz, become completely and totally ameliorated. Those arguments were always such tiresome ordeals. The cost of dissolving those arguments…

Oh it's worse than that, for distribution and playback sampling at more than 48kHz is likely worse in many ways due to unwanted ultrasonic noise and increased intermodulation distortion. 96/24 makes sense for production, and 96/float56 is common in DSP chains.

Re: Fully Featured Audio DSP Firmware for the Raspberry Pi Pico

#76
post #6
post #4

Is there a guaranteed latency?

85ms https://github.com/WeebLabs/DSPi/commit/ba8e481570e6a5ce3d35...

The 85ms is configurable per-output delay for time alignment. That same file in the docs claims a typical end-to-end latency of 10 to 15ms.

Re: Fully Featured Audio DSP Firmware for the Raspberry Pi Pico

#77
post #72

Earlier quoted context omitted.

A sampling rate of 192kHz is overkill. And 192KHz exists as a sample rate in audio world because it is overkill. With a Nyquist frequency of ~96KHz, all of the arguments about whether a person can hear up to eg 22.05KHz, 24KHz, or if there's something meaningful all the way up at 48KHz, become completely and totally ameliorated. Those arguments were always such tiresome ordeals. The cost of dissolving those arguments…

Oh it's worse than that, for distribution and playback sampling at more than 48kHz is likely worse in many ways due to unwanted ultrasonic noise and increased intermodulation distortion. 96/24 makes sense for production, and 96/float56 is common in DSP chains.

When the production produces unwanted ultrasonic noise, then that's not a sampling rate problem. It is instead a production problem.

And that's perfectly OK, too: The neat part about having too much data is that other end-users (like you and me) are free to throw it away as expeditiously as we choose to.

To that end: I, for one, welcome our 192kHz overlords. (And then I'll shove it through my hardware DSP that operates at 24-bit 48kHz and fuhgettaboutit.)

Re: Fully Featured Audio DSP Firmware for the Raspberry Pi Pico

#78
post #49

Earlier quoted context omitted.

Thank you! I will soon be producing a comprehensive introductory video on YouTube, which should make things more accessible. There will also be an official plug-and-play custom board that includes all of the relevant IO, connectors and codecs.

In the meantime, what would you recommend (if there's anything off-the-shelf that would work in a plug-and-play manner?) I had a project in mind that was waiting for something like this! :)

https://sonocotta.com/amped-esp32/

It is not 100% plug and play as you can choose your own software.

Re: Fully Featured Audio DSP Firmware for the Raspberry Pi Pico

#80

Tangentially related, I recently had some hand-me-down high-end full tower speakers lose their integrated subwoofer amps. I bypassed them and wired in an external amp but people said the integrated DSP would be missing. That's when I learned about CamillaDSP [1] and CamillaFIR [2]. I got a calibrated UMIK-1 microphone and did a frequency sweep in the room. Then I applied the Camilla-computed FIR filter to my snapcast…

Why not use a crossover driver?

The loudspeaker would have used one; a driver is both cheaper and of higher quality.

Post reply on HN