



Cultured Perl: Fun with MP3 and Perl, Part 1 232
Ted writes "Every self-respecting computer and music fan needs to be able to manipulate MP3s -- the defacto standard for recreational digital music use. In this article, I'll look at ways to manage and manipulate MP3s (searching, tagging, renaming, commenting, etc.) using the autotag.pl application. I'll also take you through the application, illustrating how CPAN modules enable the application."
and like every Linux geek.. (Score:5, Funny)
Rus
Re:and like every Linux geek.. (Score:2, Insightful)
That's the beauty of open source. You have the perl script, look at the OGG documentation and write it yourself.
Re:and like every Linux geek.. (Score:2)
where to start? (Score:2)
My biggest luck has recently been with perl. I've found it very useful in even writing small useful programs. Since it is one of the higher level l
Re:and like every Linux geek.. (Score:3, Informative)
An object-oriented interface to Ogg Vorbis information and comment fields, implemented entirely in Perl.
Re:and like every Linux geek.. (Score:1, Funny)
Re:and like every Linux geek.. (Score:5, Informative)
Right here. [cpan.org] Or here for FLAC [cpan.org].
Josh
Re:and like every Linux geek.. (Score:5, Insightful)
At the risk of wasting some karma...
I'm sick of hearing about Ogg. Great, it's free as in beer and freedom. I'm pro freedom. But seriously, it's not going to catch on. mp3 is here to stay my friends, and while ogg may be a technically superior format, the rest of the world is not going to convert the mp3 collection to ogg's. It's just not going to happen. And if nobody converts their files to ogg's, why would manufacturers waste development time and costs putting ogg support into their products?
Maybe I'm being cynical but I think it would take a miracle at this point.
Re:and like every Linux geek.. (Score:5, Insightful)
So they can have a superior format without the risk of Apple or Microsoft quadrupling the license fees 9 months down the line.
Actually, because Microsoft is pushing their own audio format, manufacturers will have a low-cost chance to push Ogg. They're going to have to expand the devices to recognize non-mp3 files anyhow... why not throw in the free integerized Ogg code while they're at it?
Re:and like every Linux geek.. (Score:3, Insightful)
Re:and like every Linux geek.. (Score:2)
Now the Fraunhofer people, I'd worry a little bit about. However, given that the compression scheme has been pretty widley disseminated with no attempt to collect license fees since their initial little fiasco, that's not much of a worry
I remember (Score:2)
Re:I remember (Score:3, Insightful)
Ogg is *nothing new*. It's different, not *new*. Until mp3 licensing fees start affecting Joe User, he's not going to care about different formats. MP3 is main
Re:and like every Linux geek.. (Score:2)
Re:and like every Linux geek.. (Score:2, Interesting)
Re:and like every Linux geek.. (Score:2)
Hmmm... perhaps I'm remembering things incorrectly, but DVD uptake was actually quite rapid. Maybe three or so years from geeky high-end to mass mass mass consumption? I seem to recall its adoption rate being something to crow about among manufacturers.
Ogg seems to me more like a LaserDisc than a DVD if you really want to stretch an analogy. Geeky, offe
Re:and like every Linux geek.. (Score:2)
Re:and like every Linux geek.. (Score:2)
I certainly hope not. Once you go lossy, you're stuck. Re-encoding with lossy compression would be (in a metaphorical sense) like replacing your 2nd generation analog tapes with 3rd generation copies: pointless.
If you have a collection of mp3's which you don't have the original cd-quality audio for, the best thing you can do is leave it alone.
Agreed. Ogg is going nowhere. (Score:2)
Re:Agreed. Ogg is going nowhere. (Score:2)
The excess power taken up by that is exceedingly minimal. Absolutely nothing compared to the power going to your headphones, for example. In my experience, OggDrop, the encoder I use, encodes much faster than Lame. If this power consumption was such a problem, then why do you think so many mp3 player manufacturers have Ogg support?
People here seem to hav
Re:and like every Linux geek.. (Score:2)
Ogg is big now. It's not just some obscure codec.
Re:and like every Linux geek.. (Score:2)
No, they're not going to convert their mp3 collection. But if they're like me, they may start ripping new cds using ogg instead of mp3. Personally, I find the difference in sound quality between the two formats to be very noticable, especially with classical music rips (to the extent that before oggs came along I refused to rip any classical cds to
Re:and like every Linux geek.. (Score:2)
Good, and I don't ever want to download an OGG file that was converted from an MP3. No point in making a high-quality OGG file from an MP3 file that has (in my opinion) worse quality. All my OGG files are ripped straight from the CD at a nice high (192 kbit nominal) bitrate.
Re:and like every Linux geek.. (Score:2)
Line noise. Some systems execute it anyway, must be by accident.
Another MP3 tagging library.... (Score:5, Informative)
Re:Another MP3 tagging library.... (Score:1)
Nice to know... (Score:5, Informative)
Re:Nice to know... (Score:5, Insightful)
Rus
Re:Nice to know... (Score:3, Insightful)
Re:Nice to know... (Score:2)
Can't someone please integrate cantus or easytag with a library management system, along with an mp3 player?!? It can be a gnome or kde app, I don't care. I want an (xmms | noatun | juk) & (madman | rhythmbox) & (easytag | cantus) combo.
Re:Nice to know... (Score:2)
You claim
Perl.com article (Score:4, Interesting)
Identifying Music with MusicBrainz [perl.com]
Re:Perl.com article (Score:5, Informative)
However, I was a little dissapointed that Teodor didn't spell out more of his reasoning for his choice of modules. I covered the (then) available Perl mp3 modules for a talk at YAPC::Europe this summer, and if you're not sure which modules to use, I'd suggest having a look at the slides (80K PDF) [husk.org] and notes [husk.org].
In any case, I look forward to the second part of the article, to see how the script shakes out in the end.
Perkasdflop (Score:2, Funny)
Self-respect (Score:2, Insightful)
Have those lossless compression afficionados [monkeysaudio.com] no dignity?
I can tell (Score:3, Interesting)
Re:Self-respect (Score:2)
What other alternative do you propose? Ogg is the best codec for bitrates 256. All codecs are lossy, with the exception of a few like FLAC. They take a 50 mb WAV down to 5 mb by throwing away stuff you (hopefully) cannot h
Talking down? (Score:3, Funny)
Re:Talking down? (Score:2)
Yeah, what will they think of next? [hamsterdance.com]
Re:Talking down? (Score:2)
Why stop with tagging? (Score:5, Interesting)
We're in an exciting time when many of the scripting languages are being augmented to be able to handle Real Data (Numpy [pfdubois.com] is another example).
Re:Why stop with tagging? (Score:2, Funny)
Oh, you said "generally munge"...
Re:Pitch shift??? (Score:2)
Re:Pitch shift??? (Score:2)
There are quite a few programs you can use to do real-time pitch and/or tempo shifting on a Mac. The only question is what level of shifting you need. Here are some programs for OS X that you may find useful (sorted in order of price):
Roni Music's The Amazing Slow Downer [ronimusic.com]. Shareware, $40 registration fee.
DSP-Quattro's i3 [i3net.it]. $129.
AntaresTech's Auto-Tune 3 [antarestech.com]. $359.
Ableton'
Re:Pitch shift??? (Score:2)
I forgot to mention that I used the tuner audio unit inside of Audio Hijack Pro [rogueamoeba.com], which can alter iTunes output in realtime. There may be another VST pitch/time shifter out there that will work with it, but I didn't find any when I searched around... Good luck!
Re:Why stop with tagging? (Score:2)
CLiki [cliki.net] is a Common Lisp wiki writt
Re:Why stop with tagging? (Score:2)
Because, unlike any of the JIT or scripting languages, Lisp requires turning your head inside out to use it. I like evaluative syntax as much as the next guy, and it's certainly the right tool for lots of things -- but using it requires a mindset that appears only to exist in a tiny fraction of the hacker population, sort of like an RPN calculator. Those who could adapt to RPN really, really loved it; but those who couldn't (which, unfortunately, was most people) found it cumbersome.
Re:Why stop with tagging? (Score:2)
There are enough people using Lisp to sustain it as a community. This means that if y
Re:Why stop with tagging? (Score:2)
Re:Why stop with tagging? (Score:2)
Your post is a melange of incherent sound-bites. I'm honestly wondering if someone just wrote a program to harvest blocks of text and re-post them when it saw a keyword. I can't buy that there was any thought behind that post.
I'm a die-hard perl programmer, and I'm honestly offended by your defense of the language.
What about emacs MP3 mode? (Score:5, Interesting)
Re:What about emacs MP3 mode? (Score:2, Informative)
Re:What about emacs MP3 mode? (Score:2)
Re:What about emacs MP3 mode? (Score:2)
He did, he just got confused whilst working on emacs.
Re:What about emacs MP3 mode? (Score:2)
first of all, that is GNU/emacs. Second of all, did it ever occur to anyone that a text editor should be used for editing text. It should not give you html tags. it should not color your code. it should just display what you wrote. next thing you know we'll be seeing GNU/Clippy. "it looks like you're designing a web page. it looks like you're designing a web page." wtf. text editors should not be made up of over a million lines of code. what happened to the good old days of vi. screw RMS, he should have
Re:That would be bad. (Score:2)
Yes, They do.
Windows Media Player (Part of the Microsoft Windows System, as they proved to a court) plays them. It actually is pretty embeded, if you click on an mp3 file or are in a dir filled with mp3s there is a 'play all' button on the left, or play song if only one is highlighted. All of the 'Sort By' stuff becomes ID3 info (which is annoying, I wan't to sort my mp3s by creation date.)
Re:That would be bad. (Score:2)
You are an idiot. First of all Emacs is not an operating system (all joking aside). Secondly, he was talking about editting ID3 tags, not playing MP3s. You could've clearly seen this if you were capable of reading. Third, MS does not have any way of playing back MP3s "builtin to the OS".
Sure they do! It is called Windows Media Player.
Re:That would be bad. (Score:2)
Re:That would be bad. (Score:2)
You are an idiot. First of all Emacs is not an operating system (all joking aside). Secondly, he was talking about editting ID3 tags, not playing MP3s. You could've clearly seen this if you were capable of reading. Third, MS does not have any way of playing back MP3s "builtin to the OS".
Sure they do! It is called Windows Media Player.
special purpose app + shell integration != OS component
Well, Microsoft seems to think it is an OS component. You certainly cannot remove it and it does come wit
genre splitting (Score:3, Interesting)
Re:genre splitting (Score:2)
It sounds like he's referring to something that will analize the peaks and valleys in the song and try to figure out if the waveform looks like a rock or classic or whatever song (ie: strong bass beat == rock, mostly in the voice range == audiobook, etc). Sounds like audioscrobber or somethin
How come many Mp3's don't have this data? (Score:2)
Furthermore, are there programs that are erasing the data from these MP3's when they are being circulated?
Re:How come many Mp3's don't have this data? (Score:5, Informative)
Of course, because this means that *someone*, *somewhere*, ended up typing in the data, there are errors in a lot of the data. Most of the CD lookup databases are very bad at handling compiliations, and can have problems with any of the items of metadata other than title and artist (for example, 'year' often ends up as the year the CD is ripped, not the year the music was produced).
There aren't many programs that strip the data that's produced, though. Thankfully.
Re:How come many Mp3's don't have this data? (Score:2)
Re:How come many Mp3's don't have this data? (Score:3, Informative)
It's true, not every commercial pressed CD out there has this feature, and believe it or not, not every CD-ROM (particularly older ones) can read the subcodes to extract the CD-TEXT info.
Sony Music includes CD-TEXT on all the CDs in it's catalog (to complement the CD-TEXT display features on most of it's car CD players.) I don't know about the other ma
Yeah! I love crypted source! (Score:2, Funny)
;-)
Re:Yeah! I love crypted source! (Score:2)
Shouldn't that be:
$filename =~ m/([^\-_]{3,})\s*-\s*(.{3,})\s*\.[^.]+$/
Re:Yeah! I love crypted source! (Score:2)
Oh, of course
Still, doesn't hurt to backslash dashes, just in case
MusicBrainz (Score:4, Interesting)
True, but the point of MusicBrainz is not to hold a database of released CD's but more snapshots of MP3 tracks.
At the moment, without MusicBrainz I cannot automatically populate my ID3 tags with the information about an album unless I get it out of the cupboard and type the details in myself.
MusicBrainz allows me to do all this without any access to the CD's
Re:MusicBrainz (Score:2)
The beauty of it is that if you find something that's missing, it's very very easy to add it
Re:MusicBrainz (Score:2)
the problem is more pertinatnt imo when you have things like multi disc sets is it: dis{c|k} 1, dis{c|k} 1 of 3, etc. is it '&', or 'and' etc. so yeah mb is more accurate and consistant. plus mb frequently merges the freedb into their own, with moderation of course.
tootin' my own horn (Score:2)
I know their are currently about five thousand object persistence modules for Perl, but I wanted one that was designed for audio metadata (artist name, album title, genres, etc etc) and provided for easy searching of metadata.
Python (Score:2)
Any takers?
speaking of tags (Score:2)
MP3::Info and Apache::MP3 (Score:2)
I wrote my own little Perl scripts using MP3::Info [uwinnipeg.ca] and MP3::ID3v1Tag [uwinnipeg.ca]. While you're at it, you may want to check out Apache::MP3 [uwinnipeg.ca] and my own pet project, TVDinner Streaming MP3 Server [dnsalias.com].
WebService::FreeDB might be fragile (Score:2)
The full-text search is still labelled experimental in CVS [sourceforge.net], though the page at freedb.org [freedb.org] doesn't warn about that anymore.
I've chosen to download the database [freedb.org] to a local server and tweak the server code (in C-- I'm nowhere with Perl) to allow full-text searches. I ripped about 30 CDs with EAC before I knew how to set the tagging options right so I'm missing track numbers.
mp3 tagger for windows (Score:2)
looks similar to Audiotag (Score:2)
This looks very similar to a little Perl program I recently wrote, although mine doesn't use a CDDB-type system.
Anyway, it's called 'Audiotag,' and is designed to be a decent mass tagger with sane options and supports MP3, OGG, and FLAC.
If you're interested... Audiotag [freshmeat.net]
tag - is this it? (Score:2)
brainwave (Score:2)
Re:MP3 is Evil (Score:2)
Now, if there wasn't away to make money from their discovery, how many companies would pour the millions into research?
I'll tell you: ZERO.
Of course 'the system' also allows for linux and ogg to exist. by 'the system' I mean copyright.
Necessary evil (Score:2)
The system encouraged someone to research and provide a treatement that saved some lives.
The system isn't evil, it is just indifferent. Come up with a better system, aboloshing IP wouldn't have stopped those AIDS related deaths that WERE prevented (or delayed)
Re:MP3 is Evil (Score:2, Interesting)
oh wait... Ogg isnt supported on any of those... so in order to support this "FREE" format I need to go spend $5000.00 on all noew gear...oh wait I can't even BUY anything that support's ogg except for one obscure pocket mp3 player...
nevermind, I'll stick with the mp3 format that is free as far as I'm concerned and use the items I alre
More complete analysis of your "system" (Score:3, Insightful)
What the "system" you refer to does is set up a risk-to-reward ratio that encourages ideas to be pursued and developed. It is a serious money risk to develop AIDS drugs, or any other complex product for that matter. To encourage the capital outlay required, the reward is granted to encourage development.
With out this "Evil" system, th
Re:More complete analysis of your "system" (Score:2)
The only ignorance here on display here is yours for only considering money in your analysis.
Re:Tagging my ass... (Score:2, Informative)
Re:Tagging my ass... (Score:5, Insightful)
Filenames are not an appropriate place to store metadata because they are volatile when moving a file between media.
windows based tagging? (Score:2)
For every MP3 I get that has no URL tag put in, I just put in my website name. A little bit of free advertising
Re:windows based tagging? (Score:2)
Re:windows based tagging? (Score:2)
AnalogX's TagMaster [analogx.com] is pretty slick.
Re:Tagging my ass... (Score:2)
Re:Tagging my ass... (Score:2)
Re:Hopefully iTunes will defeat mp3 (Score:2, Interesting)
Apple is not going to make a iStereo for my car. The same as they are not going to make a iTuner for my home stereo and plugging the ipod into my car stereo is not an option as it sucks. right now I can select from thousands of mp3's via the now discontinued Rio mp3 player. My friend has a clarion Joyride that play's DVD's full of mp3's from it's 5 disc DVD changer that play's mp3's better than any iPod made on this planet (It's the A2D converter kiddies...)
Not to mis
Re:Hopefully iTunes will defeat mp3 (Score:2)
Actually, it's the D2A converter, or for us non leet speakers, the DA converter.
Wouldn't get very far with an mp3 "player" if you had only an AD converter, although you could record a lot...
Re:Hopefully iTunes will defeat mp3 (Score:5, Informative)
Besides, I will not tolerate ANY DRM in my music files.
By "weird itunes format", I assume you're referring to the AAC [apple.com] MPEG4 format, which is an industry standard [vialicensing.com].
Also, there's only DRM in files that you buy from iTunes Music store. Please stop spreading the FUD that "AAC == DRM", because it's simply not true. Just like "EXE file" does not translate to "software which needs a registration key" and "VHS tape" does not translate to "protected by Macrovision". AAC is an open MPEG4 format to which DRM _CAN_ be applied. By default, it is not applied.
Also, what do you mean by "A2D" converter? Why would an MP3 player, which decodes digital signals into analog signals which your ear can hear need an "analog to digital to converter"?
Re:defacto? (Score:3, Insightful)
Personally I think that wma will gain a foothold only because the default tools in windows only rip to that, but I think that mp3 is "easier" as all the hardware and software that plays digital music play it. It might not be as good as ogg or aac or wma, or allow the music industry to control it through
Re:defacto? (Score:2)
Re:defacto? (Score:2)
Re:defacto? (Score:2)
Re:.wav (Score:2)
Some say that with hardware getting cheaper and HD space no longer at a premium, mp3 and other compression schemes have very little hope of surviving the next decade. In fact, I wouldn't be surprised if the record companies actually release their catalogs in an even better quality format than wav.
2 questions:
What is the bitrate at which the human ear can distinguish quality from crap?
There is no better format than WAV, as it is uncompressed audio. However, there are two new formats called DVD-Audio and