tone 0.1.0.0 → 0.2.0.0
raw patch · 3 files changed
+9/−5 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- exe/Main.hs +4/−4
- tone.cabal +1/−1
CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for tone +## 0.2.0.0 -- 11-24-2026++* Fix executable denormalization+ ## 0.1.0.0 -- 11-23-2026 * First version. Released on an unsuspecting world.
exe/Main.hs view
@@ -51,12 +51,12 @@ putWord16le 2 putWord16le 16 putWord16le 0- , Verse "data" $ runPut $ foldMap (putInt16le . norm) sound]]+ , Verse "data" $ runPut $ foldMap (putInt16le . denorm) sound]] -norm :: Double -> Int16-norm d+denorm :: Double -> Int16+denorm d | d > 0 = fromIntegral $ min (maxb :: Integer) $ round (d * maxb)- | d < 0 = fromIntegral $ max (minb :: Integer) $ round (d * minb)+ | d < 0 = fromIntegral $ max (minb :: Integer) $ negate $ round (d * minb) | otherwise = 0 maxb :: Num a => a
tone.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: tone-version: 0.1.0.0+version: 0.2.0.0 synopsis: tone synthesizer homepage: https://github.com/dopamane/tone license: MIT