Discussion:
raw data to audio
KarlHungus
2011-08-22 20:36:01 UTC
Permalink
hi, in audacity there is function file-import-raw data and then you can get
yasunao tone "wounded cd" type of sound (noise) from any file...
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? i would like to sonify my hdd
that way and hen feed the real time signal into sc for further
manipulation...any tips, suggestions, links etc.?
clueless so far...
thanks in advance


--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/raw-data-to-audio-tp6713208p6713208.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Dan Stowell
2011-08-22 21:02:43 UTC
Permalink
Hi -

Well libsndfile (which is what provides SC's audio-file-reading
ability) supports raw files; however SC's Buffer.cueSoundFile()
doesn't let you "force" the file format manually, so you might need to
push the data through a named pipe that has the ".raw" file extension,
maybe that'll make it work?

# set up the named pipe in a terminal:
mkfifo ~/tempfifo.raw
# completely UNTESTED and not even recommended
cat /dev/somedevice > ~/tempfifo.raw
# NB don't do this without setting up the fifo first, since you
probably don't want a new file the size of your hard disk

Then just cue the tempfifo.raw as if it was any other file, playing it
back with a DiskIn. No idea if it'll work.

Dan
hi, in audacity there is function  file-import-raw data and then you can get
yasunao tone "wounded cd" type of sound (noise) from any file...
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? i would like to sonify my hdd
that way and hen feed the  real time signal into sc for further
manipulation...any tips, suggestions, links etc.?
clueless so far...
thanks in advance
--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/raw-data-to-audio-tp6713208p6713208.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
--
http://www.mcld.co.uk

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
KarlHungus
2011-08-23 09:55:01 UTC
Permalink
hi, thanks
actually i want to route say cat /dev/sda> /dev/audio to sc directly, not
save it to file and then read it back (hope i understand you correctly)
right now sound comes out from my default laptop card
but how to get this as readable device in jack and then route it to sc for
processing with fx, panning etc.? or maybe there's some other method, i use
usb soundcard (-c1) with alsa driver




--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/raw-data-to-audio-tp6713208p6715477.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Dan Stowell
2011-08-23 10:02:39 UTC
Permalink
Post by KarlHungus
hi, thanks
actually i want to route say  cat /dev/sda> /dev/audio  to sc directly, not
save it to file and then read it back (hope i understand you correctly)
no, I already knew that. the point of a FIFO (aka a "named pipe") is
that it behaves like a file, but it streams data
Post by KarlHungus
right now sound comes out from my default laptop card
but how to get this as readable device in jack and then route it to sc for
processing with fx, panning etc.? or maybe there's some other method, i use
usb soundcard (-c1) with alsa driver
--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/raw-data-to-audio-tp6713208p6715477.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
--
http://www.mcld.co.uk

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
KarlHungus
2011-08-23 11:18:06 UTC
Permalink
so i tried
mkfifo ~/tempfifo.raw
cat /dev/sda1> ~/tempfifo.raw

in sc, boot up
Buffer.cueSoundFile(s, "/home/me/tempfifo.raw", 0, 1);
// loads Buffer(2, 32768, 1, 44100, /home/me/tempfifo.raw)

x = { DiskIn.ar(1, b) }.play; /
// but when i tried this line i got
WARNING:
server 'localhost' not running.
nil

boot up again
and got:

booting 57110
JackDriver: client name is 'SuperCollider-01'
SC_AudioDriver: sample rate = 44100.000000, driver's block size = 256
JackDriver: max output latency 5.8 ms
JackDriver: connected SuperCollider-01:out_1 to system:playback_1
JackDriver: connected SuperCollider-01:out_2 to system:playback_2
Exception in World_OpenUDP: unable to bind udp socket

JackDriver: max output latency 0.0 ms
RESULT = 1
ERROR:
server failed to start


tried few times, the same result everytime

for starters how can i change at least cat /dev/sda1> /dev/dsp so it outputs
sound through my usb sound card?


--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/raw-data-to-audio-tp6713208p6715737.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Dan Stowell
2011-08-23 12:05:49 UTC
Permalink
OK, I've not looked at the source but I guess SC is not coping well
with the lack of samplerate/numchannels/etc info in the .raw file
format - SC expects the file to tell it its format, which can't be
done if it's just raw data. If you can find a way (e.g. using ffmpeg)
mkfifo ~/tempfifo.au
cat /dev/sda1 | ffmpeg PLUS_LOTS_OF_OPTIONS > ~/tempfifo.raw
haven't looked up the options

Dan
so i tried
mkfifo ~/tempfifo.raw
cat /dev/sda1> ~/tempfifo.raw
in sc, boot up
Buffer.cueSoundFile(s, "/home/me/tempfifo.raw", 0, 1);
// loads Buffer(2, 32768, 1, 44100, /home/me/tempfifo.raw)
 x = { DiskIn.ar(1, b) }.play; /
// but when i tried this line i got
server 'localhost' not running.
nil
boot up again
booting 57110
JackDriver: client name is 'SuperCollider-01'
SC_AudioDriver: sample rate = 44100.000000, driver's block size = 256
JackDriver: max output latency 5.8 ms
JackDriver: connected  SuperCollider-01:out_1 to system:playback_1
JackDriver: connected  SuperCollider-01:out_2 to system:playback_2
Exception in World_OpenUDP: unable to bind udp socket
JackDriver: max output latency 0.0 ms
RESULT = 1
server failed to start
tried few times, the same result everytime
for starters how can i change at least cat /dev/sda1> /dev/dsp so it outputs
sound through my usb sound card?
--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/raw-data-to-audio-tp6713208p6715737.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
--
http://www.mcld.co.uk

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
KarlHungus
2011-08-23 19:32:57 UTC
Permalink
i tried this
cat /dev/sda | ecasound -i stdin -o jack

