ssgh

Joined 6 years ago

Karma
616
Submissions
154
Member since
Oct 20
GLSL & Sound
View on Hacker News

Recent submissions

Comment · 3 years ago
Comment · 3 years ago
It's a scientific art.
Comment · 3 years ago
> in which the schizoid individual can express a great deal of feeling and make what appear to be impressive social contacts yet, in reality, gives nothing and loses nothing ... secret schizoids ... enjoy public speaking engagements but experience great difficulty during the breaks when audience members would attempt to engage them emotionally.

It makes me think psychiatrists have no clue what that schizoid type really is. Rather, they carefully document various semi-related mental qualities, put them in a box, label it DSM-42, and pretend they are doing science.

Comment · 3 years ago
FYI, it supports decoding ultrasound wav files. I use a Dodotronic UM250K mic to capture ultrasound up to 125 kHz. LCD monitor and other electronics emits some interesting sounds. For some reason, getUserMedia doesn't allow high sample rates, but ffmpeg works:

ffmpeg -f alsa -channels 1 -sample_rate 250000 -i hw:CARD=r4,DEV=0 -t 5 mic.wav

Comment · 3 years ago
I've been looking for something like this to review books. Two suggestions: 1. allow to load a book from a url, so notes could be added to arbitrary books; 2. allow to select text and add notes to that selection.
Comment · 3 years ago
I do have a WebGL-based implementation of FFT, but here I used good old JS. When properly written, it gets translated into really fast machine code, which is even faster than WebAssembly (I tried!). WebGL's problem is the high toll on the CPU--GPU bridge. When you need to transfer a block of audio data from CPU to GPU to perform calculations, you wait. When you need to transfer the FFT data back, you wait. These waits quickly outweight everything else. However on wavelet transforms GPU comes first because you can store some pre-computed FFTs on GPU and reuse them in multiple runs.
Comment · 3 years ago
You can reach me at: ssgh at mm dot st.
Comment · 3 years ago
Very reasonable ask, sir. In fact, I had added sample.mp3, but forgot to add a button in the UI. Now that's fixed.
Comment · 3 years ago
Yeah, that's a bandpass filter, essentially. But I did it the lazy way: audio signal -> FFT -> zero out unwanted frequencies -> inverse FFT.
Comment · 3 years ago
Your spectrogram looks elongated horizontally because the FFT window size is too large. I use window size 1024 with sample rate 48000 Hz, so one window covers 1024/48000=0.02 sec. This window size looks optimal in most cases: if you change it in my web app, you'll see that all other window sizes get the spectrogram blurry in different ways, but at 1024 it gets into focus.

Of course, don't forget the window function (Hann, or raised cosine), but it looks like you've got that covered because your spectrogram looks smooth.

The color palette looks good in your case. FWIW, my color function is like this: pow(fft_amp, 1.5) * rgb(9, 3, 1). The pow() part brightens the low/quiet amplitudes, and the (9,3,1) multiplier displays 10x wider amp range by mapping it to a visually long black->orange->yellow->white range of colors. Note, that I don't do log10 mapping of the amplitudes.

Comment · 3 years ago
You can select an area and zoom into it. Another option is to change sample rate in the config in the top right.
Comment · 3 years ago
It uses "audio/webm;codecs=opus" to record mic. Now it's possible to change it in the config menu in the top right. Safari probably needs audio/mp3. Edit: also consider "audio/foo;codecs=pcm" where "foo" is something compatible with Safari.
Comment · 3 years ago
Author here. This is a basic spectrogram visualizer that's mobile friendly. It allows to select regions on the spectrogram and play them separately. There is no grand plan behind this web app: it's just a handy basic tool to capture sounds on your phone and see what they look like.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton