riff: RIFF parser for Haskell

[ data, library, mit, program ] [ Propose Tags ]

This library provides a RIFF parser for Haskell for easy manipulation of common file formats like WAVE and RIFF container AVI files.

[Skip to Readme]


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Versions [RSS],,,
Dependencies base (>=4.5 && <5.0), binary (>=0.7 && <0.8), bytestring (>=0.9 && <1.0), either (>=4.3 && <4.4), filepath (>=1.3 && <1.4), riff, transformers (>=0.4 && <0.5) [details]
License MIT
Copyright (c) 2014 Robert Massaioli
Author Robert Massaioli
Maintainer robertmassaioli@gmail.com
Category Data
Home page https://bitbucket.org/robertmassaioli/riff/overview
Bug tracker http://bitbucket.org/robertmassaioli/riff/issues
Source repo head: git clone git://bitbucket.org/robertmassaioli/riff.git
Uploaded by RobertMassaioli at 2015-04-24T00:47:06Z
Reverse Dependencies 2 direct, 0 indirect [details]
Executables riff-convert, riff-identity, riff-structure
Downloads 3588 total (14 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2015-05-21 [all 1 reports]

Readme for riff-

[back to package description]

RIFF for Haskell

RIFF has been around for a long time and I thought that now would be a good time to write a library for it in Haskell. This library supports reading most RIFF files. Example file formats (taken from Wikipedia and elsewhere) that use RIFF as the container layer include:

  • WAV (Windows audio)
  • AVI (Windows audiovisual)
  • RMI (Windows "RIFF MIDIfile")
  • CDR (CorelDRAW vector graphics file)
  • ANI (Animated Windows cursors)
  • DLS (Downloadable Sounds)
  • WebP (An image format developed by Google)
  • XMA (Microsoft Xbox 360 console audio format based on WMA Pro)

And there are many more. You can even come up with your own data that can be contained inside RIFF.

Getting the Code

You can just rely upon the library in your cabal files. The code is on Hackage.

Building the Code

To build the code:

$ cabal sandbox init
$ cabal install

And that is all that there is to it.

Bundled Executables

I have written a few simple programs just so that I could test out the code that I have written:

$ cabal run riff-structure # prints out the internal structure of a RIFF file
$ cabal run riff-convert # lets you convert files to and from RIFF and RIFX formats
$ cabal run riff-identity # the identity over RIFF files, useful for testing

Feel free to use any of these executables to have a play with the RIFF file format, or better yet, write some code using this library and let me know about it.

Example Data

You can find example data all over the internet. Any WAVE file is a RIFF file for example. Here is a list of example data that you may be able to download: