Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I use Perl to manipulate my music collection. I have scripts that validate MP3 tags, convert between formats, re-tag mp3 files as they copy them to diferent players etc.

My reasons for using Perl in this case are that there are lots of things I want to do, my processing time is close to infinite but my development time is very limited.

I have long suspected that these type of issues would be a good way to discuss many of the key Perl skills (data manipulation, controlling other programs etc) in a context that is both interesting to most people and slightly away from "work".

Validate MP3 Tags

When I get a new CD I rip it in FLAC and save the data. Once I have more than 4Gb I create an index file (with a Perl script) and write it to a DVD. In the meantime I create a 128kB MP3 and tag it using public tools. The issue is that the artist names are not consistent and the year field is almost never set, so I have a Perl script that checks the tags for consistency and works out the year.

I then have a Perl script that places the new tracks in my "on-line" set (on the house DAAP server), it takes care of transferring to the dedicated machine and making sure the server can see it.

These tasks are all implemented by combinations of CPAN modules and system() calls to existing programs (for example I use lame to encode mp3s).

Different Portable Players

The family have a number of different MP3 players, each of which has its own strange behaviour. I have a Perl script that, once you have selected which player you have, may convert the format (for example to 64kB MP3 for the older players with limited capacity) and retag.

I have one player in particular that either plays the tracks in order of creation, or in alphabetical order of track name. If the album needs to be played in the right order the transfer program prepends the track number to the trackname tag (so it becomes, for example "a01 - Grace Kelly") and playing the tracks in alphabetical order works.

Finally

I also have a collection of music charts which are consolidated in Perl to create the web site http://www.tsort.info/music/ (that is how I can assign the years to mp3 tracks).


In reply to Re: Plenty of Practical Perl Problems? by hawtin
in thread Plenty of Practical Perl Problems? by loris

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (9)
As of 2024-04-23 14:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found