5 ms·
cat /dev/urandom > /dev/audio I use it as a white noise generator, to cover ambient noise at night. Anyone know how to make a low pass filter (to make pink/red
by 10ren 18y ago
cat /dev/urandom > /dev/audio
I use it as a white noise generator, to cover ambient noise at night. Anyone know how to make a low pass filter (to make pink/red/brown noise)? I tried repeating the random source, to increase the wavelength, but it gets little R2D2 chirps and clicks in it (because of the step-like waveform):
cat /dev/urandom | sed 's/./&&&&&&/g' > /dev/audio
- mark_h 18y agoI know it's probably not what you're asking for, but if you just want a white/pink/brown noise generator this is an excellent little flash app: http://www.simplynoise.com/ http://www.simplynoise.com/
- 10ren 18y agoThanks, that's what I'm using at the moment. I'd prefer a local solution rather than a webapp (but perhaps it doesn't make any difference?). I tried their download brown noise loop, but it doesn't (always) loop seamlessly, even using: mplayer /home/user/8usb/SimplyNoise.com\ -\ Brown\ Noise.m4a -loop 0 I also tried downloading their flash swf itself, but it doesn't run locally (I expect it needs to phone home for the sound files).
- kaens 18y agoYou could try loading the swf in a browser, letting everything load up, and then checking /tmp.
- 10ren 18y agoAn intriguing idea, but nothing there unfortunately (guess they keep it in ram.)
- kaens 18y agoWeird. I would guess that would be browser/configuration dependent? I use firefox for this, and whenever I load up a flash movie (to be honest, I haven't tried it with anything else), it sits in ram until it's loaded, and then it gets cached in /tmp as a file named something like Fla[0-9a-z]+ . In about:config there's the options: browser.cache.memory.enable browser.cache.disk.enable and related settings. Disabling the memory cache might let you grab it. If I get the spare time today, I'll see if I can't get the swf to pull out.
- mark_h 18y agoThe only local one I've tried is boodler: http://boodler.org/ http://boodler.org/ (it's a "soundscape generator" written in python, which from memory has at least white and pink noise reasonably out-of-the-box).
- joe_bleau 18y agoSox (http://sox.sourceforge.net/ http://sox.sourceforge.net/) is your friend. In particular, check out the "synth" and "filter" command line options.
- 10ren 18y agophilh's post about (about yes's "y\n") gave me a tip. Instead of repeating the random character, do this: cat /dev/urandom | sed 's/./ &/g' > /dev/audio