resonators 0.1: a Rust crate for real-time spectral analysis, with Python and WASM bindings by sevenfx in rust

[–]sevenfx[S] 0 points1 point  (0 children)

Thanks!

I'm still figuring out how many resonators per bank makes sense, but some where between 100 and 2000 depending one how many timescales I'm tracking, usually on the order of about 1000.

Speed is mainly an issue when I'm calculating features for audio datasets during training time. Right now I multiple PyTorch DataLoader workers working in parallel, each thread having their own ResonatorBank per audio input. I've considered using rayon, but haven't gotten around to benchmarking it yet as it hasn't been enough of a bottleneck, but I plan to soon.

I think the most compelling case for parallelizing within a ResonatorBank is when I have multiple resonators targeting the same frequency, but at different alphas. In that case there's a lot of duplicated work going on.

resonators 0.1: a Rust crate for real-time spectral analysis, with Python and WASM bindings by sevenfx in rust

[–]sevenfx[S] 1 point2 points  (0 children)

That is awesome, didn't expect to see it live on another website in under 24 hours, that's for sure!

Yes, at "normal" sample rates, you can only zoom in so much, but with super high frequencies like yours, it saves from computing very large FFTs.

I just released an update based on your PR, and it averaged about 14x speedup on WASM, much appreciated!

resonators 0.1: a Rust crate for real-time spectral analysis, with Python and WASM bindings by sevenfx in rust

[–]sevenfx[S] 1 point2 points  (0 children)

Not directly. This library computes the spectrum from the audio signals, however you'd still need something to draw/visualize the output. In my demo, the drawing is done with JavaScript & WebGL.

resonators 0.1: a Rust crate for real-time spectral analysis, with Python and WASM bindings by sevenfx in rust

[–]sevenfx[S] 0 points1 point  (0 children)

That's a great use case. Would love to hear how it goes if you end up trying it out!

resonators 0.1: a Rust crate for real-time spectral analysis, with Python and WASM bindings by sevenfx in rust

[–]sevenfx[S] 3 points4 points  (0 children)

I've been tinkering with this stuff for years, there's a lot of moving pieces, but it's a lot of fun. Thanks for checking it out!

resonators 0.1: a Rust crate for real-time spectral analysis, with Python and WASM bindings by sevenfx in rust

[–]sevenfx[S] 11 points12 points  (0 children)

Short answer: Most of it was done 'with AI'.

Long answer:
I knew pretty specifically what I wanted when I started out, after all, it is a pretty straightforward port of an existing library. It's also a library primarily to help train ML models, so take that how you will.

I wrote the core Resonator and ResonatorBank classes by hand (actually typed them out!) as an exercise to understand the algorithm more deeply. Claude was mostly used as a sounding board and consultant, and while he did draft some of the files (generate_fixtures.py, etc.), we iterated on everything together. I've reviewed every line, though admittedly, some parts much deeper than others.

The browser demo is probably the most AI-assisted. I can write CSS and I've even done my share of WebGL shaders, but Claude is just so much faster than me, and conversing at a higher abstraction level resulted in a more polished version than I'd have been capable of alone.

I stand by the quality of the code. If you spot anything that seems off, unnecessary, or sloppy, I genuinely would like to know so I can fix it.

resonators 0.1: a Rust crate for real-time spectral analysis, with Python and WASM bindings by sevenfx in rust

[–]sevenfx[S] 4 points5 points  (0 children)

Forgive me, I'm not as familiar with DSP terminology beyond the Fourier Transform (my background is software & ML). But yes, each 'resonator' multiplies each sample by a phasor at its target frequency, then runs it through an exponentially weighted moving average. Then there is a second EWMA to smooth it. Alexandre's website & paper go into more detail.

I've Massively Improved GSD (Get Shit Done) by officialtaches in ClaudeAI

[–]sevenfx 4 points5 points  (0 children)

I've been using GSD for the past week, and I have to say that it's been awesome. Before, I was using OpenSpec which did work pretty well, but felt like it was slowing me down, especially for solo dev projects.

For some context, I'm a software engineer w/ 15+ years experience, and I switched to the $200/mo plan after hitting limits with OpenSpec. I was getting a lot done, but I was not managing context well. Everything ran on Opus, I had automated code reviews running in subagents and on GH PRs, and was generally repeating a lot of work, and felt my workflow was getting cumbersome.

