packages feed

dobutokO3 0.1.0.0 → 0.2.0.0

raw patch · 4 files changed

+81/−71 lines, 4 filesdep ~dobutokO2dep ~mmsyn7ldep ~mmsyn7s

Dependency ranges changed: dobutokO2, mmsyn7l, mmsyn7s, mmsyn7ukr

Files

CHANGELOG.md view
@@ -3,3 +3,8 @@ ## 0.1.0.0 -- 2020-05-20  * First version. Released on an unsuspecting world. Contains the most complicated and fixed functions from the dobutokO2 package.++## 0.2.0.0 -- 2020-06-24++* Second version. Changed Double to Float where possible to obtain new possibilities. The shift is inspired by: https://www.youtube.com/watch?v=FYTZkE5BZ-0 +Some minor documentation improvements.
DobutokO/Sound/Complex.hs view
@@ -48,13 +48,13 @@ import DobutokO.Sound.Functional.Elements  -- | Tesing variant of the 'soundGen3G' with predefined three last functional arguments.-testSoundGen2G :: FilePath -> Double -> String -> IO ()+testSoundGen2G :: FilePath -> Float -> String -> IO () testSoundGen2G = testSoundGen2GMN (-1) (-1)  -- | Tesing variant of the 'soundGen3GMN' with predefined last functional arguments.-testSoundGen2GMN :: Int64 -> Int64 -> FilePath -> Double -> String -> IO ()+testSoundGen2GMN :: Int64 -> Int64 -> FilePath -> Float -> String -> IO () testSoundGen2GMN m n1 file y zs = do-  vecA0 <- fmap (V.map (`quotRem` 108)) ((if m == (-1) && n1 == (-1) then readFileDoubles else readFileDoublesMN m n1) file) -- >>= print+  vecA0 <- fmap (V.map (`quotRem` 108)) ((if m == (-1) && n1 == (-1) then readFileFloats else readFileFloatsMN m n1) file) -- >>= print   let n = V.length vecA0       freq0 j = V.unsafeIndex notes (snd . V.unsafeIndex vecA0 $ j `rem` n)       f0 t = V.fromList [(0.05763181818181818 * t, 0.3598),(1.112159090909091 * t, 0.4588962),(2 * t, 0.6853),(3 * t, 0.268),(4 * t, 0.6823),(5 * t, 0.53)]@@ -75,17 +75,17 @@   endFromResult  -- | Generates a sequence of sounds with changing timbre. Uses several functions as parameters. -soundGen3G :: FilePath -> Double -> String -> ((Double,Double) -> Double -> (Double -> OvertonesO) -> OvertonesO) -  -> ((Double,Double) -> Double -> (Double -> OvertonesO) -> OvertonesO) -> (Double -> OvertonesO) -> IO ()+soundGen3G :: FilePath -> Float -> String -> ((Float,Float) -> Float -> (Float -> OvertonesO) -> OvertonesO) +  -> ((Float,Float) -> Float -> (Float -> OvertonesO) -> OvertonesO) -> (Float -> OvertonesO) -> IO () soundGen3G = soundGen3GMN (-1) (-1)  -- | Generates a sequence of sounds with changing timbre. Uses several functions as parameters. To specify how many sounds the resulting files --- will provide, you use first two 'Int64' arguments, the first of which is a number of dropped elements for 'readFileDoubles' and the second one +-- will provide, you use first two 'Int64' arguments, the first of which is a number of dropped elements for 'readFileFloats' and the second one  -- is a number of produced sounds (and, respectively, number of taken elements).-soundGen3GMN :: Int64 -> Int64 -> FilePath -> Double -> String -> ((Double,Double) -> Double -> (Double -> OvertonesO) -> OvertonesO) -  -> ((Double,Double) -> Double -> (Double -> OvertonesO) -> OvertonesO) -> (Double -> OvertonesO) -> IO ()+soundGen3GMN :: Int64 -> Int64 -> FilePath -> Float -> String -> ((Float,Float) -> Float -> (Float -> OvertonesO) -> OvertonesO) +  -> ((Float,Float) -> Float -> (Float -> OvertonesO) -> OvertonesO) -> (Float -> OvertonesO) -> IO () soundGen3GMN m n1 file y zs gAdd gRem f0 = do-  vecA0 <- fmap (V.map (`quotRem` 108)) ((if m == (-1) && n1 == (-1) then readFileDoubles else readFileDoublesMN m n1) file) -- >>= print+  vecA0 <- fmap (V.map (`quotRem` 108)) ((if m == (-1) && n1 == (-1) then readFileFloats else readFileFloatsMN m n1) file) -- >>= print   let n = V.length vecA0       freq0 j = V.unsafeIndex notes (snd . V.unsafeIndex vecA0 $ j `rem` n)       fA1 j = fAddFElem (freq0 (j + 1),0.5) f0 gAdd@@ -105,31 +105,31 @@   endFromResult  -- | Generates a sequence of sounds with changing timbre. Uses several functions as parameters. Unlike the 'soundGen3G', the last two --- functions as arguments for their first argument have not ('Double','Double'), but 'V.Vector' of them so are applied to 'OvertonesO'. To +-- functions as arguments for their first argument have not ('Float','Float'), but 'V.Vector' of them so are applied to 'OvertonesO'. To  -- provide a generalized functionality, it uses two additional functions @freq0 :: Int -> OvertonesO@ and @proj :: OvertonesO -> OvertonesO@  -- to define the first element to which are applied @gAdds@ and @gRems@ and the way to obtain a internal 'OvertonesO'. -- Besides, it lifts notes into specified with the first two 'Int' arguments enku (see 'liftInEnku'). --- The 'Double' argument is a average duration of the sounds.-soundGen3G_O :: Int -> Int -> Double -> FilePath -> Double -> String -> (OvertonesO -> Double -> (Double -> OvertonesO) -> OvertonesO) -  -> (OvertonesO -> Double -> (Double -> OvertonesO) -> OvertonesO) -> (Int -> OvertonesO) -> (OvertonesO -> OvertonesO) -> -    (Double -> OvertonesO) -> IO ()+-- The 'Float' argument is a average duration of the sounds.+soundGen3G_O :: Int -> Int -> Float -> FilePath -> Float -> String -> (OvertonesO -> Float -> (Float -> OvertonesO) -> OvertonesO) +  -> (OvertonesO -> Float -> (Float -> OvertonesO) -> OvertonesO) -> (Int -> OvertonesO) -> (OvertonesO -> OvertonesO) -> +    (Float -> OvertonesO) -> IO () soundGen3G_O = soundGen3G_OMN (-1) (-1)  -- | Generalized version of the 'soundGen3G_O' where 'liftInParams' is used instead of lifting with the 'liftInEnku'. This allows e. g. to  -- use some tonality. For more information, please, refer to 'filterInParams'.-soundGen3G_OPar :: Params -> Double -> FilePath -> Double -> String -> (OvertonesO -> Double -> (Double -> OvertonesO) -> OvertonesO) -  -> (OvertonesO -> Double -> (Double -> OvertonesO) -> OvertonesO) -> (Int -> OvertonesO) -> (OvertonesO -> OvertonesO) -> -    (Double -> OvertonesO) -> IO ()+soundGen3G_OPar :: Params -> Float -> FilePath -> Float -> String -> (OvertonesO -> Float -> (Float -> OvertonesO) -> OvertonesO) +  -> (OvertonesO -> Float -> (Float -> OvertonesO) -> OvertonesO) -> (Int -> OvertonesO) -> (OvertonesO -> OvertonesO) -> +    (Float -> OvertonesO) -> IO () soundGen3G_OPar = soundGen3G_OMNPar (-1) (-1)  -- | Generates a sequence of sounds with changing timbre. Uses several functions as parameters. To specify how many sounds the resulting files --- will provide, you use first two 'Int64' arguments, the first of which is a number of dropped elements for 'readFileDoubles' and the second one +-- will provide, you use first two 'Int64' arguments, the first of which is a number of dropped elements for 'readFileFloats' and the second one  -- is a number of produced sounds (and, respectively, number of taken elements).-soundGen3G_OMN :: Int64 -> Int64 -> Int -> Int -> Double -> FilePath -> Double -> String -> (OvertonesO -> Double -> (Double -> OvertonesO) -> OvertonesO) -  -> (OvertonesO -> Double -> (Double -> OvertonesO) -> OvertonesO) -> (Int -> OvertonesO) -> (OvertonesO -> OvertonesO) -> -    (Double -> OvertonesO) -> IO ()+soundGen3G_OMN :: Int64 -> Int64 -> Int -> Int -> Float -> FilePath -> Float -> String -> (OvertonesO -> Float -> (Float -> OvertonesO) -> OvertonesO) +  -> (OvertonesO -> Float -> (Float -> OvertonesO) -> OvertonesO) -> (Int -> OvertonesO) -> (OvertonesO -> OvertonesO) -> +    (Float -> OvertonesO) -> IO () soundGen3G_OMN m1 n1 m ku freq1 file y zs gAdds gRems freq0 proj f0 = do-  vecA0 <- fmap (V.map (`quotRem` 108)) ((if m1 == (-1) && n1 == (-1) then readFileDoubles else readFileDoublesMN m1 n1) file) -- >>= print+  vecA0 <- fmap (V.map (`quotRem` 108)) ((if m1 == (-1) && n1 == (-1) then readFileFloats else readFileFloatsMN m1 n1) file) -- >>= print   let n = V.length vecA0       fA1 j = fAddFElems (proj . freq0 $ j) f0 gAdds       fR1 j = fRemoveFElems (proj . freq0 $ j) f0 gRems@@ -149,11 +149,11 @@  -- | Generalized version of the 'soundGen3G_OMN' where 'liftInParams' is used instead of lifting with the 'liftInEnku'. This allows e. g. to  -- use some tonality. For more information, please, refer to 'filterInParams'.-soundGen3G_OMNPar :: Int64 -> Int64 -> Params -> Double -> FilePath -> Double -> String -> (OvertonesO -> Double -> (Double -> OvertonesO) -> OvertonesO) -  -> (OvertonesO -> Double -> (Double -> OvertonesO) -> OvertonesO) -> (Int -> OvertonesO) -> (OvertonesO -> OvertonesO) -> -    (Double -> OvertonesO) -> IO ()+soundGen3G_OMNPar :: Int64 -> Int64 -> Params -> Float -> FilePath -> Float -> String -> (OvertonesO -> Float -> (Float -> OvertonesO) -> OvertonesO) +  -> (OvertonesO -> Float -> (Float -> OvertonesO) -> OvertonesO) -> (Int -> OvertonesO) -> (OvertonesO -> OvertonesO) -> +    (Float -> OvertonesO) -> IO () soundGen3G_OMNPar m1 n1 params freq1 file y zs gAdds gRems freq0 proj f0 = do-  vecA0 <- fmap (V.map (`quotRem` 108)) ((if m1 == (-1) && n1 == (-1) then readFileDoubles else readFileDoublesMN m1 n1) file) -- >>= print+  vecA0 <- fmap (V.map (`quotRem` 108)) ((if m1 == (-1) && n1 == (-1) then readFileFloats else readFileFloatsMN m1 n1) file) -- >>= print   let n = V.length vecA0       fA1 j = fAddFElems (proj . freq0 $ j) f0 gAdds       fR1 j = fRemoveFElems (proj . freq0 $ j) f0 gRems@@ -194,29 +194,29 @@ -- >        _ -> fR1 j)) --  -- -soundGen3G_O2 :: ((Double -> OvertonesO,Int -> Double -> OvertonesO,Int -> Double -> OvertonesO) -> V.Vector (Int,Int) -> -  V.Vector (Double,Double -> OvertonesO)) -> Int -> Int -> Double -> FilePath -> Double -> String -> -    (OvertonesO -> Double -> (Double -> OvertonesO) -> OvertonesO) -> (OvertonesO -> Double -> (Double -> OvertonesO) -> OvertonesO) -> -      (Int -> OvertonesO) -> (OvertonesO -> OvertonesO) -> (Double -> OvertonesO) -> IO ()+soundGen3G_O2 :: ((Float -> OvertonesO,Int -> Float -> OvertonesO,Int -> Float -> OvertonesO) -> V.Vector (Int,Int) -> +  V.Vector (Float,Float -> OvertonesO)) -> Int -> Int -> Float -> FilePath -> Float -> String -> +    (OvertonesO -> Float -> (Float -> OvertonesO) -> OvertonesO) -> (OvertonesO -> Float -> (Float -> OvertonesO) -> OvertonesO) -> +      (Int -> OvertonesO) -> (OvertonesO -> OvertonesO) -> (Float -> OvertonesO) -> IO () soundGen3G_O2 = soundGen3G_O2MN (-1) (-1)  -- | Generalized version of the 'soundGen3G_O2' where 'liftInParams' is used instead of lifting with the 'liftInEnku'. This allows e. g. to  -- use some tonality. For more information, please, refer to 'filterInParams'.-soundGen3G_O2Par :: ((Double -> OvertonesO,Int -> Double -> OvertonesO,Int -> Double -> OvertonesO) -> V.Vector (Int,Int) -> -  V.Vector (Double,Double -> OvertonesO)) -> Params -> Double -> FilePath -> Double -> String -> -    (OvertonesO -> Double -> (Double -> OvertonesO) -> OvertonesO) -> (OvertonesO -> Double -> (Double -> OvertonesO) -> OvertonesO) -> -      (Int -> OvertonesO) -> (OvertonesO -> OvertonesO) -> (Double -> OvertonesO) -> IO ()+soundGen3G_O2Par :: ((Float -> OvertonesO,Int -> Float -> OvertonesO,Int -> Float -> OvertonesO) -> V.Vector (Int,Int) -> +  V.Vector (Float,Float -> OvertonesO)) -> Params -> Float -> FilePath -> Float -> String -> +    (OvertonesO -> Float -> (Float -> OvertonesO) -> OvertonesO) -> (OvertonesO -> Float -> (Float -> OvertonesO) -> OvertonesO) -> +      (Int -> OvertonesO) -> (OvertonesO -> OvertonesO) -> (Float -> OvertonesO) -> IO () soundGen3G_O2Par = soundGen3G_O2MNPar (-1) (-1)  -- | Generates a sequence of sounds with changing timbre. Is a generalized version of the 'soundGen3G_O2'. To specify how many sounds the resulting files --- will provide, you use first two 'Int64' arguments, the first of which is a number of dropped elements for 'readFileDoubles' and the second one +-- will provide, you use first two 'Int64' arguments, the first of which is a number of dropped elements for 'readFileFloats' and the second one  -- is a number of produced sounds (and, respectively, number of taken elements).-soundGen3G_O2MN :: Int64 -> Int64 -> ((Double -> OvertonesO,Int -> Double -> OvertonesO,Int -> Double -> OvertonesO) -> V.Vector (Int,Int) -> -  V.Vector (Double,Double -> OvertonesO)) -> Int -> Int -> Double -> FilePath -> Double -> String -> -    (OvertonesO -> Double -> (Double -> OvertonesO) -> OvertonesO) -> (OvertonesO -> Double -> (Double -> OvertonesO) -> OvertonesO) -> -      (Int -> OvertonesO) -> (OvertonesO -> OvertonesO) -> (Double -> OvertonesO) -> IO ()+soundGen3G_O2MN :: Int64 -> Int64 -> ((Float -> OvertonesO,Int -> Float -> OvertonesO,Int -> Float -> OvertonesO) -> V.Vector (Int,Int) -> +  V.Vector (Float,Float -> OvertonesO)) -> Int -> Int -> Float -> FilePath -> Float -> String -> +    (OvertonesO -> Float -> (Float -> OvertonesO) -> OvertonesO) -> (OvertonesO -> Float -> (Float -> OvertonesO) -> OvertonesO) -> +      (Int -> OvertonesO) -> (OvertonesO -> OvertonesO) -> (Float -> OvertonesO) -> IO () soundGen3G_O2MN m1 n1 conversionFII m ku freq1 file y zs gAdds gRems freq0 proj f0 = do-  vecA0 <- fmap (V.map (`quotRem` 108)) ((if m1 == (-1) && n1 == (-1) then readFileDoubles else readFileDoublesMN m1 n1) file) -- >>= print+  vecA0 <- fmap (V.map (`quotRem` 108)) ((if m1 == (-1) && n1 == (-1) then readFileFloats else readFileFloatsMN m1 n1) file) -- >>= print   let n = V.length vecA0       fA1 j = fAddFElems (proj . freq0 $ j) f0 gAdds       fR1 j = fRemoveFElems (proj . freq0 $ j) f0 gRems@@ -229,12 +229,12 @@  -- | Generalized version of the 'soundGen3G_O2MN' where 'liftInParams' is used instead of lifting with the 'liftInEnku'. This allows e. g. to  -- use some tonality. For more information, please, refer to 'filterInParams'.-soundGen3G_O2MNPar :: Int64 -> Int64 -> ((Double -> OvertonesO,Int -> Double -> OvertonesO,Int -> Double -> OvertonesO) -> V.Vector (Int,Int) -> -  V.Vector (Double,Double -> OvertonesO)) -> Params -> Double -> FilePath -> Double -> String -> -    (OvertonesO -> Double -> (Double -> OvertonesO) -> OvertonesO) -> (OvertonesO -> Double -> (Double -> OvertonesO) -> OvertonesO) -> -      (Int -> OvertonesO) -> (OvertonesO -> OvertonesO) -> (Double -> OvertonesO) -> IO ()+soundGen3G_O2MNPar :: Int64 -> Int64 -> ((Float -> OvertonesO,Int -> Float -> OvertonesO,Int -> Float -> OvertonesO) -> V.Vector (Int,Int) -> +  V.Vector (Float,Float -> OvertonesO)) -> Params -> Float -> FilePath -> Float -> String -> +    (OvertonesO -> Float -> (Float -> OvertonesO) -> OvertonesO) -> (OvertonesO -> Float -> (Float -> OvertonesO) -> OvertonesO) -> +      (Int -> OvertonesO) -> (OvertonesO -> OvertonesO) -> (Float -> OvertonesO) -> IO () soundGen3G_O2MNPar m1 n1 conversionFII params freq1 file y zs gAdds gRems freq0 proj f0 = do-  vecA0 <- fmap (V.map (`quotRem` 108)) ((if m1 == (-1) && n1 == (-1) then readFileDoubles else readFileDoublesMN m1 n1) file) -- >>= print+  vecA0 <- fmap (V.map (`quotRem` 108)) ((if m1 == (-1) && n1 == (-1) then readFileFloats else readFileFloatsMN m1 n1) file) -- >>= print   let n = V.length vecA0       fA1 j = fAddFElems (proj . freq0 $ j) f0 gAdds       fR1 j = fRemoveFElems (proj . freq0 $ j) f0 gRems@@ -249,30 +249,30 @@ -- tuple first argument uses not the tuple of the three functions, but a tuple of three 'V.Vector' of functions of the respective types, that allows to  -- specify more comlex behaviour and different variants inside the function itself, not its inner function parts. 'V.Vector' as a data type is used  -- instead of more common list because it has similar functionality and besides provides easier and quicker access to its elements. So these are the --- following vectors of functions: @vf :: Vector (Double -> OvertonesO)@ (no changing a function for timbre generation), --- @vfA :: Vector (Int -> Double -> OvertonesO)@ (for \"adding\" overtones to the function for timbre generation), --- and @vfR :: Vector (Int -> Double -> OvertonesO@ (for \"removing\" overtones from the function for timbre generation).+-- following vectors of functions: @vf :: Vector (Float -> OvertonesO)@ (no changing a function for timbre generation), +-- @vfA :: Vector (Int -> Float -> OvertonesO)@ (for \"adding\" overtones to the function for timbre generation), +-- and @vfR :: Vector (Int -> Float -> OvertonesO@ (for \"removing\" overtones from the function for timbre generation). -- -soundGen3G_O2G :: ((V.Vector (Double -> OvertonesO),V.Vector (Int -> Double -> OvertonesO),V.Vector (Int -> Double -> OvertonesO)) -> V.Vector (Int,Int) -> -  V.Vector (Double,Double -> OvertonesO)) -> V.Vector (Double -> OvertonesO) -> V.Vector (Int -> Double -> OvertonesO) -> V.Vector (Int -> Double -> OvertonesO) -> -    Int -> Int -> Double -> FilePath -> Double -> String -> IO ()+soundGen3G_O2G :: ((V.Vector (Float -> OvertonesO),V.Vector (Int -> Float -> OvertonesO),V.Vector (Int -> Float -> OvertonesO)) -> V.Vector (Int,Int) -> +  V.Vector (Float,Float -> OvertonesO)) -> V.Vector (Float -> OvertonesO) -> V.Vector (Int -> Float -> OvertonesO) -> V.Vector (Int -> Float -> OvertonesO) -> +    Int -> Int -> Float -> FilePath -> Float -> String -> IO () soundGen3G_O2G = soundGen3G_O2GMN (-1) (-1)  -- | Generalized version of the 'soundGen3G_O2G' where 'liftInParams' is used instead of lifting with the 'liftInEnku'. This allows e. g. to  -- use some tonality. For more information, please, refer to 'filterInParams'.-soundGen3G_O2GPar :: ((V.Vector (Double -> OvertonesO),V.Vector (Int -> Double -> OvertonesO),V.Vector (Int -> Double -> OvertonesO)) -> V.Vector (Int,Int) -> -  V.Vector (Double,Double -> OvertonesO)) -> V.Vector (Double -> OvertonesO) -> V.Vector (Int -> Double -> OvertonesO) -> V.Vector (Int -> Double -> OvertonesO) -> -    Params -> Double -> FilePath -> Double -> String -> IO ()+soundGen3G_O2GPar :: ((V.Vector (Float -> OvertonesO),V.Vector (Int -> Float -> OvertonesO),V.Vector (Int -> Float -> OvertonesO)) -> V.Vector (Int,Int) -> +  V.Vector (Float,Float -> OvertonesO)) -> V.Vector (Float -> OvertonesO) -> V.Vector (Int -> Float -> OvertonesO) -> V.Vector (Int -> Float -> OvertonesO) -> +    Params -> Float -> FilePath -> Float -> String -> IO () soundGen3G_O2GPar = soundGen3G_O2GMNPar (-1) (-1)  -- | Generates a sequence of sounds with changing timbre. Is a generalized version of the 'soundGen3G_O2G'. To specify how many sounds the resulting files --- will provide, you use first two 'Int64' arguments, the first of which is a number of dropped elements for 'readFileDoubles' and the second one +-- will provide, you use first two 'Int64' arguments, the first of which is a number of dropped elements for 'readFileFloats' and the second one  -- is a number of produced sounds (and, respectively, number of taken elements).-soundGen3G_O2GMN :: Int64 -> Int64 -> ((V.Vector (Double -> OvertonesO),V.Vector (Int -> Double -> OvertonesO),V.Vector (Int -> Double -> OvertonesO)) -> V.Vector (Int,Int) -> -  V.Vector (Double,Double -> OvertonesO)) -> V.Vector (Double -> OvertonesO) -> V.Vector (Int -> Double -> OvertonesO) -> V.Vector (Int -> Double -> OvertonesO) -> -    Int -> Int -> Double -> FilePath -> Double -> String -> IO ()+soundGen3G_O2GMN :: Int64 -> Int64 -> ((V.Vector (Float -> OvertonesO),V.Vector (Int -> Float -> OvertonesO),V.Vector (Int -> Float -> OvertonesO)) -> V.Vector (Int,Int) -> +  V.Vector (Float,Float -> OvertonesO)) -> V.Vector (Float -> OvertonesO) -> V.Vector (Int -> Float -> OvertonesO) -> V.Vector (Int -> Float -> OvertonesO) -> +    Int -> Int -> Float -> FilePath -> Float -> String -> IO () soundGen3G_O2GMN m1 n1 conversionFII vf vfA vfR m ku freq1 file y zs = do-  vecA0 <- fmap (V.map (`quotRem` 108)) ((if m1 == (-1) && n1 == (-1) then readFileDoubles else readFileDoublesMN m1 n1) file) -- >>= print+  vecA0 <- fmap (V.map (`quotRem` 108)) ((if m1 == (-1) && n1 == (-1) then readFileFloats else readFileFloatsMN m1 n1) file) -- >>= print   let n = V.length vecA0       vecB = conversionFII (vf,vfA,vfR) vecA0       zeroN = numVZeroesPre vecB@@ -283,11 +283,11 @@  -- | Generalized version of the 'soundGen3G_O2GMN' where 'liftInParams' is used instead of lifting with the 'liftInEnku'. This allows e. g. to  -- use some tonality. For more information, please, refer to 'filterInParams'.-soundGen3G_O2GMNPar :: Int64 -> Int64 -> ((V.Vector (Double -> OvertonesO),V.Vector (Int -> Double -> OvertonesO),V.Vector (Int -> Double -> OvertonesO)) -> V.Vector (Int,Int) -> -  V.Vector (Double,Double -> OvertonesO)) -> V.Vector (Double -> OvertonesO) -> V.Vector (Int -> Double -> OvertonesO) -> V.Vector (Int -> Double -> OvertonesO) -> -    Params -> Double -> FilePath -> Double -> String -> IO ()+soundGen3G_O2GMNPar :: Int64 -> Int64 -> ((V.Vector (Float -> OvertonesO),V.Vector (Int -> Float -> OvertonesO),V.Vector (Int -> Float -> OvertonesO)) -> V.Vector (Int,Int) -> +  V.Vector (Float,Float -> OvertonesO)) -> V.Vector (Float -> OvertonesO) -> V.Vector (Int -> Float -> OvertonesO) -> V.Vector (Int -> Float -> OvertonesO) -> +    Params -> Float -> FilePath -> Float -> String -> IO () soundGen3G_O2GMNPar m1 n1 conversionFII vf vfA vfR params freq1 file y zs = do-  vecA0 <- fmap (V.map (`quotRem` 108)) ((if m1 == (-1) && n1 == (-1) then readFileDoubles else readFileDoublesMN m1 n1) file) -- >>= print+  vecA0 <- fmap (V.map (`quotRem` 108)) ((if m1 == (-1) && n1 == (-1) then readFileFloats else readFileFloatsMN m1 n1) file) -- >>= print   let n = V.length vecA0       vecB = conversionFII (vf,vfA,vfR) vecA0       zeroN = numVZeroesPre vecB@@ -296,10 +296,10 @@         renameFile ("result.wav") $ "result0" ++ prependZeroes zeroN (show (j + 1)) ++ ".wav") vecB   endFromResult   --- | For the given parameters generates a single sound with overtones or pause depending on the sign of the second element in the tuple of 'Double': +-- | For the given parameters generates a single sound with overtones or pause depending on the sign of the second element in the tuple of 'Float':  -- if it is greater than zero then the sound is generated, if less -- the silence (pause), if it is equal to zero then it prints an informational message  -- about a non-standard situation. -h1 :: (Double -> OvertonesO) -> (Double, Double) -> IO ()+h1 :: (Float -> OvertonesO) -> (Float, Float) -> IO () h1 f (x, y) = do     let note0 = closestNote (if x /= 0.0 then abs x else V.unsafeIndex notes 0)         v0    = f note0@@ -314,10 +314,10 @@         \(_,_,herr) -> putStr herr      _ -> putStrLn "Zero length of the sound! "   --- | For the given parameters generates a single sound with overtones or pause depending on the sign of the second element in the tuple of 'Double': +-- | For the given parameters generates a single sound with overtones or pause depending on the sign of the second element in the tuple of 'Float':  -- if it is greater than zero then the sound is generated, if less -- the silence (pause), if it is equal to zero then it prints an informational message  -- about a non-standard situation. Unlike the 'h1' function, it lifts the frequency into the enku specified by the 'Int' arguments (see 'liftInEnku').-h2 :: OvertonesO -> (Double, Double) -> Int -> Int -> Double -> IO ()+h2 :: OvertonesO -> (Float, Float) -> Int -> Int -> Float -> IO () h2 v (x, y) m ku freq1 = do     let note0 = fromMaybe freq1 . liftInEnku m ku . closestNote $ (if x /= 0.0 then abs x else V.unsafeIndex notes 0)         ts = showFFloat (Just 4) (abs y) ""@@ -331,10 +331,10 @@         \(_,_,herr) -> putStr herr      _ -> putStrLn "Zero length of the sound! "   --- | For the given parameters generates a single sound with overtones or pause depending on the sign of the second element in a tuple of 'Double': +-- | For the given parameters generates a single sound with overtones or pause depending on the sign of the second element in a tuple of 'Float':  -- if it is greater than zero then the sound is generated, if less -- the silence (pause), if it is equal to zero then it prints an informational message  -- about a non-standard situation.  Unlike the 'h1' function, it lifts into the requency specified by the 'Params' argument .-h2Params :: OvertonesO -> (Double, Double) -> Params -> Double -> IO ()+h2Params :: OvertonesO -> (Float, Float) -> Params -> Float -> IO () h2Params v (x, y) params freq1 = do     let note01 = flip liftInParams params (if x /= 0.0 then abs x else V.unsafeIndex notes 0)         ts = showFFloat (Just 4) (abs y) ""
README.markdown view
@@ -1,3 +1,6 @@+             ***** Basic Info *****+             ======================+ Helps to create (in a more complicated manner compared to dobutokO2 package)  experimental music from a file (or its part). Can be used to generate sounds  with changing timbre.@@ -6,3 +9,5 @@  The functions are taken and fixed some issues from the package dobutokO2  https://hackage.haskell.org/package/dobutokO2++
dobutokO3.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                dobutokO3-version:             0.1.0.0+version:             0.2.0.0 synopsis:            Helps to create more complex experimental music from a file (especially timbre). description:         Uses SoX inside. homepage:            https://hackage.haskell.org/package/dobutokO3@@ -20,6 +20,6 @@   exposed-modules:     DobutokO.Sound.Complex   -- other-modules:   -- other-extensions:-  build-depends:       base >=4.7 && <4.15, bytestring >= 0.10.6 && <1, vector >=0.11 && <0.14, process >=1.4 && <1.9, mmsyn3 >=0.1.5 && <1, mmsyn7s >=0.6.7 && <1, directory >=1.2.7 && <1.7, mmsyn7ukr >=0.15.4 && <1, mmsyn2 >=0.1.8 && <1, mmsyn6ukr >=0.7.2 && <1, mmsyn7l >=0.5 && <1, dobutokO2 >=0.41 && <1+  build-depends:       base >=4.7 && <4.15, bytestring >= 0.10.6 && <1, vector >=0.11 && <0.14, process >=1.4 && <1.9, mmsyn3 >=0.1.5 && <1, mmsyn7s >=0.7 && <1, directory >=1.2.7 && <1.7, mmsyn7ukr >=0.16 && <1, mmsyn2 >=0.1.8 && <1, mmsyn6ukr >=0.7.2 && <1, mmsyn7l >=0.7 && <1, dobutokO2 >=0.42 && <1   -- hs-source-dirs:   default-language:    Haskell2010