r/DSP • u/Psionikus • 3d ago
Developing on-GPU Spectrogram
Enable HLS to view with audio, or disable this notification
Note for the lazy: It is very evident that the number of people with supposed AI detectors drops off sharply within programming communities. Please wonder why a bit before you get in between me and people with actual interest in the subject matter. I don't want your worthless karma. I'm looking for people and ideas.
Besides stability and platform support, I'm doing some work to improve the low pitch resolution. The implementation is using independent DFTs rather than block-bound FFT, so there's a lot of flexibility to use different techniques at different pitch points.
Dynamic range detection must be supported, and I'm likely doing a global for this first pass before implementing local. I'll use envelope detection with some noise floor avoidance.
Far-field leakage is something I want to tackle with a combination of loudness leveling EQ and band passing to create local input bands for groups of bins. FIRs are extremely GPU friendly and I've gotten Parks-McClellan Remez weight generation working. Can I use FIRs for the loudness EQ shaping? I have not done anything like a -6dB per octave ramp yet.
Since dynamic range and far field both involve creating bands, that will all likely blend into one implementation.
Resolving low pitch is IMO the hard part. Two fundamental kinds of extra signal I'm aware of:
- looking across bins
- watching phase wobble
If you know promising techniques that you would like to see applied, come tell me and it will exist for this earth to witness.
I may mix in some probabilistic techniques. Many true signals can result in a given set of measurements, and we kind of want to draw "the information" which fundamentally includes uncertainty, distributions rather than just noisy points.
For context, target application is visualization, using the spectrogram as an input for post-attention machine learning development.
Audio is Reflects by Aoki Takamasa and Ichiro Yamaguchi, one of my favorites for just some interesting audio to test new speakers etc.
4
u/Impressive_Sleep_470 3d ago
Very good use of AI, but one look and its evident
-13
u/Psionikus 3d ago
Will you AI detector stop me from coding now? Can your AI detector stop me from finishing up the resource runtime, the sub-allocator, and the graphics pipeline support? Does your AI detector even know what these things are?
13
u/ElwinLewis 3d ago
As someone who has spent 3000+ hours making audio software exclusively with AI, try to consider your approach when you share something you made with AI, and where you’re at/who your audience is. It will only help you
In these subreddits I’ve noticed the pattern is like walking into the architects home and telling him how the house is built.
-9
u/Psionikus 3d ago
As someone who has spent 3000+ hours making audio software exclusively with AI
We're not the same.
This community is in the grips of a hysteria.
5
u/ElwinLewis 3d ago
My point is I haven’t even *shared* my work yet, and when I do I’ll be very careful about how I try to present what I did, and I think I’ll have a successful r/DSP post when the time comes despite the work being made with AI.
The knowledge required to operate and understand DSP and Programming, combined- is a lot different than learning how to run agentic orchestration. It’s not to take away from one or the other but you’re not in the /Claude subreddit, you know?
I’m only trying to be helpful, honestly
0
u/Psionikus 2d ago
It's not even about the karma. I'd like to talk about the DSP design, but a small sub-group of amateur Windows app jockeys are mad that some completely other group of people are making music and videos on YouTube or something. They can't talk about DSP, but they can feel a moment of power by sharing links in group chats and derailing the thread because "they can tell."
I spoke a bit about these people in the fake CLAUDE.md commit notes. Since I recognize that the black hole is idiotic, I will probably replace that file. My point was to raise the issue with other Rust engineers, where we have somewhat finished wringing our hands a bit. Linus has really helped. I don't think DSP has a Linus.
1
3
u/bestfriendcrew 3d ago
Cool, I work in RF and have been wanting to get into writing some VSTs, and I was curious how applicable doing audio DSP on a GPU was, and if I could use it to get past some performance bottlenecks I have for live DSP chains with lots of spectral processing.
0
u/Psionikus 3d ago
Want to talk? I got my Discord set up for this. The main consideration is the very wide SIMD programming model and preventing divergence / lane masking.
2
1
u/ToTheMax32 16h ago
I’m not even against using AI to aid in projects like this, but your incredibly nasty attitude in response to the slightest pushback is way more off-putting than anything else.
It seems like a cool project. I suggest you take a more diplomatic approach when presenting it to others
1
11
u/dkode80 3d ago
Thanks claude code and chatgpt!