Taglib Bindings for Racket

Asumu Takikawa <asumu@racket-lang.org>

This package contains a set of Racket bindings for the Taglib library for reading metadata for popular audio formats. The bindings are for the C library, which only supports the limited abstract API of Taglib.

Requires the taglibc library.

This package has been tested on Debian GNU/Linux. If you have taglibc installed and this FFI binding cannot find it, please e-mail me about your setup so that I can improve the library.

 (require (planet asumu/taglib:1:=0))

(struct tag (title artist album comment genre year track)
  #:extra-constructor-name make-tag)
  title : string?
  artist : string?
  album : string?
  comment : string?
  genre : string?
  year : exact-nonnegative-integer?
  track : exact-nonnegative-integer?
Represents the Tag class in taglib. Contains common metadata.

(struct audioproperties (length bitrate samplerate channels)
  #:extra-constructor-name make-audioproperties)
  length : exact-nonnegative-integer?
  bitrate : exact-nonnegative-integer?
  samplerate : exact-nonnegative-integer?
  channels : exact-nonnegative-integer?
Represents the AudioProperties class in taglib. Contains audio properties.

(get-metadata path)
  (option/c (list/c tag/c audio-properties/c))
  path : path-string?
Extracts the metadata and audio properties of the audio file at the given path. If unsuccessful, the function returns #f.