packages feed

csound-sampler 0.0.7.0 → 0.0.8.0

raw patch · 3 files changed

+31/−8 lines, 3 filesdep ~csound-expressionPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: csound-expression

API changes (from Hackage documentation)

- Csound.Sam: instance Csound.Sam.ToSam (Csound.Typed.GlobalState.SE.SE Csound.Typed.Types.Tuple.Sig2)
- Csound.Sam: instance Csound.Sam.ToSam Csound.Typed.Types.Tuple.Sig2
- Csound.Sam: instance Csound.SigSpace.At Csound.Typed.Types.Prim.Sig (Csound.Typed.GlobalState.SE.SE Csound.Typed.Types.Prim.Sig) Csound.Sam.Core.Sam
- Csound.Sam: instance Csound.SigSpace.At Csound.Typed.Types.Prim.Sig (Csound.Typed.GlobalState.SE.SE Csound.Typed.Types.Tuple.Sig2) Csound.Sam.Core.Sam
- Csound.Sam: instance Csound.SigSpace.At Csound.Typed.Types.Prim.Sig Csound.Typed.Types.Tuple.Sig2 Csound.Sam.Core.Sam
- Csound.Sam: instance Csound.SigSpace.At Csound.Typed.Types.Tuple.Sig2 (Csound.Typed.GlobalState.SE.SE Csound.Typed.Types.Tuple.Sig2) Csound.Sam.Core.Sam
- Csound.Sam: instance Csound.SigSpace.At Csound.Typed.Types.Tuple.Sig2 Csound.Typed.Types.Tuple.Sig2 Csound.Sam.Core.Sam
- Csound.Sam: instance Csound.SigSpace.MixAt Csound.Typed.Types.Prim.Sig (Csound.Typed.GlobalState.SE.SE Csound.Typed.Types.Prim.Sig) Csound.Sam.Core.Sam
- Csound.Sam: instance Csound.SigSpace.MixAt Csound.Typed.Types.Prim.Sig (Csound.Typed.GlobalState.SE.SE Csound.Typed.Types.Tuple.Sig2) Csound.Sam.Core.Sam
- Csound.Sam: instance Csound.SigSpace.MixAt Csound.Typed.Types.Prim.Sig Csound.Typed.Types.Tuple.Sig2 Csound.Sam.Core.Sam
- Csound.Sam: instance Csound.SigSpace.MixAt Csound.Typed.Types.Tuple.Sig2 (Csound.Typed.GlobalState.SE.SE Csound.Typed.Types.Tuple.Sig2) Csound.Sam.Core.Sam
- Csound.Sam: instance Csound.SigSpace.MixAt Csound.Typed.Types.Tuple.Sig2 Csound.Typed.Types.Tuple.Sig2 Csound.Sam.Core.Sam
- Csound.Sam.Core: instance Csound.SigSpace.SigSpace a => Csound.SigSpace.SigSpace (Csound.Sam.Core.Sample a)
+ Csound.Sam: drumScale :: TempoSig -> PitchSig -> String -> Sam
+ Csound.Sam: drumScale1 :: TempoSig -> PitchSig -> String -> Sam
+ Csound.Sam: harmScale :: TempoSig -> PitchSig -> String -> Sam
+ Csound.Sam: harmScale1 :: TempoSig -> PitchSig -> String -> Sam
+ Csound.Sam: instance Csound.Sam.ToSam (Csound.Typed.GlobalState.SE.SE Csound.Typed.Types.Prim.Sig2)
+ Csound.Sam: instance Csound.Sam.ToSam Csound.Typed.Types.Prim.Sig2
+ Csound.Sam: instance Csound.Typed.Types.SigSpace.At Csound.Typed.Types.Prim.Sig (Csound.Typed.GlobalState.SE.SE Csound.Typed.Types.Prim.Sig) Csound.Sam.Core.Sam
+ Csound.Sam: instance Csound.Typed.Types.SigSpace.At Csound.Typed.Types.Prim.Sig (Csound.Typed.GlobalState.SE.SE Csound.Typed.Types.Prim.Sig2) Csound.Sam.Core.Sam
+ Csound.Sam: instance Csound.Typed.Types.SigSpace.At Csound.Typed.Types.Prim.Sig Csound.Typed.Types.Prim.Sig2 Csound.Sam.Core.Sam
+ Csound.Sam: instance Csound.Typed.Types.SigSpace.At Csound.Typed.Types.Prim.Sig2 (Csound.Typed.GlobalState.SE.SE Csound.Typed.Types.Prim.Sig2) Csound.Sam.Core.Sam
+ Csound.Sam: instance Csound.Typed.Types.SigSpace.At Csound.Typed.Types.Prim.Sig2 Csound.Typed.Types.Prim.Sig2 Csound.Sam.Core.Sam
+ Csound.Sam: instance Csound.Typed.Types.SigSpace.MixAt Csound.Typed.Types.Prim.Sig (Csound.Typed.GlobalState.SE.SE Csound.Typed.Types.Prim.Sig) Csound.Sam.Core.Sam
+ Csound.Sam: instance Csound.Typed.Types.SigSpace.MixAt Csound.Typed.Types.Prim.Sig (Csound.Typed.GlobalState.SE.SE Csound.Typed.Types.Prim.Sig2) Csound.Sam.Core.Sam
+ Csound.Sam: instance Csound.Typed.Types.SigSpace.MixAt Csound.Typed.Types.Prim.Sig Csound.Typed.Types.Prim.Sig2 Csound.Sam.Core.Sam
+ Csound.Sam: instance Csound.Typed.Types.SigSpace.MixAt Csound.Typed.Types.Prim.Sig2 (Csound.Typed.GlobalState.SE.SE Csound.Typed.Types.Prim.Sig2) Csound.Sam.Core.Sam
+ Csound.Sam: instance Csound.Typed.Types.SigSpace.MixAt Csound.Typed.Types.Prim.Sig2 Csound.Typed.Types.Prim.Sig2 Csound.Sam.Core.Sam
+ Csound.Sam: wavScale :: Fidelity -> TempoSig -> PitchSig -> String -> Sam
+ Csound.Sam: wavScale1 :: Fidelity -> TempoSig -> PitchSig -> String -> Sam
+ Csound.Sam.Core: instance Csound.Typed.Types.SigSpace.SigSpace a => Csound.Typed.Types.SigSpace.SigSpace (Csound.Sam.Core.Sample a)
- Csound.Sam: arpFreqOf :: [D] -> Chord -> [D] -> Sam -> Sam
+ Csound.Sam: arpFreqOf :: [Sig] -> Chord -> [D] -> Sam -> Sam
- Csound.Sam: arpFreqOf1 :: [D] -> Chord -> Sig -> Sam -> Sam
+ Csound.Sam: arpFreqOf1 :: [Sig] -> Chord -> Sig -> Sam -> Sam
- Csound.Sam: pickBy :: Sig -> [(D, Sam)] -> Sam
+ Csound.Sam: pickBy :: Sig -> [(Sig, Sam)] -> Sam
- Csound.Sam.Ui: liveEf :: Int -> [String] -> [Sam] -> (Double, FxFun) -> [(Double, FxFun)] -> Source Sam
+ Csound.Sam.Ui: liveEf :: Int -> [String] -> [Sam] -> (Double, Fx2) -> [(Double, Fx2)] -> Source Sam
- Csound.Sam.Ui: uiSam :: String -> Bool -> D -> Source Sam -> Source FxFun
+ Csound.Sam.Ui: uiSam :: String -> Bool -> D -> Source Sam -> Source Fx2

