Class AudioMetaData

  • All Implemented Interfaces:
    AudioSong

    public abstract class AudioMetaData
    extends Object
    implements AudioSong
    Provides access to metadata taken from id3 tags and other mechanisms of embedding metadata into music files.

    Note that the setters offered in this class actually write to the audio file. So be careful when you call them! Make sure nobody else (e.g. iTunes) is writing at the same time and that the properties you are writing aren't stale.

    Failure are typically reported as AudioMetaDataException

    In order to call a couple of methods and then write (and not each time) you can call beginTransaction() and commit() to write properties transactionally.

    Author:
    Hendrik Schreiber
    • Constructor Detail

      • AudioMetaData

        public AudioMetaData()
    • Method Detail

      • setITunes12_6WorkGroupingMode

        public static void setITunes12_6WorkGroupingMode​(boolean enableMode)
        Enables the special iTunes 12.6 grouping/work mode. When enabled, grouping is written to GRP1 and work to TIT1. When disabled, grouping is written to TIT1 and work to a custom field.
        Parameters:
        enableMode - true to enable
      • getNotFoundCheckMaxAgeInMs

        public static int getNotFoundCheckMaxAgeInMs()
      • setNotFoundCheckMaxAgeInMS

        public static void setNotFoundCheckMaxAgeInMS​(int notFoundCheckMaxAgeInMs)
      • getKeyFormat

        public static KeyFormat getKeyFormat()
      • setKeyFormat

        public static void setKeyFormat​(KeyFormat keyFormat)
      • isSupported

        public static boolean isSupported​(Path path)
        Indicates whether meta data can be read and potentially manipulated.
        Parameters:
        path - file
        Returns:
        true, if we can process the given file.
        See Also:
        isSupported(String)
      • isSupported

        public static boolean isSupported​(String fileExtensionWithoutDot)
        Indicates whether meta data can be read and potentially manipulated.
        Parameters:
        fileExtensionWithoutDot - file extension without dot: "exe"
        Returns:
        true, if we can process the given file type.
        See Also:
        isSupported(Path)
      • isShared

        public boolean isShared()
        Description copied from interface: AudioSong
        Indicates whether this track is a shared track, i.e. either from another iTunes library or an iTunes Match song that hasn't been downloaded yet.
        Specified by:
        isShared in interface AudioSong
        Returns:
        true or false
      • setFile

        public void setFile​(Path file)
      • getFile

        public Path getFile()
        Description copied from interface: AudioSong
        File of this song, or null, if it cannot be found.
        Specified by:
        getFile in interface AudioSong
        Returns:
        file object for AudioSong.getLocation() or null, if a proper file object cannot be formed
      • getFileId

        public FileId getFileId()
      • getTag

        protected org.jaudiotagger.tag.Tag getTag()
      • dump

        public abstract void dump​(org.jaudiotagger.tag.TagField tagField,
                                  StringBuilder sb)
      • getImplementation

        public <T> T getImplementation​(Class<T> klass)
        Description copied from interface: AudioSong

        AudioSong objects are sometimes implemented by an object that acts as a facade to other AudioSong objects. This could be a proxy for an AppleScript iTunes object, a a persistent object that is stored in a local database via Hibernate, or perhaps an Object that is capable of writing id3 tags directly (e.g. AudioMetaData). While normal calls on an object implementing this interface are routed according to some internal logic, using one of the actual implementation classes allows you precise control over what your call does.

        Note to plugin developers: It is hardly ever a good idea to exercise this control, unless you know exactly what you are doing. :-)

        Specified by:
        getImplementation in interface AudioSong
        Type Parameters:
        T - implementation class
        Parameters:
        klass - class implementing AudioSong
        Returns:
        object of the desired type or null, if such an object is not available
        See Also:
        PlayList.getImplementation(Class)
      • getFrontCoverImage

        public Image getFrontCoverImage()
        Description copied from interface: AudioSong
        Returns the first front cover image.
        Specified by:
        getFrontCoverImage in interface AudioSong
        Returns:
        image or null
      • getBackCoverImage

        public Image getBackCoverImage()
        Description copied from interface: AudioSong
        Returns the first front cover image.
        Specified by:
        getBackCoverImage in interface AudioSong
        Returns:
        image or null
      • getImages

        public Image[] getImages()
        Description copied from interface: AudioSong
        All images.
        Specified by:
        getImages in interface AudioSong
        Returns:
        images or empty array, never returns null
      • getSpecification

        public abstract String getSpecification()
      • getSpecificationVersion

        public abstract String getSpecificationVersion()
      • getChannels

        public int getChannels()
      • getChannelsAsString

        public String getChannelsAsString()
      • getAudioFile

        protected org.jaudiotagger.audio.AudioFile getAudioFile()
        Returns:
        audio file - new instance, if it was changed or not loaded yet
        Throws:
        AudioMetaDataException
      • getTuneCortexID

        public Long getTuneCortexID()
      • setTuneCortexID

        public void setTuneCortexID​(Long id)
      • getTotalTime

        public int getTotalTime()
        Description copied from interface: AudioSong
        Total length of the song in ms.
        Specified by:
        getTotalTime in interface AudioSong
        Returns:
        length in ms.
      • getSampleRate

        public int getSampleRate()
        Description copied from interface: AudioSong
        Get sample rate in Hz.
        Specified by:
        getSampleRate in interface AudioSong
        Returns:
        sample rate in Hz
      • getBitRate

        public int getBitRate()
        Description copied from interface: AudioSong
        Bit rate.
        Specified by:
        getBitRate in interface AudioSong
        Returns:
        bit rate
      • canWrite

        public boolean canWrite()
        Description copied from interface: AudioSong
        Checks whether the file corresponding to this song can in principal be written to.
        Specified by:
        canWrite in interface AudioSong
        Returns:
        true or false
      • getArtworks

        public AudioArtwork[] getArtworks()
        Description copied from interface: AudioSong
        Artwork belonging to this song.
        Specified by:
        getArtworks in interface AudioSong
        Returns:
        array of artworks
      • setArtworks

        public void setArtworks​(AudioArtwork... audioArtworks)
        Description copied from interface: AudioSong
        Set artworks belonging to this track.
        Specified by:
        setArtworks in interface AudioSong
        Parameters:
        audioArtworks - artworks
      • createArtwork

        protected static org.jaudiotagger.tag.images.Artwork createArtwork​(AudioArtwork audioArtwork)
      • getArtworkCount

        public int getArtworkCount()
        Description copied from interface: AudioSong
        Get artwork count.
        Specified by:
        getArtworkCount in interface AudioSong
        Returns:
        artwork count
      • addArtwork

        public void addArtwork​(AudioArtwork audioArtwork)
        Description copied from interface: AudioSong
        Adds an artwork/image to the audio song.
        Specified by:
        addArtwork in interface AudioSong
        Parameters:
        audioArtwork - artwork
      • setArtwork

        public void setArtwork​(File f)
      • getComposer

        public String getComposer()
        Description copied from interface: AudioSong
        Get composer(s).
        Specified by:
        getComposer in interface AudioSong
        Returns:
        composer(s)
      • getContentRating

        public String getContentRating()
        Description copied from interface: AudioSong
        Returns the content rating. E.g., "us-tv|TV-PG|400|" or "us-tv|TV-MA|600|dialogue and sexual content"
        Specified by:
        getContentRating in interface AudioSong
        Returns:
        content rating
      • getDateAdded

        public Date getDateAdded()
        Description copied from interface: AudioSong
        Get date the song was added to the library.
        Specified by:
        getDateAdded in interface AudioSong
        Returns:
        date added
      • getDateAnalyzed

        public Date getDateAnalyzed()
        Description copied from interface: AudioSong
        Date the song was last analyzed.
        Specified by:
        getDateAnalyzed in interface AudioSong
        Returns:
        date analyzed
      • setDateAnalyzed

        public void setDateAnalyzed​(Date date)
        Description copied from interface: AudioSong
        Sets the date this song was last analyzed.
        Specified by:
        setDateAnalyzed in interface AudioSong
        Parameters:
        date - date of last analysis
      • getDateModified

        public Date getDateModified()
        Description copied from interface: AudioSong
        Get date of last modification.
        Specified by:
        getDateModified in interface AudioSong
        Returns:
        date
      • getDiscCount

        public int getDiscCount()
        Description copied from interface: AudioSong
        Assuming that this song is on a disc that is part of a disc collection, return the number of discs in this collection.
        Specified by:
        getDiscCount in interface AudioSong
        Returns:
        disc count
      • getDiscNumber

        public int getDiscNumber()
        Description copied from interface: AudioSong
        Get the disc number.
        Specified by:
        getDiscNumber in interface AudioSong
        Returns:
        disc number
      • getEpisode

        public String getEpisode()
        Description copied from interface: AudioSong
        Get episode name.
        Specified by:
        getEpisode in interface AudioSong
        Returns:
        episode name
      • getEpisodeOrder

        public int getEpisodeOrder()
        Description copied from interface: AudioSong
        Episode order.
        Specified by:
        getEpisodeOrder in interface AudioSong
        Returns:
        episode order
      • setGenre

        public void setGenre​(String genre)
        Description copied from interface: AudioSong
        Sets genre.
        Specified by:
        setGenre in interface AudioSong
        Parameters:
        genre - genre
      • getKind

        public String getKind()
        Description copied from interface: AudioSong
        Kind of audio, e.g. "WAV audio file", "AAC audio file" or "MPEG audio file" (or localized versions thereof). This value is typically extracted from iTunes Music Library.xml and may simply be null for non-iTunes libraries.
        Specified by:
        getKind in interface AudioSong
        Returns:
        String describing this audio object or null if unavailable.
      • getLocation

        public String getLocation()
        Description copied from interface: AudioSong
        Location of this track in the form of a url-encoded URL. The url may also contain '+' characters instead of spaces.
        Specified by:
        getLocation in interface AudioSong
        Returns:
        location
      • getId

        public Long getId()
        Description copied from interface: AudioSong
        Persistent id. Survives application shutdown.
        Specified by:
        getId in interface AudioSong
        Returns:
        persistent id
      • getPlayDate

        public long getPlayDate()
        Description copied from interface: AudioSong
        Get time the song was last played. Returns 0, if it has never been played.
        Specified by:
        getPlayDate in interface AudioSong
        Returns:
        play date, milliseconds since January 1, 1970, 00:00:00 GMT (NOT related to the iTunes value!)
      • getPlayDateUTC

        public Date getPlayDateUTC()
        Description copied from interface: AudioSong
        Get play date.
        Specified by:
        getPlayDateUTC in interface AudioSong
        Returns:
        play date
      • getSeason

        public int getSeason()
        Description copied from interface: AudioSong
        Get season number. Suitable for TV-shows.
        Specified by:
        getSeason in interface AudioSong
        Returns:
        season.
      • getShow

        public String getShow()
        Description copied from interface: AudioSong
        Name of a show, suitable for TV shows.
        Specified by:
        getShow in interface AudioSong
        Returns:
        show name
      • getSize

        public long getSize()
        Description copied from interface: AudioSong
        File size.
        Specified by:
        getSize in interface AudioSong
        Returns:
        size
      • getSkipCount

        public int getSkipCount()
        Description copied from interface: AudioSong
        Get skip count.
        Specified by:
        getSkipCount in interface AudioSong
        Returns:
        skip count
      • getSkipDate

        public Date getSkipDate()
        Description copied from interface: AudioSong
        Get skip date.
        Specified by:
        getSkipDate in interface AudioSong
        Returns:
        skip date
      • getSortComposer

        public String getSortComposer()
        Description copied from interface: AudioSong
        Returns the sort composer.
        Specified by:
        getSortComposer in interface AudioSong
        Returns:
        sort composer
      • getSortShow

        public String getSortShow()
        Description copied from interface: AudioSong
        Returns the sort show.
        Specified by:
        getSortShow in interface AudioSong
        Returns:
        sort show
      • getStartTime

        public int getStartTime()
        Description copied from interface: AudioSong
        Start time of the song in ms.
        Specified by:
        getStartTime in interface AudioSong
        Returns:
        start time in ms.
      • getStopTime

        public int getStopTime()
        Description copied from interface: AudioSong
        Stop time of the song in ms.
        Specified by:
        getStopTime in interface AudioSong
        Returns:
        stop time in ms.
      • getTrackNumber

        public int getTrackNumber()
        Description copied from interface: AudioSong
        Get the number of the track on the release/album/recording.
        Specified by:
        getTrackNumber in interface AudioSong
        Returns:
        track number
      • getVolumeAdjustment

        public int getVolumeAdjustment()
        Description copied from interface: AudioSong
        Value between -255 and 255.
        Specified by:
        getVolumeAdjustment in interface AudioSong
        Returns:
        volume adjustment
      • getYear

        public int getYear()
        Description copied from interface: AudioSong
        Release year - (corresponds to id3 TDRC, recording time).
        Specified by:
        getYear in interface AudioSong
        Returns:
        four digit recording year, if available
        See Also:
        AudioSong.getReleaseDate()
      • hasProtectedFileExtension

        public boolean hasProtectedFileExtension()
        Description copied from interface: AudioSong
        Checks file endings instead of the protected flag in the iTunes Music Library.xml, since iTunes marks non-protected versions of files that used to be protected still as protected.
        Specified by:
        hasProtectedFileExtension in interface AudioSong
        Returns:
        true, if we know that the file-format is usually protected.
      • isClean

        public boolean isClean()
        Description copied from interface: AudioSong
        Indicates whether this song is "clean" - whatever that means.
        Specified by:
        isClean in interface AudioSong
        Returns:
        true or false
      • isCompilation

        public boolean isCompilation()
        Description copied from interface: AudioSong

        Indicates whether this track is part of a compilation.

        "A compilation album is an album (music or spoken-word) featuring tracks from one or more performers, often culled from a variety of sources (such as studio albums, live albums, singles, demos and outtakes.)"

        -- Wikipedia Album Compliation
        Specified by:
        isCompilation in interface AudioSong
        Returns:
        true or false
      • setCompilation

        public void setCompilation​(boolean compilation)
        Description copied from interface: AudioSong
        Marks this song as part of a compilation (or not).
        Specified by:
        setCompilation in interface AudioSong
        Parameters:
        compilation - true or false
      • isEnabled

        public boolean isEnabled()
        Description copied from interface: AudioSong
        Indicates whether this song is enabled or checked.
        Specified by:
        isEnabled in interface AudioSong
        Returns:
        true or false
      • isExplicit

        public boolean isExplicit()
        Description copied from interface: AudioSong
        Indicates whether this tracks is explicit or not.
        Specified by:
        isExplicit in interface AudioSong
        Returns:
        true or false
      • isHasVideo

        public boolean isHasVideo()
        Description copied from interface: AudioSong
        Indicates whether this track has a video.
        Specified by:
        isHasVideo in interface AudioSong
        Returns:
        true or false
      • isHD

        public boolean isHD()
        Description copied from interface: AudioSong
        Indicates whether this video content is in high definition (HD).
        Specified by:
        isHD in interface AudioSong
        Returns:
        true or false
      • isProtected

        public boolean isProtected()
        Description copied from interface: AudioSong
        Indicates whether this track is protected by some DRM scheme like Apple's FairPlay.
        Specified by:
        isProtected in interface AudioSong
        Returns:
        true or false
      • isPurchased

        public boolean isPurchased()
        Description copied from interface: AudioSong
        Indicates whether this song was purchased (via the iTunes store).
        Specified by:
        isPurchased in interface AudioSong
        Returns:
        true or false
      • isUnplayed

        public boolean isUnplayed()
        Description copied from interface: AudioSong
        Indicates whether this songs has been played at some point.
        Specified by:
        isUnplayed in interface AudioSong
        Returns:
        true or false
      • setClean

        public void setClean​(boolean clean)
        Description copied from interface: AudioSong
        Sets the "clean" flag.
        Specified by:
        setClean in interface AudioSong
        Parameters:
        clean - true or false
      • setComposer

        public void setComposer​(String composer)
        Description copied from interface: AudioSong
        Sets composer.
        Specified by:
        setComposer in interface AudioSong
        Parameters:
        composer - composer
      • setContentRating

        public void setContentRating​(String contentRating)
        Description copied from interface: AudioSong
        Sets the content rating.
        Specified by:
        setContentRating in interface AudioSong
        Parameters:
        contentRating - content rating
      • setDisabled

        public void setDisabled​(boolean disabled)
        Description copied from interface: AudioSong
        Enables/disables this song.
        Specified by:
        setDisabled in interface AudioSong
        Parameters:
        disabled - true or false
      • setDiscCount

        public void setDiscCount​(int discCount)
        Description copied from interface: AudioSong
        Set disc count.
        Specified by:
        setDiscCount in interface AudioSong
        Parameters:
        discCount - disc count
      • setDiscNumber

        public void setDiscNumber​(int discNumber)
        Description copied from interface: AudioSong
        Sets the disc number.
        Specified by:
        setDiscNumber in interface AudioSong
        Parameters:
        discNumber - disc number
      • getLyrics

        public String getLyrics()
        Description copied from interface: AudioSong
        Returns the lyrics.
        Specified by:
        getLyrics in interface AudioSong
        Returns:
        lyrics
      • setLyrics

        public void setLyrics​(String lyrics)
        Description copied from interface: AudioSong
        Sets lyrics.
        Specified by:
        setLyrics in interface AudioSong
        Parameters:
        lyrics - lyrics
      • getLyricsTermFrequencies

        public List<TermFrequency> getLyricsTermFrequencies()
        Description copied from interface: AudioSong
        Terms in this song's lyrics along with their frequency. All terms are lowercase, regular ASCII punctuation has been removed.
        Specified by:
        getLyricsTermFrequencies in interface AudioSong
        Returns:
        term frequencies
      • setRating

        public void setRating​(int rating)
        Description copied from interface: AudioSong
        Sets the rating
        Specified by:
        setRating in interface AudioSong
        Parameters:
        rating - rating between from 0 to 100
        See Also:
        AudioSong.getRating()
      • setAlbumRating

        public void setAlbumRating​(int albumRating)
        Description copied from interface: AudioSong
        Sets album rating.
        Specified by:
        setAlbumRating in interface AudioSong
        Parameters:
        albumRating - album rating
      • isPartOfGaplessAlbum

        public boolean isPartOfGaplessAlbum()
        Description copied from interface: AudioSong
        Indicates whether this songs is part of a gapless album.
        Specified by:
        isPartOfGaplessAlbum in interface AudioSong
        Returns:
        true or false
      • setPartOfGaplessAlbum

        public void setPartOfGaplessAlbum​(boolean partOfGaplessAlbum)
        Description copied from interface: AudioSong
        Sets the "gapless album" flag.
        Specified by:
        setPartOfGaplessAlbum in interface AudioSong
        Parameters:
        partOfGaplessAlbum - true or false
      • setEnabled

        public void setEnabled​(boolean enabled)
        Description copied from interface: AudioSong
        Enables/disables this song.
        Specified by:
        setEnabled in interface AudioSong
        Parameters:
        enabled - true or false
      • setEpisode

        public void setEpisode​(String episode)
        Description copied from interface: AudioSong
        Set episode name.
        Specified by:
        setEpisode in interface AudioSong
        Parameters:
        episode - episode name
      • setEpisodeOrder

        public void setEpisodeOrder​(int episodeOrder)
        Description copied from interface: AudioSong
        Set episode order.
        Specified by:
        setEpisodeOrder in interface AudioSong
        Parameters:
        episodeOrder - episode order
      • setExplicit

        public void setExplicit​(boolean explicit)
        Description copied from interface: AudioSong
        Sets the "explicit" flag.
        Specified by:
        setExplicit in interface AudioSong
        Parameters:
        explicit - true or false
      • setGrouping

        public void setGrouping​(String grouping)
        Description copied from interface: AudioSong
        Sets the grouping.
        Specified by:
        setGrouping in interface AudioSong
        Parameters:
        grouping - grouping
      • setHasVideo

        public void setHasVideo​(boolean hasVideo)
        Description copied from interface: AudioSong
        Sets the "video" flag.
        Specified by:
        setHasVideo in interface AudioSong
        Parameters:
        hasVideo - true or false
      • setHD

        public void setHD​(boolean hd)
        Description copied from interface: AudioSong
        Sets the HD flag.
        Specified by:
        setHD in interface AudioSong
        Parameters:
        hd - true or false
      • setKind

        public void setKind​(String kind)
        Description copied from interface: AudioSong
        Allows you to store a String descriptor of the kind of audio object this is. Typically this value is read-only (with AudioSong.getKind()) and set by the music player, e.g. iTunes.
        Specified by:
        setKind in interface AudioSong
        Parameters:
        kind - kind
        See Also:
        AudioSong.getKind()
      • setLocation

        public void setLocation​(String location)
        Description copied from interface: AudioSong
        Sets the location.
        Specified by:
        setLocation in interface AudioSong
        Parameters:
        location - location
      • setPlayDate

        public void setPlayDate​(long playDate)
        Description copied from interface: AudioSong
        Set play date in milliseconds since January 1, 1970, 00:00:00 GMT (NOT related to the iTunes value!).
        Specified by:
        setPlayDate in interface AudioSong
        Parameters:
        playDate - play date
      • setPlayDateUTC

        public void setPlayDateUTC​(Date playDateUTC)
        Description copied from interface: AudioSong
        Set play time.
        Specified by:
        setPlayDateUTC in interface AudioSong
        Parameters:
        playDateUTC - play time
      • setSeason

        public void setSeason​(int season)
        Description copied from interface: AudioSong
        Set season.
        Specified by:
        setSeason in interface AudioSong
        Parameters:
        season - season
      • setShow

        public void setShow​(String show)
        Description copied from interface: AudioSong
        Set show name.
        Specified by:
        setShow in interface AudioSong
        Parameters:
        show - show
      • setSkipCount

        public void setSkipCount​(int skipCount)
        Description copied from interface: AudioSong
        Set skip count.
        Specified by:
        setSkipCount in interface AudioSong
        Parameters:
        skipCount - skip count
      • setSkipDate

        public void setSkipDate​(Date skipDate)
        Description copied from interface: AudioSong
        Set skip date.
        Specified by:
        setSkipDate in interface AudioSong
        Parameters:
        skipDate - skip date
      • setSortComposer

        public void setSortComposer​(String sortComposer)
        Description copied from interface: AudioSong
        Sets the sort composer.
        Specified by:
        setSortComposer in interface AudioSong
        Parameters:
        sortComposer - sort composer
      • setSortShow

        public void setSortShow​(String sortShow)
        Description copied from interface: AudioSong
        Sets the sort show.
        Specified by:
        setSortShow in interface AudioSong
        Parameters:
        sortShow - sort show
      • setStartTime

        public void setStartTime​(int startTime)
        Description copied from interface: AudioSong
        Set start time in ms.
        Specified by:
        setStartTime in interface AudioSong
        Parameters:
        startTime - start time in ms
      • setStopTime

        public void setStopTime​(int stopTime)
        Description copied from interface: AudioSong
        Sets stop time.
        Specified by:
        setStopTime in interface AudioSong
        Parameters:
        stopTime - stop time in ms
      • setTrackNumber

        public void setTrackNumber​(int trackNumber)
        Description copied from interface: AudioSong
        Set the number of this track.
        Specified by:
        setTrackNumber in interface AudioSong
        Parameters:
        trackNumber - track number
      • setTrackType

        public void setTrackType​(AudioSong.TrackType trackType)
        Description copied from interface: AudioSong
        Field used by iTunes - typically "File" for files and "URL" for.. well, guess what?! Typically you don't set this field manually.
        Specified by:
        setTrackType in interface AudioSong
        Parameters:
        trackType - track type
        See Also:
        AudioSong.getTrackType()
      • setUnplayed

        public void setUnplayed​(boolean unplayed)
        Description copied from interface: AudioSong
        Sets unplayed.
        Specified by:
        setUnplayed in interface AudioSong
        Parameters:
        unplayed - unplayed
      • setVolumeAdjustment

        public void setVolumeAdjustment​(int volumeAdjustment)
        Description copied from interface: AudioSong
        Sets the volume adjustment
        Specified by:
        setVolumeAdjustment in interface AudioSong
        Parameters:
        volumeAdjustment - value between -255 and 255.
      • setComments

        public void setComments​(String comments)
        Description copied from interface: AudioSong
        Set comments.
        Specified by:
        setComments in interface AudioSong
        Parameters:
        comments - comments
      • setArtist

        public void setArtist​(String artist)
        Description copied from interface: AudioSong
        Sets artist.
        Specified by:
        setArtist in interface AudioSong
        Parameters:
        artist - artist
      • setAlbumArtist

        public void setAlbumArtist​(String albumArtist)
        Description copied from interface: AudioSong
        Sets the album artist.
        Specified by:
        setAlbumArtist in interface AudioSong
        Parameters:
        albumArtist - album artist
      • getSortArtist

        public String getSortArtist()
        Description copied from interface: AudioSong
        Returns the "sort artist". E.g., for "The Beatles" the sort artist is "Beatles".
        Specified by:
        getSortArtist in interface AudioSong
        Returns:
        sort artist
      • setSortArtist

        public void setSortArtist​(String sortArtist)
        Description copied from interface: AudioSong
        Sets the sort artist.
        Specified by:
        setSortArtist in interface AudioSong
        Parameters:
        sortArtist - sort artist
      • getSortAlbumArtist

        public String getSortAlbumArtist()
        Description copied from interface: AudioSong
        Returns the "sort album artist". E.g., for "The Beatles" the sort album artist is "Beatles".
        Specified by:
        getSortAlbumArtist in interface AudioSong
        Returns:
        sort album artist
      • setSortAlbumArtist

        public void setSortAlbumArtist​(String sortAlbumArtist)
        Description copied from interface: AudioSong
        Sets the sort album artist.
        Specified by:
        setSortAlbumArtist in interface AudioSong
        Parameters:
        sortAlbumArtist - sort album artist
      • getSortAlbum

        public String getSortAlbum()
        Description copied from interface: AudioSong
        Returns the "sort album". E.g., for "A Hard Day's Night" the sort album is "Hard Day's Night".
        Specified by:
        getSortAlbum in interface AudioSong
        Returns:
        sort album
      • setSortAlbum

        public void setSortAlbum​(String sortAlbum)
        Description copied from interface: AudioSong
        Sets the sort album.
        Specified by:
        setSortAlbum in interface AudioSong
        Parameters:
        sortAlbum - sort album
      • setAlbum

        public void setAlbum​(String album)
        Description copied from interface: AudioSong
        Sets album name.
        Specified by:
        setAlbum in interface AudioSong
        Parameters:
        album - album
      • setMovement

        public void setMovement​(String movement)
        Description copied from interface: AudioSong
        Classical movement.
        Specified by:
        setMovement in interface AudioSong
        Parameters:
        movement - movement
      • getMovement

        public String getMovement()
        Description copied from interface: AudioSong
        Classical movement.
        Specified by:
        getMovement in interface AudioSong
        Returns:
        movement
      • getMovementNumber

        public int getMovementNumber()
        Description copied from interface: AudioSong
        Classical movement number.
        Specified by:
        getMovementNumber in interface AudioSong
        Returns:
        movement number
      • setMovementNumber

        public void setMovementNumber​(int number)
        Description copied from interface: AudioSong
        Classical movement number.
        Specified by:
        setMovementNumber in interface AudioSong
        Parameters:
        number - number
      • getMovementCount

        public int getMovementCount()
        Description copied from interface: AudioSong
        Classical movement count.
        Specified by:
        getMovementCount in interface AudioSong
        Returns:
        count
      • setMovementCount

        public void setMovementCount​(int count)
        Description copied from interface: AudioSong
        Classical movement count.
        Specified by:
        setMovementCount in interface AudioSong
        Parameters:
        count - count
      • setWork

        public void setWork​(String work)
        Description copied from interface: AudioSong
        Classical work.
        Specified by:
        setWork in interface AudioSong
        Parameters:
        work - work
      • getWork

        public String getWork()
        Description copied from interface: AudioSong
        Classical work.
        Specified by:
        getWork in interface AudioSong
        Returns:
        work
      • getName

        public String getName()
        Description copied from interface: AudioSong
        Name of this song.
        Specified by:
        getName in interface AudioSong
        Returns:
        name
      • setName

        public void setName​(String name)
        Description copied from interface: AudioSong
        Sets name.
        Specified by:
        setName in interface AudioSong
        Parameters:
        name - name
      • setDescription

        public void setDescription​(String name)
        Description copied from interface: AudioSong
        Sets description/subtitle.
        Specified by:
        setDescription in interface AudioSong
        Parameters:
        name - description
      • getDescription

        public String getDescription()
        Description copied from interface: AudioSong
        Description/subtitle of this song.
        Specified by:
        getDescription in interface AudioSong
        Returns:
        description
      • getSortName

        public String getSortName()
        Description copied from interface: AudioSong
        Returns the "sort name". E.g., for "A Taste of Honey" the sort name is "Taste of Honey".
        Specified by:
        getSortName in interface AudioSong
        Returns:
        sort name
      • setSortName

        public void setSortName​(String sortName)
        Description copied from interface: AudioSong
        Sets the sort name.
        Specified by:
        setSortName in interface AudioSong
        Parameters:
        sortName - sort name
      • getCustom1

        public String getCustom1()
        Description copied from interface: AudioSong
        Custom field.
        Specified by:
        getCustom1 in interface AudioSong
        Returns:
        custom field
      • setCustom1

        public void setCustom1​(String value)
        Description copied from interface: AudioSong
        Custom field.
        Specified by:
        setCustom1 in interface AudioSong
        Parameters:
        value - custom field value
      • getCustom2

        public String getCustom2()
        Description copied from interface: AudioSong
        Custom field.
        Specified by:
        getCustom2 in interface AudioSong
        Returns:
        custom field
      • setCustom2

        public void setCustom2​(String value)
        Description copied from interface: AudioSong
        Custom field.
        Specified by:
        setCustom2 in interface AudioSong
        Parameters:
        value - custom field value
      • getCustom3

        public String getCustom3()
        Description copied from interface: AudioSong
        Custom field.
        Specified by:
        getCustom3 in interface AudioSong
        Returns:
        custom field
      • setCustom3

        public void setCustom3​(String value)
        Description copied from interface: AudioSong
        Custom field.
        Specified by:
        setCustom3 in interface AudioSong
        Parameters:
        value - custom field value
      • getCustom4

        public String getCustom4()
        Description copied from interface: AudioSong
        Custom field.
        Specified by:
        getCustom4 in interface AudioSong
        Returns:
        custom field
      • setCustom4

        public void setCustom4​(String value)
        Description copied from interface: AudioSong
        Custom field.
        Specified by:
        setCustom4 in interface AudioSong
        Parameters:
        value - custom field value
      • getCustom5

        public String getCustom5()
        Description copied from interface: AudioSong
        Custom field.
        Specified by:
        getCustom5 in interface AudioSong
        Returns:
        custom field
      • setCustom5

        public void setCustom5​(String value)
        Description copied from interface: AudioSong
        Custom field.
        Specified by:
        setCustom5 in interface AudioSong
        Parameters:
        value - custom field value
      • setMoodKeywords

        public void setMoodKeywords​(Set<String> moodKeywords)
        Description copied from interface: AudioSong
        Attempt to store the raw mood keywords
        Specified by:
        setMoodKeywords in interface AudioSong
        Parameters:
        moodKeywords - mood keywords
      • setISRC

        public void setISRC​(String isrc)
      • getISRC

        public String getISRC()
      • setASIN

        public void setASIN​(String asin)
      • getASIN

        public String getASIN()
      • getBarcode

        public String getBarcode()
      • setBarcode

        public void setBarcode​(String barcode)
      • getWikipediaReleaseURL

        public String getWikipediaReleaseURL()
      • setWikipediaReleaseURL

        public void setWikipediaReleaseURL​(String url)
      • getWikipediaArtistURL

        public String getWikipediaArtistURL()
      • setWikipediaArtistURL

        public void setWikipediaArtistURL​(String url)
      • getDiscogsArtistURL

        public String getDiscogsArtistURL()
      • setDiscogsArtistURL

        public void setDiscogsArtistURL​(String url)
      • getDiscogsReleaseURL

        public String getDiscogsReleaseURL()
      • setDiscogsReleaseURL

        public void setDiscogsReleaseURL​(String url)
      • getOfficialArtistURL

        public String getOfficialArtistURL()
      • setOfficialArtistURL

        public void setOfficialArtistURL​(String url)
      • getOfficialReleaseURL

        public String getOfficialReleaseURL()
      • setOfficialReleaseURL

        public void setOfficialReleaseURL​(String url)
      • setMusicIPPUID

        public void setMusicIPPUID​(String puid)
      • getMusicIPPUID

        public String getMusicIPPUID()
      • setMusicBrainzArtistId

        public void setMusicBrainzArtistId​(String id)
      • getMusicBrainzArtistId

        public String getMusicBrainzArtistId()
      • setMusicBrainzAlbumArtistId

        public void setMusicBrainzAlbumArtistId​(String id)
      • getMusicBrainzAlbumArtistId

        public String getMusicBrainzAlbumArtistId()
      • setMusicBrainzAlbumId

        public void setMusicBrainzAlbumId​(String id)
      • getMusicBrainzAlbumId

        public String getMusicBrainzAlbumId()
      • getMusicBrainzReleaseGroupId

        public String getMusicBrainzReleaseGroupId()
      • setMusicBrainzReleaseGroupId

        public void setMusicBrainzReleaseGroupId​(String id)
      • setMusicBrainzTrackId

        public void setMusicBrainzTrackId​(String id)
      • getMusicBrainzTrackId

        public String getMusicBrainzTrackId()
      • getBeatportTrackId

        public String getBeatportTrackId()
      • setYouTubeURL

        public void setYouTubeURL​(String url)
      • getYouTubeURL

        public String getYouTubeURL()
      • getLanguage

        public String getLanguage()
        Description copied from interface: AudioSong
        The language of the lyrics as ISO 639 three letter codes.
        Specified by:
        getLanguage in interface AudioSong
        Returns:
        ISO 639 three letter language code
      • setLanguage

        public void setLanguage​(String threeCharLanguageCode)
        Description copied from interface: AudioSong
        Sets the language as ISO 639 three letter code.
        Specified by:
        setLanguage in interface AudioSong
        Parameters:
        threeCharLanguageCode - ISO 639 three letter code
      • getEncoder

        public String getEncoder()
      • setKey

        public void setKey​(String key)
        Allows writing the key value in some custom format (NOT RECOMMENDED!!).
        Parameters:
        key - key
      • setTag

        protected void setTag​(org.jaudiotagger.tag.FieldKey key,
                              String value)
      • setTags

        protected void setTags​(org.jaudiotagger.tag.FieldKey key,
                               String[] values)
      • getFingerprint

        public byte[] getFingerprint()
        Returns beaTunes fingerprint.
        Specified by:
        getFingerprint in interface AudioSong
        Returns:
        acoustic fingerprint
      • setFingerprint

        public void setFingerprint​(byte[] fingerprint)
        Writes a beaTunes fingerprint
        Specified by:
        setFingerprint in interface AudioSong
        Parameters:
        fingerprint - fingerprint
      • isTransactional

        public boolean isTransactional()
        Indicates whether this object behaves transactionally.
        Returns:
        true or false
      • isDirty

        public boolean isDirty()
        Indicates whether we are in a transaction and the object has been changed, but not written yet.
        Returns:
        true or false
      • beginTransaction

        public void beginTransaction()
                              throws IOException
        Makes this AudioMetaData object transactional - i.e. any modifications are only written, once the user calls commit().
        Throws:
        IOException
        See Also:
        commit()
      • beginTransaction

        public void beginTransaction​(boolean readFresh)
                              throws IOException
        Makes this AudioMetaData object transactional - i.e. any modifications are only written, once the user calls commit().
        Parameters:
        readFresh - re-read the underlying object at the beginning of the transaction
        Throws:
        IOException
        See Also:
        commit()
      • commit

        public void commit​(boolean detectConcurrentModification)
                    throws IOException
        Writes all changes to disk.
        Parameters:
        detectConcurrentModification - throw IOException if the file was manipulated externally
        Throws:
        IOException
        See Also:
        beginTransaction(), rollback()
      • autoCommit

        protected void autoCommit()
                           throws IOException
        Called by all the setters to commit, should we not be transactional.
        Throws:
        IOException
      • getCloudStatus

        public AudioSong.CloudStatus getCloudStatus()
        Description copied from interface: AudioSong
        Returns the cloud status, if available. Note that this call may be expensive, as it requires calling the iTunes API.
        Specified by:
        getCloudStatus in interface AudioSong
        Returns:
        the status if available, null, if the feature is not supported (Windows, non-iTunes libraries, ...)
      • getLiking

        public AudioSong.Liking getLiking()
        Description copied from interface: AudioSong
        Liking. This is an expression of iTunes' loved and disliked fields.
        Specified by:
        getLiking in interface AudioSong
        Returns:
        a liking value
      • getAlbumLiking

        public AudioSong.Liking getAlbumLiking()
        Description copied from interface: AudioSong
        Is album liked. This is an expression of iTunes' album loved and album disliked fields.
        Specified by:
        getAlbumLiking in interface AudioSong
        Returns:
        liking
      • getDanceability

        public Float getDanceability()
        Description copied from interface: AudioSong
        Danceability.
        Specified by:
        getDanceability in interface AudioSong
        Returns:
        normalized positive value (0-1)
      • setDanceability

        public void setDanceability​(Float danceability)
        Description copied from interface: AudioSong
        Danceability.
        Specified by:
        setDanceability in interface AudioSong
        Parameters:
        danceability - normalized positive value (0-1)
      • setUniqueTextFrame

        protected abstract void setUniqueTextFrame​(String name,
                                                   String value)
        Sets a value as text frame, replacing any text frame with the same name/description. As example, in the context of ID3, this is a TXXX frame.
        Parameters:
        name - name
        value - value
        See Also:
        getUniqueTextFrame(String), getUniqueURLFrame(String)
      • getUniqueIntTextFrame

        protected Integer getUniqueIntTextFrame​(String key)
      • getUniqueLongTextFrame

        protected long getUniqueLongTextFrame​(String key)
      • getUniqueFloatTextFrame

        protected Float getUniqueFloatTextFrame​(String key)
      • setUniqueFloatTextFrame

        protected void setUniqueFloatTextFrame​(String key,
                                               Float value)
      • setTuning

        public void setTuning​(Integer tuning)
        Description copied from interface: AudioSong
        Sets tuning in cents (+-50).
        Specified by:
        setTuning in interface AudioSong
        Parameters:
        tuning - in cents
      • getBeatsPerMinuteAlgorithm

        public String getBeatsPerMinuteAlgorithm()
        Description copied from interface: AudioSong
        Returns the name of the algorithm used to determine the beats per minute (BPM).
        Specified by:
        getBeatsPerMinuteAlgorithm in interface AudioSong
        Returns:
        algorithm name
      • getKeyAlgorithm

        public String getKeyAlgorithm()
        Description copied from interface: AudioSong
        Returns the name of the key algorithm. May be Entered, if the key value was entered.
        Specified by:
        getKeyAlgorithm in interface AudioSong
        Returns:
        key algorithm
      • getInstrumentationAlgorithm

        public String getInstrumentationAlgorithm()
        Description copied from interface: AudioSong
        Returns the name of the instrumentation algorithm. May be Entered, if the value was entered.
        Specified by:
        getInstrumentationAlgorithm in interface AudioSong
        Returns:
        instrumentation algorithm
      • getDanceabilityAlgorithm

        public String getDanceabilityAlgorithm()
        Description copied from interface: AudioSong
        Returns the name of the danceability algorithm. May be Entered, if the value was entered.
        Specified by:
        getDanceabilityAlgorithm in interface AudioSong
        Returns:
        danceability algorithm
      • setBeatsPerMinuteAlgorithm

        public void setBeatsPerMinuteAlgorithm​(String bpmAlgorithm)
        Description copied from interface: AudioSong
        Sets the BPM algorithm.
        Specified by:
        setBeatsPerMinuteAlgorithm in interface AudioSong
        Parameters:
        bpmAlgorithm - bpm algorithm name
      • setKeyAlgorithm

        public void setKeyAlgorithm​(String keyAlgorithm)
        Description copied from interface: AudioSong
        Set the key algorithm. Should be Entered, if the value was entered manually.
        Specified by:
        setKeyAlgorithm in interface AudioSong
        Parameters:
        keyAlgorithm - key algorithm
      • setInstrumentationAlgorithm

        public void setInstrumentationAlgorithm​(String instrumentationAlgorithm)
        Description copied from interface: AudioSong
        Set the instrumentation algorithm. Should be Entered, if the value was entered manually.
        Specified by:
        setInstrumentationAlgorithm in interface AudioSong
        Parameters:
        instrumentationAlgorithm - instrumentation algorithm
      • setDanceabilityAlgorithm

        public void setDanceabilityAlgorithm​(String danceabilityAlgorithm)
        Description copied from interface: AudioSong
        Set the danceability algorithm. Should be Entered, if the value was entered manually.
        Specified by:
        setDanceabilityAlgorithm in interface AudioSong
        Parameters:
        danceabilityAlgorithm - danceability algorithm
      • getTuningAlgorithm

        public String getTuningAlgorithm()
        Description copied from interface: AudioSong
        The method the current tuning was created with.
        Specified by:
        getTuningAlgorithm in interface AudioSong
        Returns:
        tuning algorithm
      • setTuningAlgorithm

        public void setTuningAlgorithm​(String tuningAlgorithm)
        Description copied from interface: AudioSong
        Sets the tuning algorithm the current tuning value was computed with.
        Specified by:
        setTuningAlgorithm in interface AudioSong
        Parameters:
        tuningAlgorithm - tuning algorithm
      • setRMSStandardDeviation

        public void setRMSStandardDeviation​(Float standardDeviation)
        Description copied from interface: AudioSong
        Sets the standard deviation of the root mean square (RMS).
        Specified by:
        setRMSStandardDeviation in interface AudioSong
        Parameters:
        standardDeviation - standard deviation of the RMS/window
      • getRMSStandardDeviation

        public Float getRMSStandardDeviation()
        Description copied from interface: AudioSong
        Standard deviation of the root mean square energy values for windows of length ~23ms (actually 1024/44100 frames for a signal with sample rate 44.1kHz) with a hopsize of half a window. Only the first 120 seconds of the audio are considered, the rest is discarded.
        Specified by:
        getRMSStandardDeviation in interface AudioSong
        Returns:
        standard deviation of the RMS for the first 120 seconds
        See Also:
        Floats.rootMeanSquare(float[]), AudioSong.getRMSMean()
      • setRMSMean

        public void setRMSMean​(Float average)
        Description copied from interface: AudioSong
        Sets the average RMS for the first 120 seconds of this song.
        Specified by:
        setRMSMean in interface AudioSong
        Parameters:
        average - averaged RMS
        See Also:
        AudioSong.getRMSMean()
      • getSpectralNoveltyMean

        public Float getSpectralNoveltyMean()
        Description copied from interface: AudioSong
        Average of the spectral novelty values computed for windows of length 23.22ms, with a hopsize of half a window. Only the first 120 seconds of the signal are considered, the rest is discarded.
        Specified by:
        getSpectralNoveltyMean in interface AudioSong
        Returns:
        average spectral novelty
      • setSpectralFluctuationPeak

        public void setSpectralFluctuationPeak​(Float peak)
        Description copied from interface: AudioSong
        Peak of the spectral fluctuation values computed for windows of length 23.22ms, with a hopsize of half a window. Only the first 120 seconds of the signal are considered, the rest is discarded.
        Specified by:
        setSpectralFluctuationPeak in interface AudioSong
        Parameters:
        peak - peak in an averaged fluctuation spectrum
        See Also:
        AudioSong.getSpectralFluctuationPeak()
      • getMoodAlgorithm

        public String getMoodAlgorithm()
        Description copied from interface: AudioSong
        The method the associated mood value was created with.
        Specified by:
        getMoodAlgorithm in interface AudioSong
        Returns:
        mood algorithm
      • setMoodAlgorithm

        public void setMoodAlgorithm​(String moodAlgorithm)
        Description copied from interface: AudioSong
        Sets the method the current mood value was created with.
        Specified by:
        setMoodAlgorithm in interface AudioSong
        Parameters:
        moodAlgorithm - mood algorithm
      • getBeatsAlgorithm

        public String getBeatsAlgorithm()
        Description copied from interface: AudioSong
        Method the beats were computed with.
        Specified by:
        getBeatsAlgorithm in interface AudioSong
        Returns:
        algorithm the beats were computed with
      • setBeatsAlgorithm

        public void setBeatsAlgorithm​(String beatsAlgorithm)
        Description copied from interface: AudioSong
        Sets the algorithm the beats were computed with.
        Specified by:
        setBeatsAlgorithm in interface AudioSong
        Parameters:
        beatsAlgorithm - beats algorithm
      • setSimilaritiesAlgorithm

        public void setSimilaritiesAlgorithm​(String similaritiesAlgorithm)
        Description copied from interface: AudioSong
        Sets the algorithm the similarities were computed with.
        Specified by:
        setSimilaritiesAlgorithm in interface AudioSong
        Parameters:
        similaritiesAlgorithm - similarities algorithm
      • getSimilaritiesAlgorithm

        public String getSimilaritiesAlgorithm()
        Description copied from interface: AudioSong
        Method the similarities were computed with.
        Specified by:
        getSimilaritiesAlgorithm in interface AudioSong
        Returns:
        algorithm the similarities were computed with
      • getTimeSignatureAlgorithm

        public String getTimeSignatureAlgorithm()
        Description copied from interface: AudioSong
        Method the time signature was computed with.
        Specified by:
        getTimeSignatureAlgorithm in interface AudioSong
        Returns:
        algorithm the time signature was computed with
      • setTimeSignatureAlgorithm

        public void setTimeSignatureAlgorithm​(String timeSignatureAlgorithm)
        Description copied from interface: AudioSong
        Sets the algorithm the time signature was computed with.
        Specified by:
        setTimeSignatureAlgorithm in interface AudioSong
        Parameters:
        timeSignatureAlgorithm - time signature algorithm
      • setSegmentsAlgorithm

        public void setSegmentsAlgorithm​(String segmentsAlgorithm)
        Description copied from interface: AudioSong
        Sets the algorithm the segments were computed with.
        Specified by:
        setSegmentsAlgorithm in interface AudioSong
        Parameters:
        segmentsAlgorithm - segments algorithm
      • getSegmentsAlgorithm

        public String getSegmentsAlgorithm()
        Description copied from interface: AudioSong
        Method the segments were computed with.
        Specified by:
        getSegmentsAlgorithm in interface AudioSong
        Returns:
        algorithm the segments were computed with
      • setMood

        public void setMood​(Mood mood)
        Description copied from interface: AudioSong
        Sets this song's mood.
        Specified by:
        setMood in interface AudioSong
        Parameters:
        mood - mood
      • getMood

        public Mood getMood()
        Description copied from interface: AudioSong
        The song's mood.
        Specified by:
        getMood in interface AudioSong
        Returns:
        mood
      • setTimeSignature

        public void setTimeSignature​(TimeSignature timeSignature)
        Description copied from interface: AudioSong
        Sets this song's time signature.
        Specified by:
        setTimeSignature in interface AudioSong
        Parameters:
        timeSignature - time signature
      • setBeats

        public void setBeats​(Beats beats)
        Description copied from interface: AudioSong
        Sets this song's beats.
        Specified by:
        setBeats in interface AudioSong
        Parameters:
        beats - beats
      • getBeats

        public Beats getBeats()
        Description copied from interface: AudioSong
        The song's beats.
        Specified by:
        getBeats in interface AudioSong
        Returns:
        beats
      • setSimilarities

        public void setSimilarities​(Similarities similarities)
        Description copied from interface: AudioSong
        Sets this song's similarities.
        Specified by:
        setSimilarities in interface AudioSong
        Parameters:
        similarities - similarities
      • setSegments

        public void setSegments​(Segments segments)
        Description copied from interface: AudioSong
        Sets this song's segments.
        Specified by:
        setSegments in interface AudioSong
        Parameters:
        segments - segments
      • getLoudness

        public Loudness getLoudness()
        Description copied from interface: AudioSong
        The song's loudness curve.
        Specified by:
        getLoudness in interface AudioSong
        Returns:
        loudness
      • setLoudness

        public void setLoudness​(Loudness loudness)
        Description copied from interface: AudioSong
        Sets this song's loudness curve.
        Specified by:
        setLoudness in interface AudioSong
      • setColor

        public void setColor​(Color color)
        Description copied from interface: AudioSong
        Sets the color.
        Specified by:
        setColor in interface AudioSong
        Parameters:
        color - color
      • getColor

        public Color getColor()
        Description copied from interface: AudioSong
        Returns the color.
        Specified by:
        getColor in interface AudioSong
        Returns:
        color
      • setTempoColor

        public void setTempoColor​(Color color)
        Description copied from interface: AudioSong
        Sets this song's tempo color.
        Specified by:
        setTempoColor in interface AudioSong
        Parameters:
        color - color
      • setTempoTimbreColor

        public void setTempoTimbreColor​(Color color)
        Description copied from interface: AudioSong
        Sets this song's tempo-timbre color.
        Specified by:
        setTempoTimbreColor in interface AudioSong
        Parameters:
        color - color
      • setSpectrum

        public void setSpectrum​(com.tagtraum.audiokern.timbre.BarkSpectrum spectrum)
        Description copied from interface: AudioSong
        Sets the bark spectrum.
        Specified by:
        setSpectrum in interface AudioSong
        Parameters:
        spectrum - bark spectrum
      • setTempoSpectrum

        public void setTempoSpectrum​(com.tagtraum.audiokern.bpm.TempoSpectrum spectrum)
        Description copied from interface: AudioSong
        Sets the tempo spectrum.
        Specified by:
        setTempoSpectrum in interface AudioSong
        Parameters:
        spectrum - tempo spectrum
      • setTags

        public void setTags​(Set<String> tags)
        Description copied from interface: AudioSong
        Sets a new set of tags.
        Specified by:
        setTags in interface AudioSong
        Parameters:
        tags - set of strings
      • getTempo

        public com.tagtraum.audiokern.bpm.Tempo getTempo()
        Description copied from interface: AudioSong
        Returns tempo.
        Specified by:
        getTempo in interface AudioSong
        Returns:
        tempo
      • setTempo

        public void setTempo​(com.tagtraum.audiokern.bpm.Tempo tempo)
        Description copied from interface: AudioSong
        Sets the tempo.
        Specified by:
        setTempo in interface AudioSong
        Parameters:
        tempo - tempo
      • getITunNORM

        protected abstract com.tagtraum.audiokern.audiometadata.ITunNORM getITunNORM()
      • setITunNORM

        protected abstract void setITunNORM​(com.tagtraum.audiokern.audiometadata.ITunNORM iTunNORM)
      • setAlbumReplayGain

        public void setAlbumReplayGain​(ReplayGain replayGain,
                                       boolean updateITunNorm)
        Description copied from interface: AudioSong
        Sets the replay gain for this album.
        Specified by:
        setAlbumReplayGain in interface AudioSong
        Parameters:
        replayGain - replay gain
        updateITunNorm - update the iTunNorm field with the given value
        See Also:
        AudioSong.getAlbumReplayGain()
      • getTrackReplayGainFromITunNORM

        protected ReplayGain getTrackReplayGainFromITunNORM()
      • getExecutorService

        public static ExecutorService getExecutorService()
        Special ExecutorService for synchronizing access to audiometadata resources. This service is single-threaded.

        Note that the simpler methods like ExecutorService.submit(Runnable), Executor.execute(Runnable) or ExecutorService.submit(Callable) execute runnables and callables out of order, if you are already in the executor's thread. In other words, typically tasks are queued (i.e. executed in order), but when you are already in the executor thread, your task is executed right away (i.e. executed out of order).

        Returns:
        executor service
      • invokeLater

        public static Future<?> invokeLater​(Runnable runnable)
        Executes the runnable asynchronously in the executor thread.
        Parameters:
        runnable - runnable
        Returns:
        future