wave: Work with WAVE and RF64 files

[ audio, bsd3, codec, library ] [ Propose Tags ] [ Report a vulnerability ]

Work with WAVE and RF64 files.


[Skip to Readme]

Modules

[Index] [Quick Jump]

Flags

Manual Flags

NameDescriptionDefault
dev

Turn on development settings.

Disabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.2.0, 0.2.1
Change log CHANGELOG.md
Dependencies base (>=4.15 && <5), bytestring (>=0.2 && <0.13), cereal (>=0.3 && <0.6), containers (>=0.5 && <0.8) [details]
Tested with ghc ==9.4.7, ghc ==9.6.3, ghc ==9.8.1
License BSD-3-Clause
Author Mark Karpov <markkarpov92@gmail.com>
Maintainer Mark Karpov <markkarpov92@gmail.com>
Revised Revision 1 made by mrkkrp at 2024-06-15T21:22:18Z
Category Codec, Audio
Home page https://github.com/mrkkrp/wave
Bug tracker https://github.com/mrkkrp/wave/issues
Source repo head: git clone https://github.com/mrkkrp/wave.git
Uploaded by mrkkrp at 2023-10-25T16:34:04Z
Distributions LTSHaskell:0.2.1, NixOS:0.2.1, Stackage:0.2.1
Reverse Dependencies 3 direct, 2 indirect [details]
Downloads 5938 total (42 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2023-10-25 [all 1 reports]

Readme for wave-0.2.1

[back to package description]

Wave

License BSD3 Hackage Stackage Nightly Stackage LTS CI

This library provides a safe interface that allows us to manipulate WAVE files in their “classic” form as well as files in the RF64 format. RF64 adds the ability to store files larger than 4 Gb.

The main feature of the API is that it does not allow the user to duplicate information and introduce errors in that way. For example, the block alignment can be calculated from other parameters of an audio stream, thus we do not store it in the Wave record and do not allow the user to specify it. We provide, however, a way to calculate it given a Wave record, see waveBlockAlign. The same is true for the number of channels. The channel mask is a more general means of providing the information about the number of channels and the corresponding speaker positions, thus we only store the channel mask.

Another feature of the library is that it does not dictate how to read or write the audio data. To write the audio data the user passes a callback that receives a Handle as an argument. The size of the written data block is deduced automatically. This makes the library fast and open to different ways of handling the audio data, including via foreign code.

Motivation

I needed a way to work with WAVE files to finish the flac package and for analyzing input data in WAVE format in general. The existing solutions (WAVE, wavy) are not maintained and poorly designed. Suffice it to say that they read samples of audio stream and put them in a linked list, like [[Sample]] (the inner linked list is to store multi-channel data).

Limitations

The library only supports PCM format with samples represented as integers and floating point values.

Contribution

Issues, bugs, and questions may be reported in the GitHub issue tracker for this project.

Pull requests are also welcome.

License

Copyright © 2016–present Mark Karpov

Distributed under BSD 3 clause license.