Max and Freedb

Discuss Max, an open source CD audio extractor and audio converter.
rockmeisster
Posts: 1
Joined: Sun Jan 13, 2008 4:46 pm

Max and Freedb

Post by rockmeisster » Sun Jan 13, 2008 4:53 pm

Hi,
First of all thanks for a great tool. By far the best ripper for Mac.
Is it possible somehow to do cd info lookup in freedb (like EAC for windows) instead of Musicbrainz?

So far i have ripped over 20 cds and only one has been found in musicbrainz. This means that i have to type all info for each cd, which in the long run is both timeconsuming and annoying.

jdc0730
Posts: 6
Joined: Sat Oct 27, 2007 10:24 am

Re: Max and Freedb

Post by jdc0730 » Thu Jan 17, 2008 1:45 pm

First, I will confess that I am an avid MusicBrainz user so take this suggestion from that perspective...

I don't know how uncommon the CDs you are attempting to rip are, but adding a disc id to MusicBrainz is not very complicated at all. If you have Picard installed, there is a button to do a discid lookup. If it doesn't exist, you can use the "Look up manually" button. Find the album you are looking for and it will add your discid to that release. You can then hit the MusicBrainz button on Max to download the information. If your release doesn't exist in MusicBrainz, it also has a feature to import information from freedb as a starting point.

Advantages:
1) I would suspect for releases that are you are typing in, adding the discid to MusicBrainz will be much quicker.
2) The data you get from MusicBrainz will likely be more complete, accurate than freedb as well as standardized (this is great for artists where they might be listed in freedb undermultiple names like "Sonny & Cher" or "Sonny and Cher")
3) You can refresh the information from MusicBrainz at anytime with Picard (or Jaikoz)
4) You will help the next person out who has that discid.

Disadvantages:
1) Another piece of software to install
2) MusicBrainz does not have genres (although I don't think freedb is very accurate)

Picard: http://wiki.musicbrainz.org/PicardDownload

User avatar
Fuga
Posts: 391
Joined: Mon Jun 05, 2006 8:30 pm
Location: Texas

Re: Max and Freedb

Post by Fuga » Thu Jan 17, 2008 3:39 pm

Another option is to use Gracenote info plugged into Max via iTunes as discussed here.

Mike1
Posts: 201
Joined: Thu Sep 21, 2006 3:55 pm

Re: Max and Freedb

Post by Mike1 » Fri Jan 18, 2008 8:55 am

Fuga wrote:Another option is to use Gracenote info plugged into Max via iTunes as discussed here.
Thanks, Fuga. I'd missed that thread. Music Brainz seems to be the least reliable of all three services by a long way, so it's good to know there's that option for tagging.

glevethan
Posts: 11
Joined: Sat Jun 03, 2006 2:01 pm

Re: Max and Freedb

Post by glevethan » Mon Jan 21, 2008 10:33 am

I read the link regarding the incorporation of Gracenote however I am confused - any better directions for a newbie?

Gregg

User avatar
Fuga
Posts: 391
Joined: Mon Jun 05, 2006 8:30 pm
Location: Texas

Re: Max and Freedb

Post by Fuga » Mon Jan 21, 2008 2:43 pm

There are actually two scripts in that post. Use the second one.

1) Open Script Editor.
2) Copy all the script from the thread.
3) Paste into SE window.
4) Save As "Application Bundle." (I think. I am pretty sure that's what I did to make it a Universal Binary. "Application" makes it PPC. It'll run on ICBM but under Rosetta.) Give it a cool name, one you'll remember. I use it so seldom I kept forgetting what I called it - finally named it iTunes-META and gave it a cool icon.

Here's the klunky part, using it.
1) Before inserting a CD, open iTunes. (Make sure it is set to grab Gracenote stuff.)
2) Open Max.
3) Insert CD.
4) Run your app.

Ta-dah. It''ll put the new tags into Max's fields. And, if I remember correctly, will remember them for the next time you insert the CD and use Max.

You have to do #4 for each CD. It does work with Leopard on an ICBM.

glevethan
Posts: 11
Joined: Sat Jun 03, 2006 2:01 pm

Re: Max and Freedb

Post by glevethan » Mon Jan 21, 2008 6:33 pm

Fuga

First off a big thank you for your reply.

After following your posting I created the script (using the second script of the linked thread) and saved it as an application bundle. I then followed your directions and ran iTunes first- started up MAX (latest unstable build) - inserted the CD - and ran the script. I was greeted with the following script error:

Can't set year of <ckass trcj> 1 of document "9WU.qJsyEOg43oFG4bZxLo9e5wU-.cdinfo" of applicatioin "Max" to 0.

Finally the script was successful in filling in only the track name and length of THE FIRST TRACK ONLY - not the remaining tracks. It also did not fill in any of the pertinent information in the top of the MAX window ie Title-Artist-Date-Genre-Composer-Comment.

Any suggestions?

Here is a copy of the script which I pasted from your link:

tell application "iTunes"
set abortit to false
try
set myCD to some source whose kind is audio CD
on error erMs number erNum
-- error 1728 means the AudioCD was not found, so wait a little
if erNum is -1728 then
set abortit to true
end if
end try
if not abortit then
set CDname to myCD's name
set myPlaylist to playlist 1 of myCD
set theTracks to tracks of myPlaylist
tell application "Max"
set mc to (count tracks of document 1)
set maxdisk to document 1
end tell
set ic to (count theTracks)
if mc = ic then
repeat with i from 1 to (count theTracks)
set atrack to item i of theTracks
set ar to artist of atrack
set al to album of atrack
set tn to track number of atrack
set tc to track count of atrack
set ge to genre of atrack
set co to composer of atrack
set ye to year of atrack
set na to name of atrack
set comp to compilation of atrack
set com to comment of atrack
set dn to disc number of atrack
set dc to disc count of atrack
tell application "Max"
set maxtrack to track i of document 1
if not (rip in progress of maxtrack) and not (encode in progress of maxtrack) then
set title of maxtrack to na
set artist of maxtrack to ar
set year of maxtrack to ye
set genre of maxtrack to ge
--set double integer of maxtrack to co
-- max bug: for some reason "composer" compiles as "double integer"
--set number of maxtrack to tn
end if
end tell
if i = 1 then
tell application "Max"
set title of maxdisk to al
set artist of maxdisk to ar
set compilation of maxdisk to comp
set genre of maxdisk to ge
set year of maxdisk to ye
set comment of maxdisk to com
--set total tracks of maxdisk to tc
-- max doesn't allow setting total tracks
--set double integer of maxdisk to co
-- max bug: for some reason "composer" compiles as "double integer"
if dn > 1 then
set disc number of maxdisk to dn
--set total discs to dc
-- setting total disks results in error
end if
end tell
end if
end repeat
else
display dialog "The iTunes CD track count and the Max CD track count do not match."
end if
else
display dialog "Couldn't get a CD from iTunes. Please retry."

end if
end tell



Thanks
Gregg

User avatar
Fuga
Posts: 391
Joined: Mon Jun 05, 2006 8:30 pm
Location: Texas

Re: Max and Freedb

Post by Fuga » Mon Jan 21, 2008 7:14 pm

I am sorry, Gregg. I have no clue. I'm not all that much a geek and know even less about scripting. That is the same as I have.

Nuts! As I said earlier I don't do it all that often and now I just got the same error and same result (name of first track). Since I last used it both iTunes and Max have changed versions several times.

Damn. Stephen? Any ideas?

User avatar
Fuga
Posts: 391
Joined: Mon Jun 05, 2006 8:30 pm
Location: Texas

Re: Max and Freedb

Post by Fuga » Mon Jan 21, 2008 7:20 pm

Rereading that error I infer that it reads from iTunes just fine. It just can't write the year to Max. When you look at the script, "year" is way down the list of fields it's looking to write, after artist and album title, among others, yet it balks at year without writing album and artist. It does write track number and title. Leads me to wonder if it's Max.

glevethan
Posts: 11
Joined: Sat Jun 03, 2006 2:01 pm

Re: Max and Freedb

Post by glevethan » Mon Jan 21, 2008 8:16 pm

Fuga

Maybe the moderator is reading this post and can help us out.

Thanks
Gregg

User avatar
Fuga
Posts: 391
Joined: Mon Jun 05, 2006 8:30 pm
Location: Texas

Re: Max and Freedb

Post by Fuga » Mon Jan 21, 2008 8:38 pm

glevethan wrote:Fuga

Maybe the moderator is reading this post and can help us out.

Thanks
Gregg
That would the "Stephen" I referenced (as in "sbooth"). He is usually very responsive but things do get by.

glevethan
Posts: 11
Joined: Sat Jun 03, 2006 2:01 pm

Re: Max and Freedb

Post by glevethan » Mon Jan 21, 2008 11:26 pm

Fuga

Well - I am in no way a programmer at all however - I looked at the script and eliminated anything that had to do with the "year" as that seemed to be the offending party. Guess what - it now works! (more or less). I was able to grab the title - artist - genre in the title lines above - and correctly grab all of the song titles and lengths below.

The problem now remains that the CD I tested with is a compilation CD ie different artists for each song. If I go to the bottom of MAX and click on each different song the Artist always remains the same up at the top of the window. So the year bug has been eliminated from the script (?) however the artist is remaining the same.

I would think for MAX it might be an idea to have an additional vertical column at the bottom along with the track#-title-length which would be for the artist name. In the case of a normal one artist CD the name would appear the same all the way down the column - for a compilation CD it would be able to show the different artists.

Still a big problem for me as most of the CD's I wish to rip are compilations.

Here is the script which now works for me:


tell application "iTunes"
set abortit to false
try
set myCD to some source whose kind is audio CD
on error erMs number erNum
-- error 1728 means the AudioCD was not found, so wait a little
if erNum is -1728 then
set abortit to true
end if
end try
if not abortit then
set CDname to myCD's name
set myPlaylist to playlist 1 of myCD
set theTracks to tracks of myPlaylist
tell application "Max"
set mc to (count tracks of document 1)
set maxdisk to document 1
end tell
set ic to (count theTracks)
if mc = ic then
repeat with i from 1 to (count theTracks)
set atrack to item i of theTracks
set ar to artist of atrack
set al to album of atrack
set tn to track number of atrack
set tc to track count of atrack
set ge to genre of atrack
set co to composer of atrack

set na to name of atrack
set comp to compilation of atrack
set com to comment of atrack
set dn to disc number of atrack
set dc to disc count of atrack
tell application "Max"
set maxtrack to track i of document 1
if not (rip in progress of maxtrack) and not (encode in progress of maxtrack) then
set title of maxtrack to na
set artist of maxtrack to ar

set genre of maxtrack to ge
--set double integer of maxtrack to co
-- max bug: for some reason "composer" compiles as "double integer"
--set number of maxtrack to tn
end if
end tell
if i = 1 then
tell application "Max"
set title of maxdisk to al
set artist of maxdisk to ar
set compilation of maxdisk to comp
set genre of maxdisk to ge

set comment of maxdisk to com
--set total tracks of maxdisk to tc
-- max doesn't allow setting total tracks
--set double integer of maxdisk to co
-- max bug: for some reason "composer" compiles as "double integer"
if dn > 1 then
set disc number of maxdisk to dn
--set total discs to dc
-- setting total disks results in error
end if
end tell
end if
end repeat
else
display dialog "The iTunes CD track count and the Max CD track count do not match."
end if
else
display dialog "Couldn't get a CD from iTunes. Please retry."

end if
end tell



Thanks
Gregg

User avatar
Fuga
Posts: 391
Joined: Mon Jun 05, 2006 8:30 pm
Location: Texas

Re: Max and Freedb

Post by Fuga » Mon Jan 21, 2008 11:38 pm

Clever boy. Thanks. Still, I'd like the year info to be present no matter how easy to hand-edit.

As for the compilations? Good luck!

glevethan
Posts: 11
Joined: Sat Jun 03, 2006 2:01 pm

Re: Max and Freedb

Post by glevethan » Tue Jan 22, 2008 1:10 am

Clever boy - not so quick! I was able to encode and a folder was created with the FLAC files. The file names are not exactly what I want ie the name of the file is correct (song title) however it is proceeded by a 7 (and sometimes 9) digit number ?? ie 6393568 There Goes My Used To Be.flac

Also the first song is entitled 6386240 I'm Living Good_The Ovations.flac where I'm Living Good is the song title - The Ovations are the group. All subsequent files are as above number and title.

Help please Mr Booth??????

Gregg

User avatar
sbooth
Site Admin
Posts: 2445
Joined: Fri Dec 23, 2005 7:45 am
Location: USA
Contact:

Re: Max and Freedb

Post by sbooth » Tue Jan 22, 2008 6:18 am

The track number bug (in filenames) is one that I've fixed today and checked in- I'll post a new unstable build this week with the changes.

As for the script to get iTunes metadata, I've created an updated version that works with the svn trunk version of the Max.sdef scripting definition file. The new Max.sdef fixes the problem where the composer element would compile as "double integer". I will post a sticky topic in this forum with the source to the new script soon.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests