packages feed

HCodecs 0.0.2 → 0.0.3

raw patch · 2 files changed

+19/−13 lines, 2 files

Files

HCodecs.cabal view
@@ -1,22 +1,27 @@ name: HCodecs-version: 0.0.2+version: 0.0.3 cabal-Version: >= 1.2 license: BSD3 license-file: LICENSE+copyright: (c) 2007-2008 George Giorgidze author: George Giorgidze maintainer: George Giorgidze (GGG at CS dot NOTT dot AC dot UK)-homepage: http://cs.nott.ac.uk/~ggg/+homepage: http://www.cs.nott.ac.uk/~ggg/ category: Codec-synopsis: The library to read, write and manipulate MIDI, WAV, and SoundFont2 files.-description: The library provides functions to read write and manipulate Midi, Wav and SoundFont2 multimedia file formats.-             It is written entirly in Haskell (without any FFI).-             It uses efficient parsing and building combinators for binary data stored in ByteStrings (based on the one in 'binary' package).+stability: experimental+synopsis: The library to read, write and manipulate MIDI, WAVE, and SoundFont2 files.+description:+  The library provides functions to read, write and manipulate MIDI, WAVE and SoundFont2 multimedia files. It is written entirely in Haskell (without any FFI). It uses efficient parsing and building combinators for binary data stored in ByteStrings (based on the one in 'binary' package).+  .+  Correctness of significant parts of library has been validated with QuickCheck and Haskell Program Coverage (HPC) tool-kit.+  .+  HPC results can be seen at <http://www.cs.nott.ac.uk/~ggg/hpc/HCodecs/hpc_index.html>. build-type: Simple extra-source-files: src/Tests/Main.hs  library   hs-source-dirs:  src-  ghc-options : -Wall -fno-warn-name-shadowing+  ghc-options : -O2 -Wall -fno-warn-name-shadowing   build-Depends: base, bytestring, QuickCheck, random, array   exposed-modules:     Codec.Midi
src/Tests/Main.hs view
@@ -19,6 +19,7 @@ import Control.Monad import Data.Monoid import Debug.Trace+import System.FilePath  roundTrip :: (Eq a, Show a) => (a -> Builder) -> Parser a -> a -> Bool roundTrip b p a = if Right a == ea'@@ -62,7 +63,7 @@    c <- readFile "midiFiles.txt"   let midiFiles = lines c -  -- sequence_ $ map f midiFiles+  sequence_ $ map f midiFiles   return ()   where   f n = do@@ -75,7 +76,7 @@     putStr "Testing  ... "     when (not $ roundTrip buildMidi parseMidi m) $ fail "Failed\n"     putStrLn "OK"-    -- exportFile ("./tmp/" ++ (takeBaseName n) ++ ".mid") m+    exportFile ("./tmp/" ++ (takeBaseName n) ++ ".mid") m  testWav :: IO () testWav =  do@@ -87,7 +88,7 @@    c <- readFile "wavFiles.txt"   let wavFiles = lines c -  -- sequence_ $ map f wavFiles+  sequence_ $ map f wavFiles   return ()   where   f n = do@@ -104,7 +105,7 @@     let sd = (convert $ sampleData a) :: SampleData Int32     when (not $ roundTrip Wav.buildWav Wav.parseWav (a {sampleData = sd})) $ fail "Failed\n"     putStrLn "OK"-    --Wav.exportFile ("./tmp/" ++ (takeBaseName n) ++ ".wav") w+    Wav.exportFile ("./tmp/" ++ (takeBaseName n) ++ ".wav") a  testSoundFont :: IO () testSoundFont =  do@@ -114,7 +115,7 @@     c <- readFile "soundFontFiles.txt"   let soundFontFiles = lines c -  -- sequence_ $ map f soundFontFiles+  sequence_ $ map f soundFontFiles   return ()   where   f n = do@@ -127,7 +128,7 @@     putStr "Testing  ... "     when (not $ roundTrip SF.buildSoundFont SF.parseSoundFont sf) $ fail "Failed\n"     putStrLn "OK"-    -- Wav.exportFile ("./tmp/" ++ (takeBaseName n) ++ ".wav") w+    SF.exportFile ("./tmp/" ++ (takeBaseName n) ++ ".wav") sf  testParserBuilder :: IO () testParserBuilder = do