Email or username:

Password:

Forgot your password?
Top-level
MeaTLoTioN

@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."

1 comment
MeaTLoTioN

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

Go Up