Copyright | © 2015–2017 Mark Karpov |
---|---|
License | BSD 3 clause |
Maintainer | Mark Karpov <markkarpov92@gmail.com> |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
Sound.HTagLib.Getter
Contents
Description
A high-level applicative interface for reading of audio meta data. You don't need to import this module directly, import Sound.HTagLib instead.
- data TagGetter a
- getTags :: MonadIO m => FilePath -> TagGetter a -> m a
- getTags' :: MonadIO m => FilePath -> FileType -> TagGetter a -> m a
- titleGetter :: TagGetter Title
- artistGetter :: TagGetter Artist
- albumGetter :: TagGetter Album
- commentGetter :: TagGetter Comment
- genreGetter :: TagGetter Genre
- yearGetter :: TagGetter (Maybe Year)
- trackNumberGetter :: TagGetter (Maybe TrackNumber)
- durationGetter :: TagGetter Duration
- bitRateGetter :: TagGetter BitRate
- sampleRateGetter :: TagGetter SampleRate
- channelsGetter :: TagGetter Channels
High-level API
getTags path g
will try to read file located at path
and read meta
data of the file using getter g
. Type of file will be guessed from its
extension. If this is not satisfactory and you want to explicitly specify
the file type, see getTags'
variation of this function.
In the case of trouble HTagLibException
will be thrown.
Built-in getters
titleGetter :: TagGetter Title #
Getter to retrieve track title.
artistGetter :: TagGetter Artist #
Getter to retrieve track artist.
albumGetter :: TagGetter Album #
Getter to retrieve track album.
commentGetter :: TagGetter Comment #
Getter to retrieve track comment.
genreGetter :: TagGetter Genre #
Getter to retrieve genre of the track.
yearGetter :: TagGetter (Maybe Year) #
Getter to retrieve year to the track (returns Nothing
if the data is
missing).
trackNumberGetter :: TagGetter (Maybe TrackNumber) #
Getter to retrieve track number (returns Nothing
if the data is
missing).
durationGetter :: TagGetter Duration #
Getter to retrieve duration in seconds.
bitRateGetter :: TagGetter BitRate #
Getter to retrieve bit rate.
sampleRateGetter :: TagGetter SampleRate #
Getter to retrieve sample rate.
channelsGetter :: TagGetter Channels #
Getter to retrieve number of channels in audio data.