Class ITunesAudioSong
- java.lang.Object
-
- com.tagtraum.beatunes.library.AudioSongFacade
-
- com.tagtraum.beatunes.library.itunes.ITunesAudioSong
-
- All Implemented Interfaces:
AudioSong
public class ITunesAudioSong extends AudioSongFacade
Facade forAudioMetaData
,Song
andTrack
. Changes are immediately and correctly persisted in some or all of the implementation classes.- Author:
- Hendrik Schreiber
-
-
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 class com.tagtraum.beatunes.library.AudioSongFacade
audioMetaDataExecutor, musicLibrary, song, tunesExecutor
-
Fields inherited from interface com.tagtraum.audiokern.AudioSong
ACOUSTIC_NAMES, ELECTRONIC_NAMES
-
-
Constructor Summary
Constructors Constructor Description ITunesAudioSong(Song song, MediaLibrary musicLibrary)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addArtwork(AudioArtwork audioArtwork)
Adds an artwork/image to the audio song.void
download()
Allows downloading of shared (e.g.boolean
equals(Object o)
Set<AudioId>
getAlbumIds()
Get album ids.Set<AudioId>
getArtistIds()
Get artists ids.AudioArtwork[]
getArtworks()
Artwork belonging to this song.Image
getBackCoverImage()
Returns the first front cover image.AudioSong.CloudStatus
getCloudStatus()
Returns the cloud status, if available.Path
getFile(boolean refresh)
File of this track.Image
getFrontCoverImage()
Returns the first front cover image.Image
getImage()
First artwork image.Image[]
getImages()
All images.<T> T
getImplementation(Class<T> klass)
AudioSong
objects are sometimes implemented by an object that acts as a facade to other AudioSong objects.List<AudioSong>
getImplementations()
Returns implementations of this interface instance.String
getLocation(boolean refresh)
Location of this track.String
getLyrics()
Returns the lyrics.Set<String>
getTags()
Returns a set of tags associated with this song.Set<AudioId>
getTrackIds()
Returns track ids.void
refreshFromFile()
Attempt to reload data from the underlying file.void
setAlbum(String value)
Sets album name.void
setAlbumArtist(String value)
Sets the album artist.void
setAlbumLiking(AudioSong.Liking value)
Set album liking.void
setAlbumRating(int value)
Sets album rating.void
setAlbumReplayGain(ReplayGain value, boolean updateITunNorm)
Sets the replay gain for this album.void
setArtist(String value)
Sets artist.void
setArtworks(AudioArtwork... audioArtworks)
Set artworks belonging to this track.void
setBackCoverArtwork(File... backCover)
Replace all back covers with the given files.void
setBeats(Beats value)
Sets this song's beats.void
setBeatsAlgorithm(String value)
Sets the algorithm the beats were computed with.void
setBeatsPerMinute(float value)
Sets beats per minute.void
setBeatsPerMinuteAlgorithm(String value)
Sets the BPM algorithm.void
setClean(boolean value)
Sets the "clean" flag.void
setColor(Color value)
Sets the color.void
setComments(String value)
Set comments.void
setCompilation(boolean value)
Marks this song as part of a compilation (or not).void
setComposer(String value)
Sets composer.void
setContentRating(String value)
Sets the content rating.void
setCustom1(String value)
Custom field.void
setCustom2(String value)
Custom field.void
setCustom3(String value)
Custom field.void
setCustom4(String value)
Custom field.void
setCustom5(String value)
Custom field.void
setDanceability(Float value)
Danceability.void
setDanceabilityAlgorithm(String value)
Set the danceability algorithm.void
setDateAnalyzed(Date value)
Sets the date this song was last analyzed.void
setDescription(String value)
Sets description/subtitle.void
setDiscCount(int value)
Set disc count.void
setDiscNumber(int value)
Sets the disc number.void
setEnabled(boolean value)
Enables/disables this song.void
setEpisode(String value)
Set episode name.void
setEpisodeOrder(int value)
Set episode order.void
setExplicit(boolean value)
Sets the "explicit" flag.void
setFingerprint(byte[] value)
Sets the acoustic fingerprint.void
setFinish(float value)
Sets the stop time in seconds.void
setFrontCoverArtwork(File... frontCover)
Replace all front covers with the given files.void
setGenre(String value)
Sets genre.void
setGrouping(String value)
Sets the grouping.void
setHasVideo(boolean value)
Sets the "video" flag.void
setHD(boolean value)
Sets the HD flag.void
setInstrumentation(AudioSong.Instrumentation instrumentation)
Sets the instrumentation property.void
setInstrumentationAlgorithm(String instrumentationAlgorithm)
Set the instrumentation algorithm.void
setKey(Key value)
Sets the tonal key.void
setKeyAlgorithm(String value)
Set the key algorithm.void
setKind(String value)
Allows you to store a String descriptor of the kind of audio object this is.void
setLanguage(String value)
Sets the language as ISO 639 three letter code.void
setLiking(AudioSong.Liking value)
Set liking.void
setLocation(String value)
Sets the location.void
setLoudness(Loudness value)
Sets this song's loudness curve.void
setLyrics(String value)
Sets lyrics.void
setMediaKind(AudioSong.MediaKind value)
Set the kind of media, e.g.void
setMood(Mood value)
Sets this song's mood.void
setMoodAlgorithm(String value)
Sets the method the current mood value was created with.void
setMoodKeywords(Set<String> value)
Attempt to store the raw mood keywordsvoid
setMovement(String value)
Classical movement.void
setMovementCount(int value)
Classical movement count.void
setMovementNumber(int value)
Classical movement number.void
setName(String value)
Sets name.void
setPartOfGaplessAlbum(boolean value)
Sets the "gapless album" flag.void
setPlayCount(int value)
Set play count.void
setPlayDate(long value)
Set play date in milliseconds since January 1, 1970, 00:00:00 GMT (NOT related to the iTunes value!).void
setPlayDateUTC(Date value)
Set play time.void
setPopularity(float value)
Sets the value locally.void
setRating(int value)
Sets the ratingvoid
setRelativeSpectralEntropyMean(Float value)
Sets the average relative spectral entropy.void
setReleaseDate(Date value)
Set release date.void
setRemoteDisliked(float value)
Sets the value locally.void
setRemoteLoved(float value)
Sets the value locally.void
setRemotePlayFrequency(float value)
Sets the value locally.void
setRemotePlaySkipRatio(float value)
Sets the value locally.void
setRemoteRating(int value)
Sets the value locally.void
setRemoteUpdateDate(Date value)
Sets the date that marks the last update of remote properties.void
setRMSMean(Float value)
Sets the average RMS for the first 120 seconds of this song.void
setRMSStandardDeviation(Float value)
Sets the standard deviation of the root mean square (RMS).void
setSeason(int value)
Set season.void
setSegments(Segments value)
Sets this song's segments.void
setSegmentsAlgorithm(String value)
Sets the algorithm the segments were computed with.void
setShow(String value)
Set show name.void
setSimilarities(Similarities value)
Sets this song's similarities.void
setSimilaritiesAlgorithm(String value)
Sets the algorithm the similarities were computed with.void
setSkipCount(int value)
Set skip count.void
setSkipDate(Date value)
Set skip date.void
setSortAlbum(String value)
Sets the sort album.void
setSortAlbumArtist(String value)
Sets the sort album artist.void
setSortArtist(String value)
Sets the sort artist.void
setSortComposer(String value)
Sets the sort composer.void
setSortName(String value)
Sets the sort name.void
setSortShow(String value)
Sets the sort show.void
setSpectralCentroidMean(Float value)
Sets the mean of the spectral centroids.void
setSpectralFluctuationPeak(Float value)
Peak of the spectral fluctuation values computed for windows of length 23.22ms, with a hopsize of half a window.void
setSpectralFluxMean(Float value)
Sets the mean spectral flux.void
setSpectralNoveltyMean(Float value)
Sets the average spectral novelty.void
setSpectralSpreadMean(Float value)
Sets the average spectral spread.void
setSpectralVariabilityMean(Float value)
Sets the mean spectral variability.void
setSpectrum(com.tagtraum.audiokern.timbre.BarkSpectrum value)
Sets the bark spectrum.void
setStart(float value)
Sets the start time in seconds.void
setStartTime(int value)
Set start time in ms.void
setStopTime(int value)
Sets stop time.void
setTags(Set<String> value)
Sets a new set of tags.void
setTempo(com.tagtraum.audiokern.bpm.Tempo value)
Sets the tempo.void
setTempoColor(Color value)
Sets this song's tempo color.void
setTempoSpectrum(com.tagtraum.audiokern.bpm.TempoSpectrum value)
Sets the tempo spectrum.void
setTempoTimbreColor(Color value)
Sets this song's tempo-timbre color.void
setTimeSignature(TimeSignature value)
Sets this song's time signature.void
setTimeSignatureAlgorithm(String value)
Sets the algorithm the time signature was computed with.void
setTrackCount(int value)
Set track countvoid
setTrackNumber(int value)
Set the number of this track.void
setTrackReplayGain(ReplayGain value, boolean updateITunNorm)
Sets the replay gain for this track, not taking other tracks of the album into account.void
setTrackType(AudioSong.TrackType value)
Field used by iTunes - typicallyAudioSong.TrackType.FILE
for files andAudioSong.TrackType.URL
for..void
setTuning(Integer value)
Sets tuning in cents (+-50).void
setTuningAlgorithm(String value)
Sets the tuning algorithm the current tuning value was computed with.void
setUnplayed(boolean value)
Sets unplayed.void
setVolumeAdjustment(int value)
Sets the volume adjustmentvoid
setWork(String value)
Classical work.void
setYear(int value)
Sets the year.String
toString()
-
Methods inherited from class com.tagtraum.beatunes.library.AudioSongFacade
addPropertyChangeListener, addPropertyChangeListener, canWrite, copy, delete, firePropertyChange, getAlbum, getAlbumArtist, getAlbumLiking, getAlbumRating, getAlbumReplayGain, getArtist, getArtworkCount, getBeats, getBeatsAlgorithm, getBeatsPerMinute, getBeatsPerMinuteAlgorithm, getBitRate, getColor, getComments, getComposer, getContentRating, getCustom1, getCustom2, getCustom3, getCustom4, getCustom5, getDanceability, getDanceabilityAlgorithm, getDateAdded, getDateAnalyzed, getDateModified, getDescription, getDiscCount, getDiscNumber, getEpisode, getEpisodeOrder, getFingerprint, getFinish, getFolderImage, getGenre, getGrouping, getId, getInstrumentation, getInstrumentationAlgorithm, getKey, getKeyAlgorithm, getKind, getLanguage, getLiking, getLoudness, getLyricsTermFrequencies, getMeasuresPerMinute, getMediaKind, getMood, getMoodAlgorithm, getMoodKeywords, getMovement, getMovementCount, getMovementNumber, getName, getPath, getPlayCount, getPlayDate, getPlayDateUTC, getPlayFrequency, getPlaySkipRatio, getPopularity, getPropertyChangeListeners, getPropertyChangeListeners, getRating, getRelativeSpectralEntropyMean, getReleaseDate, getRemoteDisliked, getRemoteLoved, getRemotePlayFrequency, getRemotePlaySkipRatio, getRemoteRating, getRemoteUpdateDate, getRMSMean, getRMSStandardDeviation, getSampleRate, getSeason, getSegments, getSegmentsAlgorithm, getShow, getSimilarities, getSimilaritiesAlgorithm, getSize, getSkipCount, getSkipDate, getSortAlbum, getSortAlbumArtist, getSortArtist, getSortComposer, getSortName, getSortShow, getSpectralCentroidMean, getSpectralFluctuationPeak, getSpectralFluxMean, getSpectralNoveltyMean, getSpectralSpreadMean, getSpectralVariabilityMean, getSpectrum, getStart, getStartTime, getStopTime, getTempo, getTempoColor, getTempoSpectrum, getTempoTimbreColor, getTimeSignature, getTimeSignatureAlgorithm, getTotalTime, getTrackCount, getTrackNumber, getTrackReplayGain, getTrackType, getTuning, getTuningAlgorithm, getVolumeAdjustment, getWork, getYear, hashCode, hasProtectedFileExtension, isAlbumRatingComputed, isClean, isCompilation, isDifferent, isDisabled, isEnabled, isExplicit, isHasVideo, isHD, isPartOfGaplessAlbum, isProtected, isPurchased, isRatingComputed, isShared, isUnplayed, removePropertyChangeListener, removePropertyChangeListener, setDisabled, updateTempoTimbreColor
-
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
-
-
-
-
Constructor Detail
-
ITunesAudioSong
public ITunesAudioSong(Song song, MediaLibrary musicLibrary)
-
-
Method Detail
-
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. :-)
- 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:AudioSong
Returns implementations of this interface instance.- Returns:
- implementations
- See Also:
AudioSong.getImplementation(Class)
-
download
public void download()
Description copied from interface:AudioSong
Allows 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
PropertyChangeListener
for one of the propertiesshared
,trackType
orlocation
.
-
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.- Returns:
- the status if available,
null
, if the feature is not supported (Windows, non-iTunes libraries, ...)
-
setName
public void setName(String value)
Description copied from interface:AudioSong
Sets name.- Parameters:
value
- name
-
setDescription
public void setDescription(String value)
Description copied from interface:AudioSong
Sets description/subtitle.- Parameters:
value
- description
-
setWork
public void setWork(String value)
Description copied from interface:AudioSong
Classical work.- Parameters:
value
- work
-
setMovement
public void setMovement(String value)
Description copied from interface:AudioSong
Classical movement.- Parameters:
value
- movement
-
setMovementNumber
public void setMovementNumber(int value)
Description copied from interface:AudioSong
Classical movement number.- Parameters:
value
- number
-
setMovementCount
public void setMovementCount(int value)
Description copied from interface:AudioSong
Classical movement count.- Parameters:
value
- count
-
setArtist
public void setArtist(String value)
Description copied from interface:AudioSong
Sets artist.- Parameters:
value
- artist
-
setAlbumArtist
public void setAlbumArtist(String value)
Description copied from interface:AudioSong
Sets the album artist.- Parameters:
value
- album artist
-
getLyrics
public String getLyrics()
Description copied from interface:AudioSong
Returns the lyrics.- Returns:
- lyrics
-
setLyrics
public void setLyrics(String value)
Description copied from interface:AudioSong
Sets lyrics.- Parameters:
value
- lyrics
-
setComposer
public void setComposer(String value)
Description copied from interface:AudioSong
Sets composer.- Parameters:
value
- composer
-
setAlbum
public void setAlbum(String value)
Description copied from interface:AudioSong
Sets album name.- Parameters:
value
- album
-
setGrouping
public void setGrouping(String value)
Description copied from interface:AudioSong
Sets the grouping.- Parameters:
value
- grouping
-
setGenre
public void setGenre(String value)
Description copied from interface:AudioSong
Sets genre.- Parameters:
value
- genre
-
setKind
public void setKind(String value)
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 (withAudioSong.getKind()
) and set by the music player, e.g. iTunes.- Parameters:
value
- kind- See Also:
AudioSong.getKind()
-
setStartTime
public void setStartTime(int value)
Description copied from interface:AudioSong
Set start time in ms.- Parameters:
value
- start time in ms
-
setStopTime
public void setStopTime(int value)
Description copied from interface:AudioSong
Sets stop time.- Parameters:
value
- stop time in ms
-
setStart
public void setStart(float value)
Description copied from interface:AudioSong
Sets the start time in seconds.- Parameters:
value
- start time in seconds- See Also:
AudioSong.setStartTime(int)
-
setFinish
public void setFinish(float value)
Description copied from interface:AudioSong
Sets the stop time in seconds.- Parameters:
value
- stop time in seconds- See Also:
AudioSong.setStopTime(int)
-
setTrackCount
public void setTrackCount(int value)
Description copied from interface:AudioSong
Set track count- Parameters:
value
- track count- See Also:
AudioSong.setTrackNumber(int)
-
setTrackNumber
public void setTrackNumber(int value)
Description copied from interface:AudioSong
Set the number of this track.- Parameters:
value
- track number
-
setDiscNumber
public void setDiscNumber(int value)
Description copied from interface:AudioSong
Sets the disc number.- Parameters:
value
- disc number
-
setDiscCount
public void setDiscCount(int value)
Description copied from interface:AudioSong
Set disc count.- Parameters:
value
- disc count
-
setYear
public void setYear(int value)
Description copied from interface:AudioSong
Sets the year.- Parameters:
value
- year- See Also:
AudioSong.getYear()
,AudioSong.getReleaseDate()
-
setVolumeAdjustment
public void setVolumeAdjustment(int value)
Description copied from interface:AudioSong
Sets the volume adjustment- Parameters:
value
- value between -255 and 255.
-
setComments
public void setComments(String value)
Description copied from interface:AudioSong
Set comments.- Parameters:
value
- comments
-
setPlayCount
public void setPlayCount(int value)
Description copied from interface:AudioSong
Set play count.- Parameters:
value
- play count
-
setPlayDate
public void setPlayDate(long value)
Description copied from interface:AudioSong
Set play date in milliseconds since January 1, 1970, 00:00:00 GMT (NOT related to the iTunes value!).- Parameters:
value
- play date
-
setPlayDateUTC
public void setPlayDateUTC(Date value)
Description copied from interface:AudioSong
Set play time.- Parameters:
value
- play time
-
setSkipCount
public void setSkipCount(int value)
Description copied from interface:AudioSong
Set skip count.- Parameters:
value
- skip count
-
setSkipDate
public void setSkipDate(Date value)
Description copied from interface:AudioSong
Set skip date.- Parameters:
value
- skip date
-
setReleaseDate
public void setReleaseDate(Date value)
Description copied from interface:AudioSong
Set release date.- Parameters:
value
- release date
-
setDateAnalyzed
public void setDateAnalyzed(Date value)
Description copied from interface:AudioSong
Sets the date this song was last analyzed.- Parameters:
value
- date of last analysis
-
getImage
public Image getImage()
Description copied from interface:AudioSong
First artwork image.- Returns:
- first artwork image of this track.
- See Also:
AudioSong.getFrontCoverImage()
,AudioSong.getBackCoverImage()
-
getFrontCoverImage
public Image getFrontCoverImage()
Description copied from interface:AudioSong
Returns the first front cover image.- Returns:
- image or null
-
getBackCoverImage
public Image getBackCoverImage()
Description copied from interface:AudioSong
Returns the first front cover image.- Returns:
- image or null
-
getImages
public Image[] getImages()
Description copied from interface:AudioSong
All images.- Returns:
- images or empty array, never returns
null
-
getArtworks
public AudioArtwork[] getArtworks()
Description copied from interface:AudioSong
Artwork belonging to this song.- Returns:
- array of artworks
-
addArtwork
public void addArtwork(AudioArtwork audioArtwork)
Description copied from interface:AudioSong
Adds an artwork/image to the audio song.- Parameters:
audioArtwork
- artwork
-
setArtworks
public void setArtworks(AudioArtwork... audioArtworks)
Description copied from interface:AudioSong
Set artworks belonging to this track.- Parameters:
audioArtworks
- artworks
-
setFrontCoverArtwork
public void setFrontCoverArtwork(File... frontCover)
Description copied from interface:AudioSong
Replace all front covers with the given files.- Parameters:
frontCover
- front cover- See Also:
AudioSong.setBackCoverArtwork(java.io.File...)
-
setBackCoverArtwork
public void setBackCoverArtwork(File... backCover)
Description copied from interface:AudioSong
Replace all back covers with the given files.- Parameters:
backCover
- back cover- See Also:
AudioSong.setFrontCoverArtwork(java.io.File...)
-
setRating
public void setRating(int value)
Description copied from interface:AudioSong
Sets the rating- Parameters:
value
- rating between from 0 to 100- See Also:
AudioSong.getRating()
-
setAlbumRating
public void setAlbumRating(int value)
Description copied from interface:AudioSong
Sets album rating.- Parameters:
value
- album rating
-
setInstrumentation
public void setInstrumentation(AudioSong.Instrumentation instrumentation)
Description copied from interface:AudioSong
Sets the instrumentation property.- Parameters:
instrumentation
- instrumentation
-
setInstrumentationAlgorithm
public void setInstrumentationAlgorithm(String instrumentationAlgorithm)
Description copied from interface:AudioSong
Set the instrumentation algorithm. Should beEntered
, if the value was entered manually.- Parameters:
instrumentationAlgorithm
- instrumentation algorithm
-
setDanceability
public void setDanceability(Float value)
Description copied from interface:AudioSong
Danceability.- Parameters:
value
- normalized positive value (0-1)
-
setDanceabilityAlgorithm
public void setDanceabilityAlgorithm(String value)
Description copied from interface:AudioSong
Set the danceability algorithm. Should beEntered
, if the value was entered manually.- Parameters:
value
- danceability algorithm
-
setLiking
public void setLiking(AudioSong.Liking value)
Description copied from interface:AudioSong
Set liking.- Parameters:
value
- liking
-
setAlbumLiking
public void setAlbumLiking(AudioSong.Liking value)
Description copied from interface:AudioSong
Set album liking.- Parameters:
value
- liking
-
setShow
public void setShow(String value)
Description copied from interface:AudioSong
Set show name.- Parameters:
value
- show
-
setSeason
public void setSeason(int value)
Description copied from interface:AudioSong
Set season.- Parameters:
value
- season
-
setEpisode
public void setEpisode(String value)
Description copied from interface:AudioSong
Set episode name.- Parameters:
value
- episode name
-
setEpisodeOrder
public void setEpisodeOrder(int value)
Description copied from interface:AudioSong
Set episode order.- Parameters:
value
- episode order
-
setCompilation
public void setCompilation(boolean value)
Description copied from interface:AudioSong
Marks this song as part of a compilation (or not).- Parameters:
value
-true
orfalse
-
setEnabled
public void setEnabled(boolean value)
Description copied from interface:AudioSong
Enables/disables this song.- Parameters:
value
-true
orfalse
-
setTrackType
public void setTrackType(AudioSong.TrackType value)
Description copied from interface:AudioSong
Field used by iTunes - typicallyAudioSong.TrackType.FILE
for files andAudioSong.TrackType.URL
for.. well, guess what?! Typically you don't set this field manually.- Parameters:
value
- track type- See Also:
AudioSong.getTrackType()
-
setUnplayed
public void setUnplayed(boolean value)
Description copied from interface:AudioSong
Sets unplayed.- Parameters:
value
- unplayed
-
setClean
public void setClean(boolean value)
Description copied from interface:AudioSong
Sets the "clean" flag. "Clean" and "explicit" are mutually exclusive.- Parameters:
value
-true
orfalse
- See Also:
AudioSong.setExplicit(boolean)
-
setHasVideo
public void setHasVideo(boolean value)
Description copied from interface:AudioSong
Sets the "video" flag.- Parameters:
value
-true
orfalse
-
setMediaKind
public void setMediaKind(AudioSong.MediaKind value)
Description copied from interface:AudioSong
Set the kind of media, e.g.AudioSong.MediaKind.AUDIOBOOK
.- Parameters:
value
- media kind
-
setLocation
public void setLocation(String value)
Description copied from interface:AudioSong
Sets the location.- Parameters:
value
- location
-
getLocation
public String getLocation(boolean refresh)
Description copied from interface:AudioSong
Location of this track. Ifrefresh
is 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:
getLocation
in interfaceAudioSong
- Overrides:
getLocation
in classAudioSongFacade
- Parameters:
refresh
- refresh from backend- Returns:
- location
- See Also:
AudioSong.getLocation()
,AudioSong.getFile(boolean)
-
getFile
public Path getFile(boolean refresh)
Description copied from interface:AudioSong
File of this track. Ifrefresh
is 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.- 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)
-
setPartOfGaplessAlbum
public void setPartOfGaplessAlbum(boolean value)
Description copied from interface:AudioSong
Sets the "gapless album" flag.- Parameters:
value
-true
orfalse
-
setExplicit
public void setExplicit(boolean value)
Description copied from interface:AudioSong
Sets the "explicit" flag. "Clean" and "explicit" are mutually exclusive.- Parameters:
value
-true
orfalse
- See Also:
AudioSong.setClean(boolean)
-
setHD
public void setHD(boolean value)
Description copied from interface:AudioSong
Sets the HD flag.- Parameters:
value
-true
orfalse
-
setSortArtist
public void setSortArtist(String value)
Description copied from interface:AudioSong
Sets the sort artist.- Parameters:
value
- sort artist
-
setSortAlbum
public void setSortAlbum(String value)
Description copied from interface:AudioSong
Sets the sort album.- Parameters:
value
- sort album
-
setSortName
public void setSortName(String value)
Description copied from interface:AudioSong
Sets the sort name.- Parameters:
value
- sort name
-
setSortAlbumArtist
public void setSortAlbumArtist(String value)
Description copied from interface:AudioSong
Sets the sort album artist.- Parameters:
value
- sort album artist
-
setSortComposer
public void setSortComposer(String value)
Description copied from interface:AudioSong
Sets the sort composer.- Parameters:
value
- sort composer
-
setSortShow
public void setSortShow(String value)
Description copied from interface:AudioSong
Sets the sort show.- Parameters:
value
- sort show
-
setContentRating
public void setContentRating(String value)
Description copied from interface:AudioSong
Sets the content rating.- Parameters:
value
- content rating
-
setBeatsPerMinute
public void setBeatsPerMinute(float value)
Description copied from interface:AudioSong
Sets beats per minute.- Parameters:
value
- beats per minute- See Also:
AudioSong.setTempo(com.tagtraum.audiokern.bpm.Tempo)
-
setTempo
public void setTempo(com.tagtraum.audiokern.bpm.Tempo value)
Description copied from interface:AudioSong
Sets the tempo.- Parameters:
value
- tempo
-
setTags
public void setTags(Set<String> value)
Description copied from interface:AudioSong
Sets a new set of tags.- Parameters:
value
- set of strings
-
getTags
public Set<String> getTags()
Description copied from interface:AudioSong
Returns 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.- Returns:
- set of tags
-
setKey
public void setKey(Key value)
Description copied from interface:AudioSong
Sets the tonal key.- Parameters:
value
- tonal key key- See Also:
AudioSong.setKeyAlgorithm(String)
-
setKeyAlgorithm
public void setKeyAlgorithm(String value)
Description copied from interface:AudioSong
Set the key algorithm. Should beEntered
, if the value was entered manually.- Parameters:
value
- key algorithm
-
setSpectrum
public void setSpectrum(com.tagtraum.audiokern.timbre.BarkSpectrum value)
Description copied from interface:AudioSong
Sets the bark spectrum.- Parameters:
value
- bark spectrum
-
setColor
public void setColor(Color value)
Description copied from interface:AudioSong
Sets the color.- Parameters:
value
- color
-
setTempoColor
public void setTempoColor(Color value)
Description copied from interface:AudioSong
Sets this song's tempo color.- Parameters:
value
- color
-
setTempoTimbreColor
public void setTempoTimbreColor(Color value)
Description copied from interface:AudioSong
Sets this song's tempo-timbre color.- Parameters:
value
- color
-
setTempoSpectrum
public void setTempoSpectrum(com.tagtraum.audiokern.bpm.TempoSpectrum value)
Description copied from interface:AudioSong
Sets the tempo spectrum.- Parameters:
value
- tempo spectrum
-
setBeatsPerMinuteAlgorithm
public void setBeatsPerMinuteAlgorithm(String value)
Description copied from interface:AudioSong
Sets the BPM algorithm.- Parameters:
value
- bpm algorithm name
-
setTuningAlgorithm
public void setTuningAlgorithm(String value)
Description copied from interface:AudioSong
Sets the tuning algorithm the current tuning value was computed with.- Parameters:
value
- tuning algorithm
-
setMoodAlgorithm
public void setMoodAlgorithm(String value)
Description copied from interface:AudioSong
Sets the method the current mood value was created with.- Parameters:
value
- mood algorithm
-
setBeatsAlgorithm
public void setBeatsAlgorithm(String value)
Description copied from interface:AudioSong
Sets the algorithm the beats were computed with.- Parameters:
value
- beats algorithm
-
setSegmentsAlgorithm
public void setSegmentsAlgorithm(String value)
Description copied from interface:AudioSong
Sets the algorithm the segments were computed with.- Parameters:
value
- segments algorithm
-
setSimilaritiesAlgorithm
public void setSimilaritiesAlgorithm(String value)
Description copied from interface:AudioSong
Sets the algorithm the similarities were computed with.- Parameters:
value
- similarities algorithm
-
setTimeSignatureAlgorithm
public void setTimeSignatureAlgorithm(String value)
Description copied from interface:AudioSong
Sets the algorithm the time signature was computed with.- Parameters:
value
- time signature algorithm
-
setLanguage
public void setLanguage(String value)
Description copied from interface:AudioSong
Sets the language as ISO 639 three letter code.- Parameters:
value
- ISO 639 three letter code
-
setFingerprint
public void setFingerprint(byte[] value)
Description copied from interface:AudioSong
Sets the acoustic fingerprint.- Parameters:
value
- fingerprint
-
setTuning
public void setTuning(Integer value)
Description copied from interface:AudioSong
Sets tuning in cents (+-50).- Parameters:
value
- in cents
-
setMood
public void setMood(Mood value)
Description copied from interface:AudioSong
Sets this song's mood.- Parameters:
value
- mood
-
setMoodKeywords
public void setMoodKeywords(Set<String> value)
Description copied from interface:AudioSong
Attempt to store the raw mood keywords- Parameters:
value
- mood keywords
-
setBeats
public void setBeats(Beats value)
Description copied from interface:AudioSong
Sets this song's beats.- Parameters:
value
- beats
-
setSegments
public void setSegments(Segments value)
Description copied from interface:AudioSong
Sets this song's segments.- Parameters:
value
- segments
-
setSimilarities
public void setSimilarities(Similarities value)
Description copied from interface:AudioSong
Sets this song's similarities.- Parameters:
value
- similarities
-
setLoudness
public void setLoudness(Loudness value)
Description copied from interface:AudioSong
Sets this song's loudness curve.
-
setTrackReplayGain
public void setTrackReplayGain(ReplayGain value, boolean updateITunNorm)
Description copied from interface:AudioSong
Sets the replay gain for this track, not taking other tracks of the album into account.- Parameters:
value
- replay gainupdateITunNorm
- update the iTunNorm field with the given value- See Also:
AudioSong.getTrackReplayGain()
,AudioSong.getAlbumReplayGain()
-
setAlbumReplayGain
public void setAlbumReplayGain(ReplayGain value, boolean updateITunNorm)
Description copied from interface:AudioSong
Sets the replay gain for this album.- Parameters:
value
- replay gainupdateITunNorm
- update the iTunNorm field with the given value- See Also:
AudioSong.getAlbumReplayGain()
-
setTimeSignature
public void setTimeSignature(TimeSignature value)
Description copied from interface:AudioSong
Sets this song's time signature.- Parameters:
value
- time signature
-
setCustom1
public void setCustom1(String value)
Description copied from interface:AudioSong
Custom field.- Parameters:
value
- custom field value
-
setCustom2
public void setCustom2(String value)
Description copied from interface:AudioSong
Custom field.- Parameters:
value
- custom field value
-
setCustom3
public void setCustom3(String value)
Description copied from interface:AudioSong
Custom field.- Parameters:
value
- custom field value
-
setCustom4
public void setCustom4(String value)
Description copied from interface:AudioSong
Custom field.- Parameters:
value
- custom field value
-
setCustom5
public void setCustom5(String value)
Description copied from interface:AudioSong
Custom field.- Parameters:
value
- custom field value
-
setPopularity
public void setPopularity(float value)
Description copied from interface:AudioSong
Sets the value locally. In other words, the value is not propagated to the central database.- Parameters:
value
- value
-
setRemoteUpdateDate
public void setRemoteUpdateDate(Date value)
Description copied from interface:AudioSong
Sets 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.- Parameters:
value
- date- See Also:
AudioSong.getRemoteUpdateDate()
-
setRemoteRating
public void setRemoteRating(int value)
Description copied from interface:AudioSong
Sets the value locally. In other words, the value is not propagated to the central database.- Parameters:
value
- value
-
setRemotePlayFrequency
public void setRemotePlayFrequency(float value)
Description copied from interface:AudioSong
Sets the value locally. In other words, the value is not propagated to the central database.- Parameters:
value
- value
-
setRemotePlaySkipRatio
public void setRemotePlaySkipRatio(float value)
Description copied from interface:AudioSong
Sets the value locally. In other words, the value is not propagated to the central database.- Parameters:
value
- value
-
setRemoteLoved
public void setRemoteLoved(float value)
Description copied from interface:AudioSong
Sets the value locally. In other words, the value is not propagated to the central database.- Parameters:
value
- value
-
setRemoteDisliked
public void setRemoteDisliked(float value)
Description copied from interface:AudioSong
Sets the value locally. In other words, the value is not propagated to the central database.- Parameters:
value
- value
-
setRMSMean
public void setRMSMean(Float value)
Description copied from interface:AudioSong
Sets the average RMS for the first 120 seconds of this song.- Parameters:
value
- averaged RMS- See Also:
AudioSong.getRMSMean()
-
setRMSStandardDeviation
public void setRMSStandardDeviation(Float value)
Description copied from interface:AudioSong
Sets the standard deviation of the root mean square (RMS).- Parameters:
value
- standard deviation of the RMS/window
-
setSpectralCentroidMean
public void setSpectralCentroidMean(Float value)
Description copied from interface:AudioSong
Sets the mean of the spectral centroids.- Parameters:
value
- averaged spectral centroids- See Also:
AudioSong.getSpectralCentroidMean()
-
setSpectralSpreadMean
public void setSpectralSpreadMean(Float value)
Description copied from interface:AudioSong
Sets the average spectral spread.- Parameters:
value
- average spectral spread- See Also:
AudioSong.getSpectralSpreadMean()
-
setRelativeSpectralEntropyMean
public void setRelativeSpectralEntropyMean(Float value)
Description copied from interface:AudioSong
Sets the average relative spectral entropy.- Parameters:
value
- average- See Also:
AudioSong.getRelativeSpectralEntropyMean()
-
setSpectralFluctuationPeak
public void setSpectralFluctuationPeak(Float value)
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.- Parameters:
value
- peak in an averaged fluctuation spectrum- See Also:
AudioSong.getSpectralFluctuationPeak()
-
setSpectralNoveltyMean
public void setSpectralNoveltyMean(Float value)
Description copied from interface:AudioSong
Sets the average spectral novelty.- Parameters:
value
- average- See Also:
AudioSong.getSpectralNoveltyMean()
-
setSpectralFluxMean
public void setSpectralFluxMean(Float value)
Description copied from interface:AudioSong
Sets the mean spectral flux.- Parameters:
value
- average spectral flux- See Also:
AudioSong.getSpectralFluxMean()
-
setSpectralVariabilityMean
public void setSpectralVariabilityMean(Float value)
Description copied from interface:AudioSong
Sets the mean spectral variability.- Parameters:
value
- average spectral variability- See Also:
AudioSong.getSpectralVariabilityMean()
-
getTrackIds
public Set<AudioId> getTrackIds()
Description copied from interface:AudioSong
Returns track ids.- Returns:
- track ids
-
getAlbumIds
public Set<AudioId> getAlbumIds()
Description copied from interface:AudioSong
Get album ids.- Returns:
- album ids
-
getArtistIds
public Set<AudioId> getArtistIds()
Description copied from interface:AudioSong
Get artists ids.- Returns:
- artist ids
-
refreshFromFile
public void refreshFromFile() throws IOException, UnsupportedOperationException
Description copied from interface:AudioSong
Attempt to reload data from the underlying file.- Throws:
IOException
- if the operation failsUnsupportedOperationException
- if the operation is not supported by the current implementation- See Also:
AudioSong.getImplementation(Class)
-
-