Gracenote integration
-
- Posts: 4
- Joined: Thu Apr 06, 2006 3:27 pm
Gracenote integration
i'm not sure how things are progressing on obtaining a license to use CDDB instead of freedb (i just spent all morning re-entering track information for Die Walkure, since freedb gave me gibberish for foreign characters)...is there any way, in the meantime, to simply bypass freedb and let Max get the cd track information from CDDB by way of itunes? something like "use existing track names" or whatever you want to call it; when a cd is displayed in itunes, to use those titles rather than freedb's? any idea? thanks a lot
-
- Posts: 1
- Joined: Tue May 09, 2006 4:11 am
- Contact:
an excellent suggestion, pianomaster - an option for accessing the on-board CD database (whatever it's called) once mac/itunes calls CDDB would be swell - I dislike the often goofy info from freedb, too.
BTW, Max is coming along superbly, Stephen - sincere thanks for all of your excellent work!
We doan need no steenkeen EAC!
BTW, Max is coming along superbly, Stephen - sincere thanks for all of your excellent work!
We doan need no steenkeen EAC!
-
- Posts: 2
- Joined: Fri May 19, 2006 4:24 pm
Here's an AppleScript I found that's supposed to grab the info that iTunes gets when a CD is inserted - I don't know if Max can use it somehow though.
Code: Select all
tell application "iTunes"
set doRepeat to true
repeat while doRepeat is equal to true
try
set myCD to some source whose kind is audio CD
set doRepeat to false
on error erMs number erNum
-- error 1728 means the AudioCD was not found, so wait a little
-- the loop should not be infitite, better to mofify it to wait only
-- for some time
if erNum is -1728 then
set doRepeat to true
else
set doRepeat to false
end if
end try
end repeat
set CDname to myCD's name
-- the playlist 1 is actually the CD contents
set myPlaylist to playlist 1 of myCD
set theTracks to number of tracks of myPlaylist
set evCDtrack to (get name of every track of myPlaylist)
set evCDArtist to (get artist of every track of myPlaylist)
set evCDGenre to (get genre of every track of myPlaylist)
-- etc...
-- any other CD data could be retrieved, use Script Editor,
-- select File/Open Dictionary, and then iTunes.
-- all the attributes of playlist object could be retrieved
end tell
rudimentary script itunes cddb-->max
I have no idea why Max can't get this information from the internal database that is kept by OS X. This info should be cached as soon as iTunes loads it.
But here's a rudimentary soluation that will get the tag info from iTunes and put it into the top max window. Note some bugs in Max in the comments.
This is not extensively tested or anything, but in theory should work.
Recommended install location is in:
~/Scripts/Applications/Max/
Then can access from Script menu while Max is top.
[/code]
But here's a rudimentary soluation that will get the tag info from iTunes and put it into the top max window. Note some bugs in Max in the comments.
This is not extensively tested or anything, but in theory should work.
Recommended install location is in:
~/Scripts/Applications/Max/
Then can access from Script menu while Max is top.
Code: Select all
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
More than once someone has offered to work a deal with Gracenote with no response made public in these forums.
The trouble with using iTunes' information is that one has to have iTunes fired up to get it, presuming the CD hasn't been in the machine before with iTunes open. Still, I'd prefer that - say an option to let us choose to have Max start iTunes and grab the info.
xACT uses iTunes' info if available.
I missed the June posting's script and now see this one. Here's to hoping I get so bored/frustrated at work I want to goof off a tad.
The trouble with using iTunes' information is that one has to have iTunes fired up to get it, presuming the CD hasn't been in the machine before with iTunes open. Still, I'd prefer that - say an option to let us choose to have Max start iTunes and grab the info.
xACT uses iTunes' info if available.
I missed the June posting's script and now see this one. Here's to hoping I get so bored/frustrated at work I want to goof off a tad.
-
- Posts: 23
- Joined: Mon Oct 30, 2006 10:54 pm
SeeFuga wrote:More than once someone has offered to work a deal with Gracenote with no response made public in these forums.
http://www.sbooth.org/tracker/view.php?id=158
It is not possible to conform to Gracenote's licensing conditions (even for a "shareware") license for an open source project like Max. In fact it would not even be possible to link to their client library as Max is licensed under the GPL and the client library is a binary only SDK.
Re: Gracenote integration
I too would love it if there were some way to get the info from iTunes, even if required iTunes to be open or whatever.
The MusicBrainz info I am getting is just plain not as good as what iTunes gets from GraceNote.
The MusicBrainz info I am getting is just plain not as good as what iTunes gets from GraceNote.
Re: Gracenote integration
I will look again into parsing the CD Info.cidb file that iTunes and Finder use to store disc information.
Re: Gracenote integration
This code:
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 as string
set genre of maxtrack to ge
No longer works in 10.5. It gives an exception at year. Changed to "as string" and also to date and date "as string" all with no luck. Anyone have any ideas please?
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 as string
set genre of maxtrack to ge
No longer works in 10.5. It gives an exception at year. Changed to "as string" and also to date and date "as string" all with no luck. Anyone have any ideas please?
Re: Gracenote integration
I need to check in the Max.sdef file, then you will be able to get the date as a string.
Re: Gracenote integration
Now fixed in 1328. Thank you Stephen!
-
- Posts: 9
- Joined: Mon Mar 17, 2008 2:00 am
Re: Gracenote script doesn't get Composer tag
The script gets all tags from Itunes except Composer. Since I have a lot of classical music, this is preventing me from using Max as my default flac ripper which I would really like to do.
Anyone have any ideas on how to fix this?
Thanks for the excellent programs.
Anyone have any ideas on how to fix this?
Thanks for the excellent programs.
Re: Gracenote integration
Did you try the script from http://sbooth.org/forums/viewtopic.php?f=4&t=1930 ?