pseudomonas.livejournal.com ([identity profile] pseudomonas.livejournal.com) wrote in [personal profile] simont 2005-11-07 09:19 pm (UTC)

Ah, and you can write a player for it with the system beep:
($B,$D,$O,$/)=(63,4,6);$f{(qw/C C# D D# E F F# G G# A A# H/)[$_%12].(int($_/12)
+2)}=440*(2**(1/12))**($_-45)for(1..88);for(split(/[^\w\=\#\.]+/, uc(<>))){if(
/(\w)=(\d+)/){$$1=$2;next}if(/^(\d*)([PA-H]\#?)(\.?)(\d?)$/){$n=($3?60:90)/$B/
($1||$D);`@{["xset b 75 ".int($f{$2.($4||$O)}||1)." ".($2=~/P/?0:int($n*1000))]
}`;print chr(7),`sleep $n`}} # I apologise for this, I really do. I was bored.

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting