ITunes Metadaten in Max Importieren

Aus SGiersch WIKI
Wechseln zu: Navigation, Suche

Inhaltsverzeichnis

Info

Max alias Macintosh Audio for OS X, macht aus Musik-CDs digitale Audiodateien. Die kostenlose Software wandelt Tracks von Silberlingen in mehr als 20 unterschiedliche Audiotypen um. Alle gängigen und zig unbekanntere Formate inklusive.

Das Programm fragt bei MusicBrainz die Metadaten ab. Sollte die Abzufragende CD aber nicht bei MusicBrainz hinterlegt sein, hilft in den meisten Fällen iTunes weiter.

Da das Abtippen dieser Informationen viel zu anstrengend ist, wird hierfür AppleScript benutzt.


Anfang

  • Öffne den AppleScript-Editor
  • Füge nachfolgenden Code ein.
Version 0.2
 
tell application "iTunes"
  set foundCD to true
  try
    set myCD to some source whose kind is audio CD
    on error errorMessage number errorNumber
    -- error 1728 means the AudioCD was not found, so wait a little 
    if errorNumber is -1728 then
      set foundCD to false
    else
     display dialog errorMessage
    end if
  end try
  if foundCD 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 every track 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 date of maxtrack to ye as string
            set genre of maxtrack to ge
            set composer of maxtrack to co
            --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 date of maxdisk to ye as string
            set composer of maxdisk to com
            -- set track count of maxdisk to tc
            -- max doesn't allow setting total tracks
            set composer of maxdisk to co
            if dn > 1 then
              set disc number of maxdisk to dn
              set total discs of maxdisk to dc
            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
 


  • Als Script abspeichern, mit einem Aussagekräftigen Namen.

Voraussetzung zur Benutzung

  • Du hast einen Mac PC :)
  • Du hast das Script erstellt.
  • Itunes ist gestartet.
  • Max ist gestartet.


Import der Daten

  • Lege die CD ein und warte bis iTunes die CD erkannt hat und die Metadaten zusehen sind.
  • Warte auch, das Max die CD erkannt hat.
  • Führe nun das Script Programm aus.

Fertig


Das ganze wurde im Forum gefunden.