Hacker News new | past | comments | ask | show | jobs | submit login
Music with AWK (kmkeen.com)
74 points by johnbender on Mar 6, 2011 | hide | past | web | favorite | 15 comments



Here is Paul Hudak's library for creating music in Haskell

http://haskell.org/haskellwiki/Haskore and here are some samples that you can listen to http://users.informatik.uni-halle.de/~thielema/Music/HAL2/mi...

He also discusses it in chapter 20 of his book. I was quite surprised to know that he is currently on medical leave due to a rare form of leukemia. Surprised, because leukemia has been on the radar on HN (as well as on personal front) lately.

I know it is selection bias, but it still feels weird when coincidences like that happen in clusters.


You'll want to pipe it into `aplay -r 64000`. At least my copy of aplay incorrectly guesses the rate so you have to tell it.


Thank you- that sounds much more pleasant.


How can i make it work on osx?


pipe it into SoX

awk [...] | sox -c 1 -b 16 -r 44100 -s -t raw - -d


And you can install sox from homebrew. (I, at least, didn't have it installed by default)


Hey, it is HN again. I would have about four times as many points if I ever remembered to post any of my stuff here. :-)

Thanks for the feedback, will update it with regards to osx later.


Oh, the power and beauty of the pentatonic scale.



Anybody knows if the faster "chirping" sounds in the background can be eliminated? If there were only "slow" chimes I think it would really be very suitable for meditation purposes.


There is no faster chirping sound. I'm guessing you are using Jesvs's sox line? I was very surprised sox was able to work at all, half of the settings were wrong. Try

awk [...] | sox -c 1 -b 8 -r 64k -e unsigned -t raw - -d

instead. No clicking/popping with that.


I've just listened to the mp3 linked from the page (http://kmkeen.com/tmp/awkbient.mp3) and I've heard the sounds I've described. I hear it like "(loud:) dong (quieter:) brrr-brrr-bbrrr (loud:) dong (quieter:) brrr-brrr-brrr (loud:) dong" The brr-brr sounds are the unpleasant ones. I hear them also when listening to wav made by lame --decode of mp3.


This is a little (a lot) off-topic but I liked the way he conveys his contact details in that image to the left, heh.


You don't need to end all those lines with backslashes, BTW.


haha, reminds me of the social network.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: