Taglib Bindings for Racket
tag
audio-properties
get-metadata
6.3.90.900

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 taglib) package: taglib

struct

(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

(struct audio-properties (length bitrate samplerate channels)
    #:extra-constructor-name make-audio-properties)
  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.

procedure

(get-metadata path)  (or/c (list/c tag? audio-properties?) #f)

  path : path-string?
Extracts the metadata and audio properties of the audio file at the given path. If unsuccessful, the function returns #f.