packages feed

dobutokO4 0.6.0.0 → 0.7.0.0

raw patch · 5 files changed

+112/−113 lines, 5 filesdep ~dobutokO2dep ~mmsyn7ldep ~vector-doublezipPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: dobutokO2, mmsyn7l, vector-doublezip

API changes (from Hackage documentation)

- DobutokO.Sound.Faded: double42Float4 :: ((Double, Double), (Double, Double)) -> ((Float, Float), (Float, Float))
- DobutokO.Sound.Faded: basicF :: String -> String -> Float -> Float -> Float -> Double -> (Double -> Double) -> Vector Double -> IO ()
+ DobutokO.Sound.Faded: basicF :: String -> String -> Float -> Float -> Float -> Float -> (Float -> Float) -> Vector Float -> IO ()
- DobutokO.Sound.Faded: basicF2 :: String -> String -> Float -> Float -> Float -> Double -> Double -> (Double -> Double) -> Vector Double -> IO ()
+ DobutokO.Sound.Faded: basicF2 :: String -> String -> Float -> Float -> Float -> Float -> Float -> (Float -> Float) -> Vector Float -> IO ()
- DobutokO.Sound.Faded: basicF2C :: String -> Float -> Float -> Float -> Double -> Double -> (Double -> Double) -> Vector Double -> IO ()
+ DobutokO.Sound.Faded: basicF2C :: String -> Float -> Float -> Float -> Float -> Float -> (Float -> Float) -> Vector Float -> IO ()
- DobutokO.Sound.Faded: basicF2CN :: FilePath -> String -> Float -> Float -> Float -> Double -> Double -> (Double -> Double) -> Vector Double -> IO ()
+ DobutokO.Sound.Faded: basicF2CN :: FilePath -> String -> Float -> Float -> Float -> Float -> Float -> (Float -> Float) -> Vector Float -> IO ()
- DobutokO.Sound.Faded: basicF2N :: FilePath -> String -> String -> Float -> Float -> Float -> Double -> Double -> (Double -> Double) -> Vector Double -> IO ()
+ DobutokO.Sound.Faded: basicF2N :: FilePath -> String -> String -> Float -> Float -> Float -> Float -> Float -> (Float -> Float) -> Vector Float -> IO ()
- DobutokO.Sound.Faded: basicFC :: String -> Float -> Float -> Float -> Double -> (Double -> Double) -> Vector Double -> IO ()
+ DobutokO.Sound.Faded: basicFC :: String -> Float -> Float -> Float -> Float -> (Float -> Float) -> Vector Float -> IO ()
- DobutokO.Sound.Faded: basicFCN :: FilePath -> String -> Float -> Float -> Float -> Double -> (Double -> Double) -> Vector Double -> IO ()
+ DobutokO.Sound.Faded: basicFCN :: FilePath -> String -> Float -> Float -> Float -> Float -> (Float -> Float) -> Vector Float -> IO ()
- DobutokO.Sound.Faded: basicFN :: FilePath -> String -> String -> Float -> Float -> Float -> Double -> (Double -> Double) -> Vector Double -> IO ()
+ DobutokO.Sound.Faded: basicFN :: FilePath -> String -> String -> Float -> Float -> Float -> Float -> (Float -> Float) -> Vector Float -> IO ()
- DobutokO.Sound.Faded: moreFCN :: FilePath -> String -> Float -> Float -> Float -> Float -> Double -> (Double -> Double) -> Vector Double -> IO ()
+ DobutokO.Sound.Faded: moreFCN :: FilePath -> String -> Float -> Float -> Float -> Float -> Float -> (Float -> Float) -> Vector Float -> IO ()
- DobutokO.Sound.Faded: moreFN :: FilePath -> String -> String -> Float -> Float -> Float -> Float -> Double -> (Double -> Double) -> Vector Double -> IO ()
+ DobutokO.Sound.Faded: moreFN :: FilePath -> String -> String -> Float -> Float -> Float -> Float -> Float -> (Float -> Float) -> Vector Float -> IO ()
- DobutokO.Sound.Faded: moreFNC :: String -> FilePath -> String -> String -> Float -> Float -> Float -> Float -> Double -> (Double -> Double) -> Vector Double -> IO ()
+ DobutokO.Sound.Faded: moreFNC :: String -> FilePath -> String -> String -> Float -> Float -> Float -> Float -> Float -> (Float -> Float) -> Vector Float -> IO ()
- DobutokO.Sound.Faded: overChangeVol :: String -> Char -> Int -> Float -> Float -> Float -> ((Double, Double), (Double, Double)) -> IO ()
+ DobutokO.Sound.Faded: overChangeVol :: String -> Char -> Int -> Float -> Float -> Float -> ((Float, Float), (Float, Float)) -> IO ()
- DobutokO.Sound.Faded: overChangeVolC :: String -> Char -> Int -> Float -> Float -> Float -> (Double, Double) -> (Double, Double) -> IO ()
+ DobutokO.Sound.Faded: overChangeVolC :: String -> Char -> Int -> Float -> Float -> Float -> (Float, Float) -> (Float, Float) -> IO ()
- DobutokO.Sound.Faded: overChangeVolCN :: FilePath -> String -> Char -> Int -> Float -> Float -> Float -> (Double, Double) -> (Double, Double) -> IO ()
+ DobutokO.Sound.Faded: overChangeVolCN :: FilePath -> String -> Char -> Int -> Float -> Float -> Float -> (Float, Float) -> (Float, Float) -> IO ()
- DobutokO.Sound.Faded: overChangeVolF :: String -> Char -> Int -> Float -> Float -> (Double, Double) -> (Double, Double) -> Float -> IO ()
+ DobutokO.Sound.Faded: overChangeVolF :: String -> Char -> Int -> Float -> Float -> (Float, Float) -> (Float, Float) -> Float -> IO ()
- DobutokO.Sound.Faded: overChangeVolFN :: FilePath -> String -> Char -> Int -> Float -> Float -> (Double, Double) -> (Double, Double) -> Float -> IO ()
+ DobutokO.Sound.Faded: overChangeVolFN :: FilePath -> String -> Char -> Int -> Float -> Float -> (Float, Float) -> (Float, Float) -> Float -> IO ()
- DobutokO.Sound.Faded: overChangeVolG :: String -> String -> Int -> Float -> Float -> Float -> Float -> ((Double, Double), (Double, Double)) -> IO ()
+ DobutokO.Sound.Faded: overChangeVolG :: String -> String -> Int -> Float -> Float -> Float -> Float -> ((Float, Float), (Float, Float)) -> IO ()
- DobutokO.Sound.Faded: overChangeVolGC :: String -> String -> Int -> Float -> Float -> Float -> Float -> (Double, Double) -> (Double, Double) -> IO ()
+ DobutokO.Sound.Faded: overChangeVolGC :: String -> String -> Int -> Float -> Float -> Float -> Float -> (Float, Float) -> (Float, Float) -> IO ()
- DobutokO.Sound.Faded: overChangeVolGCN :: FilePath -> String -> String -> Int -> Float -> Float -> Float -> Float -> (Double, Double) -> (Double, Double) -> IO ()
+ DobutokO.Sound.Faded: overChangeVolGCN :: FilePath -> String -> String -> Int -> Float -> Float -> Float -> Float -> (Float, Float) -> (Float, Float) -> IO ()
- DobutokO.Sound.Faded: overChangeVolGF :: String -> String -> Int -> Float -> Float -> (Double, Double) -> (Double, Double) -> Float -> Float -> IO ()
+ DobutokO.Sound.Faded: overChangeVolGF :: String -> String -> Int -> Float -> Float -> (Float, Float) -> (Float, Float) -> Float -> Float -> IO ()
- DobutokO.Sound.Faded: overChangeVolGFN :: FilePath -> String -> String -> Int -> Float -> Float -> (Double, Double) -> (Double, Double) -> Float -> Float -> IO ()
+ DobutokO.Sound.Faded: overChangeVolGFN :: FilePath -> String -> String -> Int -> Float -> Float -> (Float, Float) -> (Float, Float) -> Float -> Float -> IO ()
- DobutokO.Sound.Faded: overChangeVolGN :: FilePath -> String -> String -> Int -> Float -> Float -> Float -> Float -> ((Double, Double), (Double, Double)) -> IO ()
+ DobutokO.Sound.Faded: overChangeVolGN :: FilePath -> String -> String -> Int -> Float -> Float -> Float -> Float -> ((Float, Float), (Float, Float)) -> IO ()
- DobutokO.Sound.Faded: overChangeVolGNC :: String -> FilePath -> String -> String -> Int -> Float -> Float -> Float -> Float -> ((Double, Double), (Double, Double)) -> IO ()
+ DobutokO.Sound.Faded: overChangeVolGNC :: String -> FilePath -> String -> String -> Int -> Float -> Float -> Float -> Float -> ((Float, Float), (Float, Float)) -> IO ()
- DobutokO.Sound.Faded: overChangeVolN :: FilePath -> String -> Char -> Int -> Float -> Float -> Float -> ((Double, Double), (Double, Double)) -> IO ()
+ DobutokO.Sound.Faded: overChangeVolN :: FilePath -> String -> Char -> Int -> Float -> Float -> Float -> ((Float, Float), (Float, Float)) -> IO ()
- DobutokO.Sound.Presentation: I :: Double -> Double -> IntervalTim
+ DobutokO.Sound.Presentation: I :: Float -> Float -> IntervalTim
- DobutokO.Sound.Presentation: II :: Double -> Double -> IntervalTimI
+ DobutokO.Sound.Presentation: II :: Float -> Float -> IntervalTimI
- DobutokO.Sound.Presentation: SAbi :: Int -> Double -> Double -> Double -> OvertonesO -> SoundI
+ DobutokO.Sound.Presentation: SAbi :: Int -> Float -> Float -> Float -> OvertonesO -> SoundI
- DobutokO.Sound.Presentation: SAbn :: FilePath -> String -> Double -> Double -> Double -> SoundFN
+ DobutokO.Sound.Presentation: SAbn :: FilePath -> String -> Float -> Float -> Float -> SoundFN
- DobutokO.Sound.Presentation: SAbtO :: Double -> Double -> Double -> Double -> Double -> OvertonesO -> SoundT
+ DobutokO.Sound.Presentation: SAbtO :: Float -> Float -> Float -> Float -> Float -> OvertonesO -> SoundT
- DobutokO.Sound.Presentation: SAi :: Int -> Double -> Double -> Double -> OvertonesO -> SoundI
+ DobutokO.Sound.Presentation: SAi :: Int -> Float -> Float -> Float -> OvertonesO -> SoundI
- DobutokO.Sound.Presentation: SAn :: FilePath -> String -> Double -> Double -> Double -> SoundFN
+ DobutokO.Sound.Presentation: SAn :: FilePath -> String -> Float -> Float -> Float -> SoundFN
- DobutokO.Sound.Presentation: SAtO :: Double -> Double -> Double -> Double -> Double -> OvertonesO -> SoundT
+ DobutokO.Sound.Presentation: SAtO :: Float -> Float -> Float -> Float -> Float -> OvertonesO -> SoundT
- DobutokO.Sound.Presentation: Si :: Int -> Double -> Double -> OvertonesO -> SoundI
+ DobutokO.Sound.Presentation: Si :: Int -> Float -> Float -> OvertonesO -> SoundI
- DobutokO.Sound.Presentation: Sn :: FilePath -> String -> Double -> Double -> SoundFN
+ DobutokO.Sound.Presentation: Sn :: FilePath -> String -> Float -> Float -> SoundFN
- DobutokO.Sound.Presentation: StO :: Double -> Double -> Double -> Double -> OvertonesO -> SoundT
+ DobutokO.Sound.Presentation: StO :: Float -> Float -> Float -> Float -> OvertonesO -> SoundT
- DobutokO.Sound.Presentation: Time :: Double -> Double -> Double -> Timity
+ DobutokO.Sound.Presentation: Time :: Float -> Float -> Float -> Timity
- DobutokO.Sound.Presentation: Time1 :: Double -> Double -> a -> Timity1 a
+ DobutokO.Sound.Presentation: Time1 :: Float -> Float -> a -> Timity1 a

