rndmcnlly (rndmcnlly) wrote,
rndmcnlly
rndmcnlly

mashdown


mashdown
Originally uploaded by rndmcnlly.
So its past 4:00am again. I wondered a for a while what it would be like to have arbitrary digital signal processing interposed in a streaming audio network. In the past I've gotten live synthesis to be streamed out over the network, but tonight I've created something different (and without writing any code).

What I have created is an octave-down pitch shifted live mp3 stream of another stream from someone on the internet. Its not ready to be consumed by the masses (I haven't connected it up to a shoutcast server yet, but this is trivial and only really matters if someone other than me wants to hear it). The particular stream I chose to mangle was Cryosleep, the beatless stream from BlueMars.org. The droning chords they tend to play take on rumbling nature when shifted down an octave. Now, data coming from a shoutcast server like theirs isnt ready to be consumed by any command line tools I know (wget didn't play icy with it). I used StreamRipperX to consume the stream and told it to create a local relay station that luckily wget wouldnt balk at. An instance of wget requested an endless stream of data from http://localhost:18000/ and saved it into a named pipe (created with mkfifo) called some.mp3. I used lame --decode to pipe this data into another named pipe called some.wav. This file was consumed by sox, a self-proclaimed "swiss army knife of sound processing" which highpassed then pitch shifted (preserving tempo) the incoming data and wrote it to yet another pipe, out.wav. I coverted the stream in out.wav to a final pipe, out.mp3 using lame in the forward sense. And finally, after all that processing junk, I had VLC open the file and treat it as a pipe (not all that successfully). Finally, playing through the speakers, I had a pitch shifted version of what the live stream was playing a few seconds ago.

Um, yay for the command line. And, of course, living in a world where my mom's user-friendly desktop computer is also friendly to hackers.
  • Post a new comment

    Error

    default userpic

    Your IP address will be recorded 

  • 1 comment