Files

csound-sampler.cabal view
@@ -1,5 +1,5 @@ name:                csound-sampler-version:             0.0.7.0+version:             0.0.8.0 license:             BSD3 license-file:        LICENSE author:              Anton Kholomiov@@ -25,7 +25,7 @@ library   Ghc-Options:    -Wall   Hs-Source-Dirs:      src/-  build-depends:       base >= 4, base < 5, transformers >= 0.3, csound-expression >= 5.1.0+  build-depends:       base >= 4, base < 5, transformers >= 0.3, csound-expression >= 5.2.0   exposed-modules:          Csound.Sam     Csound.Sam.Core
src/Csound/Sam.hs view
@@ -15,6 +15,9 @@ 	ramLoop, ramRead, segLoop, segRead, relLoop, relRead, 	-- ** Mono	 	ramLoop1, ramRead1, segLoop1, segRead1, relLoop1, relRead1,++    -- ** Tempo/pitch scaling based on temposcal+    wavScale, wavScale1, drumScale, drumScale1, harmScale, harmScale1, 	-- * Envelopes 	linEnv, expEnv, hatEnv, decEnv, riseEnv, edecEnv, eriseEnv, 	-- * Arrange@@ -327,7 +330,7 @@  -- | Picks samples at random. We can specify a frequency of the occurernce. -- The sum of all frequencies should be equal to 1.-pickBy :: Sig -> [(D, Sam)] -> Sam+pickBy :: Sig -> [(Sig, Sam)] -> Sam pickBy dt as = genPick (\ds -> freqOf $ zip (fmap fst as) ds) dt (fmap snd as)  type EnvFun = (Dur -> D -> D -> Sig)@@ -499,7 +502,7 @@  -- | Plays arpeggio of samles with random notes from the chord. -- We can assign the frequencies of the notes.-arpFreqOf1 :: [D] -> Chord -> Sig -> Sam -> Sam+arpFreqOf1 :: [Sig] -> Chord -> Sig -> Sam -> Sam arpFreqOf1 freqs ch = genArp1 (freqOf (zip freqs ch))  genArp :: Arp1Fun -> [D] -> Sam -> Sam@@ -520,7 +523,7 @@  -- | Plays arpeggio of samles with random notes from the chord. -- We can assign the frequencies of the notes.-arpFreqOf :: [D] -> Chord -> [D] -> Sam -> Sam+arpFreqOf :: [Sig] -> Chord -> [D] -> Sam -> Sam arpFreqOf freqs ch = genArp (freqOf $ zip freqs ch)  metroS :: Bpm -> Sig -> Evt Unit@@ -607,7 +610,6 @@ --------------------------------------------------------------- --- reading from RAM - -- | It's the same as loopRam but wrapped in Sam (see "Csound.Air.Wav"). ramLoop :: Fidelity -> TempoSig -> PitchSig -> String -> Sam ramLoop winSize tempo pitch file = toSam $ loopRam winSize tempo pitch file@@ -655,3 +657,24 @@ -- | It's the same as readRel1 but wrapped in Sam (see "Csound.Air.Wav"). relRead1 :: Fidelity -> (Sig, Sig) -> TempoSig -> PitchSig -> String -> Sam relRead1 winSize ds@(kmin, kmax) tempo pitch file = sig1 (ir $ (kmax - kmin) / tempo) $ readRel1 winSize ds tempo pitch file++-----------------------+-- temposcale++wavScale :: Fidelity -> TempoSig -> PitchSig -> String -> Sam+wavScale winSize tempo pitch file = toSam $ scaleWav winSize tempo pitch file++wavScale1 :: Fidelity -> TempoSig -> PitchSig -> String -> Sam+wavScale1 winSize tempo pitch file = toSam $ scaleWav1 winSize tempo pitch file++drumScale :: TempoSig -> PitchSig -> String -> Sam+drumScale tempo pitch file = toSam $ scaleDrum tempo pitch file++drumScale1 :: TempoSig -> PitchSig -> String -> Sam+drumScale1  tempo pitch file = toSam $ scaleDrum1 tempo pitch file++harmScale :: TempoSig -> PitchSig -> String -> Sam+harmScale tempo pitch file = toSam $ scaleHarm tempo pitch file++harmScale1 :: TempoSig -> PitchSig -> String -> Sam+harmScale1  tempo pitch file = toSam $ scaleHarm1 tempo pitch file
src/Csound/Sam/Ui.hs view
@@ -219,7 +219,7 @@ -- | It's just like the function @live@ but we can provide the list -- of effects for each column. The double value specifies the mix -- between dry and wet signals.-liveEf :: Int -> [String] -> [Sam] -> (Double, FxFun) -> [(Double, FxFun)] -> Source Sam+liveEf :: Int -> [String] -> [Sam] -> (Double, Fx2) -> [(Double, Fx2)] -> Source Sam liveEf numBeats names sams masterEff effs = source $ do 	(gVols, vols) <- fmap unzip $  mapM  defSlider $ replicate n "vol" 	(gEffs, effCtrls) <- fmap unzip $  @@ -250,7 +250,7 @@ -- | Creates fx-unit from sampler widget. -- -- > uisam name isOn bpm samWidget-uiSam :: String -> Bool -> D -> Source Sam -> Source FxFun+uiSam :: String -> Bool -> D -> Source Sam -> Source Fx2 uiSam name onOff bpm sam = uiSig name onOff (joinSource $ mapSource (runSam bpm) sam) 	where  		joinSource :: Source (SE Sig2) -> Source Sig2