Slashdot Mirror


User: zikzak+muzak

zikzak+muzak's activity in the archive.

Stories
0
Comments
1
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 1

  1. simple solution: lame, shell, dd, and maybe sox on Sampling Short Sequences From Long MP3 Recordings? · · Score: 1, Insightful

    most people are suggesting something complicated, but this is exactly what the shell and lots of little programs are for.

    1. use lame to decode the mp3 file to raw data

    $ lame --decode -t input.mp3 source.raw

    2. use dd to extract the bytes corresponding to the times you want. assuming you want 1 second clips and the input file is 16 bit 44k stereo, the dd command might look something like this:

    $ dd if=source.raw of=second.raw bs=176400 count=1 skip=30

    the above command will extract the 30th second from your sound and put it in second.raw

    3. if you want to accumulate all the seconds you've extracted, use cat

    $ cat second.raw >>total.raw

    4. writing a nifty little shell script and reencoding back to your desired format is left as an exercize for the reader. (hint: man sox; man lame; info bash)

    You can do all this on windows. just install cygwin. I do a lot of algorithmically generated music and video and i use basically the above approach when all i want to do is make a whole bunch of simple edits of sampled sound. You don't need any sound editing software for what you describe.