Files

ChangeLog.md view
@@ -34,3 +34,7 @@  * Sixth version. Changed a lot of Double arguments in the DobutokO.Sound.Faded to Float ones. This change is inspired by: https://www.youtube.com/watch?v=FYTZkE5BZ-0 +## 0.7.0.0 -- 2020-06-24++* Seventh version. Completed changes from Double to Float started in the 0.6.0.0 version. Moved DobutokO.Sound.Faded.double42Float4 function to Data.Vector.DoubleZipped +module.
DobutokO/Sound/Faded.hs view
@@ -7,7 +7,7 @@ -- -- Helps to create experimental music.  -- Uses SoX fade (in a special 2D way) effect and frequency modulation. --- Since 0.6.0.0 version it uses 'Float' instead of 'Double'. This change is inspired by: +-- Since 0.7.0.0 version it uses 'Float' instead of 'Double'. This change is inspired by:  -- https://www.youtube.com/watch?v=FYTZkE5BZ-0 -- For conversion it uses functions from the 'GHC.Float' module. -- @@ -52,7 +52,6 @@   , charFadeType   , argString   , freqChange-  , double42Float4   -- * Special numbers   , sameConst ) where@@ -75,7 +74,6 @@ import DobutokO.Sound.Functional.Basics import DobutokO.Sound.IntermediateF (soxBasicParams) import Data.Vector.DoubleZip (evalSndFV)-import GHC.Float (float2Double,double2Float)  #ifdef __GLASGOW_HASKELL__ #if __GLASGOW_HASKELL__==708@@ -84,80 +82,77 @@ #endif #endif -double42Float4 :: ((Double,Double), (Double,Double)) -> ((Float,Float), (Float,Float))-double42Float4 ((x,y),(z,t)) = ((double2Float x,double2Float y),(double2Float z,double2Float t))- -- | Generates a sound, the volume of which (being plotted graphically) comes through the given 2D points at the time-volume scale with possibly --- changing frequency (they are specified by the first and the second 'Double' arguments). Uses SoX inside especially the \"fade\" and \"synth\" effects. +-- changing frequency (they are specified by the first and the second 'Float' arguments). Uses SoX inside especially the \"fade\" and \"synth\" effects.  -- For the equal frequencies generates specifically faded output without frequency modulation. -overChangeVolG :: String -> String -> Int -> Float -> Float -> Float -> Float -> ((Double,Double), (Double,Double)) -> IO ()+overChangeVolG :: String -> String -> Int -> Float -> Float -> Float -> Float -> ((Float,Float), (Float,Float)) -> IO () overChangeVolG = overChangeVolGN "test"   -- | A generalized version of the 'overChangeVolG' with a possibility to specify the name of the resulting file (by default it is \"test\" based).-overChangeVolGN :: FilePath -> String -> String -> Int -> Float -> Float -> Float -> Float -> ((Double,Double), (Double,Double)) -> IO ()+overChangeVolGN :: FilePath -> String -> String -> Int -> Float -> Float -> Float -> Float -> ((Float,Float), (Float,Float)) -> IO () overChangeVolGN filestart ys cs j freq1 freq2 x0 xdelta ((t0,v0), (t1,v1)) - | x0 /= 0 && compare (abs x0) 1.0 /= GT && compare freq1 16 == GT && compare freq1 20000 == LT = let ((t0F,v0F), (t1F,v1F)) = double42Float4 ((t0,v0), (t1,v1))  in -  case compare (v1F * v0F) 0 of + | x0 /= 0 && compare (abs x0) 1.0 /= GT && compare freq1 16 == GT && compare freq1 20000 == LT = +  case compare (v1 * v0) 0 of      GT -> do-     (code1,_,herr1) <- readProcessWithExitCode (fromJust (showE "sox")) (soxBasicParams ys ["","-n","test1F.wav","synth", -       showFFloat Nothing (if t1F == t0F then abs x0 else abs (t1F - t0F)) "", "sine", showFFloat (Just 4) freq1 (freqChange (drop 1 cs) freq2 freq1), "fade", +     (code1,_,herr1) <- readProcessWithExitCode (fromJust (showE "sox")) (soxBasicParams ys ["","-n","test1.wav","synth", +       showFFloat Nothing (if t1 == t0 then abs x0 else abs (t1 - t0)) "", "sine", showFFloat (Just 4) freq1 (freqChange (drop 1 cs) freq2 freq1), "fade",          charFadeType (if null cs then 'l' else head cs)] ++ -         if compare ((v1F - v0F) * (t1F - t0F)) 0 /= LT then [showFFloat Nothing (if compare (abs (t1F - t0F)) xdelta /= GT then abs x0 else abs (t1F - t0F)) ""] -           else ["0", "-0.0", showFFloat Nothing (if compare (abs (t1F - t0F)) xdelta /= GT then abs x0 else abs (t1F - t0F)) "", "vol", -             showFFloat (Just 4) (signum v1F * abs (v1F - v0F)) ""]) ""+         if compare ((v1 - v0) * (t1 - t0)) 0 /= LT then [showFFloat Nothing (if compare (abs (t1 - t0)) xdelta /= GT then abs x0 else abs (t1 - t0)) ""] +           else ["0", "-0.0", showFFloat Nothing (if compare (abs (t1 - t0)) xdelta /= GT then abs x0 else abs (t1 - t0)) "", "vol", +             showFFloat (Just 4) (signum v1 * abs (v1 - v0)) ""]) ""      if code1 /= ExitSuccess then error $ "DobutokO.Sound.Faded.overChangeVolGN: " ++ herr1      else do-      (code2,_,herr2) <- readProcessWithExitCode (fromJust (showE "sox")) (soxBasicParams ys ["","-n","test0F.wav","synth", -        showFFloat Nothing (if compare (abs (t1F - t0F)) xdelta /= GT then abs x0 else abs (t1F - t0F)) "", "sine", -          showFFloat (Just 4) freq1 (freqChange (drop 1 cs) freq2 freq1), "vol", showFFloat (Just 4) (min v0F v1F) ""]) ""+      (code2,_,herr2) <- readProcessWithExitCode (fromJust (showE "sox")) (soxBasicParams ys ["","-n","test0.wav","synth", +        showFFloat Nothing (if compare (abs (t1 - t0)) xdelta /= GT then abs x0 else abs (t1 - t0)) "", "sine", +          showFFloat (Just 4) freq1 (freqChange (drop 1 cs) freq2 freq1), "vol", showFFloat (Just 4) (min v0 v1) ""]) ""       if code2 == ExitSuccess          then do-          (code3,_,herr3) <- readProcessWithExitCode (fromJust (showE "sox")) ["-m","test0F" ++ endingWF ys,"test1F" ++ endingWF ys, (filestart ++ "G") ++ +          (code3,_,herr3) <- readProcessWithExitCode (fromJust (showE "sox")) ["-m","test0" ++ endingWF ys,"test1" ++ endingWF ys, (filestart ++ "G") ++              prependZeroes 6 (show j) ++ endingWF ys, "vol", "2"] ""           if code3 == ExitSuccess -            then removeFile ("test0F" ++ endingWF ys) >> removeFile ("test1F" ++ endingWF ys)+            then removeFile ("test0" ++ endingWF ys) >> removeFile ("test1" ++ endingWF ys)             else error $ "DobutokO.Sound.Faded.overChangeVolGN: " ++ herr3         else print herr2 >> error "DobutokO.Sound.Faded.overChangeVolGN: Operation not successful. "     LT -> do  -     overChangeVolGN filestart ys cs j freq1 ((v0F * freq2 - v1F * freq1) / (v0F - v1F)) x0 xdelta ((t0,v0), ((v0 * t1 - v1 * t0) / (v0 - v1),0)) >> +     overChangeVolGN filestart ys cs j freq1 ((v0 * freq2 - v1 * freq1) / (v0 - v1)) x0 xdelta ((t0,v0), ((v0 * t1 - v1 * t0) / (v0 - v1),0)) >>        renameFile ((filestart ++ "G") ++ prependZeroes 6 (show j) ++ endingWF ys) ("temp00" ++ endingWF ys)      (code0,_,herr) <- readProcessWithExitCode (fromJust (showE "sox")) ["temp00" ++ endingWF ys,"temp0" ++ endingWF ys, "fade", "h", "0", "-0.0",        showFFloat (Just 6) ((max freq1 freq2) ** (-1.0)) ""] ""       if code0 /= ExitSuccess then error (show herr)      else do-      overChangeVolGN filestart ys cs j ((v0F * freq2 - v1F * freq1) / (v0F - v1F)) freq2 x0 xdelta (((v0 * t1 - v1 * t0) / (v0 - v1),0), (t1,v1)) >> +      overChangeVolGN filestart ys cs j ((v0 * freq2 - v1 * freq1) / (v0 - v1)) freq2 x0 xdelta (((v0 * t1 - v1 * t0) / (v0 - v1),0), (t1,v1)) >>         renameFile ((filestart ++ "G") ++ prependZeroes 6 (show j) ++ endingWF ys) ("temp1" ++ endingWF ys)       (code1,_,herr1) <- readProcessWithExitCode (fromJust (showE "sox")) ["temp0" ++ endingWF ys,"temp1" ++ endingWF ys, (filestart ++ "G") ++         prependZeroes 6 (show j) ++ endingWF ys] ""       if code1 == ExitSuccess then removeFile ("temp0" ++ endingWF ys) >> removeFile ("temp1" ++ endingWF ys) >> removeFile ("temp00" ++ endingWF ys)        else error $ "DobutokO.Sound.Faded.overChangeVolGN: " ++ herr1      _  -> -     case v1F of +     case v1 of        0 -> -       if v0F == 0 +       if v0 == 0          then do           (code1,_,herr1) <- readProcessWithExitCode (fromJust (showE "sox")) (soxBasicParams ys ["","-n",(filestart ++ "G") ++ prependZeroes 6 (show j) ++ -            ".wav","delay", showFFloat Nothing (if compare (abs (t1F - t0F)) xdelta /= GT then abs x0 else abs (t1F - t0F)) "", "trim", showFFloat Nothing -              (if compare (abs (t1F - t0F)) xdelta /= GT then abs x0 else abs (t1F - t0F)) ""]) ""+            ".wav","delay", showFFloat Nothing (if compare (abs (t1 - t0)) xdelta /= GT then abs x0 else abs (t1 - t0)) "", "trim", showFFloat Nothing +              (if compare (abs (t1 - t0)) xdelta /= GT then abs x0 else abs (t1 - t0)) ""]) ""           if code1 /= ExitSuccess then error $ "DobutokO.Sound.Faded.overChangeVolGN: " ++ herr1           else return ()         else do            (code1,_,herr1) <- readProcessWithExitCode (fromJust (showE "sox")) (soxBasicParams ys ["","-n",(filestart ++ "G") ++ prependZeroes 6 (show j) ++ -            ".wav","synth", showFFloat Nothing (if compare (abs (t1F - t0F)) xdelta /= GT then abs x0 else abs (t1F - t0F)) "", "sine", +            ".wav","synth", showFFloat Nothing (if compare (abs (t1 - t0)) xdelta /= GT then abs x0 else abs (t1 - t0)) "", "sine",                showFFloat (Just 4) freq1 (freqChange (drop 1 cs) freq2 freq1), "fade", charFadeType (if null cs then 'l' else head cs)] ++ -               if compare t0F t1F == GT then [showFFloat Nothing -                (if compare (abs (t1F - t0F)) xdelta /= GT then abs x0 else abs (t1F - t0F)) ""] else ["0", "-0.0", showFFloat Nothing -                  (if compare (abs (t1F - t0F)) xdelta /= GT then abs x0 else abs (t1F - t0F)) "", "vol", showFFloat (Just 4) v0F ""]) ""+               if compare t0 t1 == GT then [showFFloat Nothing +                (if compare (abs (t1 - t0)) xdelta /= GT then abs x0 else abs (t1 - t0)) ""] else ["0", "-0.0", showFFloat Nothing +                  (if compare (abs (t1 - t0)) xdelta /= GT then abs x0 else abs (t1 - t0)) "", "vol", showFFloat (Just 4) v0 ""]) ""           if code1 /= ExitSuccess then error $ "DobutokO.Sound.Faded.overChangeVolGN: " ++ herr1           else return ()       _ -> do        (code1,_,herr1) <- readProcessWithExitCode (fromJust (showE "sox")) (soxBasicParams ys ["","-n",(filestart ++ "G") ++ prependZeroes 6 (show j) ++ ".wav",-         "synth", showFFloat Nothing (if compare (abs (t1F - t0F)) xdelta /= GT then abs x0 else abs (t1F - t0F)) "", "sine", +         "synth", showFFloat Nothing (if compare (abs (t1 - t0)) xdelta /= GT then abs x0 else abs (t1 - t0)) "", "sine",            showFFloat (Just 4) freq1 (freqChange (drop 1 cs) freq2 freq1), "fade", charFadeType (if null cs then 'l' else head cs)] ++ -           if compare t1F t0F == GT -            then [showFFloat Nothing (if compare (abs (t1F - t0F)) xdelta /= GT then abs x0 -             else abs (t1F - t0F)) ""] else ["0", "-0.0", showFFloat Nothing (if compare (abs (t1F - t0F)) xdelta /= GT then abs x0 else abs (t1F - t0F)) "", -               "vol", showFFloat (Just 4) v1F ""]) ""+           if compare t1 t0 == GT +            then [showFFloat Nothing (if compare (abs (t1 - t0)) xdelta /= GT then abs x0 +             else abs (t1 - t0)) ""] else ["0", "-0.0", showFFloat Nothing (if compare (abs (t1 - t0)) xdelta /= GT then abs x0 else abs (t1 - t0)) "", +               "vol", showFFloat (Just 4) v1 ""]) ""        if code1 /= ExitSuccess then error $ "DobutokO.Sound.Faded.overChangeVolGN: " ++ herr1        else return ()  | otherwise = error "DobutokO.Sound.Faded.overChangeVolGN: sound for these conditions is not defined. " @@ -174,53 +169,53 @@  | otherwise = error "DobutokO.Sound.Faded.freqChange: undefined for this value of the frequency (the first Float argument). "  -- | Generates a sound, the volume of which (being plotted graphically) comes through the given 2D points at the time-volume scale. Uses SoX inside --- especially the \"fade\" and \"synth\" effects. A frequency does not change and is specified (in Hz) by the first 'Double' argument.-overChangeVol :: String -> Char -> Int -> Float -> Float -> Float -> ((Double,Double), (Double,Double)) -> IO () +-- especially the \"fade\" and \"synth\" effects. A frequency does not change and is specified (in Hz) by the first 'Float' argument.+overChangeVol :: String -> Char -> Int -> Float -> Float -> Float -> ((Float,Float), (Float,Float)) -> IO ()  overChangeVol ys c j freq1 = overChangeVolGN "test" ys [c] j freq1 freq1  -- | A generalized version of the 'overChangeVol' with a possibility to specify the name for the mixed files (by default is \"test\" based).-overChangeVolN :: FilePath -> String -> Char -> Int -> Float -> Float -> Float -> ((Double,Double), (Double,Double)) -> IO () +overChangeVolN :: FilePath -> String -> Char -> Int -> Float -> Float -> Float -> ((Float,Float), (Float,Float)) -> IO ()  overChangeVolN filestart ys c j freq1 = overChangeVolGN filestart ys [c] j freq1 freq1  -- | Generates a sound, the volume of which (being plotted graphically) comes through the given 2D points in the time-volume scale. Uses SoX inside especially --- the \"fade\" and \"synth\" effects. A frequency does not change and is specified (in Hz) by the first 'Double' argument. Is a curried variant of the +-- the \"fade\" and \"synth\" effects. A frequency does not change and is specified (in Hz) by the first 'Float' argument. Is a curried variant of the  -- 'overChangeVol' in its two last arguments.-overChangeVolC :: String -> Char -> Int -> Float -> Float -> Float -> (Double,Double) -> (Double,Double) -> IO ()+overChangeVolC :: String -> Char -> Int -> Float -> Float -> Float -> (Float,Float) -> (Float,Float) -> IO () overChangeVolC ys c j freq x0 xdelta w1 = overChangeVol ys c j freq x0 xdelta . (,) w1  -- | A generalized version of the 'overChangeVolC' with a possibility to specify the name for the mixed files (by default is \"test\" based).-overChangeVolCN :: FilePath -> String -> Char -> Int -> Float -> Float -> Float -> (Double,Double) -> (Double,Double) -> IO ()+overChangeVolCN :: FilePath -> String -> Char -> Int -> Float -> Float -> Float -> (Float,Float) -> (Float,Float) -> IO () overChangeVolCN filestart ys c j freq x0 xdelta w1 = overChangeVolN filestart ys c j freq x0 xdelta . (,) w1  -- | Generates a sound, the volume of which (being plotted graphically) comes through the given 2D points in the time-volume scale with possibly changing frequency (they are specified by --- the first and the second 'Double' arguments). Uses SoX inside especially the \"fade\" and \"synth\" effects. For the equal frequencies generates specifically +-- the first and the second 'Float' arguments). Uses SoX inside especially the \"fade\" and \"synth\" effects. For the equal frequencies generates specifically  -- faded output without frequency modulation. Is a curried variant of the 'overChangeVolG' in its two last arguments.-overChangeVolGC :: String -> String -> Int -> Float -> Float -> Float -> Float -> (Double,Double) -> (Double,Double) -> IO ()+overChangeVolGC :: String -> String -> Int -> Float -> Float -> Float -> Float -> (Float,Float) -> (Float,Float) -> IO () overChangeVolGC ys cs j freq1 freq2 x0 xdelta w1 = overChangeVolG ys cs j freq1 freq2 x0 xdelta . (,) w1  -- | A generalized version of the 'overChangeVolGC' with a possibility to specify the name for the mixed files (by default is \"test\" based).-overChangeVolGCN :: FilePath -> String -> String -> Int -> Float -> Float -> Float -> Float -> (Double,Double) -> (Double,Double) -> IO ()+overChangeVolGCN :: FilePath -> String -> String -> Int -> Float -> Float -> Float -> Float -> (Float,Float) -> (Float,Float) -> IO () overChangeVolGCN filestart ys cs j freq1 freq2 x0 xdelta w1 = overChangeVolGN filestart ys cs j freq1 freq2 x0 xdelta . (,) w1  -- | Generates a sound, the volume of which (being plotted graphically) comes through the given 2D points in the time-volume scale. Uses SoX inside especially  -- the \"fade\" and \"synth\" effects. Is a somewhat flipped variant of the 'overChangeVol' with changed order of the arguments (is provided here  -- for convenience).-overChangeVolF :: String -> Char -> Int -> Float -> Float -> (Double,Double) -> (Double,Double) ->  Float -> IO ()+overChangeVolF :: String -> Char -> Int -> Float -> Float -> (Float,Float) -> (Float,Float) ->  Float -> IO () overChangeVolF ys c j x0 xdelta w1 w2 freq  = overChangeVol ys c j freq x0 xdelta (w1,w2)  -- | A generalized version of the 'overChangeVolF' with a possibility to specify the name for the mixed files (by default is \"test\" based).-overChangeVolFN :: FilePath -> String -> Char -> Int -> Float -> Float -> (Double,Double) -> (Double,Double) ->  Float -> IO ()+overChangeVolFN :: FilePath -> String -> Char -> Int -> Float -> Float -> (Float,Float) -> (Float,Float) ->  Float -> IO () overChangeVolFN filestart ys c j x0 xdelta w1 w2 freq  = overChangeVolN filestart ys c j freq x0 xdelta (w1,w2)  -- | Generates a sound, the volume of which (being plotted graphically) comes through the given 2D points in the time-volume scale with possibly --- changing frequency (they are specified by the first and the second 'Double' arguments). Uses SoX inside especially the \"fade\" and \"synth\" effects. +-- changing frequency (they are specified by the first and the second 'Float' arguments). Uses SoX inside especially the \"fade\" and \"synth\" effects.  -- For the equal frequencies generates specifically faded output without frequency modulation. Is a somewhat flipped variant of the 'overChangeVolGC'  -- with changed order of the arguments (is provided here for convenience).-overChangeVolGF :: String -> String -> Int -> Float -> Float -> (Double,Double) -> (Double,Double) ->  Float -> Float -> IO ()+overChangeVolGF :: String -> String -> Int -> Float -> Float -> (Float,Float) -> (Float,Float) ->  Float -> Float -> IO () overChangeVolGF ys cs j x0 xdelta w1 w2 freq1 freq2  = overChangeVolG ys cs j freq1 freq2 x0 xdelta (w1,w2)  -- | A generalized version of the 'overChangeVolGF' with a possibility to specify the name for the mixed files (by default is \"test\" based).-overChangeVolGFN :: FilePath -> String -> String -> Int -> Float -> Float -> (Double,Double) -> (Double,Double) ->  Float -> Float -> IO ()+overChangeVolGFN :: FilePath -> String -> String -> Int -> Float -> Float -> (Float,Float) -> (Float,Float) ->  Float -> Float -> IO () overChangeVolGFN filestart ys cs j x0 xdelta w1 w2 freq1 freq2  = overChangeVolGN filestart ys cs j freq1 freq2 x0 xdelta (w1,w2)  -- | A simplified variant of the 'soxBasicParameters' function with defining only a file extension.@@ -260,8 +255,8 @@    -- | Generates a sequence of sounds using 'overChangeVol' so that their time-volume characteristic is going through the 2D points obtained  -- with the last two arguments.--- Uses 'fadeEndsTMB', the arguments for which are specified by the second symbol in the second 'String' and by the third 'Double' argument.-basicF :: String -> String -> Float -> Float -> Float -> Double -> (Double -> Double) -> V.Vector Double -> IO ()+-- Uses 'fadeEndsTMB', the arguments for which are specified by the second symbol in the second 'String' and by the third 'Float' argument.+basicF :: String -> String -> Float -> Float -> Float -> Float -> (Float -> Float) -> V.Vector Float -> IO () basicF ys x2s freq x0 xdelta per f v = do   let (xs1,xs2) = splitAt 1 x2s       c1 = if null xs1 then 'l' else head xs1@@ -272,7 +267,7 @@     fadeEndsTMB c2 per $ "testG" ++ prependZeroes 6 (show i) ++ endingWF ys) v1  -- | A generalized version of the 'basicF' with a possibility to specify the name for the generated files (by default is \"test\" based).-basicFN :: FilePath -> String -> String -> Float -> Float -> Float -> Double -> (Double -> Double) -> V.Vector Double -> IO ()+basicFN :: FilePath -> String -> String -> Float -> Float -> Float -> Float -> (Float -> Float) -> V.Vector Float -> IO () basicFN filestart ys x2s freq x0 xdelta per f v = do   let (xs1,xs2) = splitAt 1 x2s       c1 = if null xs1 then 'l' else head xs1@@ -292,21 +287,21 @@ -- The 'String' should consist of 6 alphanumeric characters. The first four as for the 'soxBasicParams', and the fifth one -- a letter from the \"hlpqt\". The  -- sixth one is one of the \"els\" or some other symbol. -- Otherwise, the default values are used (\"221w\" for the first and \"ll\" for the second one).-basicFC :: String -> Float -> Float -> Float -> Double -> (Double -> Double) -> V.Vector Double -> IO ()+basicFC :: String -> Float -> Float -> Float -> Float -> (Float -> Float) -> V.Vector Float -> IO () basicFC = basicFCN "test"  -- | A generalized version of the 'basicFC' with a possibility to specify the name for the mixed files (by default is \"test\" based).-basicFCN :: FilePath -> String -> Float -> Float -> Float -> Double -> (Double -> Double) -> V.Vector Double -> IO ()+basicFCN :: FilePath -> String -> Float -> Float -> Float -> Float -> (Float -> Float) -> V.Vector Float -> IO () basicFCN filestart xs freq x0 xdelta per f v = let (ys,x2s) = argString xs in basicFN filestart ys x2s freq x0 xdelta per f v  -- | Generates a sequence of sounds using 'overChangeVol' so that their time-volume characteristic (if being plotted graphically) is going through the 2D points obtained  -- with the last two arguments.--- Uses 'fadeEndsTMN', the arguments for which are specified by the second symbol in the second 'String' and by the third and fourth 'Double' arguments.-basicF2 :: String -> String -> Float -> Float -> Float -> Double -> Double -> (Double -> Double) -> V.Vector Double -> IO ()+-- Uses 'fadeEndsTMN', the arguments for which are specified by the second symbol in the second 'String' and by the third and fourth 'Float' arguments.+basicF2 :: String -> String -> Float -> Float -> Float -> Float -> Float -> (Float -> Float) -> V.Vector Float -> IO () basicF2 = basicF2N "test"  -- | A generalized version of the 'basicF2' with a possibility to specify the name for the mixed files (by default is \"test\" based).-basicF2N :: FilePath -> String -> String -> Float -> Float -> Float -> Double -> Double -> (Double -> Double) -> V.Vector Double -> IO ()+basicF2N :: FilePath -> String -> String -> Float -> Float -> Float -> Float -> Float -> (Float -> Float) -> V.Vector Float -> IO () basicF2N filestart ys x2s freq x0 xdelta per1 per2 f v = do   let (xs1,xs2) = splitAt 1 x2s       c1 = if null xs1 then 'l' else head xs1@@ -321,15 +316,15 @@ -- The 'String' should consist of 6 alphanumeric characters. The first four as for the 'soxBasicParams' and the the fifth one -- a letter  -- from the \"hlpqt\". The sixth one is one of the \"els\" or some other symbol. Otherwise, the default values are used (\"221w\" for the first  -- and \"ll\" for the second one).-basicF2C :: String -> Float -> Float -> Float -> Double -> Double -> (Double -> Double) -> V.Vector Double -> IO ()+basicF2C :: String -> Float -> Float -> Float -> Float -> Float -> (Float -> Float) -> V.Vector Float -> IO () basicF2C = basicF2CN "test"  -- | A generalized version of the 'basicF2C' with a possibility to specify the name for the mixed files (by default is \"test\" based).-basicF2CN :: FilePath -> String -> Float -> Float -> Float -> Double -> Double -> (Double -> Double) -> V.Vector Double -> IO ()+basicF2CN :: FilePath -> String -> Float -> Float -> Float -> Float -> Float -> (Float -> Float) -> V.Vector Float -> IO () basicF2CN filestart xs freq x0 xdelta per1 per2 f v = let (ys,x2s) = argString xs in basicF2N filestart ys x2s freq x0 xdelta per1 per2 f v  -- | A generalized version of the 'basicFN' with a frequency modulation.-moreFN :: FilePath -> String -> String -> Float -> Float -> Float -> Float -> Double -> (Double -> Double) -> V.Vector Double -> IO ()+moreFN :: FilePath -> String -> String -> Float -> Float -> Float -> Float -> Float -> (Float -> Float) -> V.Vector Float -> IO () moreFN filestart ys x2s freq1 freq2 x0 xdelta per f v = do   let (xs1,xs2) = splitAt 1 x2s       c1 = if null xs1 then 'l' else head xs1@@ -340,7 +335,7 @@     fadeEndsTMB c2 per $ (filestart ++ "G") ++ prependZeroes 6 (show i) ++ endingWF ys) v1  -- | A generalized version of the 'basicFCN' with a frequency modulation.-moreFCN :: FilePath -> String -> Float -> Float -> Float -> Float -> Double -> (Double -> Double) -> V.Vector Double -> IO ()+moreFCN :: FilePath -> String -> Float -> Float -> Float -> Float -> Float -> (Float -> Float) -> V.Vector Float -> IO () moreFCN filestart xs freq1 freq2 x0 xdelta per f v = let (ys,x2s) = argString xs in moreFN filestart ys x2s freq1 freq2 x0 xdelta per f v  --------------------------------------------------------------------------------------------@@ -353,40 +348,40 @@  -- | A generalized version of the 'overChangeVolGN' with a possibility to make lower the noisy clipping by specifying the first parameter. The default parameter  -- \"rev\" it uses reverberation to transform the distortion on the edges in case of existing root on fro the 2D line connection points. -overChangeVolGNC :: String -> FilePath -> String -> String -> Int -> Float -> Float -> Float -> Float -> ((Double,Double), (Double,Double)) -> IO ()+overChangeVolGNC :: String -> FilePath -> String -> String -> Int -> Float -> Float -> Float -> Float -> ((Float,Float), (Float,Float)) -> IO () overChangeVolGNC check filestart ys cs j freq1 freq2 x0 xdelta ((t0,v0), (t1,v1)) - | x0 /= 0 && compare (abs x0) 1.0 /= GT && compare freq1 16 == GT && compare freq1 20000 == LT = let ((t0F,v0F), (t1F,v1F)) = double42Float4 ((t0,v0), (t1,v1))  in -  case compare (v1F * v0F) 0 of + | x0 /= 0 && compare (abs x0) 1.0 /= GT && compare freq1 16 == GT && compare freq1 20000 == LT = +  case compare (v1 * v0) 0 of      GT -> do-     (code1,_,herr1) <- readProcessWithExitCode (fromJust (showE "sox")) (soxBasicParams ys ["","-n","test1F.wav","synth", -       showFFloat Nothing (if t1F == t0F then abs x0 else abs (t1F - t0F)) "", "sine", showFFloat (Just 4) freq1 (freqChange (drop 1 cs) freq2 freq1), "fade", +     (code1,_,herr1) <- readProcessWithExitCode (fromJust (showE "sox")) (soxBasicParams ys ["","-n","test1.wav","synth", +       showFFloat Nothing (if t1 == t0 then abs x0 else abs (t1 - t0)) "", "sine", showFFloat (Just 4) freq1 (freqChange (drop 1 cs) freq2 freq1), "fade",          charFadeType (if null cs then 'l' else head cs)] ++ -         if compare ((v1F - v0F) * (t1F - t0F)) 0 /= LT then [showFFloat Nothing (if compare (abs (t1F - t0F)) xdelta /= GT then abs x0 else abs (t1F - t0F)) ""] -           else ["0", "-0.0", showFFloat Nothing (if compare (abs (t1F - t0F)) xdelta /= GT then abs x0 else abs (t1F - t0F)) "", "vol", -             showFFloat (Just 4) (signum v1F * abs (v1F - v0F)) ""]) ""+         if compare ((v1 - v0) * (t1 - t0)) 0 /= LT then [showFFloat Nothing (if compare (abs (t1 - t0)) xdelta /= GT then abs x0 else abs (t1 - t0)) ""] +           else ["0", "-0.0", showFFloat Nothing (if compare (abs (t1 - t0)) xdelta /= GT then abs x0 else abs (t1 - t0)) "", "vol", +             showFFloat (Just 4) (signum v1 * abs (v1 - v0)) ""]) ""      if code1 /= ExitSuccess then error $ "DobutokO.Sound.Faded.overChangeVolGNC: " ++ herr1      else do-      (code2,_,herr2) <- readProcessWithExitCode (fromJust (showE "sox")) (soxBasicParams ys ["","-n","test0F.wav","synth", -        showFFloat Nothing (if compare (abs (t1F - t0F)) xdelta /= GT then abs x0 else abs (t1F - t0F)) "", "sine", -          showFFloat (Just 4) freq1 (freqChange (drop 1 cs) freq2 freq1), "vol", showFFloat (Just 4) (min v0F v1F) ""]) ""+      (code2,_,herr2) <- readProcessWithExitCode (fromJust (showE "sox")) (soxBasicParams ys ["","-n","test0.wav","synth", +        showFFloat Nothing (if compare (abs (t1 - t0)) xdelta /= GT then abs x0 else abs (t1 - t0)) "", "sine", +          showFFloat (Just 4) freq1 (freqChange (drop 1 cs) freq2 freq1), "vol", showFFloat (Just 4) (min v0 v1) ""]) ""       if code2 == ExitSuccess          then do-          (code3,_,herr3) <- readProcessWithExitCode (fromJust (showE "sox")) ["-m","test0F" ++ endingWF ys,"test1F" ++ endingWF ys, (filestart ++ "G") ++ +          (code3,_,herr3) <- readProcessWithExitCode (fromJust (showE "sox")) ["-m","test0" ++ endingWF ys,"test1" ++ endingWF ys, (filestart ++ "G") ++              prependZeroes 6 (show j) ++ endingWF ys, "vol", "2"] ""           if code3 == ExitSuccess -            then removeFile ("test0F" ++ endingWF ys) >> removeFile ("test1F" ++ endingWF ys)+            then removeFile ("test0" ++ endingWF ys) >> removeFile ("test1" ++ endingWF ys)             else error $ "DobutokO.Sound.Faded.overChangeVolGNC: " ++ herr3         else print herr2 >> error "DobutokO.Sound.Faded.overChangeVolGNC: Operation not successful. "     LT ->       case check of        "simple" -> do  -        overChangeVolGNC check filestart ys cs j freq1 ((v0F * freq2 - v1F * freq1) / (v0F - v1F)) x0 xdelta ((t0,v0), ((v0 * t1 - v1 * t0) / (v0 - v1),0)) >> +        overChangeVolGNC check filestart ys cs j freq1 ((v0 * freq2 - v1 * freq1) / (v0 - v1)) x0 xdelta ((t0,v0), ((v0 * t1 - v1 * t0) / (v0 - v1),0)) >>           renameFile ((filestart ++ "G") ++ prependZeroes 6 (show j) ++ endingWF ys) ("temp00" ++ endingWF ys)         (code0,_,herr) <- readProcessWithExitCode (fromJust (showE "sox")) ["temp00" ++ endingWF ys,"temp0" ++ endingWF ys, "fade", "h", "0", "-0.0",           showFFloat (Just 6) ((max freq1 freq2) ** (-1.0)) ""] ""          if code0 /= ExitSuccess then error (show herr)         else do-         overChangeVolGNC check filestart ys cs j ((v0F * freq2 - v1F * freq1) / (v0F - v1F)) freq2 x0 xdelta (((v0 * t1 - v1 * t0) / (v0 - v1),0), (t1,v1)) >> +         overChangeVolGNC check filestart ys cs j ((v0 * freq2 - v1 * freq1) / (v0 - v1)) freq2 x0 xdelta (((v0 * t1 - v1 * t0) / (v0 - v1),0), (t1,v1)) >>             renameFile ((filestart ++ "G") ++ prependZeroes 6 (show j) ++ endingWF ys) ("temp1" ++ endingWF ys)          (code1,_,herr1) <- readProcessWithExitCode (fromJust (showE "sox")) ["temp0" ++ endingWF ys,"temp1" ++ endingWF ys, (filestart ++ "G") ++              prependZeroes 6 (show j) ++ endingWF ys] ""@@ -394,10 +389,10 @@          else error $ "DobutokO.Sound.Faded.overChangeVolGNC: " ++ herr1        "silent" -> do           (code0,_,herr) <- readProcessWithExitCode (fromJust (showE "sox")) (soxBasicParams ys ["","-n","temp0" ++ endingWF ys,"trim", "0", -         showFFloat (Just 6) (abs (v0F * (t0F - t1F) / (v0F - v1F))) "","vol","0"]) "" +         showFFloat (Just 6) (abs (v0 * (t0 - t1) / (v0 - v1))) "","vol","0"]) ""          if code0 /= ExitSuccess then error (show herr)         else do-         overChangeVolGNC check filestart ys cs j ((v0F * freq2 - v1F * freq1) / (v0F - v1F)) freq2 x0 xdelta (((v0 * t1 - v1 * t0) / (v0 - v1),0), (t1,v1)) >> +         overChangeVolGNC check filestart ys cs j ((v0 * freq2 - v1 * freq1) / (v0 - v1)) freq2 x0 xdelta (((v0 * t1 - v1 * t0) / (v0 - v1),0), (t1,v1)) >>             renameFile ((filestart ++ "G") ++ prependZeroes 6 (show j) ++ endingWF ys) ("temp1" ++ endingWF ys)          (code1,_,herr1) <- readProcessWithExitCode (fromJust (showE "sox")) ["temp0" ++ endingWF ys,"temp1" ++ endingWF ys, (filestart ++ "G") ++             prependZeroes 6 (show j) ++ endingWF ys] ""@@ -405,49 +400,49 @@          else error $ "DobutokO.Sound.Faded.overChangeVolGNC: " ++ herr1        _ -> do           (code0,_,herr) <- readProcessWithExitCode (fromJust (showE "sox")) (soxBasicParams ys ["","-n","temp0" ++ endingWF ys,"trim", "0", -         showFFloat (Just 6) (abs (v0F * (t0F - t1F) / (v0F - v1F))) "","vol","0"]) "" +         showFFloat (Just 6) (abs (v0 * (t0 - t1) / (v0 - v1))) "","vol","0"]) ""          if code0 /= ExitSuccess then error (show herr)         else do-         overChangeVolGNC check filestart ys cs j ((v0F * freq2 - v1F * freq1) / (v0F - v1F)) freq2 x0 xdelta (((v0 * t1 - v1 * t0) / (v0 - v1),0), (t1,v1)) >> +         overChangeVolGNC check filestart ys cs j ((v0 * freq2 - v1 * freq1) / (v0 - v1)) freq2 x0 xdelta (((v0 * t1 - v1 * t0) / (v0 - v1),0), (t1,v1)) >>             renameFile ((filestart ++ "G") ++ prependZeroes 6 (show j) ++ endingWF ys) ("temp1" ++ endingWF ys)          (code1,_,herr1) <- readProcessWithExitCode (fromJust (showE "sox")) ["temp0" ++ endingWF ys,"temp1" ++ endingWF ys, (filestart ++ "G") ++             prependZeroes 6 (show j) ++ endingWF ys,"reverb","-w","1","1","10","gain","-n","gain","-9"] ""          if code1 == ExitSuccess then removeFile ("temp0" ++ endingWF ys) >> removeFile ("temp1" ++ endingWF ys)           else error $ "DobutokO.Sound.Faded.overChangeVolGNC: " ++ herr1      _  -> -     case v1F of +     case v1 of        0 -> -       if v0F == 0 +       if v0 == 0          then do           (code1,_,herr1) <- readProcessWithExitCode (fromJust (showE "sox")) (soxBasicParams ys ["","-n",(filestart ++ "G") ++ prependZeroes 6 (show j) ++ -            ".wav","delay", showFFloat Nothing (if compare (abs (t1F - t0F)) xdelta /= GT then abs x0 else abs (t1F - t0F)) "", "trim", showFFloat Nothing -              (if compare (abs (t1F - t0F)) xdelta /= GT then abs x0 else abs (t1F - t0F)) ""]) ""+            ".wav","delay", showFFloat Nothing (if compare (abs (t1 - t0)) xdelta /= GT then abs x0 else abs (t1 - t0)) "", "trim", showFFloat Nothing +              (if compare (abs (t1 - t0)) xdelta /= GT then abs x0 else abs (t1 - t0)) ""]) ""           if code1 /= ExitSuccess then error $ "DobutokO.Sound.Faded.overChangeVolGNC: " ++ herr1           else return ()         else do            (code1,_,herr1) <- readProcessWithExitCode (fromJust (showE "sox")) (soxBasicParams ys ["","-n",(filestart ++ "G") ++ prependZeroes 6 (show j) ++ -            ".wav","synth", showFFloat Nothing (if compare (abs (t1F - t0F)) xdelta /= GT then abs x0 else abs (t1F - t0F)) "", "sine", +            ".wav","synth", showFFloat Nothing (if compare (abs (t1 - t0)) xdelta /= GT then abs x0 else abs (t1 - t0)) "", "sine",                showFFloat (Just 4) freq1 (freqChange (drop 1 cs) freq2 freq1), "fade", charFadeType (if null cs then 'l' else head cs)] ++ -               if compare t0F t1F == GT then [showFFloat Nothing -                (if compare (abs (t1F - t0F)) xdelta /= GT then abs x0 else abs (t1F - t0F)) ""] else ["0", "-0.0", showFFloat Nothing -                  (if compare (abs (t1F - t0F)) xdelta /= GT then abs x0 else abs (t1F - t0F)) "", "vol", showFFloat (Just 4) v0F ""]) ""+               if compare t0 t1 == GT then [showFFloat Nothing +                (if compare (abs (t1 - t0)) xdelta /= GT then abs x0 else abs (t1 - t0)) ""] else ["0", "-0.0", showFFloat Nothing +                  (if compare (abs (t1 - t0)) xdelta /= GT then abs x0 else abs (t1 - t0)) "", "vol", showFFloat (Just 4) v0 ""]) ""           if code1 /= ExitSuccess then error $ "DobutokO.Sound.Faded.overChangeVolGNC: " ++ herr1           else return ()       _ -> do        (code1,_,herr1) <- readProcessWithExitCode (fromJust (showE "sox")) (soxBasicParams ys ["","-n",(filestart ++ "G") ++ prependZeroes 6 (show j) ++ ".wav",-         "synth", showFFloat Nothing (if compare (abs (t1F - t0F)) xdelta /= GT then abs x0 else abs (t1F - t0F)) "", "sine", +         "synth", showFFloat Nothing (if compare (abs (t1 - t0)) xdelta /= GT then abs x0 else abs (t1 - t0)) "", "sine",            showFFloat (Just 4) freq1 (freqChange (drop 1 cs) freq2 freq1), "fade", charFadeType (if null cs then 'l' else head cs)] ++ -           if compare t1F t0F == GT -            then [showFFloat Nothing (if compare (abs (t1F - t0F)) xdelta /= GT then abs x0 -             else abs (t1F - t0F)) ""] else ["0", "-0.0", showFFloat Nothing (if compare (abs (t1F - t0F)) xdelta /= GT then abs x0 else abs (t1F - t0F)) "", -               "vol", showFFloat (Just 4) v1F ""]) ""+           if compare t1 t0 == GT +            then [showFFloat Nothing (if compare (abs (t1 - t0)) xdelta /= GT then abs x0 +             else abs (t1 - t0)) ""] else ["0", "-0.0", showFFloat Nothing (if compare (abs (t1 - t0)) xdelta /= GT then abs x0 else abs (t1 - t0)) "", +               "vol", showFFloat (Just 4) v1 ""]) ""        if code1 /= ExitSuccess then error $ "DobutokO.Sound.Faded.overChangeVolGNC: " ++ herr1        else return ()  | otherwise = error "DobutokO.Sound.Faded.overChangeVolGNC: sound for these conditions is not defined. "   -- | A generalized version of the 'moreFN' with a possibility to change the behaviour for the situation with existing roots on the interval for the line connecting the 2D  -- points. -moreFNC :: String -> FilePath -> String -> String -> Float -> Float -> Float -> Float -> Double -> (Double -> Double) -> V.Vector Double -> IO ()+moreFNC :: String -> FilePath -> String -> String -> Float -> Float -> Float -> Float -> Float -> (Float -> Float) -> V.Vector Float -> IO () moreFNC check filestart ys x2s freq1 freq2 x0 xdelta per f v = do   let (xs1,xs2) = splitAt 1 x2s       c1 = if null xs1 then 'l' else head xs1
DobutokO/Sound/Presentation.hs view
@@ -43,30 +43,30 @@  -- | An 'Int' parameter is an index of the 'SoundI' sound file in the sorted in the ascending order 'V.Vector' of them (the corresponding files or their  -- names) representing the whole composition.-data SoundI = Si Int Double Double OvertonesO | SAi Int Double Double Double OvertonesO | SAbi Int Double Double Double OvertonesO+data SoundI = Si Int Float Float OvertonesO | SAi Int Float Float Float OvertonesO | SAbi Int Float Float Float OvertonesO   deriving Eq  ----------------------------------------------------------------------------------  -- | An 'FilePath' parameter is a name of the sound file in the current directory with the filetype (supported by SoX) being given by 'String' representing  -- the whole composition.-data SoundFN = Sn FilePath String Double Double | SAn FilePath String Double Double Double | SAbn FilePath String Double Double Double+data SoundFN = Sn FilePath String Float Float | SAn FilePath String Float Float Float | SAbn FilePath String Float Float Float   deriving Eq  ---------------------------------------------------------------------------------- --- | The first 'Double' parameter is a time moment (starting from 0) of the playing the sound being represented by 'OvertonesO', the second one is its +-- | The first 'Float' parameter is a time moment (starting from 0) of the playing the sound being represented by 'OvertonesO', the second one is its  -- duration. The third one is its maximum amplitude by an absolute value. The fourth one is the minimum duration that can provide a needed human  -- feeling of perception (some impression) for the sound. The further one(s) is(are) some adjustment(s) parameter(s).-data SoundT = StO Double Double Double Double OvertonesO | SAtO Double Double Double Double Double OvertonesO | -  SAbtO Double Double Double Double Double OvertonesO deriving Eq+data SoundT = StO Float Float Float Float OvertonesO | SAtO Float Float Float Float Float OvertonesO | +  SAbtO Float Float Float Float Float OvertonesO deriving Eq  ---------------------------------------------------------------------------------- --- | The first 'Double' parameter is a time moment (starting from 0) of the playing the sound, the second one is its duration in seconds (with a negative +-- | The first 'Float' parameter is a time moment (starting from 0) of the playing the sound, the second one is its duration in seconds (with a negative  -- values corresponding to the pause duration --- the silent \"sound\"), the third one is the minimum duration that can provide a needed human  -- feeling of perception (some impression) for the sound.-data Timity = Time Double Double Double deriving Eq+data Timity = Time Float Float Float deriving Eq  instance Ord Timity where    compare (Time t01 t11 t21) (Time t02 t12 t22) @@ -77,9 +77,9 @@ instance Show Timity where   show (Time t0 t1 t2) = showFFloat Nothing t0 ":(" ++ showFFloat Nothing t1 "):(" ++ showFFloat Nothing t2 ")" --- | The first 'Double' parameter is a time moment (starting from 0) of the playing the sound, the second one is its duration in seconds (with a negative +-- | The first 'Float' parameter is a time moment (starting from 0) of the playing the sound, the second one is its duration in seconds (with a negative  -- values corresponding to the pause duration --- the silent \"sound\"), the third one is a parameter to specify more complex behaviour for the sound. -data Timity1 a = Time1 Double Double a +data Timity1 a = Time1 Float Float a   instance (Eq a) => Eq (Timity1 a) where   (==) (Time1 x1 x2 a0) (Time1 x3 x4 a1)@@ -109,8 +109,8 @@ #endif #endif --- | 'Double' interval representation with no order of the arguments preserved.-data IntervalTim = Empty | I Double Double | UniversalI+-- | 'Float' interval representation with no order of the arguments preserved.+data IntervalTim = Empty | I Float Float | UniversalI  instance Eq IntervalTim where   (==) (I x1 x2) (I y1 y2) @@ -162,9 +162,9 @@ #endif #endif   --- | Another 'Double' interval representation with no order of the arguments preserved. Since base-4.9.0.0 has different instance of 'Semigroup' +-- | Another 'Float' interval representation with no order of the arguments preserved. Since base-4.9.0.0 has different instance of 'Semigroup'  -- than 'IntervalTim'.-data IntervalTimI = Empty2 | II Double Double | UniversalII+data IntervalTimI = Empty2 | II Float Float | UniversalII    instance Eq IntervalTimI where   (==) (II x1 x2) (II y1 y2) @@ -223,8 +223,8 @@ #endif #endif     --- | The first 'Double' parameter is some adjustment parameter for the playing sound being represented by 'OvertonesO'.-data SoundTim = StOm Timity Double OvertonesO | SAtOm Timity Double Double OvertonesO | SAbtOm Timity Double Double OvertonesO+-- | The first 'Float' parameter is some adjustment parameter for the playing sound being represented by 'OvertonesO'.+data SoundTim = StOm Timity Float OvertonesO | SAtOm Timity Float Float OvertonesO | SAbtOm Timity Float Float OvertonesO   deriving (Eq, Ord, Show)  ----------------------------------------------------------------------------------
README.markdown view
@@ -1,5 +1,5 @@ Model Explanation for DobutokO.Sound.Faded-==========================================+======================================  [![Model Explanation](https://drive.google.com/file/d/1DUXtj-2YMMxc6wAmTcQS8Ub2czDFSOro)] (https://drive.google.com/file/d/1DUXtj-2YMMxc6wAmTcQS8Ub2czDFSOro)
dobutokO4.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                dobutokO4-version:             0.6.0.0+version:             0.7.0.0 synopsis:            Helps to create experimental music. Uses SoX inside. description:         Uses SoX fade (in a special 2D way) and frequency modulation. Provides a special representation for the composition. homepage:            https://hackage.haskell.org/package/dobutokO4@@ -20,6 +20,6 @@   exposed-modules:     DobutokO.Sound.Faded, DobutokO.Sound.Presentation   -- other-modules:   other-extensions:    CPP-  build-depends:       base >=4.7 && <4.15, vector >=0.11 && <0.14, process >=1.4 && <1.9, mmsyn3 >=0.1.5 && <1, directory >=1.2.7 && <1.7, mmsyn7l >=0.6.1 && <1, dobutokO2 >=0.41 && <1, vector-doublezip >= 0.1 && <1+  build-depends:       base >=4.7 && <4.15, vector >=0.11 && <0.14, process >=1.4 && <1.9, mmsyn3 >=0.1.5 && <1, directory >=1.2.7 && <1.7, mmsyn7l >=0.7 && <1, dobutokO2 >=0.42 && <1, vector-doublezip >= 0.2 && <1   -- hs-source-dirs:   default-language:    Haskell2010