Class Song
- java.lang.Object
-
- com.tagtraum.beatunes.library.Song
-
- All Implemented Interfaces:
AudioSong,Matchable<PlayList.SubstringFilterProperty>,Serializable
@Entity public class Song extends Object implements Matchable<PlayList.SubstringFilterProperty>, Serializable, AudioSong
Song object that represents song data in beaTunes' own database, theMediaLibrary. Modifications to instances have to persisted by calling e.g.MediaLibrary.store(AudioSong, String). Storing modifications in beaTunes' database does not automatically store those modifications in iTunes or the audio file. SeeTrack. Some methods only act as facade forSongAnnotation.- Author:
- Hendrik Schreiber
- See Also:
SongAnnotation, Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.tagtraum.audiokern.AudioSong
AudioSong.CloudStatus, AudioSong.Instrumentation, AudioSong.Liking, AudioSong.MediaKind, AudioSong.TrackType
-
-
Field Summary
-
Fields inherited from interface com.tagtraum.audiokern.AudioSong
ACOUSTIC_NAMES, ELECTRONIC_NAMES
-
-
Constructor Summary
Constructors Constructor Description Song()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddArtwork(AudioArtwork audioArtwork)Adds an artwork/image to the audio song.voidaddPropertyChangeListener(PropertyChangeListener propertyChangeListener)Lets you add a property change listener to this song.voidaddPropertyChangeListener(String property, PropertyChangeListener propertyChangeListener)Lets you add a property change listener to this song.booleancanWrite()Checks whether the file corresponding to this song can in principal be written to.SongAnnotationcreateSongAnnotation()Creates and associates aSongAnnotationwith this Song, if no annotation exists yet.voiddownload()Allows downloading of shared (e.g.booleanequals(Object obj)StringgetAlbum()Get Album.StringgetAlbumArtist()Get album artist.Set<AudioId>getAlbumIds()Get album ids.AudioSong.LikinggetAlbumLiking()Is album liked.intgetAlbumRating()Get album rating.ReplayGaingetAlbumReplayGain()Replay gain for this album.StringgetArtist()Get artist.Set<AudioId>getArtistIds()Get artists ids.intgetArtworkCount()Get artwork count.AudioArtwork[]getArtworks()Artwork belonging to this song.AudioMetaDatagetAudioMetaData()Gets some audio meta data for this song from the actual file.AudioMetaDatagetAudioMetaData(boolean fresh)Gets some audio meta data for this song from the actual file.ImagegetBackCoverImage()Returns the first front cover image.BeatsgetBeats()The song's beats.StringgetBeatsAlgorithm()Method the beats were computed with.floatgetBeatsPerMinute()Beats per minute (BPM).StringgetBeatsPerMinuteAlgorithm()Returns the name of the algorithm used to determine the beats per minute (BPM).intgetBitRate()Bit rate.AudioSong.CloudStatusgetCloudStatus()Returns the cloud status, if available.ColorgetColor()Returns the color.StringgetComments()Get comments.StringgetComposer()Get composer(s).StringgetContentRating()Returns the content rating.StringgetCustom1()Custom field.StringgetCustom2()Custom field.StringgetCustom3()Custom field.StringgetCustom4()Custom field.StringgetCustom5()Custom field.FloatgetDanceability()Danceability.StringgetDanceabilityAlgorithm()Returns the name of the danceability algorithm.DategetDateAdded()Get date the song was added to the library.DategetDateAnalyzed()Date the song was last analyzed.DategetDateModified()Get date of last modification.StringgetDescription()Description/subtitle of this song.intgetDiscCount()Assuming that this song is on a disc that is part of a disc collection, return the number of discs in this collection.intgetDiscNumber()Get the disc number.StringgetEpisode()Get episode name.intgetEpisodeOrder()Episode order.StringgetEqualizer()PathgetFile(boolean refresh)File of this track.intgetFileCreator()intgetFileFolderCount()intgetFileType()byte[]getFingerprint()Acoustic fingerprint.floatgetFinish()Stop time of the song in seconds.ImagegetFrontCoverImage()Returns the first front cover image.StringgetGenre()Get genre.StringgetGrouping()Get grouping.LonggetId()Persistent id.ImagegetImage()First artwork image.Image[]getImages()All images.<T> TgetImplementation(Class<T> klass)AudioSongobjects are sometimes implemented by an object that acts as a facade to other AudioSong objects.List<AudioSong>getImplementations()Returns implementations of this interface instance.AudioSong.InstrumentationgetInstrumentation()Indicates whether this song qualifies as "electronic" or "acoustic".StringgetInstrumentationAlgorithm()Returns the name of the instrumentation algorithm.intgetITunesPropertiesHashCode()Hash code for the iTunes parts of this song.KeygetKey()Return the tonal key of this song.StringgetKeyAlgorithm()Returns the name of the key algorithm.StringgetKind()Kind of audio, e.g.StringgetLanguage()The language of the lyrics as ISO 639 three letter codes.intgetLibraryFolderCount()AudioSong.LikinggetLiking()Liking.StringgetLocation(boolean refresh)Location of this track.LoudnessgetLoudness()The song's loudness curve.StringgetLyrics()Returns the lyrics.List<TermFrequency>getLyricsTermFrequencies()Terms in this song's lyrics along with their frequency.floatgetMeasuresPerMinute()Measures (bars) per minute.AudioSong.MediaKindgetMediaKind()Media kind of this object.MoodgetMood()The song's mood.StringgetMoodAlgorithm()The method the associated mood value was created with.Set<String>getMoodKeywords()Get raw mood keywords.StringgetMovement()Classical movement.intgetMovementCount()Classical movement count.intgetMovementNumber()Classical movement number.StringgetName()Name of this song.StringgetPath()Path.intgetPlayCount()Get the number of times the song was played.longgetPlayDate()Get time the song was last played.DategetPlayDateUTC()Get play date.doublegetPlayFrequency()Played per 100 days.LonggetPlaylistId()The id of the playlist this song object stems from.Collection<PlayList>getPlayLists()Returns playlists the song belongs to.doublegetPlaySkipRatio()Play/Skip ratio.floatgetPopularity()Popularity as a value between 0 and 1.PropertyChangeListener[]getPropertyChangeListeners()PropertyChangeListener[]getPropertyChangeListeners(String property)intgetRating()Value ranging from 0-100, 100 being best.FloatgetRelativeSpectralEntropyMean()Average of relative entropy values computed for windows of length 1.486s with a hopsize of half a window.DategetReleaseDate()Release year (corresponds to id3 TDRL).intgetReleaseYear()floatgetRemoteDisliked()Indicates, what percentage of people "dislike" this song.floatgetRemoteLoved()Indicates, what percentage of people "love" this song.floatgetRemotePlayFrequency()Average of play frequencies as reported by users.floatgetRemotePlaySkipRatio()Play/skip ratio by all users with this song.intgetRemoteRating()Average of other people's ratings.DategetRemoteUpdateDate()Time the remote properties of this song were last updated.FloatgetRMSMean()Root mean square (RMS) of the signal's energy, averaged over windows of length ~23ms (actually 1024/44100 frames for a signal with sample rate 44.1kHz, i.e.FloatgetRMSStandardDeviation()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.intgetSampleRate()Get sample rate in Hz.intgetSeason()Get season number.SegmentsgetSegments()The song's segments.StringgetSegmentsAlgorithm()Method the segments were computed with.StringgetShow()Name of a show, suitable for TV shows.SimilaritiesgetSimilarities()The song's similarities.StringgetSimilaritiesAlgorithm()Method the similarities were computed with.longgetSize()File size.intgetSkipCount()Get skip count.DategetSkipDate()Get skip date.SongAnnotationgetSongAnnotation()AudioSongLocationgetSongLocation()StringgetSortAlbum()Returns the "sort album".StringgetSortAlbumArtist()Returns the "sort album artist".StringgetSortArtist()Returns the "sort artist".StringgetSortComposer()Returns the sort composer.StringgetSortName()Returns the "sort name".StringgetSortShow()Returns the sort show.FloatgetSpectralCentroidMean()Average of the spectral centroids computed for individual windows of length ~23.22ms with a hopsize of half a window length.FloatgetSpectralFluctuationPeak()Peak of the averaged spectral fluctuation values computed for windows of length 23.22ms, with a hopsize of half a window.FloatgetSpectralFluxMean()Average of the spectral flux values computed for windows of length 23.22ms, with a hopsize of half a window.FloatgetSpectralNoveltyMean()Average of the spectral novelty values computed for windows of length 23.22ms, with a hopsize of half a window.FloatgetSpectralSpreadMean()Average of the spectral spread values computed for windows of length 23.22ms, with a hopsize of half a window.FloatgetSpectralVariabilityMean()Average of the spectral variability values computed for windows of length 23.22ms, with a hopsize of half a window.com.tagtraum.audiokern.timbre.BarkSpectrumgetSpectrum()Returns the bark spectrum.floatgetStart()Start time of the song in seconds.intgetStartTime()Start time of the song in ms.intgetStopTime()Stop time of the song in ms.Set<String>getTags()Returns a set of tags associated with this song.com.tagtraum.audiokern.bpm.TempogetTempo()Returns tempo.ColorgetTempoColor()Projection ofAudioSong.getTempoSpectrum()to a color.com.tagtraum.audiokern.bpm.TempoSpectrumgetTempoSpectrum()Returns the tempo spectrum.ColorgetTempoTimbreColor()Projection ofAudioSong.getTempoSpectrum()andAudioSong.getSpectrum()to a color.TimeSignaturegetTimeSignature()The song's time signature.StringgetTimeSignatureAlgorithm()Method the time signature was computed with.intgetTotalTime()Total length of the song in ms.intgetTrackCount()Number of tracks on album/release/recording.intgetTrackID()Set<AudioId>getTrackIds()Returns track ids.intgetTrackNumber()Get the number of the track on the release/album/recording.ReplayGaingetTrackReplayGain()Replay gain for this track (not taking other tracks in an album into account).AudioSong.TrackTypegetTrackType()Track type.IntegergetTuning()Tuning in cents.StringgetTuningAlgorithm()The method the current tuning was created with.intgetVideoHeight()intgetVideoWidth()intgetVolumeAdjustment()Value between -255 and 255.StringgetWork()Classical work.intgetYear()Release year - (corresponds to id3 TDRC, recording time).inthashCode()booleanhasProtectedFileExtension()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.voidinit(AudioSong song)booleanisAlbumRatingComputed()Indicates whether the value returned byAudioSong.getAlbumRating()was computed or set manually.booleanisClean()Indicates whether this song is "clean" - whatever that means.booleanisCompilation()Indicates whether this track is part of a compilation.booleanisDisabled()Indicates whether this song is disabled or unchecked.booleanisEnabled()Indicates whether this song is enabled or checked.booleanisExplicit()Indicates whether this tracks is explicit or not.booleanisHasVideo()Indicates whether this track has a video.booleanisHD()Indicates whether this video content is in high definition (HD).booleanisPartOfGaplessAlbum()Indicates whether this songs is part of a gapless album.booleanisProtected()booleanisPurchased()Indicates whether this song was purchased (via the iTunes store).booleanisRatingComputed()Indicates whether the value returned byAudioSong.getRating()was computed or set manually.booleanisShared()Indicates whether this track is a shared track, i.e.booleanisUnplayed()Indicates whether this songs has been played at some point.booleanmatches(Pattern[] patterns, PlayList.SubstringFilterProperty searchMode)True if this object matches all provided patters (logical AND).voidremovePropertyChangeListener(PropertyChangeListener listener)Lets you remove a property change listener to this song.voidremovePropertyChangeListener(String property, PropertyChangeListener listener)Lets you remove a property change listener to this song.voidsetAlbum(String album)Sets album name.voidsetAlbumArtist(String albumArtist)Sets the album artist.voidsetAlbumDisliked(boolean disliked)voidsetAlbumLiking(AudioSong.Liking value)Set album liking.voidsetAlbumLoved(boolean loved)voidsetAlbumRating(int value)Sets album rating.voidsetAlbumRatingComputed(boolean albumRatingComputed)voidsetAlbumReplayGain(ReplayGain replayGain)Sets the replay gain for this album.voidsetAlbumReplayGain(ReplayGain value, boolean updateITunNorm)Sets the replay gain for this album.voidsetAlertTone(boolean value)voidsetArtist(String artist)Sets artist.voidsetArtworkCount(int value)voidsetArtworks(AudioArtwork... artworks)Set artworks belonging to this track.voidsetAudiobook(boolean value)voidsetBackCoverArtwork(File... backCover)Replace all back covers with the given files.voidsetBeats(Beats value)Sets this song's beats.voidsetBeatsAlgorithm(String value)Sets the algorithm the beats were computed with.voidsetBeatsPerMinute(float value)Sets beats per minute.voidsetBeatsPerMinute(int value)voidsetBeatsPerMinuteAlgorithm(String value)Sets the BPM algorithm.voidsetBitRate(int value)voidsetBook(boolean value)voidsetClean(boolean value)Sets the "clean" flag.voidsetCloudStatus(AudioSong.CloudStatus cloudStatus)voidsetColor(Color value)Sets the color.voidsetComments(String comments)Set comments.voidsetCompilation(boolean value)Marks this song as part of a compilation (or not).voidsetComposer(String composer)Sets composer.voidsetContentRating(String value)Sets the content rating.voidsetCustom1(String value)Custom field.voidsetCustom2(String value)Custom field.voidsetCustom3(String value)Custom field.voidsetCustom4(String value)Custom field.voidsetCustom5(String value)Custom field.voidsetDanceability(Float value)Danceability.voidsetDanceabilityAlgorithm(String value)Set the danceability algorithm.voidsetDateAdded(Date value)voidsetDateAnalyzed(Date value)Sets the date this song was last analyzed.voidsetDateModified(Date value)voidsetDescription(String description)Sets description/subtitle.voidsetDisabled(boolean value)Enables/disables this song.voidsetDiscCount(int value)Set disc count.voidsetDiscNumber(int value)Sets the disc number.voidsetDisliked(boolean disliked)voidsetEnabled(boolean enabled)Enables/disables this song.voidsetEpisode(String episode)Set episode name.voidsetEpisodeOrder(int value)Set episode order.voidsetEqualizer(String equalizer)voidsetExplicit(boolean value)Sets the "explicit" flag.voidsetFileCreator(int value)voidsetFileFolderCount(int value)voidsetFileType(int value)voidsetFingerprint(byte[] fingerprint)Sets the acoustic fingerprint.voidsetFinish(float finish)Sets the stop time in seconds.voidsetFrontCoverArtwork(File... frontCover)Replace all front covers with the given files.voidsetGenre(String genre)Sets genre.voidsetGrouping(String grouping)Sets the grouping.voidsetHasVideo(boolean value)Sets the "video" flag.voidsetHD(boolean value)Sets the HD flag.voidsetHomeVideo(boolean value)voidsetId(Long value)voidsetId(String value)voidsetInstrumentation(AudioSong.Instrumentation instrumentation)Sets the instrumentation property.voidsetInstrumentationAlgorithm(String instrumentationAlgorithm)Set the instrumentation algorithm.voidsetITunesPropertiesHashCode(int value)voidsetiTunesU(boolean value)voidsetKey(Key value)Sets the tonal key.voidsetKeyAlgorithm(String value)Set the key algorithm.voidsetKind(String kind)Allows you to store a String descriptor of the kind of audio object this is.voidsetLanguage(String value)Sets the language as ISO 639 three letter code.voidsetLibraryFolderCount(int value)voidsetLiking(AudioSong.Liking value)Set liking.voidsetLocation(String location)Sets the location.voidsetLoudness(Loudness value)Sets this song's loudness curve.voidsetLoved(boolean loved)voidsetLyrics(String lyrics)Sets lyrics.voidsetMatched(boolean value)voidsetMediaKind(AudioSong.MediaKind value)Set the kind of media, e.g.voidsetMood(Mood value)Sets this song's mood.voidsetMoodAlgorithm(String value)Sets the method the current mood value was created with.voidsetMoodKeywords(Set<String> moodKeywords)Persistent storage in database is not supported yet.voidsetMovement(String movement)Classical movement.voidsetMovementCount(int value)Classical movement count.voidsetMovementNumber(int value)Classical movement number.voidsetMovie(boolean value)voidsetMusic(boolean value)voidsetMusicVideo(boolean value)voidsetName(String name)Sets name.voidsetPartOfGaplessAlbum(boolean value)Sets the "gapless album" flag.voidsetPlayCount(int value)Set play count.voidsetPlayDate(long value)Set play date in milliseconds since January 1, 1970, 00:00:00 GMT (NOT related to the iTunes value!).voidsetPlayDateUTC(Date value)Set play time.voidsetPlaylistId(Long value)Typically not called by the user, but by the applicationvoidsetPodcast(boolean value)voidsetPopularity(float value)Sets the value locally.voidsetProtected(boolean value)voidsetPurchased(boolean value)voidsetRating(int value)Sets the ratingvoidsetRatingComputed(boolean ratingComputed)voidsetRelativeSpectralEntropyMean(Float value)Sets the average relative spectral entropy.voidsetReleaseDate(Date value)Set release date.voidsetRemoteDisliked(float value)Sets the value locally.voidsetRemoteLoved(float value)Sets the value locally.voidsetRemotePlayFrequency(float value)Sets the value locally.voidsetRemotePlaySkipRatio(float value)Sets the value locally.voidsetRemoteRating(int value)Sets the value locally.voidsetRemoteUpdateDate(Date value)Sets the date that marks the last update of remote properties.voidsetRingTone(boolean value)voidsetRMSMean(Float value)Sets the average RMS for the first 120 seconds of this song.voidsetRMSStandardDeviation(Float value)Sets the standard deviation of the root mean square (RMS).voidsetSampleRate(int value)voidsetSeason(int value)Set season.voidsetSegments(Segments value)Sets this song's segments.voidsetSegmentsAlgorithm(String value)Sets the algorithm the segments were computed with.voidsetShow(String show)Set show name.voidsetSimilarities(Similarities value)Sets this song's similarities.voidsetSimilaritiesAlgorithm(String value)Sets the algorithm the similarities were computed with.voidsetSize(long value)voidsetSkipCount(int value)Set skip count.voidsetSkipDate(Date value)Set skip date.voidsetSongAnnotation(SongAnnotation songAnnotation)voidsetSortAlbum(String sortAlbum)Sets the sort album.voidsetSortAlbumArtist(String sortAlbumArtist)Sets the sort album artist.voidsetSortArtist(String sortArtist)Sets the sort artist.voidsetSortComposer(String sortComposer)Sets the sort composer.voidsetSortName(String sortName)Sets the sort name.voidsetSortShow(String sortShow)Sets the sort show.voidsetSpectralCentroidMean(Float value)Sets the mean of the spectral centroids.voidsetSpectralFluctuationPeak(Float value)Peak of the spectral fluctuation values computed for windows of length 23.22ms, with a hopsize of half a window.voidsetSpectralFluxMean(Float value)Sets the mean spectral flux.voidsetSpectralNoveltyMean(Float value)Sets the average spectral novelty.voidsetSpectralSpreadMean(Float value)Sets the average spectral spread.voidsetSpectralVariabilityMean(Float value)Sets the mean spectral variability.voidsetSpectrum(com.tagtraum.audiokern.timbre.BarkSpectrum value)Sets the bark spectrum.voidsetStart(float start)Sets the start time in seconds.voidsetStartTime(int value)Set start time in ms.voidsetStopTime(int value)Sets stop time.voidsetTags(Set<String> tags)Sets a new set of tags.voidsetTempo(com.tagtraum.audiokern.bpm.Tempo value)Sets the tempo.voidsetTempoColor(Color value)Sets this song's tempo color.voidsetTempoSpectrum(com.tagtraum.audiokern.bpm.TempoSpectrum value)Sets the tempo spectrum.voidsetTempoTimbreColor(Color value)Sets this song's tempo-timbre color.voidsetTimeSignature(TimeSignature value)Sets this song's time signature.voidsetTimeSignatureAlgorithm(String value)Sets the algorithm the time signature was computed with.voidsetTotalTime(int value)voidsetTrackCount(int trackCount)Set track countvoidsetTrackID(int value)voidsetTrackNumber(int value)Set the number of this track.voidsetTrackReplayGain(ReplayGain replayGain)Sets the replay gain for this track, not taking other tracks of the album into account.voidsetTrackReplayGain(ReplayGain value, boolean updateITunNorm)Sets the replay gain for this track, not taking other tracks of the album into account.voidsetTrackType(AudioSong.TrackType value)Field used by iTunes - typicallyAudioSong.TrackType.FILEfor files andAudioSong.TrackType.URLfor..voidsetTrackType(String value)voidsetTuning(Integer value)Sets tuning in cents (+-50).voidsetTuningAlgorithm(String value)Sets the tuning algorithm the current tuning value was computed with.voidsetTvShow(boolean value)voidsetUnplayed(boolean value)Sets unplayed.voidsetVideoHeight(int value)voidsetVideoWidth(int value)voidsetVoiceMemo(boolean value)voidsetVolumeAdjustment(int value)Sets the volume adjustmentvoidsetWork(String work)Classical work.voidsetYear(int value)Sets the year.StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.tagtraum.audiokern.AudioSong
addBackCoverArtwork, addFrontCoverArtwork, getFile, getInstrumentationBasedOnGenreAndTags, getLocation, getPurchaseURL, getSyncTempoKey, getSyncTempoTuning, isAcousticBasedOnGenreTitleAndTags, isElectronicBasedOnGenreAndTags, refreshFromFile
-
-
-
-
Method Detail
-
init
public void init(AudioSong song)
-
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener propertyChangeListener)
Description copied from interface:AudioSongLets you add a property change listener to this song. This is an optional feature and may lead to exceptions.- Specified by:
addPropertyChangeListenerin interfaceAudioSong- Parameters:
propertyChangeListener- property change listener- See Also:
PropertyChangeSupport.addPropertyChangeListener(java.beans.PropertyChangeListener)
-
addPropertyChangeListener
public void addPropertyChangeListener(String property, PropertyChangeListener propertyChangeListener)
Description copied from interface:AudioSongLets you add a property change listener to this song. This is an optional feature and may lead to exceptions.- Specified by:
addPropertyChangeListenerin interfaceAudioSong- Parameters:
property- property namepropertyChangeListener- property change listener- See Also:
PropertyChangeSupport.addPropertyChangeListener(java.beans.PropertyChangeListener)
-
removePropertyChangeListener
public void removePropertyChangeListener(String property, PropertyChangeListener listener)
Description copied from interface:AudioSongLets you remove a property change listener to this song. This is an optional feature and may lead to exceptions.- Specified by:
removePropertyChangeListenerin interfaceAudioSong- Parameters:
property- property namelistener- property change listener- See Also:
PropertyChangeSupport.removePropertyChangeListener(PropertyChangeListener)
-
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
Description copied from interface:AudioSongLets you remove a property change listener to this song. This is an optional feature and may lead to exceptions.- Specified by:
removePropertyChangeListenerin interfaceAudioSong- Parameters:
listener- property change listener- See Also:
PropertyChangeSupport.removePropertyChangeListener(PropertyChangeListener)
-
getPropertyChangeListeners
public PropertyChangeListener[] getPropertyChangeListeners(String property)
- Specified by:
getPropertyChangeListenersin interfaceAudioSong- See Also:
PropertyChangeSupport.getPropertyChangeListeners(String)
-
getPropertyChangeListeners
public PropertyChangeListener[] getPropertyChangeListeners()
- Specified by:
getPropertyChangeListenersin interfaceAudioSong- See Also:
PropertyChangeSupport.getPropertyChangeListeners()
-
download
public void download()
Description copied from interface:AudioSongAllows downloading of shared (e.g. podcasts) or iCloud tracks. May not be available on Windows.
You may be notified of a change in download status of a track by registering a
PropertyChangeListenerfor one of the propertiesshared,trackTypeorlocation.- Specified by:
downloadin interfaceAudioSong- See Also:
AudioSong.isShared(),AudioSong.getTrackType(),AudioSong.getCloudStatus()
-
isShared
public boolean isShared()
Description copied from interface:AudioSongIndicates 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.
-
getCloudStatus
public AudioSong.CloudStatus getCloudStatus()
Description copied from interface:AudioSongReturns the cloud status, if available. Note that this call may be expensive, as it requires calling the iTunes API.- Specified by:
getCloudStatusin interfaceAudioSong- Returns:
- the status if available,
null, if the feature is not supported (Windows, non-iTunes libraries, ...)
-
setCloudStatus
public void setCloudStatus(AudioSong.CloudStatus cloudStatus)
-
getPlayLists
public Collection<PlayList> getPlayLists()
Returns playlists the song belongs to.- Returns:
- playlists
-
getSongAnnotation
public SongAnnotation getSongAnnotation()
-
setSongAnnotation
public void setSongAnnotation(SongAnnotation songAnnotation)
-
createSongAnnotation
public SongAnnotation createSongAnnotation()
Creates and associates aSongAnnotationwith this Song, if no annotation exists yet.- Returns:
- a SongAnnotation associated with this Song
-
getImplementation
public <T> T getImplementation(Class<T> klass)
Description copied from interface:AudioSongAudioSongobjects 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:
getImplementationin interfaceAudioSong- 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)
-
getImplementations
public List<AudioSong> getImplementations()
Description copied from interface:AudioSongReturns implementations of this interface instance.- Specified by:
getImplementationsin interfaceAudioSong- Returns:
- implementations
- See Also:
AudioSong.getImplementation(Class)
-
getDescription
public String getDescription()
Description copied from interface:AudioSongDescription/subtitle of this song.- Specified by:
getDescriptionin interfaceAudioSong- Returns:
- description
-
setDescription
public void setDescription(String description)
Description copied from interface:AudioSongSets description/subtitle.- Specified by:
setDescriptionin interfaceAudioSong- Parameters:
description- description
-
setWork
public void setWork(String work)
Description copied from interface:AudioSongClassical work.
-
getMovement
public String getMovement()
Description copied from interface:AudioSongClassical movement.- Specified by:
getMovementin interfaceAudioSong- Returns:
- movement
-
setMovement
public void setMovement(String movement)
Description copied from interface:AudioSongClassical movement.- Specified by:
setMovementin interfaceAudioSong- Parameters:
movement- movement
-
getMovementNumber
public int getMovementNumber()
Description copied from interface:AudioSongClassical movement number.- Specified by:
getMovementNumberin interfaceAudioSong- Returns:
- movement number
-
setMovementNumber
public void setMovementNumber(int value)
Description copied from interface:AudioSongClassical movement number.- Specified by:
setMovementNumberin interfaceAudioSong- Parameters:
value- number
-
getMovementCount
public int getMovementCount()
Description copied from interface:AudioSongClassical movement count.- Specified by:
getMovementCountin interfaceAudioSong- Returns:
- count
-
setMovementCount
public void setMovementCount(int value)
Description copied from interface:AudioSongClassical movement count.- Specified by:
setMovementCountin interfaceAudioSong- Parameters:
value- count
-
setArtist
public void setArtist(String artist)
Description copied from interface:AudioSongSets artist.
-
getAlbumArtist
public String getAlbumArtist()
Description copied from interface:AudioSongGet album artist.- Specified by:
getAlbumArtistin interfaceAudioSong- Returns:
- album artist
-
setAlbumArtist
public void setAlbumArtist(String albumArtist)
Description copied from interface:AudioSongSets the album artist.- Specified by:
setAlbumArtistin interfaceAudioSong- Parameters:
albumArtist- album artist
-
getComposer
public String getComposer()
Description copied from interface:AudioSongGet composer(s).- Specified by:
getComposerin interfaceAudioSong- Returns:
- composer(s)
-
setComposer
public void setComposer(String composer)
Description copied from interface:AudioSongSets composer.- Specified by:
setComposerin interfaceAudioSong- Parameters:
composer- composer
-
setAlbum
public void setAlbum(String album)
Description copied from interface:AudioSongSets album name.
-
getGrouping
public String getGrouping()
Description copied from interface:AudioSongGet grouping.- Specified by:
getGroupingin interfaceAudioSong- Returns:
- grouping
-
setGrouping
public void setGrouping(String grouping)
Description copied from interface:AudioSongSets the grouping.- Specified by:
setGroupingin interfaceAudioSong- Parameters:
grouping- grouping
-
setGenre
public void setGenre(String genre)
Description copied from interface:AudioSongSets genre.
-
getKind
public String getKind()
Description copied from interface:AudioSongKind of audio, e.g. "WAV audio file", "AAC audio file" or "MPEG audio file" (or localized versions thereof). This value is typically extracted fromiTunes Music Library.xmland may simply benullfor non-iTunes libraries.
-
setKind
public void setKind(String kind)
Description copied from interface:AudioSongAllows you to store a String descriptor of the kind of audio object this is. Typically this value is read-only (withAudioSong.getKind()) and set by the music player, e.g. iTunes.- Specified by:
setKindin interfaceAudioSong- Parameters:
kind- kind- See Also:
AudioSong.getKind()
-
getSize
public long getSize()
Description copied from interface:AudioSongFile size.
-
setSize
public void setSize(long value)
-
getTotalTime
public int getTotalTime()
Description copied from interface:AudioSongTotal length of the song in ms.- Specified by:
getTotalTimein interfaceAudioSong- Returns:
- length in ms.
-
setTotalTime
public void setTotalTime(int value)
-
getTrackID
public int getTrackID()
-
setTrackID
public void setTrackID(int value)
-
getTrackCount
public int getTrackCount()
Description copied from interface:AudioSongNumber of tracks on album/release/recording.- Specified by:
getTrackCountin interfaceAudioSong- Returns:
- track count
- See Also:
AudioSong.getTrackNumber()
-
getStartTime
public int getStartTime()
Description copied from interface:AudioSongStart time of the song in ms.- Specified by:
getStartTimein interfaceAudioSong- Returns:
- start time in ms.
-
setStartTime
public void setStartTime(int value)
Description copied from interface:AudioSongSet start time in ms.- Specified by:
setStartTimein interfaceAudioSong- Parameters:
value- start time in ms
-
getStopTime
public int getStopTime()
Description copied from interface:AudioSongStop time of the song in ms.- Specified by:
getStopTimein interfaceAudioSong- Returns:
- stop time in ms.
-
setStopTime
public void setStopTime(int value)
Description copied from interface:AudioSongSets stop time.- Specified by:
setStopTimein interfaceAudioSong- Parameters:
value- stop time in ms
-
getStart
public float getStart()
Description copied from interface:AudioSongStart time of the song in seconds.- Specified by:
getStartin interfaceAudioSong- Returns:
- start time in seconds.
- See Also:
AudioSong.getStartTime()
-
setStart
public void setStart(float start)
Description copied from interface:AudioSongSets the start time in seconds.- Specified by:
setStartin interfaceAudioSong- Parameters:
start- start time in seconds- See Also:
AudioSong.setStartTime(int)
-
getFinish
public float getFinish()
Description copied from interface:AudioSongStop time of the song in seconds.- Specified by:
getFinishin interfaceAudioSong- Returns:
- stop time in seconds.
- See Also:
AudioSong.getStopTime()
-
setFinish
public void setFinish(float finish)
Description copied from interface:AudioSongSets the stop time in seconds.- Specified by:
setFinishin interfaceAudioSong- Parameters:
finish- stop time in seconds- See Also:
AudioSong.setStopTime(int)
-
setTrackCount
public void setTrackCount(int trackCount)
Description copied from interface:AudioSongSet track count- Specified by:
setTrackCountin interfaceAudioSong- Parameters:
trackCount- track count- See Also:
AudioSong.setTrackNumber(int)
-
getTrackNumber
public int getTrackNumber()
Description copied from interface:AudioSongGet the number of the track on the release/album/recording.- Specified by:
getTrackNumberin interfaceAudioSong- Returns:
- track number
-
setTrackNumber
public void setTrackNumber(int value)
Description copied from interface:AudioSongSet the number of this track.- Specified by:
setTrackNumberin interfaceAudioSong- Parameters:
value- track number
-
getDiscNumber
public int getDiscNumber()
Description copied from interface:AudioSongGet the disc number.- Specified by:
getDiscNumberin interfaceAudioSong- Returns:
- disc number
-
setDiscNumber
public void setDiscNumber(int value)
Description copied from interface:AudioSongSets the disc number.- Specified by:
setDiscNumberin interfaceAudioSong- Parameters:
value- disc number
-
getDiscCount
public int getDiscCount()
Description copied from interface:AudioSongAssuming that this song is on a disc that is part of a disc collection, return the number of discs in this collection.- Specified by:
getDiscCountin interfaceAudioSong- Returns:
- disc count
-
setDiscCount
public void setDiscCount(int value)
Description copied from interface:AudioSongSet disc count.- Specified by:
setDiscCountin interfaceAudioSong- Parameters:
value- disc count
-
getYear
public int getYear()
Description copied from interface:AudioSongRelease year - (corresponds to id3 TDRC, recording time).- Specified by:
getYearin interfaceAudioSong- Returns:
- four digit recording year, if available
- See Also:
AudioSong.getReleaseDate()
-
setYear
public void setYear(int value)
Description copied from interface:AudioSongSets the year.- Specified by:
setYearin interfaceAudioSong- Parameters:
value- year- See Also:
AudioSong.getYear(),AudioSong.getReleaseDate()
-
getReleaseYear
public int getReleaseYear()
-
getDateModified
public Date getDateModified()
Description copied from interface:AudioSongGet date of last modification.- Specified by:
getDateModifiedin interfaceAudioSong- Returns:
- date
-
setDateModified
public void setDateModified(Date value)
-
getDateAdded
public Date getDateAdded()
Description copied from interface:AudioSongGet date the song was added to the library.- Specified by:
getDateAddedin interfaceAudioSong- Returns:
- date added
-
setDateAdded
public void setDateAdded(Date value)
-
getBitRate
public int getBitRate()
Description copied from interface:AudioSongBit rate.- Specified by:
getBitRatein interfaceAudioSong- Returns:
- bit rate
-
setBitRate
public void setBitRate(int value)
-
getSampleRate
public int getSampleRate()
Description copied from interface:AudioSongGet sample rate in Hz.- Specified by:
getSampleRatein interfaceAudioSong- Returns:
- sample rate in Hz
-
setSampleRate
public void setSampleRate(int value)
-
getEqualizer
public String getEqualizer()
-
setEqualizer
public void setEqualizer(String equalizer)
-
getTrackReplayGain
public ReplayGain getTrackReplayGain()
Description copied from interface:AudioSongReplay gain for this track (not taking other tracks in an album into account).- Specified by:
getTrackReplayGainin interfaceAudioSong- Returns:
- replay gain
- See Also:
- "Radio" replay gain
-
setTrackReplayGain
public void setTrackReplayGain(ReplayGain value, boolean updateITunNorm)
Description copied from interface:AudioSongSets the replay gain for this track, not taking other tracks of the album into account.- Specified by:
setTrackReplayGainin interfaceAudioSong- Parameters:
value- replay gainupdateITunNorm- update the iTunNorm field with the given value- See Also:
AudioSong.getTrackReplayGain(),AudioSong.getAlbumReplayGain()
-
setTrackReplayGain
public void setTrackReplayGain(ReplayGain replayGain)
Sets the replay gain for this track, not taking other tracks of the album into account. Calling this method will also update theiTunNORMvalue, if possible.- Parameters:
replayGain- replay gain- See Also:
setTrackReplayGain(ReplayGain, boolean)
-
getAlbumReplayGain
public ReplayGain getAlbumReplayGain()
Description copied from interface:AudioSongReplay gain for this album.- Specified by:
getAlbumReplayGainin interfaceAudioSong- Returns:
- replay gain
- See Also:
- "Audiophile" replay gain,
AudioSong.getTrackReplayGain()
-
setAlbumReplayGain
public void setAlbumReplayGain(ReplayGain value, boolean updateITunNorm)
Description copied from interface:AudioSongSets the replay gain for this album.- Specified by:
setAlbumReplayGainin interfaceAudioSong- Parameters:
value- replay gainupdateITunNorm- update the iTunNorm field with the given value- See Also:
AudioSong.getAlbumReplayGain()
-
setAlbumReplayGain
public void setAlbumReplayGain(ReplayGain replayGain)
Sets the replay gain for this album. Calling this method will not update theiTunNORMvalue.- Parameters:
replayGain- replay gain- See Also:
setAlbumReplayGain(ReplayGain, boolean)
-
getVolumeAdjustment
public int getVolumeAdjustment()
Description copied from interface:AudioSongValue between -255 and 255.- Specified by:
getVolumeAdjustmentin interfaceAudioSong- Returns:
- volume adjustment
-
setVolumeAdjustment
public void setVolumeAdjustment(int value)
Description copied from interface:AudioSongSets the volume adjustment- Specified by:
setVolumeAdjustmentin interfaceAudioSong- Parameters:
value- value between -255 and 255.
-
getComments
public String getComments()
Description copied from interface:AudioSongGet comments.- Specified by:
getCommentsin interfaceAudioSong- Returns:
- comments
-
setComments
public void setComments(String comments)
Description copied from interface:AudioSongSet comments.- Specified by:
setCommentsin interfaceAudioSong- Parameters:
comments- comments
-
getPlayCount
public int getPlayCount()
Description copied from interface:AudioSongGet the number of times the song was played.- Specified by:
getPlayCountin interfaceAudioSong- Returns:
- play count
-
setPlayCount
public void setPlayCount(int value)
Description copied from interface:AudioSongSet play count.- Specified by:
setPlayCountin interfaceAudioSong- Parameters:
value- play count
-
getPlayDate
public long getPlayDate()
Description copied from interface:AudioSongGet time the song was last played. Returns0, if it has never been played.- Specified by:
getPlayDatein interfaceAudioSong- Returns:
- play date, milliseconds since January 1, 1970, 00:00:00 GMT (NOT related to the iTunes value!)
-
setPlayDate
public void setPlayDate(long value)
Description copied from interface:AudioSongSet play date in milliseconds since January 1, 1970, 00:00:00 GMT (NOT related to the iTunes value!).- Specified by:
setPlayDatein interfaceAudioSong- Parameters:
value- play date
-
getPlayDateUTC
public Date getPlayDateUTC()
Description copied from interface:AudioSongGet play date.- Specified by:
getPlayDateUTCin interfaceAudioSong- Returns:
- play date
-
setPlayDateUTC
public void setPlayDateUTC(Date value)
Description copied from interface:AudioSongSet play time.- Specified by:
setPlayDateUTCin interfaceAudioSong- Parameters:
value- play time
-
getSkipCount
public int getSkipCount()
Description copied from interface:AudioSongGet skip count.- Specified by:
getSkipCountin interfaceAudioSong- Returns:
- skip count
-
setSkipCount
public void setSkipCount(int value)
Description copied from interface:AudioSongSet skip count.- Specified by:
setSkipCountin interfaceAudioSong- Parameters:
value- skip count
-
getSkipDate
public Date getSkipDate()
Description copied from interface:AudioSongGet skip date.- Specified by:
getSkipDatein interfaceAudioSong- Returns:
- skip date
-
setSkipDate
public void setSkipDate(Date value)
Description copied from interface:AudioSongSet skip date.- Specified by:
setSkipDatein interfaceAudioSong- Parameters:
value- skip date
-
getReleaseDate
public Date getReleaseDate()
Description copied from interface:AudioSongRelease year (corresponds to id3 TDRL).- Specified by:
getReleaseDatein interfaceAudioSong- Returns:
- release time
-
setReleaseDate
public void setReleaseDate(Date value)
Description copied from interface:AudioSongSet release date.- Specified by:
setReleaseDatein interfaceAudioSong- Parameters:
value- release date
-
getArtworkCount
public int getArtworkCount()
Description copied from interface:AudioSongGet artwork count.- Specified by:
getArtworkCountin interfaceAudioSong- Returns:
- artwork count
-
getImage
public Image getImage()
Description copied from interface:AudioSongFirst artwork image.- Specified by:
getImagein interfaceAudioSong- Returns:
- first artwork image of this track.
- See Also:
AudioSong.getFrontCoverImage(),AudioSong.getBackCoverImage()
-
setArtworkCount
public void setArtworkCount(int value)
-
getRating
public int getRating()
Description copied from interface:AudioSongValue ranging from 0-100, 100 being best.- Specified by:
getRatingin interfaceAudioSong- Returns:
- rating
- See Also:
AudioSong.isRatingComputed(),AudioSong.getAlbumRating()
-
setRating
public void setRating(int value)
Description copied from interface:AudioSongSets the rating- Specified by:
setRatingin interfaceAudioSong- Parameters:
value- rating between from 0 to 100- See Also:
AudioSong.getRating()
-
getAlbumRating
public int getAlbumRating()
Description copied from interface:AudioSongGet album rating.- Specified by:
getAlbumRatingin interfaceAudioSong- Returns:
- album rating
- See Also:
AudioSong.isAlbumRatingComputed()
-
setAlbumRating
public void setAlbumRating(int value)
Description copied from interface:AudioSongSets album rating.- Specified by:
setAlbumRatingin interfaceAudioSong- Parameters:
value- album rating
-
isRatingComputed
public boolean isRatingComputed()
Description copied from interface:AudioSongIndicates whether the value returned byAudioSong.getRating()was computed or set manually.- Specified by:
isRatingComputedin interfaceAudioSong- Returns:
trueorfalse
-
setRatingComputed
public void setRatingComputed(boolean ratingComputed)
-
isAlbumRatingComputed
public boolean isAlbumRatingComputed()
Description copied from interface:AudioSongIndicates whether the value returned byAudioSong.getAlbumRating()was computed or set manually.- Specified by:
isAlbumRatingComputedin interfaceAudioSong- Returns:
trueorfalse
-
setAlbumRatingComputed
public void setAlbumRatingComputed(boolean albumRatingComputed)
-
setRemoteUpdateDate
public void setRemoteUpdateDate(Date value)
Description copied from interface:AudioSongSets the date that marks the last update of remote properties. This method is usually called by the app, not the user or any user/plugin code.- Specified by:
setRemoteUpdateDatein interfaceAudioSong- Parameters:
value- date- See Also:
AudioSong.getRemoteUpdateDate()
-
getRemoteUpdateDate
public Date getRemoteUpdateDate()
Description copied from interface:AudioSongTime the remote properties of this song were last updated. Remote are e.g.AudioSong.getRemotePlayFrequency()orAudioSong.getPopularity().- Specified by:
getRemoteUpdateDatein interfaceAudioSong- Returns:
- date or
null, if never
-
getRemoteRating
public int getRemoteRating()
Description copied from interface:AudioSongAverage of other people's ratings.- Specified by:
getRemoteRatingin interfaceAudioSong- Returns:
- mean of ratings
-
setRemoteRating
public void setRemoteRating(int value)
Description copied from interface:AudioSongSets the value locally. In other words, the value is not propagated to the central database.- Specified by:
setRemoteRatingin interfaceAudioSong- Parameters:
value- value
-
getPopularity
public float getPopularity()
Description copied from interface:AudioSongPopularity as a value between 0 and 1.- Specified by:
getPopularityin interfaceAudioSong- Returns:
- popularity among all users
-
setPopularity
public void setPopularity(float value)
Description copied from interface:AudioSongSets the value locally. In other words, the value is not propagated to the central database.- Specified by:
setPopularityin interfaceAudioSong- Parameters:
value- value
-
getRemotePlayFrequency
public float getRemotePlayFrequency()
Description copied from interface:AudioSongAverage of play frequencies as reported by users.- Specified by:
getRemotePlayFrequencyin interfaceAudioSong- Returns:
- play frequency
- See Also:
AudioSong.getPlayFrequency()
-
setRemotePlayFrequency
public void setRemotePlayFrequency(float value)
Description copied from interface:AudioSongSets the value locally. In other words, the value is not propagated to the central database.- Specified by:
setRemotePlayFrequencyin interfaceAudioSong- Parameters:
value- value
-
getRemotePlaySkipRatio
public float getRemotePlaySkipRatio()
Description copied from interface:AudioSongPlay/skip ratio by all users with this song.- Specified by:
getRemotePlaySkipRatioin interfaceAudioSong- Returns:
- play/skip ratio
- See Also:
AudioSong.getPlaySkipRatio()
-
setRemotePlaySkipRatio
public void setRemotePlaySkipRatio(float value)
Description copied from interface:AudioSongSets the value locally. In other words, the value is not propagated to the central database.- Specified by:
setRemotePlaySkipRatioin interfaceAudioSong- Parameters:
value- value
-
getRemoteLoved
public float getRemoteLoved()
Description copied from interface:AudioSongIndicates, what percentage of people "love" this song. May be much lower than expected.- Specified by:
getRemoteLovedin interfaceAudioSong- Returns:
- value between 0 and 1.
- See Also:
AudioSong.getRemoteDisliked(),AudioSong.getLiking()
-
setRemoteLoved
public void setRemoteLoved(float value)
Description copied from interface:AudioSongSets the value locally. In other words, the value is not propagated to the central database.- Specified by:
setRemoteLovedin interfaceAudioSong- Parameters:
value- value
-
getRemoteDisliked
public float getRemoteDisliked()
Description copied from interface:AudioSongIndicates, what percentage of people "dislike" this song. May be much lower than expected.- Specified by:
getRemoteDislikedin interfaceAudioSong- Returns:
- value between 0 and 1.
- See Also:
AudioSong.getRemoteLoved(),AudioSong.getLiking()
-
setRemoteDisliked
public void setRemoteDisliked(float value)
Description copied from interface:AudioSongSets the value locally. In other words, the value is not propagated to the central database.- Specified by:
setRemoteDislikedin interfaceAudioSong- Parameters:
value- value
-
setLoved
public void setLoved(boolean loved)
-
setDisliked
public void setDisliked(boolean disliked)
-
setAlbumLoved
public void setAlbumLoved(boolean loved)
-
setAlbumDisliked
public void setAlbumDisliked(boolean disliked)
-
getLiking
public AudioSong.Liking getLiking()
Description copied from interface:AudioSongLiking. This is an expression of iTunes' loved and disliked fields.
-
setLiking
public void setLiking(AudioSong.Liking value)
Description copied from interface:AudioSongSet liking.
-
getAlbumLiking
public AudioSong.Liking getAlbumLiking()
Description copied from interface:AudioSongIs album liked. This is an expression of iTunes' album loved and album disliked fields.- Specified by:
getAlbumLikingin interfaceAudioSong- Returns:
- liking
-
setAlbumLiking
public void setAlbumLiking(AudioSong.Liking value)
Description copied from interface:AudioSongSet album liking.- Specified by:
setAlbumLikingin interfaceAudioSong- Parameters:
value- liking
-
setInstrumentation
public void setInstrumentation(AudioSong.Instrumentation instrumentation)
Description copied from interface:AudioSongSets the instrumentation property.- Specified by:
setInstrumentationin interfaceAudioSong- Parameters:
instrumentation- instrumentation
-
getInstrumentation
public AudioSong.Instrumentation getInstrumentation()
Description copied from interface:AudioSongIndicates whether this song qualifies as "electronic" or "acoustic".- Specified by:
getInstrumentationin interfaceAudioSong- Returns:
- instrumentation
-
setInstrumentationAlgorithm
public void setInstrumentationAlgorithm(String instrumentationAlgorithm)
Description copied from interface:AudioSongSet the instrumentation algorithm. Should beEntered, if the value was entered manually.- Specified by:
setInstrumentationAlgorithmin interfaceAudioSong- Parameters:
instrumentationAlgorithm- instrumentation algorithm
-
getInstrumentationAlgorithm
public String getInstrumentationAlgorithm()
Description copied from interface:AudioSongReturns the name of the instrumentation algorithm. May beEntered, if the value was entered.- Specified by:
getInstrumentationAlgorithmin interfaceAudioSong- Returns:
- instrumentation algorithm
-
setDanceability
public void setDanceability(Float value)
Description copied from interface:AudioSongDanceability.- Specified by:
setDanceabilityin interfaceAudioSong- Parameters:
value- normalized positive value (0-1)
-
getDanceability
public Float getDanceability()
Description copied from interface:AudioSongDanceability.- Specified by:
getDanceabilityin interfaceAudioSong- Returns:
- normalized positive value (0-1)
-
setDanceabilityAlgorithm
public void setDanceabilityAlgorithm(String value)
Description copied from interface:AudioSongSet the danceability algorithm. Should beEntered, if the value was entered manually.- Specified by:
setDanceabilityAlgorithmin interfaceAudioSong- Parameters:
value- danceability algorithm
-
getDanceabilityAlgorithm
public String getDanceabilityAlgorithm()
Description copied from interface:AudioSongReturns the name of the danceability algorithm. May beEntered, if the value was entered.- Specified by:
getDanceabilityAlgorithmin interfaceAudioSong- Returns:
- danceability algorithm
-
getShow
public String getShow()
Description copied from interface:AudioSongName of a show, suitable for TV shows.
-
setShow
public void setShow(String show)
Description copied from interface:AudioSongSet show name.
-
getSeason
public int getSeason()
Description copied from interface:AudioSongGet season number. Suitable for TV-shows.
-
setSeason
public void setSeason(int value)
Description copied from interface:AudioSongSet season.
-
getEpisode
public String getEpisode()
Description copied from interface:AudioSongGet episode name.- Specified by:
getEpisodein interfaceAudioSong- Returns:
- episode name
-
setEpisode
public void setEpisode(String episode)
Description copied from interface:AudioSongSet episode name.- Specified by:
setEpisodein interfaceAudioSong- Parameters:
episode- episode name
-
getEpisodeOrder
public int getEpisodeOrder()
Description copied from interface:AudioSongEpisode order.- Specified by:
getEpisodeOrderin interfaceAudioSong- Returns:
- episode order
-
setEpisodeOrder
public void setEpisodeOrder(int value)
Description copied from interface:AudioSongSet episode order.- Specified by:
setEpisodeOrderin interfaceAudioSong- Parameters:
value- episode order
-
isCompilation
public boolean isCompilation()
Description copied from interface:AudioSongIndicates 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:
isCompilationin interfaceAudioSong- Returns:
trueorfalse
-
setCompilation
public void setCompilation(boolean value)
Description copied from interface:AudioSongMarks this song as part of a compilation (or not).- Specified by:
setCompilationin interfaceAudioSong- Parameters:
value-trueorfalse
-
getId
public Long getId()
Description copied from interface:AudioSongPersistent id. Survives application shutdown.
-
setId
public void setId(String value)
-
setId
public void setId(Long value)
-
isDisabled
public boolean isDisabled()
Description copied from interface:AudioSongIndicates whether this song is disabled or unchecked.- Specified by:
isDisabledin interfaceAudioSong- Returns:
- !
AudioSong.isEnabled()
-
setDisabled
public void setDisabled(boolean value)
Description copied from interface:AudioSongEnables/disables this song.- Specified by:
setDisabledin interfaceAudioSong- Parameters:
value-trueorfalse
-
isEnabled
public boolean isEnabled()
Description copied from interface:AudioSongIndicates whether this song is enabled or checked.
-
setEnabled
public void setEnabled(boolean enabled)
Description copied from interface:AudioSongEnables/disables this song.- Specified by:
setEnabledin interfaceAudioSong- Parameters:
enabled-trueorfalse
-
getTrackType
public AudioSong.TrackType getTrackType()
Description copied from interface:AudioSongTrack type. E.g.AudioSong.TrackType.FILE.- Specified by:
getTrackTypein interfaceAudioSong- Returns:
- track type
- See Also:
AudioSong.setTrackType(TrackType)
-
setTrackType
public void setTrackType(AudioSong.TrackType value)
Description copied from interface:AudioSongField used by iTunes - typicallyAudioSong.TrackType.FILEfor files andAudioSong.TrackType.URLfor.. well, guess what?! Typically you don't set this field manually.- Specified by:
setTrackTypein interfaceAudioSong- Parameters:
value- track type- See Also:
AudioSong.getTrackType()
-
getFileType
public int getFileType()
-
setFileType
public void setFileType(int value)
-
getFileCreator
public int getFileCreator()
-
setFileCreator
public void setFileCreator(int value)
-
setMediaKind
public void setMediaKind(AudioSong.MediaKind value)
Description copied from interface:AudioSongSet the kind of media, e.g.AudioSong.MediaKind.AUDIOBOOK.- Specified by:
setMediaKindin interfaceAudioSong- Parameters:
value- media kind
-
getMediaKind
public AudioSong.MediaKind getMediaKind()
Description copied from interface:AudioSongMedia kind of this object.- Specified by:
getMediaKindin interfaceAudioSong- Returns:
- kind of media
-
setMatched
public void setMatched(boolean value)
-
setPodcast
public void setPodcast(boolean value)
-
setAudiobook
public void setAudiobook(boolean value)
-
setiTunesU
public void setiTunesU(boolean value)
-
setTvShow
public void setTvShow(boolean value)
-
setMusicVideo
public void setMusicVideo(boolean value)
-
setMovie
public void setMovie(boolean value)
-
setHomeVideo
public void setHomeVideo(boolean value)
-
setBook
public void setBook(boolean value)
-
setAlertTone
public void setAlertTone(boolean value)
-
setRingTone
public void setRingTone(boolean value)
-
setVoiceMemo
public void setVoiceMemo(boolean value)
-
setMusic
public void setMusic(boolean value)
-
setTrackType
public void setTrackType(String value)
-
isUnplayed
public boolean isUnplayed()
Description copied from interface:AudioSongIndicates whether this songs has been played at some point.- Specified by:
isUnplayedin interfaceAudioSong- Returns:
trueorfalse
-
setUnplayed
public void setUnplayed(boolean value)
Description copied from interface:AudioSongSets unplayed.- Specified by:
setUnplayedin interfaceAudioSong- Parameters:
value- unplayed
-
isHasVideo
public boolean isHasVideo()
Description copied from interface:AudioSongIndicates whether this track has a video.- Specified by:
isHasVideoin interfaceAudioSong- Returns:
trueorfalse
-
setHasVideo
public void setHasVideo(boolean value)
Description copied from interface:AudioSongSets the "video" flag.- Specified by:
setHasVideoin interfaceAudioSong- Parameters:
value-trueorfalse
-
isProtected
public boolean isProtected()
Description copied from interface:AudioSong- Specified by:
isProtectedin interfaceAudioSong- Returns:
trueorfalse
-
setProtected
public void setProtected(boolean value)
-
getLocation
public String getLocation(boolean refresh)
Description copied from interface:AudioSongLocation of this track. Ifrefreshis true and no location is available or the resource does not exist anymore, ask the backend app (iTunes, Music.app, ...) for the correct path. Because of the backend call, this method may block and therefore should be called from the EDT.- Specified by:
getLocationin interfaceAudioSong- Parameters:
refresh- refresh from backend- Returns:
- location
- See Also:
AudioSong.getLocation(),AudioSong.getFile(boolean)
-
setLocation
public void setLocation(String location)
Description copied from interface:AudioSongSets the location.- Specified by:
setLocationin interfaceAudioSong- Parameters:
location- location
-
getSongLocation
public AudioSongLocation getSongLocation()
-
getFileFolderCount
public int getFileFolderCount()
-
setFileFolderCount
public void setFileFolderCount(int value)
-
getLibraryFolderCount
public int getLibraryFolderCount()
-
setLibraryFolderCount
public void setLibraryFolderCount(int value)
-
isPartOfGaplessAlbum
public boolean isPartOfGaplessAlbum()
Description copied from interface:AudioSongIndicates whether this songs is part of a gapless album.- Specified by:
isPartOfGaplessAlbumin interfaceAudioSong- Returns:
trueorfalse
-
setPartOfGaplessAlbum
public void setPartOfGaplessAlbum(boolean value)
Description copied from interface:AudioSongSets the "gapless album" flag.- Specified by:
setPartOfGaplessAlbumin interfaceAudioSong- Parameters:
value-trueorfalse
-
isClean
public boolean isClean()
Description copied from interface:AudioSongIndicates whether this song is "clean" - whatever that means. "Clean" and "explicit" are mutually exclusive.- Specified by:
isCleanin interfaceAudioSong- Returns:
trueorfalse- See Also:
AudioSong.isExplicit()
-
setClean
public void setClean(boolean value)
Description copied from interface:AudioSongSets the "clean" flag. "Clean" and "explicit" are mutually exclusive.- Specified by:
setCleanin interfaceAudioSong- Parameters:
value-trueorfalse- See Also:
AudioSong.setExplicit(boolean)
-
isExplicit
public boolean isExplicit()
Description copied from interface:AudioSongIndicates whether this tracks is explicit or not. "Clean" and "explicit" are mutually exclusive.- Specified by:
isExplicitin interfaceAudioSong- Returns:
trueorfalse- See Also:
AudioSong.isClean()
-
setExplicit
public void setExplicit(boolean value)
Description copied from interface:AudioSongSets the "explicit" flag. "Clean" and "explicit" are mutually exclusive.- Specified by:
setExplicitin interfaceAudioSong- Parameters:
value-trueorfalse- See Also:
AudioSong.setClean(boolean)
-
isHD
public boolean isHD()
Description copied from interface:AudioSongIndicates whether this video content is in high definition (HD).
-
setHD
public void setHD(boolean value)
Description copied from interface:AudioSongSets the HD flag.
-
getSortArtist
public String getSortArtist()
Description copied from interface:AudioSongReturns the "sort artist". E.g., for "The Beatles" the sort artist is "Beatles".- Specified by:
getSortArtistin interfaceAudioSong- Returns:
- sort artist
-
setSortArtist
public void setSortArtist(String sortArtist)
Description copied from interface:AudioSongSets the sort artist.- Specified by:
setSortArtistin interfaceAudioSong- Parameters:
sortArtist- sort artist
-
getSortAlbum
public String getSortAlbum()
Description copied from interface:AudioSongReturns the "sort album". E.g., for "A Hard Day's Night" the sort album is "Hard Day's Night".- Specified by:
getSortAlbumin interfaceAudioSong- Returns:
- sort album
-
setSortAlbum
public void setSortAlbum(String sortAlbum)
Description copied from interface:AudioSongSets the sort album.- Specified by:
setSortAlbumin interfaceAudioSong- Parameters:
sortAlbum- sort album
-
getSortName
public String getSortName()
Description copied from interface:AudioSongReturns the "sort name". E.g., for "A Taste of Honey" the sort name is "Taste of Honey".- Specified by:
getSortNamein interfaceAudioSong- Returns:
- sort name
-
setSortName
public void setSortName(String sortName)
Description copied from interface:AudioSongSets the sort name.- Specified by:
setSortNamein interfaceAudioSong- Parameters:
sortName- sort name
-
getSortAlbumArtist
public String getSortAlbumArtist()
Description copied from interface:AudioSongReturns the "sort album artist". E.g., for "The Beatles" the sort album artist is "Beatles".- Specified by:
getSortAlbumArtistin interfaceAudioSong- Returns:
- sort album artist
-
setSortAlbumArtist
public void setSortAlbumArtist(String sortAlbumArtist)
Description copied from interface:AudioSongSets the sort album artist.- Specified by:
setSortAlbumArtistin interfaceAudioSong- Parameters:
sortAlbumArtist- sort album artist
-
getSortComposer
public String getSortComposer()
Description copied from interface:AudioSongReturns the sort composer.- Specified by:
getSortComposerin interfaceAudioSong- Returns:
- sort composer
-
setSortComposer
public void setSortComposer(String sortComposer)
Description copied from interface:AudioSongSets the sort composer.- Specified by:
setSortComposerin interfaceAudioSong- Parameters:
sortComposer- sort composer
-
getSortShow
public String getSortShow()
Description copied from interface:AudioSongReturns the sort show.- Specified by:
getSortShowin interfaceAudioSong- Returns:
- sort show
-
setSortShow
public void setSortShow(String sortShow)
Description copied from interface:AudioSongSets the sort show.- Specified by:
setSortShowin interfaceAudioSong- Parameters:
sortShow- sort show
-
getContentRating
public String getContentRating()
Description copied from interface:AudioSongReturns the content rating. E.g., "us-tv|TV-PG|400|" or "us-tv|TV-MA|600|dialogue and sexual content"- Specified by:
getContentRatingin interfaceAudioSong- Returns:
- content rating
-
setContentRating
public void setContentRating(String value)
Description copied from interface:AudioSongSets the content rating.- Specified by:
setContentRatingin interfaceAudioSong- Parameters:
value- content rating
-
isPurchased
public boolean isPurchased()
Description copied from interface:AudioSongIndicates whether this song was purchased (via the iTunes store).- Specified by:
isPurchasedin interfaceAudioSong- Returns:
trueorfalse
-
setPurchased
public void setPurchased(boolean value)
-
getVideoHeight
public int getVideoHeight()
-
setVideoHeight
public void setVideoHeight(int value)
-
getVideoWidth
public int getVideoWidth()
-
setVideoWidth
public void setVideoWidth(int value)
-
getPlayFrequency
public double getPlayFrequency()
Played per 100 days.- Specified by:
getPlayFrequencyin interfaceAudioSong- Returns:
- played per 100 days
- See Also:
AudioSong.getRemotePlayFrequency()
-
getPlaySkipRatio
public double getPlaySkipRatio()
Description copied from interface:AudioSongPlay/Skip ratio. Defined asplayCount/(skipCount+1).- Specified by:
getPlaySkipRatioin interfaceAudioSong- Returns:
- playSkip ratio as defined above
- See Also:
AudioSong.getRemotePlaySkipRatio(),AudioSong.getPopularity()
-
getFile
public Path getFile(boolean refresh)
Description copied from interface:AudioSongFile of this track. Ifrefreshis true and the file does not exist anymore, ask the backend app (iTunes, Music.app, ...) for the correct file name. Because of the backend call, this method may block and therefore should be called from the EDT.- Specified by:
getFilein interfaceAudioSong- Parameters:
refresh- refresh from backend- Returns:
- file object for
AudioSong.getLocation()or null, if a proper file object cannot be formed - See Also:
AudioSong.getLocation(),AudioSong.getLocation(boolean)
-
getPath
public String getPath()
Description copied from interface:AudioSongPath.- Specified by:
getPathin interfaceAudioSong- Returns:
- path object for
AudioSong.getLocation()or null, if a proper file object cannot be formed
-
getITunesPropertiesHashCode
public int getITunesPropertiesHashCode()
Hash code for the iTunes parts of this song.- Returns:
- hash code, if set
- See Also:
ITunesPropertiesHashCode.hashCode(java.util.Map)
-
setITunesPropertiesHashCode
public void setITunesPropertiesHashCode(int value)
-
canWrite
public boolean canWrite()
Checks whether the file corresponding to this song can in principal be written to.
-
hasProtectedFileExtension
public boolean hasProtectedFileExtension()
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:
hasProtectedFileExtensionin interfaceAudioSong- Returns:
- true, if we know that the file format is usually protected.
-
getAudioMetaData
public AudioMetaData getAudioMetaData()
Gets some audio meta data for this song from the actual file. The result is cached with a soft reference.- Returns:
- audio meta data for this song
-
getAudioMetaData
public AudioMetaData getAudioMetaData(boolean fresh)
Gets some audio meta data for this song from the actual file. The result is cached with a soft reference.- Parameters:
fresh- if true the AudioMetaData is freshly read from file- Returns:
- audio meta data for this song
-
matches
public boolean matches(Pattern[] patterns, PlayList.SubstringFilterProperty searchMode)
Description copied from interface:MatchableTrue if this object matches all provided patters (logical AND).- Specified by:
matchesin interfaceMatchable<PlayList.SubstringFilterProperty>- Parameters:
patterns- patternssearchMode- specifies a particular way in which the match should occur- Returns:
- true if this object matches.
-
getCustom1
public String getCustom1()
Description copied from interface:AudioSongCustom field.- Specified by:
getCustom1in interfaceAudioSong- Returns:
- custom field
-
setCustom1
public void setCustom1(String value)
Description copied from interface:AudioSongCustom field.- Specified by:
setCustom1in interfaceAudioSong- Parameters:
value- custom field value
-
getCustom2
public String getCustom2()
Description copied from interface:AudioSongCustom field.- Specified by:
getCustom2in interfaceAudioSong- Returns:
- custom field
-
setCustom2
public void setCustom2(String value)
Description copied from interface:AudioSongCustom field.- Specified by:
setCustom2in interfaceAudioSong- Parameters:
value- custom field value
-
getCustom3
public String getCustom3()
Description copied from interface:AudioSongCustom field.- Specified by:
getCustom3in interfaceAudioSong- Returns:
- custom field
-
setCustom3
public void setCustom3(String value)
Description copied from interface:AudioSongCustom field.- Specified by:
setCustom3in interfaceAudioSong- Parameters:
value- custom field value
-
getCustom4
public String getCustom4()
Description copied from interface:AudioSongCustom field.- Specified by:
getCustom4in interfaceAudioSong- Returns:
- custom field
-
setCustom4
public void setCustom4(String value)
Description copied from interface:AudioSongCustom field.- Specified by:
setCustom4in interfaceAudioSong- Parameters:
value- custom field value
-
getCustom5
public String getCustom5()
Description copied from interface:AudioSongCustom field.- Specified by:
getCustom5in interfaceAudioSong- Returns:
- custom field
-
setCustom5
public void setCustom5(String value)
Description copied from interface:AudioSongCustom field.- Specified by:
setCustom5in interfaceAudioSong- Parameters:
value- custom field value
-
getTags
public Set<String> getTags()
Description copied from interface:AudioSongReturns a set of tags associated with this song. To manipulate this song's tag, please useAudioSong.setTags(java.util.Set)and don't manipulate the returned set.
-
setTags
public void setTags(Set<String> tags)
Description copied from interface:AudioSongSets a new set of tags.
-
getDateAnalyzed
public Date getDateAnalyzed()
Description copied from interface:AudioSongDate the song was last analyzed.- Specified by:
getDateAnalyzedin interfaceAudioSong- Returns:
- date analyzed
-
setDateAnalyzed
public void setDateAnalyzed(Date value)
Description copied from interface:AudioSongSets the date this song was last analyzed.- Specified by:
setDateAnalyzedin interfaceAudioSong- Parameters:
value- date of last analysis
-
getKey
public Key getKey()
Description copied from interface:AudioSongReturn the tonal key of this song. E.g.,MajorKey.C_MAJOR.
-
setKey
public void setKey(Key value)
Description copied from interface:AudioSongSets the tonal key.- Specified by:
setKeyin interfaceAudioSong- Parameters:
value- tonal key key- See Also:
AudioSong.setKeyAlgorithm(String)
-
getKeyAlgorithm
public String getKeyAlgorithm()
Description copied from interface:AudioSongReturns the name of the key algorithm. May beEntered, if the key value was entered.- Specified by:
getKeyAlgorithmin interfaceAudioSong- Returns:
- key algorithm
-
setKeyAlgorithm
public void setKeyAlgorithm(String value)
Description copied from interface:AudioSongSet the key algorithm. Should beEntered, if the value was entered manually.- Specified by:
setKeyAlgorithmin interfaceAudioSong- Parameters:
value- key algorithm
-
getSpectrum
public com.tagtraum.audiokern.timbre.BarkSpectrum getSpectrum()
Description copied from interface:AudioSongReturns the bark spectrum.- Specified by:
getSpectrumin interfaceAudioSong- Returns:
- bark spectrum
- See Also:
AudioSong.getTempoTimbreColor()
-
setSpectrum
public void setSpectrum(com.tagtraum.audiokern.timbre.BarkSpectrum value)
Description copied from interface:AudioSongSets the bark spectrum.- Specified by:
setSpectrumin interfaceAudioSong- Parameters:
value- bark spectrum
-
getTempoSpectrum
public com.tagtraum.audiokern.bpm.TempoSpectrum getTempoSpectrum()
Description copied from interface:AudioSongReturns the tempo spectrum.- Specified by:
getTempoSpectrumin interfaceAudioSong- Returns:
- tempo spectrum
- See Also:
AudioSong.getTempoColor(),AudioSong.getTempoTimbreColor()
-
setTempoSpectrum
public void setTempoSpectrum(com.tagtraum.audiokern.bpm.TempoSpectrum value)
Description copied from interface:AudioSongSets the tempo spectrum.- Specified by:
setTempoSpectrumin interfaceAudioSong- Parameters:
value- tempo spectrum
-
setColor
public void setColor(Color value)
Description copied from interface:AudioSongSets the color.
-
getTempoColor
public Color getTempoColor()
Description copied from interface:AudioSongProjection ofAudioSong.getTempoSpectrum()to a color.- Specified by:
getTempoColorin interfaceAudioSong- Returns:
- color or null
-
setTempoColor
public void setTempoColor(Color value)
Description copied from interface:AudioSongSets this song's tempo color.- Specified by:
setTempoColorin interfaceAudioSong- Parameters:
value- color
-
getTempoTimbreColor
public Color getTempoTimbreColor()
Description copied from interface:AudioSongProjection ofAudioSong.getTempoSpectrum()andAudioSong.getSpectrum()to a color.- Specified by:
getTempoTimbreColorin interfaceAudioSong- Returns:
- color or null
-
setTempoTimbreColor
public void setTempoTimbreColor(Color value)
Description copied from interface:AudioSongSets this song's tempo-timbre color.- Specified by:
setTempoTimbreColorin interfaceAudioSong- Parameters:
value- color
-
getBeatsPerMinute
public float getBeatsPerMinute()
Description copied from interface:AudioSongBeats per minute (BPM).- Specified by:
getBeatsPerMinutein interfaceAudioSong- Returns:
- beats per minute
- See Also:
AudioSong.getTempo()
-
setBeatsPerMinute
public void setBeatsPerMinute(int value)
-
setBeatsPerMinute
public void setBeatsPerMinute(float value)
Description copied from interface:AudioSongSets beats per minute.- Specified by:
setBeatsPerMinutein interfaceAudioSong- Parameters:
value- beats per minute- See Also:
AudioSong.setTempo(com.tagtraum.audiokern.bpm.Tempo)
-
getTempo
public com.tagtraum.audiokern.bpm.Tempo getTempo()
Description copied from interface:AudioSongReturns tempo.
-
setTempo
public void setTempo(com.tagtraum.audiokern.bpm.Tempo value)
Description copied from interface:AudioSongSets the tempo.
-
getBeatsPerMinuteAlgorithm
public String getBeatsPerMinuteAlgorithm()
Description copied from interface:AudioSongReturns the name of the algorithm used to determine the beats per minute (BPM).- Specified by:
getBeatsPerMinuteAlgorithmin interfaceAudioSong- Returns:
- algorithm name
-
setBeatsPerMinuteAlgorithm
public void setBeatsPerMinuteAlgorithm(String value)
Description copied from interface:AudioSongSets the BPM algorithm.- Specified by:
setBeatsPerMinuteAlgorithmin interfaceAudioSong- Parameters:
value- bpm algorithm name
-
getTuningAlgorithm
public String getTuningAlgorithm()
Description copied from interface:AudioSongThe method the current tuning was created with.- Specified by:
getTuningAlgorithmin interfaceAudioSong- Returns:
- tuning algorithm
-
setTuningAlgorithm
public void setTuningAlgorithm(String value)
Description copied from interface:AudioSongSets the tuning algorithm the current tuning value was computed with.- Specified by:
setTuningAlgorithmin interfaceAudioSong- Parameters:
value- tuning algorithm
-
getMoodAlgorithm
public String getMoodAlgorithm()
Description copied from interface:AudioSongThe method the associated mood value was created with.- Specified by:
getMoodAlgorithmin interfaceAudioSong- Returns:
- mood algorithm
-
setMoodAlgorithm
public void setMoodAlgorithm(String value)
Description copied from interface:AudioSongSets the method the current mood value was created with.- Specified by:
setMoodAlgorithmin interfaceAudioSong- Parameters:
value- mood algorithm
-
getTimeSignatureAlgorithm
public String getTimeSignatureAlgorithm()
Description copied from interface:AudioSongMethod the time signature was computed with.- Specified by:
getTimeSignatureAlgorithmin interfaceAudioSong- Returns:
- algorithm the time signature was computed with
-
setTimeSignatureAlgorithm
public void setTimeSignatureAlgorithm(String value)
Description copied from interface:AudioSongSets the algorithm the time signature was computed with.- Specified by:
setTimeSignatureAlgorithmin interfaceAudioSong- Parameters:
value- time signature algorithm
-
getBeatsAlgorithm
public String getBeatsAlgorithm()
Description copied from interface:AudioSongMethod the beats were computed with.- Specified by:
getBeatsAlgorithmin interfaceAudioSong- Returns:
- algorithm the beats were computed with
-
setBeatsAlgorithm
public void setBeatsAlgorithm(String value)
Description copied from interface:AudioSongSets the algorithm the beats were computed with.- Specified by:
setBeatsAlgorithmin interfaceAudioSong- Parameters:
value- beats algorithm
-
getSegmentsAlgorithm
public String getSegmentsAlgorithm()
Description copied from interface:AudioSongMethod the segments were computed with.- Specified by:
getSegmentsAlgorithmin interfaceAudioSong- Returns:
- algorithm the segments were computed with
-
setSegmentsAlgorithm
public void setSegmentsAlgorithm(String value)
Description copied from interface:AudioSongSets the algorithm the segments were computed with.- Specified by:
setSegmentsAlgorithmin interfaceAudioSong- Parameters:
value- segments algorithm
-
getSimilaritiesAlgorithm
public String getSimilaritiesAlgorithm()
Description copied from interface:AudioSongMethod the similarities were computed with.- Specified by:
getSimilaritiesAlgorithmin interfaceAudioSong- Returns:
- algorithm the similarities were computed with
-
setSimilaritiesAlgorithm
public void setSimilaritiesAlgorithm(String value)
Description copied from interface:AudioSongSets the algorithm the similarities were computed with.- Specified by:
setSimilaritiesAlgorithmin interfaceAudioSong- Parameters:
value- similarities algorithm
-
getLanguage
public String getLanguage()
Description copied from interface:AudioSongThe language of the lyrics as ISO 639 three letter codes.- Specified by:
getLanguagein interfaceAudioSong- Returns:
- ISO 639 three letter language code
-
setLanguage
public void setLanguage(String value)
Description copied from interface:AudioSongSets the language as ISO 639 three letter code.- Specified by:
setLanguagein interfaceAudioSong- Parameters:
value- ISO 639 three letter code
-
getFingerprint
public byte[] getFingerprint()
Description copied from interface:AudioSongAcoustic fingerprint.- Specified by:
getFingerprintin interfaceAudioSong- Returns:
- acoustic fingerprint
-
setFingerprint
public void setFingerprint(byte[] fingerprint)
Description copied from interface:AudioSongSets the acoustic fingerprint.- Specified by:
setFingerprintin interfaceAudioSong- Parameters:
fingerprint- fingerprint
-
getTrackIds
public Set<AudioId> getTrackIds()
Description copied from interface:AudioSongReturns track ids.- Specified by:
getTrackIdsin interfaceAudioSong- Returns:
- track ids
-
getAlbumIds
public Set<AudioId> getAlbumIds()
Description copied from interface:AudioSongGet album ids.- Specified by:
getAlbumIdsin interfaceAudioSong- Returns:
- album ids
-
getArtistIds
public Set<AudioId> getArtistIds()
Description copied from interface:AudioSongGet artists ids.- Specified by:
getArtistIdsin interfaceAudioSong- Returns:
- artist ids
-
getPlaylistId
public Long getPlaylistId()
The id of the playlist this song object stems from. Note that a song object may be contained in multiple playlists. This property is transient.- Returns:
- playlist id this song object stems from
- See Also:
getPlayLists()
-
setPlaylistId
public void setPlaylistId(Long value)
Typically not called by the user, but by the application- Parameters:
value- playlistId- See Also:
getPlaylistId()
-
getLyrics
public String getLyrics()
Description copied from interface:AudioSongReturns the lyrics.
-
setLyrics
public void setLyrics(String lyrics)
Description copied from interface:AudioSongSets lyrics.
-
getLyricsTermFrequencies
public List<TermFrequency> getLyricsTermFrequencies()
Description copied from interface:AudioSongTerms in this song's lyrics along with their frequency. All terms are lowercase, regular ASCII punctuation has been removed.- Specified by:
getLyricsTermFrequenciesin interfaceAudioSong- Returns:
- term frequencies
-
setTuning
public void setTuning(Integer value)
Description copied from interface:AudioSongSets tuning in cents (+-50).
-
setBeats
public void setBeats(Beats value)
Description copied from interface:AudioSongSets this song's beats.
-
getSegments
public Segments getSegments()
Description copied from interface:AudioSongThe song's segments.- Specified by:
getSegmentsin interfaceAudioSong- Returns:
- segments
-
setSegments
public void setSegments(Segments value)
Description copied from interface:AudioSongSets this song's segments.- Specified by:
setSegmentsin interfaceAudioSong- Parameters:
value- segments
-
getSimilarities
public Similarities getSimilarities()
Description copied from interface:AudioSongThe song's similarities.- Specified by:
getSimilaritiesin interfaceAudioSong- Returns:
- similarities
-
setSimilarities
public void setSimilarities(Similarities value)
Description copied from interface:AudioSongSets this song's similarities.- Specified by:
setSimilaritiesin interfaceAudioSong- Parameters:
value- similarities
-
getLoudness
public Loudness getLoudness()
Description copied from interface:AudioSongThe song's loudness curve.- Specified by:
getLoudnessin interfaceAudioSong- Returns:
- loudness
-
setLoudness
public void setLoudness(Loudness value)
Description copied from interface:AudioSongSets this song's loudness curve.- Specified by:
setLoudnessin interfaceAudioSong
-
setMood
public void setMood(Mood value)
Description copied from interface:AudioSongSets this song's mood.
-
getMoodKeywords
public Set<String> getMoodKeywords()
Description copied from interface:AudioSongGet raw mood keywords.- Specified by:
getMoodKeywordsin interfaceAudioSong- Returns:
- mood keywords
-
setMoodKeywords
public void setMoodKeywords(Set<String> moodKeywords)
Persistent storage in database is not supported yet.- Specified by:
setMoodKeywordsin interfaceAudioSong- Parameters:
moodKeywords- mood keywords
-
setTimeSignature
public void setTimeSignature(TimeSignature value)
Description copied from interface:AudioSongSets this song's time signature.- Specified by:
setTimeSignaturein interfaceAudioSong- Parameters:
value- time signature
-
getTimeSignature
public TimeSignature getTimeSignature()
Description copied from interface:AudioSongThe song's time signature.- Specified by:
getTimeSignaturein interfaceAudioSong- Returns:
- time signature
-
getMeasuresPerMinute
public float getMeasuresPerMinute()
Description copied from interface:AudioSongMeasures (bars) per minute. This value is computed fromAudioSong.getBeatsPerMinute()andAudioSong.getTimeSignature(). In essence BPM is divided by meter (time signature) numerator.- Specified by:
getMeasuresPerMinutein interfaceAudioSong- Returns:
- measures/bars per minute or zero, if either the time signature or the BPM is not known
-
getRMSMean
public Float getRMSMean()
Description copied from interface:AudioSongRoot mean square (RMS) of the signal's energy, averaged over windows of length ~23ms (actually 1024/44100 frames for a signal with sample rate 44.1kHz, i.e. 23.22ms) with a hopsize of half a window. Only the first 120 seconds of the audio are considered, the rest is discarded.- Specified by:
getRMSMeanin interfaceAudioSong- Returns:
- average RMS for the first 120 seconds
- See Also:
TemporalFeaturePipelines.createAverageRootMeanSquarePipeline(String, int, int),Floats.rootMeanSquare(float[]),AudioSong.getRMSStandardDeviation()
-
setRMSMean
public void setRMSMean(Float value)
Description copied from interface:AudioSongSets the average RMS for the first 120 seconds of this song.- Specified by:
setRMSMeanin interfaceAudioSong- Parameters:
value- averaged RMS- See Also:
AudioSong.getRMSMean()
-
getRMSStandardDeviation
public Float getRMSStandardDeviation()
Description copied from interface:AudioSongStandard 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:
getRMSStandardDeviationin interfaceAudioSong- Returns:
- standard deviation of the RMS for the first 120 seconds
- See Also:
Floats.rootMeanSquare(float[]),AudioSong.getRMSMean()
-
setRMSStandardDeviation
public void setRMSStandardDeviation(Float value)
Description copied from interface:AudioSongSets the standard deviation of the root mean square (RMS).- Specified by:
setRMSStandardDeviationin interfaceAudioSong- Parameters:
value- standard deviation of the RMS/window
-
getSpectralCentroidMean
public Float getSpectralCentroidMean()
Description copied from interface:AudioSongAverage of the spectral centroids computed for individual windows of length ~23.22ms with a hopsize of half a window length. Only the first 120 seconds of the signal are considered, the rest is discarded.- Specified by:
getSpectralCentroidMeanin interfaceAudioSong- Returns:
- averaged spectral centroid
- See Also:
SpectralFeaturePipelines.createAverageSpectralCentroidPipeline(String, int, int, int)
-
setSpectralCentroidMean
public void setSpectralCentroidMean(Float value)
Description copied from interface:AudioSongSets the mean of the spectral centroids.- Specified by:
setSpectralCentroidMeanin interfaceAudioSong- Parameters:
value- averaged spectral centroids- See Also:
AudioSong.getSpectralCentroidMean()
-
getSpectralSpreadMean
public Float getSpectralSpreadMean()
Description copied from interface:AudioSongAverage of the spectral spread 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:
getSpectralSpreadMeanin interfaceAudioSong- Returns:
- average spectral spread
- See Also:
SpectralFeaturePipelines.createAverageSpectralSpreadPipeline(String, int, int, int)
-
setSpectralSpreadMean
public void setSpectralSpreadMean(Float value)
Description copied from interface:AudioSongSets the average spectral spread.- Specified by:
setSpectralSpreadMeanin interfaceAudioSong- Parameters:
value- average spectral spread- See Also:
AudioSong.getSpectralSpreadMean()
-
getRelativeSpectralEntropyMean
public Float getRelativeSpectralEntropyMean()
Description copied from interface:AudioSongAverage of relative entropy values computed for windows of length 1.486s with a hopsize of half a window. Only the first 120 seconds of the signal are considered, the rest is discarded.- Specified by:
getRelativeSpectralEntropyMeanin interfaceAudioSong- Returns:
- average relative entropy
- See Also:
AggregateFunctions.RELATIVE_ENTROPY,SpectralFeaturePipelines.createAverageRelativeSpectralEntropyPipeline(String, int, int, int)
-
setRelativeSpectralEntropyMean
public void setRelativeSpectralEntropyMean(Float value)
Description copied from interface:AudioSongSets the average relative spectral entropy.- Specified by:
setRelativeSpectralEntropyMeanin interfaceAudioSong- Parameters:
value- average- See Also:
AudioSong.getRelativeSpectralEntropyMean()
-
setSpectralNoveltyMean
public void setSpectralNoveltyMean(Float value)
Description copied from interface:AudioSongSets the average spectral novelty.- Specified by:
setSpectralNoveltyMeanin interfaceAudioSong- Parameters:
value- average- See Also:
AudioSong.getSpectralNoveltyMean()
-
getSpectralNoveltyMean
public Float getSpectralNoveltyMean()
Description copied from interface:AudioSongAverage 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:
getSpectralNoveltyMeanin interfaceAudioSong- Returns:
- average spectral novelty
-
setSpectralFluctuationPeak
public void setSpectralFluctuationPeak(Float value)
Description copied from interface:AudioSongPeak 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:
setSpectralFluctuationPeakin interfaceAudioSong- Parameters:
value- peak in an averaged fluctuation spectrum- See Also:
AudioSong.getSpectralFluctuationPeak()
-
getSpectralFluctuationPeak
public Float getSpectralFluctuationPeak()
Description copied from interface:AudioSongPeak of the averaged 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:
getSpectralFluctuationPeakin interfaceAudioSong- Returns:
- peak of an averaged fluctuation spectrum
- See Also:
SpectralFeaturePipelines.createAverageSpectralFluctuationPipeline(String, int)
-
getSpectralFluxMean
public Float getSpectralFluxMean()
Description copied from interface:AudioSongAverage of the spectral flux 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:
getSpectralFluxMeanin interfaceAudioSong- Returns:
- average spectral flux
- See Also:
SpectralFeaturePipelines.createAverageSpectralFluxPipeline(String, int, int, int)
-
setSpectralFluxMean
public void setSpectralFluxMean(Float value)
Description copied from interface:AudioSongSets the mean spectral flux.- Specified by:
setSpectralFluxMeanin interfaceAudioSong- Parameters:
value- average spectral flux- See Also:
AudioSong.getSpectralFluxMean()
-
getSpectralVariabilityMean
public Float getSpectralVariabilityMean()
Description copied from interface:AudioSongAverage of the spectral variability 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:
getSpectralVariabilityMeanin interfaceAudioSong- Returns:
- average spectral variability
- See Also:
SpectralFeaturePipelines.createAverageSpectralVariabilityPipeline(String, int, int, int)
-
setSpectralVariabilityMean
public void setSpectralVariabilityMean(Float value)
Description copied from interface:AudioSongSets the mean spectral variability.- Specified by:
setSpectralVariabilityMeanin interfaceAudioSong- Parameters:
value- average spectral variability- See Also:
AudioSong.getSpectralVariabilityMean()
-
setFrontCoverArtwork
public void setFrontCoverArtwork(File... frontCover)
Description copied from interface:AudioSongReplace all front covers with the given files.- Specified by:
setFrontCoverArtworkin interfaceAudioSong- Parameters:
frontCover- front cover- See Also:
AudioSong.setBackCoverArtwork(java.io.File...)
-
setBackCoverArtwork
public void setBackCoverArtwork(File... backCover)
Description copied from interface:AudioSongReplace all back covers with the given files.- Specified by:
setBackCoverArtworkin interfaceAudioSong- Parameters:
backCover- back cover- See Also:
AudioSong.setFrontCoverArtwork(java.io.File...)
-
getFrontCoverImage
public Image getFrontCoverImage()
Description copied from interface:AudioSongReturns the first front cover image.- Specified by:
getFrontCoverImagein interfaceAudioSong- Returns:
- image or null
-
getBackCoverImage
public Image getBackCoverImage()
Description copied from interface:AudioSongReturns the first front cover image.- Specified by:
getBackCoverImagein interfaceAudioSong- Returns:
- image or null
-
getArtworks
public AudioArtwork[] getArtworks()
Description copied from interface:AudioSongArtwork belonging to this song.- Specified by:
getArtworksin interfaceAudioSong- Returns:
- array of artworks
-
addArtwork
public void addArtwork(AudioArtwork audioArtwork)
Description copied from interface:AudioSongAdds an artwork/image to the audio song.- Specified by:
addArtworkin interfaceAudioSong- Parameters:
audioArtwork- artwork
-
setArtworks
public void setArtworks(AudioArtwork... artworks)
Description copied from interface:AudioSongSet artworks belonging to this track.- Specified by:
setArtworksin interfaceAudioSong- Parameters:
artworks- artworks
-
-