mastodon.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
The original server operated by the Mastodon gGmbH non-profit

Administered by:

Server stats:

380K
active users

nixCraft 🐧

01. users open your terminal (you must have ffmpeg package installed).

02. Type the following bash command

for i in {100..1000..100}; do ffplay -f lavfi -i "sine=frequency=${i}:duration=0.1" -autoexit -nodisp -loglevel quiet; done

03. Enjoy!

@michael Life is either a daring adventure or nothing at all.

@nixCraft I guess it’s only my work laptop 🤔😂

note:
running on Termux requires to install `x11-repo` and `ffplay`

@nixCraft I don't understand what this did lol

@nixCraft

It's a robot mating call. You raised an army of horny bots.

@nixCraft For folks who use fish shell like me:

for i in (seq 100 100 1000); ffplay -f lavfi -i "sine=frequency=$i:duration=0.1" -autoexit -nodisp -loglevel quiet; end;

🎵🎶🎵🎶🎵🎶🎵🎶🎵🎶🎵🎶

@nixCraft Replicating my reply in X:
To check the low frequency extension of your speakers or headphones:
for i in {100..20..-10}; do echo "$i"; ffplay -f lavfi -i "sine=frequency=${i}:duration=2" -autoexit -nodisp -loglevel quiet; done

@nixCraft for i in {100..3000..100}; do ffplay -f lavfi -i "sine=frequency=${i}:duration=0.1" -autoexit -nodisp -loglevel quiet; done

The "3000" will trigger my tinitus, whereas a "2000" doesn't quite get there. ;-)

@nixCraft That's the... first 10 harmonics of 100 Hz, I guess…

@nixCraft I see your tune and raise you a hearing test;

#!/bin/bash
m=10; M=12000; s=100
p() { ffplay -nodisp -autoexit -loglevel quiet -f lavfi -i "sine=frequency=$1:duration=1" > /dev/null 2>&1; }
a() { read -p "Can you hear $1 Hz? (y/n): " r; [[ $r == [Yy]* ]]; }

while p $M && ! a $M; do ((M-=s)); [[ $M -le $m ]] && break; done
while p $m && ! a $m; do ((m+=$((s/10)))); [[ $m -ge $M ]] && break; done

echo "Your hearing range is approximately between $m Hz and $M Hz."

@nixCraft (in case it doesn't lay out well here's what it should look like;

@nixCraft Dang it. A long time ago I gave a talk on the wonders of sox(1). I had a shell script that would use it to play happy birthday, but I can't find it now.

Awesome! My laptop can't play audio below 240Hz. Or maybe I'm the one who can't hear it.