summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonKholomiov <>2015-02-13 15:17:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2015-02-13 15:17:00 (GMT)
commit21608c7a16d1c03750d5d00954226f3933b30457 (patch)
treef376b22a45080d566eb422752069c13cd13c779b
parentf6e54b40ccb0cbf03f620b1b3a833b2c040a43db (diff)
version 0.2.10.2.1
-rw-r--r--csound-catalog.cabal4
-rw-r--r--src/Csound/Catalog/Effect.hs2
-rw-r--r--src/Csound/Catalog/Wave/Ac.hs12
-rw-r--r--src/Csound/Catalog/Wave/Vowel.hs2
4 files changed, 10 insertions, 10 deletions
diff --git a/csound-catalog.cabal b/csound-catalog.cabal
index 9cf44c2..ff3dcf6 100644
--- a/csound-catalog.cabal
+++ b/csound-catalog.cabal
@@ -1,5 +1,5 @@
Name: csound-catalog
-Version: 0.2.0
+Version: 0.2.1
Cabal-Version: >= 1.6
License: BSD3
License-file: LICENSE
@@ -27,7 +27,7 @@ Source-repository head
Library
Ghc-Options: -Wall
Build-Depends:
- base >= 4, base < 5, transformers >= 0.3, csound-expression >= 4.0.0
+ base >= 4, base < 5, transformers >= 0.3, csound-expression >= 4.3
Hs-Source-Dirs: src/
Exposed-Modules:
Csound.Catalog
diff --git a/src/Csound/Catalog/Effect.hs b/src/Csound/Catalog/Effect.hs
index bd79663..119db49 100644
--- a/src/Csound/Catalog/Effect.hs
+++ b/src/Csound/Catalog/Effect.hs
@@ -141,7 +141,7 @@ sweepFilter dur start end bandWidth = bp centerFreq bandWidth
-- > sweepFilter dur startCps endCps bandWidth asignal
loopSweepFilter :: D -> D -> D -> Sig -> Sig -> Sig
loopSweepFilter dur start end bandWidth = bp centerFreq bandWidth
- where centerFreq = oscLine start end (sig dur)
+ where centerFreq = loopseg [sig start, 1, sig end, 1, sig start] (1 / sig dur)
-- | The effect that was used in the piece \"Bay at night\".
bayAtNight :: Sig -> SE (Sig, Sig)
diff --git a/src/Csound/Catalog/Wave/Ac.hs b/src/Csound/Catalog/Wave/Ac.hs
index 8d9fe22..a9a56be 100644
--- a/src/Csound/Catalog/Wave/Ac.hs
+++ b/src/Csound/Catalog/Wave/Ac.hs
@@ -127,8 +127,8 @@ harpsichord cps = 0.5 * asignal
xing :: D -> Sig -> Sig
xing xdur cps = asignal
where
- amps xs dt vib freq phs = ar (loopseg (sig $ 1/xdur) 0 0 xs) * (1 + poscil vibEnv freq sine `withD` phs)
- where vibEnv = ar $ loopseg (sig $ 1/xdur) 0 0 [0, dt, vib, sig xdur - dt, 0]
+ amps xs dt vib freq phs = ar (loopseg xs (sig $ 1/xdur)) * (1 + poscil vibEnv freq sine `withD` phs)
+ where vibEnv = ar $ loopseg [0, dt, vib, sig xdur - dt, 0] (sig $ 1/xdur)
f vol freq = poscil vol (sig freq * cps) sine
@@ -166,8 +166,8 @@ fmMod xdur cps = asignal
ishift = 4 / 12000
ipch = cps
ioct = octcps cps
- amodi = ar $ loopseg (sig $ 1 / xdur) 0 0 [0, iattack, 5, sig xdur, 2, irelease, 0]
- amodr = ar $ loopseg (sig $ 0.5 / xdur) 0 0 [ip6, 1, ip7, 1, ip6]
+ amodi = ar $ loopseg [0, iattack, 5, sig xdur, 2, irelease, 0] (sig $ 1 / xdur)
+ amodr = ar $ loopseg [ip6, 1, ip7, 1, ip6] (sig $ 0.5 / xdur)
a1 = amodi * (amodr - 1 / amodr) / 2
a2 = amodi * (amodr + 1 / amodr) / 2
a1ndx = abs $ a1 / 10
@@ -185,7 +185,7 @@ fmMod xdur cps = asignal
filteredChorus :: D -> Sig -> Sig
filteredChorus xdur cps = asignal
where
- a ~~ b = loopseg (sig $ 1 / (xdur * 2)) 0 0 [sig a, 1, sig b, 1, sig a]
+ a ~~ b = loopseg [sig a, 1, sig b, 1, sig a] (sig $ 1 / (xdur * 2))
filt cf1 bw1 cf2 bw2 x = balance (bp cf2 bw2 $ bp cf1 bw1 x) x
harm fqc = poscil ((sig $ idb)) fqc $ sines
[ 0.28, 1, 0.74, 0.66, 0.78, 0.48, 0.05, 0.33, 0.12
@@ -268,7 +268,7 @@ delayedString cps = asignal
melody :: D -> Sig -> SE Sig
melody xdur cps = do
k1000 <- randi 1 10
- let k100 = cps + loopseg (sig $ 1/xdur) 0 0 [0, 0.5, 1, sig xdur, 1] * poscil 1 (5 + k1000) sine
+ let k100 = cps + loopseg [0, 0.5, 1, sig xdur, 1] (sig $ 1/xdur) * poscil 1 (5 + k1000) sine
-- a1-3 are for cheby with p6=1-4
a1 = poscil k1 k100 (sines [1, 0.4, 0.2, 0.1, 0.1, 0.05])
a2 = tablei a1 ip6 `withDs` [1, 0.5]
diff --git a/src/Csound/Catalog/Wave/Vowel.hs b/src/Csound/Catalog/Wave/Vowel.hs
index a5b7ff8..9d7a040 100644
--- a/src/Csound/Catalog/Wave/Vowel.hs
+++ b/src/Csound/Catalog/Wave/Vowel.hs
@@ -47,7 +47,7 @@ vowels = vowelsBy mkEnv
loopVowels :: D -> Sig -> [(Vowel, D)] -> Sig -> Sig
loopVowels maxDur xdur params = vowelsBy mkEnv maxDur params lastVowel
where
- mkEnv xs x = loopseg (1 / xdur) 0 0 ((++ [sig x]) $ (\(a, b) -> [sig a, sig b]) =<< xs)
+ mkEnv xs x = loopseg ((++ [sig x]) $ (\(a, b) -> [sig a, sig b]) =<< xs) (1 / xdur)
lastVowel = fst $ head params
-- | Generic construcotr for the signals that interpolate between vowel sounds.