monatone: Pure Haskell library for audio metadata parsing and writing

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

Monatone is a pure Haskell library for parsing and writing metadata from audio files. Supported formats include . - FLAC (full read/write support with Vorbis comments and album art) - MP3 (ID3v1, ID3v2.3, and ID3v2.4 tags including APIC frames for album art) - OGG/Vorbis (Vorbis comment reading) - Opus (basic metadata support) . Features include a pure Haskell implementation with no FFI dependencies, streaming support for large files, type-safe metadata representation, and comprehensive tag writing support for both FLAC and MP3 formats.


[Skip to Readme]

Properties

Versions 0.1.0.0, 0.1.0.0
Change log CHANGELOG.md
Dependencies aeson (>=2.1 && <2.4), base (>=4.17 && <5), base64-bytestring (>=1.2 && <1.3), binary (>=0.8 && <0.9), bytestring (>=0.11 && <0.13), containers (>=0.6 && <0.9), deepseq (>=1.4 && <1.6), directory (>=1.3 && <1.4), file-io (>=0.1 && <0.2), filepath (>=1.4 && <1.6), monatone, mtl (>=2.2 && <2.4), text (>=2.1 && <2.2), unordered-containers (>=0.2 && <0.3) [details]
License GPL-3.0-only
Author rembo10
Maintainer rembo10@users.noreply.github.com
Category Audio, Sound
Home page https://github.com/rembo10/monatone
Bug tracker https://github.com/rembo10/monatone/issues
Source repo head: git clone https://github.com/rembo10/monatone
Uploaded by rembo10 at 2025-11-14T02:42:08Z

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for monatone-0.1.0.0

[back to package description]

Monatone

A pure Haskell library for parsing and writing audio metadata.

Features

Installation

cabal install monatone

Or add to your .cabal file:

build-depends: monatone >= 0.1.0

Quick Start

import Monatone.FLAC (parseMetadata)
import Monatone.Metadata

-- Parse metadata from a FLAC file
main :: IO ()
main = do
  result <- parseMetadata "song.flac"
  case result of
    Left err -> putStrLn $ "Error: " ++ show err
    Right metadata -> do
      putStrLn $ "Title: " ++ maybe "Unknown" id (title metadata)
      putStrLn $ "Artist: " ++ maybe "Unknown" id (artist metadata) 
      putStrLn $ "Album: " ++ maybe "Unknown" id (album metadata)

Supported Formats

FLAC

MP3

OGG/Vorbis

Opus

Writing Tags

import Monatone.Writer
import Monatone.Types
import qualified Data.Map as Map

-- Update MP3 tags
updateMP3Tags :: FilePath -> IO ()
updateMP3Tags file = do
  let tags = Map.fromList
        [ ("TIT2", "New Title")
        , ("TPE1", "New Artist")
        , ("TALB", "New Album")
        ]
  result <- writeMP3Tags file tags
  case result of
    Left err -> putStrLn $ "Error: " ++ err
    Right () -> putStrLn "Tags updated successfully"

API Documentation

Full API documentation is available on Hackage.

Contributing

Contributions are welcome! Please feel free to submit issues and pull requests on GitHub.

License

GPL 3.0 License - see LICENSE file for details.