Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide
translations



Rockbox mail archive

Subject: Re: mp3 cutting and pasting

Re: mp3 cutting and pasting

From: Johan Vromans <jvromans_at_squirrel.nl>
Date: Tue, 17 Aug 2004 21:50:18 +0200

Christopher Moore <christopher.h.moore_at_verizon.net> writes:

> Johan,
> Please send the cuefilemaker.pl script again. The version you sent to the
> rockbox mailing list seems to have vanished.

Okay. Here it is, included as text so you can cut/paste, _and_ as
attachment.

----snip----
#!/usr/bin/perl

# Q&D cue file maker.
# Takes input a file with offsets (in seconds), one per line.
# Offsets can easily be determined with e.g. audacity.
# Minutes and fractions are allowed.

die("Usage: $0 mp3file [ secondsfile | secs1 secs2 ...]\n") unless _at_ARGV >= 2;
use strict;

print ("PERFORMER \"Unknown\"\n",
       "TITLE \"Unknown\"\n",
       "FILE \"", shift, "\" WAVE\n");

my $track = 0;

my _at_t = _at_ARGV == 1 ? <> : _at_ARGV;
foreach my $t ( 0, _at_t ) {
    my ($mm, $ss, $ms);
    $ms = $t;
    $ms = 60 * $1 + $2 if $t =~ /^(\d+):(\d+(?:\.\d+)?)/;
    $mm = int($ms / 60);
    $ss = int($ms) % 60;
    $ms = int(75*$ms) % 75;
    printf (" TRACK %02d AUDIO\n", ++$track);
    print (" PERFORMER \"Unknown\"\n",
            " TITLE \"Unknown\"\n");
    printf (" INDEX %02d %02d:%02d:%02d\n",
            1, $mm, $ss, $ms);
}
----snip----

-- Johan


_______________________________________________
http://cool.haxx.se/mailman/listinfo/rockbox
Received on 2004-08-17

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy