KarlHungus said :
> hello, in audacity there is function file-import-raw data and then you can
> get yasunao tone "wounded cd" type of sound (noise)
> also i stumbled upon this
> http://reboot.fm/2011/08/14/substrat-radio-2-data-carvery/ guy ,as i
> understand he is using hdd as input device for
> http://en.wikipedia.org/wiki/Dd_%28Unix%29 dd
> and then routes to gstreamer which converts raw data input into audio
> signal... how?
> is anyone here ever tried something like that? any tips, suggestions?
> clueless so far...
Anything that you can pipe or redirect the output of can be used.
I mean really anything :)
(well you might have the kernel complain if you want to tac/sort
dev/mem, but other than that...)
grant centauri said :
> Here's something simple I think Aymeric showed me once:
>
> sudo cat /dev/mem > /dev/dsp
Can't remember the first time I saw this trick myself. What is sure is
that the Unix pipeline/redirection penny dropped the day I typed it in a
terminal and started to add more things to it :)
BTW, we used 'cat /dev/mem > /dev/dsp' for Puredyne as a startup chime
back in 2005.
### crappy bash script circa 2005 #########
if test -e /dev/dsp ; then
(cat /dev/mem > /dev/dsp)&
(sleep 6.66 && kill `pidof cat /dev/mem`)&
fi
##############################################
> this should be writing raw data from the ram (?) directly to the audio
> device.
* cat prints the memory (as in the image of the physical memory as
provided by /dev/mem) on stdout
* '>' sends it to a file
* the file we choose to send to it is a special one, a device file, that
is an interface to the OSS device driver that is in charge of playing
and capturing sound (modprobe snd-pcm-oss if this file is missing)
Thus, doing the opposite, cat /dev/dsp > /dev/mem will rewrite your
memory with whatever comes from the microphone (a great party trick!).
> /dev/urandom generates noise, though I'm not sure what kind. Anyone
> have an idea about it?
It's a pseudorandom number generator - man urandom ;)
> Perhaps there's a way to read a file at an audio rate and use its data
> to fill a wavetable in Puredata, or something like that.
[pdp_rawin] is nice to play with as well.
KarlHungus said :
> yes! this is exactly what i searched for, thanks
> is it possible to sonify incoming wifi this way?
> what other possible inputs there might be?
# quick and dirty
tcpdump -i wlan0 -s 0 -w - > /dev/dsp
Then go on the interweb and browse away.
martin said :
> As one of the (ir)responsible carvers (the other being Danja
> Vassiliev), the full command which danja used on the show was:
>
> dd if=/dev/sdb | gst-launch-0.10 filesrc location=/dev/stdin ! queue !
> tee name=v ! queue ! videoparse framerate=1 ! videoscale !
> video/x-raw-yuv, width=40, height=30 ! videorate ! audioparse !
> audiorate ! alsasink v. ! queue leaky=2 ! videoparse width=640
> height=480 ! videoscale ! videorate ! xvimagesink sync=false
nice :)
I should find all my /dev/dsp oneliners and publish them, or better,
make an 0xA .sh musicmag with it.
KarlHungus said :
> but i also really would like to know how to route this audio madness further
> say dd if=/dev/sdb of=/dev/dsp
Next to what Martin and Claude said, this stuff looks nice too (also
untested) http://fort.xdas.com/~kor/oss2jack/
a.
--
http://su.kuri.mu
---
[email protected]
http://identi.ca/group/puredyne
irc://irc.goto10.org/puredyne