Making Our Own Spectrogram

Jimmc4141 pts0 comments

Making our own spectrogram

Making our own spectrogram

Sep 15, 2025

20 min

#sound

·

#rust

·

#maths

Thanks to my sponsors:

Marty Penner, Valentin Mariette, Joshua Roesslein, Thehbadger, Daniel Wagner-Hall, Anna M, Ian McLinden, Braidon Whatley, Sam Leonard, Vladimir, Jeff Crocker, Justin Ossevoort, Nyefan, psentee, Manuel Hutter, Lyrenhex, ofrighil, compwhizii, Marco Carmosino, Ben Mitchell<br>and 241 more

Marty Penner, Valentin Mariette, Joshua Roesslein, Thehbadger, Daniel Wagner-Hall, Anna M, Ian McLinden, Braidon Whatley, Sam Leonard, Vladimir, Jeff Crocker, Justin Ossevoort, Nyefan, psentee, Manuel Hutter, Lyrenhex, ofrighil, compwhizii, Marco Carmosino, Ben Mitchell, Colin VanDervoort, Max Bruckner, Tobias Bahls, Olly Swanson, hgranthorner, David White, Radu Matei, WeblWabl, Tomáš Šedovič, Hazel Duvall, Matthias Zepper, Lucille Blumire, John VanEnk, C J Silverio, jalciné, Ben Wishovich, Brooke, Neil Blakey-Milner, Menno Finlay-Smits, Dragoon, ZacJW, Mattia Valzelli, Chris Walker, Tiziano Santoro, Chris Emery, traxys, Luis, Boris Dolgov, Dominik Wagner, genny, Matt Jackson, Kai Kaufman, Niels Abildgaard, Christian Bourjau, Scott Sanderson, zoey, Chris Sims, ShikChen, xales, Guy Waldman, Ross Williams, Luke Konopka, Gioele Pannetto, Corey Alexander, Benjamin Röjder Delnavaz, Blake Johnson, Yuriy Taraday, Jan-Stefan Janetzky, Samit Basu, Dirkjan Ochtman, Guilherme Neubaner, Reto Trappitsch, Stephan Buys, SeniorMars, Wyatt Herkamp, Jörn Huxhorn, Marie Janssen, playest, Aleksandre Khokhiashvili, Philipp Hatt, Xirvik Servers, Justy, Marcus Griep, Lach, Ives van Hoorne, Toon Willems, Astrid, Zaki, Justin Smith, Marc-Andre Giroux, Kyle Lacy, Nicolas Coulange, Henrik Tudborg, Gorazd Brumen, James Leitch, Horváth-Lázár Péter, The0x539, Paige Ruten, Vincent Mutolo, Andy F, Adam Gutglick, Geoffrey Thomas, Jonathan Adams, Integer 32, LLC, Taneli Kaivola, Mikkel Rasmussen, old.woman.josiah, Max von Forell, Tanner Muro, belzael, Josh Triplett, Jake Demarest-Mays, Romet Tagobert, Makoto Nakashima, Mike English, you got maiL, Em Sharnoff, prairiewolf, Daniel Strittmatter, Yves, avborhanian, pinkhatbeard, Romain Ruetschi, villem, asaaki, Geoffroy Couprie, Lena Schönburg, Torben Clasen, Laine Taffin Altman, Eugene Bulkin, Nicolas Riebesel, Olivier Peyrusse, Andy Gocke, Romain Kelifa, eliferrous, Steven Pham, Lyssieth, Dimitri Merejkowsky, notryanb, Hadrien G., Beat Scherrer, Mark Tomlin, Simon Menke, James Brown, Jimmy Hartzell, Xavier Groleau, Pete Bevin, Mathew Haji, Sean Bryant, Tom Forbes, Andrew Henshaw, Zachary Thomas, Édomaur odéon, Zeeger Lubsen, jatescher, Dom, Senyo Simpson, Angelo, Richard Stephens, Dave Minter, Chris, Yann Schwartz, milan, Matt Campbell, Bob Ippolito, clement, Victor Song, Hamilton Chapman, rektide, Raphaël Thériault, Alex Rudy, Alan O'Donnell, Antoine Rouaze, Daniel Silverstone, Carson Page, Christopher Valerio, Jelle Besseling, Enrico Zschemisch, Michael, Zac Harrold, FELIX, Egor Ternovoi, Björn Marschollek, Urs Metz, Raine Godmaire, Antoine PESTEL-ROPARS, AdrianEddy, Johnathan Pagnutti, anichno, Tyler Bloom, frankwang, Marcus Griep, Mark Old, Mateusz Wykurz, kuerbsikakteen, Jim, Alexandra Østermark, Guillaume E, Matt Heise, Santiago Lema, Luke Yue, René Ribaud, David Barsky, Matej Volf, Ripta Pasay, Pete LeVasseur, knutwalker, Richard Pringle, Mario Fleischhacker, Malik Bougacha, Chris Thackrey, Julien Roncaglia, RedstoneWizard08, Vinay Mehta, Brandon Piña, Ryan, Jesse Luehrs, Sawyer Knoblich, Julian Schmid, Timothée Gerber, Sung Jeon, Twan Walpot, callym, Miguel Raz Guzmán Macedo, budrick, Isak Sunde Singh, Jean-David Gadina, Ronen Cohen, Geoff Cant, Lawrence Bethlenfalvy, Mason Ginter, Mathias Brossard, James Rhodes, Matt Jadczak, Borys Minaiev, Kamran Khan, L0r3m1p5um, Zoran Zaric, Peter Shih, xd009642, Philipp Angerer, Michal Hošna, Tabitha, David Smith, Brian L. Troutwine, Anson VanDoren, Michał Bartoszkiewicz, Mark, me, Aiden Scandella, Yufan Lou, Marcin Kołodziej, Adam Lassek, std__mpa, Zalán Bálint Lévai, Diego Roig, Dylan Anthony, qrpth, David Cornu, Kevin Murphy, Olivia Crain

A couple months ago I made a loudness meter<br>and went way too in-depth into how humans have measured loudness over time.

Today we’re looking at a spectrogram visualization I made, which is a lot more entertaining!

We’re going to talk about how to extract frequencies from sound waves, but also<br>how my spectrogram app is assembled from different Rust crates, how it<br>handles audio and graphics threads, how it draws the spectrogram etc.

For now, let’s start at the beginning, with Fourier transforms.

The humble sine wave

I’d always heard that Fourier transforms allowed translating from the time<br>domain to the frequency domain, and vice versa.

But it was all a bit abstract until I saw it. Just like the whole “sound is<br>a wave” thing didn’t really click for me, until I played around with the<br>parameters of a sine wave:

Woops JavaScript stuff broke

Amplitude (A) scales the wave vertically;...

spectrogram david chris daniel matt wave

Related Articles