Posted on 2006-03-14 00:53:09-08 by grantg
MP3 sample maker
Just wrote this horribly complicated script that I thought might be useful to you fellow myspace bands. It makes a 2-minute sample from an MP3 file. Nothing fancy (i.e. no fade-out), but it works. Enjoy.
#!/usr/bin/perl -w ###################################################################### # makesample # Sccsid: %Z% %M% %I% Delta: %G% # $Id: makesample,v 1.2 2006/03/14 00:49:51 grant Exp $ ###################################################################### # Copyright (c) 2006 Grant Grueninger, Commercial Systems Corp. # # Description: # Given an mp3 file as an argument, exports a 2-minute sample # # usage: cd filedir ; makesample filename.mp3 # # - Writes "01_filename.mp3" in the current directory. # - filename.mp3 must be in the current directory. # # Known Issues: # Errors if filename.mp3 has artwork in it. use MP3::Splitter; mp3split( $ARGV[0], { verbose=>1}, [ 0, 120 ] );
Direct Responses: 2130 | Write a response
Posted on 2006-04-10 06:48:58-07 by jimmy in response to 1944
Re: MP3 sample maker
now i just need a code to reproduce my player on other profiles!
Direct Responses: 11307 | Write a response
Posted on 2009-08-16 04:41:33-07 by spencoid in response to 2130
Re: MP3 sample maker
new to this forum, can't even find how to change my password so i may never find it again. very interested in the MP3 sampler program, it would save me hours writing one or doing it another very difficult way. would love to get the script. please contact me at spencer@spencerserolls.com as i may never get back on this forum if I forget my arcane password
Direct Responses: 11308 | Write a response
Posted on 2009-08-16 04:50:58-07 by grantg in response to 11307
Re: MP3 sample maker

Hi Spencer,

The script is in the post - it's a 2-line script. You'll need to install MP3::Splitter first (Open Terminal, type "cpan MP3::Splitter"). Just copy and paste the post into a file on your computer and name it "makesample". Then run it using the instructions in the script's comments.

Yes, I did assume you're on a Mac. Command will still work if you're on UNIX. I don't do Windows, but someone else can possibly help you get Perl running if you are on that OS.

Grant

Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.