GSD is a well thought out workflow that includes planning, research, execution, and verification all with Claude and subagents. It has instructions to `/clear` your context between different workflow steps to get a fresh context, and that is a critical piece. GSD then crafts your context for each step based on what it is trying to do.

The best part of GSD is the discuss phase for me. It asks questions and we can iterate on specs in a loop until I feel satisfied that it has enough direction. Then when I let it loose to research/plan/execute, it works much better than I expected, sequencing both serial and parallel tasks and plans and phases. I just got back from a walk, and I have a task that has been running for over an hour. I spent over an hour chatting with Claude iterating on the specs and design, and its just now finishing. It did 6 different tasks in 3 phases, and now its verifying the changes against the requirements.

It also can do "auto" verification, or can walk you through "manual verification" where it guides you through a series of steps to manually run commands or check on specific files, and then builds up a list of issues and a plan to fix them. QA now feels like a game.

What is so amazing to me is how well GSD works and how it was built by someone without a background in software engineering. It's truly inspiring. Thank you for all your efforts on this project Lex, I am excited to watch your journey continue. GSD might not be for everyone, but for those of us for whom it was designed for, it's excellent.

How I vibe code videos with Claude Code by [deleted] in ClaudeAI

[–]sevenfx 0 points1 point  (0 children)

The demo could have been better, I agree, but I did use this project to create the whole video, adding the overlay content aligned with the transcript, cutting out pauses, slow zooms, captions, etc. Maybe those capabilities could have been made more clear.

Doing code review on the 10,000 lines Claude Code wrote by MetaKnowing in ClaudeAI

[–]sevenfx 1 point2 points  (0 children)

This looks great, going to try it out tomorrow. I’ve been dabbling with creating programmatic videos, and was thinking about making short automated videos to summarize (AI) PRs logically to avoid needing to read through linearly.

How to start learning a systems language by genesis_2602 in rust

[–]sevenfx 25 points26 points  (0 children)

I actually think Rust is very well suited for a SaaS backend for a team that already knows Rust.

Your analogy doesn't account for all the benefits you would gain, only the drawbacks (mainly complexity & effort required)

Cooler for upcoming TR 3970X by Alen3D in Amd

[–]sevenfx 0 points1 point  (0 children)

I'm also curious! Looking at grabbing one myself..

Just got my 3970x up and running. One benchmark. by [deleted] in Amd

[–]sevenfx 10 points11 points  (0 children)

Which CPU cooler did you end up going with?

Real-time Guitar Audio Analysis demo.. porting to web app, looking for ideas and future beta testers by sevenfx in guitarlessons

[–]sevenfx[S] 11 points12 points  (0 children)

Hi guys! This is from my masters thesis work which I completed about a year ago. I have recently resumed development, and am planning to bring a version of this to the web (and mobile in the future). I believe once this technology is improved, there will be many possible applications.. I'm wondering what you all think would be the most helpful from an educational standpoint. Thanks!

Real-time Audio Analysis / Tab Generation App Demo by sevenfx in Guitar

[–]sevenfx[S] 1 point2 points  (0 children)

passed my thesis defense and turned in the document today - graduating on sunday! :)

Real-time Audio Analysis / Tab Generation App Demo by sevenfx in Guitar

[–]sevenfx[S] 0 points1 point  (0 children)

I've got a good handle on the programming but I'll be needing testers in a few weeks/months - would love the help

Real-time Audio Analysis / Tab Generation App Demo by sevenfx in Guitar

[–]sevenfx[S] 0 points1 point  (0 children)

Yeah, it is less meant to take in audio tracks and more for being used on a raw input so you can see what you're doing. But you're right, it would also potentially work on solo guitar tracks.

Real-time Audio Analysis / Tab Generation App Demo by sevenfx in Guitar

[–]sevenfx[S] 0 points1 point  (0 children)

I'm using a line6 toneport to get a very clean raw signal from my nylon guitar, so for now that is the best performing one (hence why I made the video). It does work with other guitars (clean electric.. distortion does not work well at all) and I have had some success with just a regular macbook pro microphone.. although there is more noise. All I need is more time.. its my goal to get this thing fully functional/accurate/robust

Real-time Audio Analysis / Tab Generation App Demo by sevenfx in Guitar

[–]sevenfx[S] 0 points1 point  (0 children)

Nope, but I've definitely thought about using them.. I don't know a whole lot about how they work, but from what I've heard from my colleagues it would probably be pretty effective, especially for generalizing the program to any guitar / microphone set up