summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksandrZhabenko <>2020-06-29 19:11:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2020-06-29 19:11:00 (GMT)
commitaca72593726af158c63ac54371fe95dfb759fdf9 (patch)
treeecd4a1e0d6d15e37aed7d7544e081ee14c5daca7
parent8b5aee56850b0238725c04bb37bfec1797ccd9b4 (diff)
version 0.1.1.0HEAD0.1.1.0master
-rw-r--r--ChangeLog.md5
-rw-r--r--DobutokO/Sound/Frequency.hs18
-rw-r--r--dobutokO-frequency.cabal2
3 files changed, 24 insertions, 1 deletions
diff --git a/ChangeLog.md b/ChangeLog.md
index 1fecffb..20e17c5 100644
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -3,3 +3,8 @@
## 0.1.0.0 -- 2020-06-26
* First version. Released on an unsuspecting world.
+
+## 0.1.1.0 -- 2020-06-29
+
+* First version revised A. Added functions to deal with Choice data.
+
diff --git a/DobutokO/Sound/Frequency.hs b/DobutokO/Sound/Frequency.hs
index 28f480e..e81eb37 100644
--- a/DobutokO/Sound/Frequency.hs
+++ b/DobutokO/Sound/Frequency.hs
@@ -173,6 +173,24 @@ data Di = O | T deriving Eq
data Choice a b c d = C2 (Swept a b c) (Single a c) d
deriving Eq
+choice1 :: Choice a b c d -> Swept a b c
+choice1 (C2 x _ _) = x
+
+choice2 :: Choice a b c d -> Single a c
+choice2 (C2 _ y _) = y
+
+choice3 :: Choice a b c d -> d
+choice3 (C2 _ _ z) = z
+
+choiceSet1 :: Swept a b c -> Choice a b c d -> Choice a b c d
+choiceSet1 x (C2 _ y z) = C2 x y z
+
+choiceSet2 :: Single a c -> Choice a b c d -> Choice a b c d
+choiceSet2 y (C2 x _ z) = C2 x y z
+
+choiceSet3 :: d -> Choice a b c d -> Choice a b c d
+choiceSet3 z (C2 x y _) = C2 x y z
+
instance Show (Choice [Float] String Int Di) where
show (C2 y _ O) = show y
show (C2 _ z T) = show z
diff --git a/dobutokO-frequency.cabal b/dobutokO-frequency.cabal
index 77551c3..7640aae 100644
--- a/dobutokO-frequency.cabal
+++ b/dobutokO-frequency.cabal
@@ -2,7 +2,7 @@
-- documentation, see http://haskell.org/cabal/users-guide/
name: dobutokO-frequency
-version: 0.1.0.0
+version: 0.1.1.0
synopsis: Helps to create experimental music. Working with frequencies and types.
description: Can be used for applying the SoX "synth" effect and frequency modulation.
homepage: https://hackage.haskell.org/package/dobutokO-frequency