and set things up like this
Loading Image...
Screenshot.png
the thing is my soundcard don't have physical inputs but this shouldn't be
problem with jack or is it?

in s.meter i see incoming signal from cat /dev/sda but i cant or don't know
how to make it sound
i expected to get input with
Ndef(\capture,{Limiter.ar(\in.ar(0!2),0.6)}).play
but i cant :(

--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/raw-data-to-audio-tp6713208p6717452.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Jonatan Liljedahl
2011-08-24 09:34:40 UTC
Permalink
Post by KarlHungus
i tried this
cat /dev/sda | ecasound -i stdin -o jack
and set things up like this
http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/file/n6717452/Screenshot.png
Screenshot.png
the thing is my soundcard don't have physical inputs but this shouldn't be
problem with jack or is it?
in s.meter i see incoming signal from cat /dev/sda but i cant or don't know
how to make it sound
i expected to get input with
Ndef(\capture,{Limiter.ar(\in.ar(0!2),0.6)}).play
but i cant :(
Use In.ar(0,1) (or In.ar(0,2) if it's stereo).

/Jonatan

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
KarlHungus
2011-08-24 10:17:39 UTC
Permalink
thanks but no sound on output with {Limiter.ar(In.ar(0,2),0.6)}.play either


--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/raw-data-to-audio-tp6713208p6719555.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
KarlHungus
2011-08-24 17:26:21 UTC
Permalink
postln show me this, i am confused, i see input in s.meter , but cant get it
to outs, don't understand why, cruel world

JACK compiled with System V SHM support.
ALSA: Cannot open PCM device alsa_pcm for capture. Falling back to
playback-only mode
loading driver ..
apparent rate = 44100
creating alsa driver ... hw:1|hw:1|256|2|44100|0|0|nomon|swmeter|-|32bit
control device hw:1
configuring for 44100Hz, period = 256 frames (5.8 ms), buffer = 2 periods
ALSA: final selected sample format for playback: 16bit little-endian
ALSA: use 2 periods for playback
Triangular dithering at 16 bits
JackDriver: client name is 'SuperCollider'
SC_AudioDriver: sample rate = 44100.000000, driver's block size = 256
unknown source port in attempted connection [system:capture_1]
unknown source port in attempted connection [system:capture_2]
JackDriver: couldn't connect system:capture_1 to SuperCollider:in_1
JackDriver: couldn't connect system:capture_2 to SuperCollider:in_2
JackDriver: max output latency 5.8 ms
JackDriver: connected SuperCollider:out_1 to system:playback_1
JackDriver: connected SuperCollider:out_2 to system:playback_2


--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/raw-data-to-audio-tp6713208p6721088.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
yvan volochine
2011-08-24 17:48:30 UTC
Permalink
Post by KarlHungus
postln show me this, i am confused, i see input in s.meter , but cant get it
to outs, don't understand why, cruel world
[snip]
Post by KarlHungus
unknown source port in attempted connection [system:capture_1]
unknown source port in attempted connection [system:capture_2]
JackDriver: couldn't connect system:capture_1 to SuperCollider:in_1
JackDriver: couldn't connect system:capture_2 to SuperCollider:in_2
IIRC you cannot use audio inputs within jackd if your sound card does
not have any physical inputs.

it's weird if you see any audio activity in inputs of s.meter because sc
tells you that it can't connect to system:capture (which are the
non-existing inputs).

cheers,
_y

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
KarlHungus
2011-08-24 20:07:20 UTC
Permalink
exactly, it's weird+that's pita about inputs
maybe there's some workaround? perhaps i can use my crappy laptop inbuilt
card as in and route signal to my output card?



--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/raw-data-to-audio-tp6713208p6721813.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
yvan volochine
2011-08-24 20:37:00 UTC
Permalink
Post by KarlHungus
exactly, it's weird+that's pita about inputs
maybe there's some workaround? perhaps i can use my crappy laptop inbuilt
card as in and route signal to my output card?
you can probably hack around your .asoundrc file but it might not be as
stable as with a real card with inputs though:
http://www.alsa-project.org/main/index.php/Asoundrc

cheers,
_y

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
James Harkins
2011-08-25 00:26:11 UTC
Permalink
At Wed, 24 Aug 2011 22:37:00 +0200,
Post by yvan volochine
Post by KarlHungus
exactly, it's weird+that's pita about inputs
maybe there's some workaround? perhaps i can use my crappy laptop inbuilt
card as in and route signal to my output card?
you can probably hack around your .asoundrc file but it might not be as
http://www.alsa-project.org/main/index.php/Asoundrc
I tried recently to "merge devices" this way, but failed. Maybe another time.

In the meantime, if you want to take input from one device and output to another, that's very easy to set up in qjackctl -- just set different devices for input and output. Or, if you're starting jackd from the command line, use the -P (playback) and -C (capture) switches -- they don't have to be the same device.

I'd suggest starting Jack before putting the server in this case -- you have a little more control this way.

IIUC you would only need to mess around with .asoundrc if you wanted to take audio input from, say, the built-in sound card and a USB device at the same time. If you have, hypothetically, a USB device with outputs only and you wanted input from a different device, Jack can handle that easily in its own configuration.

hjh


--
James Harkins /// dewdrop world
jamshark70-***@public.gmane.org
http://www.dewdrop-world.net

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal." -- Whitman

blog: http://www.dewdrop-world.net/words
audio clips: http://www.dewdrop-world.net/audio
more audio: http://soundcloud.com/dewdrop_world/tracks

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/

Loading...