packages feed

dobutokO2 0.39.0.0 → 0.39.0.1

raw patch · 5 files changed

+32/−25 lines, 5 filesPVP: minor bump suggested

API additions: PVP suggests at least a minor version bump

API changes (from Hackage documentation)

+ DobutokO.Sound.Executable: dobutokO2H92 :: Bool -> String -> FilePath -> IO ()
+ DobutokO.Sound.Executable: o2help :: Bool -> String -> FilePath -> IO ()

Files

CHANGELOG.md view
@@ -363,3 +363,7 @@ * Thirty-ninth version. Added new functions with Params to DobutokO.Sound.Executable module. Changed the structure of the modules DobutokO.Sound.Functional  and DobutokO.Sound.Executable into more logical one. Added three new functions for special SoX effects to the DobutokO.Sound.IntermediateF module.  Some minor documentation improvements.++## 0.39.0.1 -- 2020-05-08++* Thirty-ninth version revised A. Some documentation improvements.
DobutokO/Sound/Executable.hs view
@@ -17,6 +17,8 @@   , recAndProcess   , dobutokO2H7   , dobutokO2H9+  , dobutokO2H92+  , o2help ) where  import Control.Monad (void)@@ -403,7 +405,7 @@ processD_1 = onException (do   putStr "Please, specify two \'Int\' numbers (with intermediate space character between them): the first one is a number of different notes there will be "   putStr "in the result, and the second one is a number of enky, to which you would like all the main components (not taking into account their "-  putStr "respective lower pure quints) should belong. "+  putStr "respective lower bases of the intervals if any will exist) should belong. "   putStrLn "If you specify as the first one 2 (possibly the simplest case), then to the second one you can define a number in the range [3..53]. "   putStrLn "If you specify as the first one 3, then to the second one you can define a number in the range [2..35]. "   putStrLn "If you specify as the first one 4, then to the second one you can define a number in the range [2..26]. "@@ -588,7 +590,7 @@  processD9 :: IO String processD9 = onException (do-  putStrLn "Please, input the Ukrainian text that will be used to define intervals to be used to produce the lower note for the given main one. "+  putStrLn "Please, input the Ukrainian text that will be used to define the intervals to be used to produce the lower note for the given main one. "   putStrLn "The default one is \"й\". "   putStrLn "To use the default value, you can simply press Enter."   fmap d9H getLine) (do@@ -615,9 +617,9 @@ processD99 :: IO String processD99 = onException (do   putStr "Please, input the lists of Int in Haskell syntaxis (e. g. [1,3..56], or [3..45], or [2..]) of the indices for the files to be played "-  putStr "with SoX effects applied to. The lists must be separated with newline (just press \"Enter\"), empty lists are ignored. If index is "+  putStr "with SoX effects applied to. The lists must be separated with newline (just press \"Enter\"), empty lists are ignored. If index is an "   putStrLn "element of several input lists then if its number of occurrences in all the lists is odd, then it is played, otherwise it is not. "-  putStrLn "To end the input, just press the combination that means end of input (e. g. for Unices, it's probably Ctrl + D). "+  putStrLn "To end the input, just press the combination that means the end of input (e. g. for Unices, it's probably Ctrl + D). "   getContents) (do     putStrLn "The process was not successful may be because of the not valid data. Please, specify the valid data as requested."     putStrLn "_______________________________________________________________________"
DobutokO/Sound/Functional.hs view
@@ -2147,7 +2147,7 @@     (Double -> OvertonesO) -> IO () soundGen3G_O = soundGen3G_OMN (-1) (-1) --- | Generalized version of the 'soundGen3G_O' where instead of lifting with 'liftInEnku' 'liftInParams' is used. It allows e. g. to +-- | 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 -> OvertonesO) -> Double -> String -> (OvertonesO -> Double -> (Double -> OvertonesO) -> OvertonesO)    -> (OvertonesO -> Double -> (Double -> OvertonesO) -> OvertonesO) -> (Int -> OvertonesO) -> (OvertonesO -> OvertonesO) -> @@ -2179,7 +2179,7 @@         renameFile ("result.wav") $ "result0" ++ prependZeroes zeroN (show (j + 1)) ++ ".wav") vecB   endFromResult   --- | Generalized version of the 'soundGen3G_OMN' where instead of lifting with 'liftInEnku' 'liftInParams' is used. It allows e. g. to +-- | 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 -> OvertonesO) -> Double -> String -> (OvertonesO -> Double -> (Double -> OvertonesO) -> OvertonesO)    -> (OvertonesO -> Double -> (Double -> OvertonesO) -> OvertonesO) -> (Int -> OvertonesO) -> (OvertonesO -> OvertonesO) -> @@ -2232,7 +2232,7 @@       (Int -> OvertonesO) -> (OvertonesO -> OvertonesO) -> (Double -> OvertonesO) -> IO () soundGen3G_O2 = soundGen3G_O2MN (-1) (-1) --- | Generalized version of the 'soundGen3G_O2' where instead of lifting with 'liftInEnku' 'liftInParams' is used. It allows e. g. to +-- | 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 -> OvertonesO) -> Double -> String -> @@ -2259,7 +2259,7 @@         renameFile ("result.wav") $ "result0" ++ prependZeroes zeroN (show (j + 1)) ++ ".wav") vecB   endFromResult --- | Generalized version of the 'soundGen3G_O2MN' where instead of lifting with 'liftInEnku' 'liftInParams' is used. It allows e. g. to +-- | 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 -> OvertonesO) -> Double -> String -> @@ -2292,7 +2292,7 @@         (Int -> OvertonesO) -> (Double -> OvertonesO) -> IO () soundGen3G_O2G = soundGen3G_O2GMN (-1) (-1) --- | Generalized version of the 'soundGen3G_O2G' where instead of lifting with 'liftInEnku' 'liftInParams' is used. It allows e. g. to +-- | 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) -> @@ -2319,7 +2319,7 @@         renameFile ("result.wav") $ "result0" ++ prependZeroes zeroN (show (j + 1)) ++ ".wav") vecB   endFromResult --- | Generalized version of the 'soundGen3G_O2GMN' where instead of lifting with 'liftInEnku' 'liftInParams' is used. It allows e. g. to +-- | 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) -> @@ -2336,9 +2336,9 @@         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 a tuple of 'Double': --- 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 informational message --- about not standard situation. +-- | 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': +-- 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) -> Int -> IO () h1 f (x, y) j = do     let note0 = closestNote (if x /= 0.0 then abs x else V.unsafeIndex notes 0)@@ -2354,9 +2354,9 @@         \(_,_,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': --- 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 informational message --- about not standard situation. Unlike the 'h1' function, it lifts into specified by 'Int' arguments enku (see 'liftInEnku') the frequency.+-- | 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': +-- 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 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)@@ -2372,8 +2372,8 @@      _ -> 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': --- 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 informational message --- about not standard situation.  Unlike the 'h1' function, it lifts into specified by 'Params' argument frequency.+-- 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 v (x, y) params freq1 = do     let note01 = flip liftInParams params (if x /= 0.0 then abs x else V.unsafeIndex notes 0)@@ -2395,8 +2395,9 @@ -- is used to avoid the effect of becoming less and less -- closer to the zero for the higher overtones so the durations will become also less.  -- Besides it allows to rescale the durations in a much more convenient way.  -- --- The first 'Double' parameter is a multiplication coefficient to increase or to decrease the durations (positive values correspond to increasing inside --- the @g@. function applied afterwards with function composition. +-- The first 'Double' parameter is a multiplication coefficient to increase or to decrease the durations (values with an absolute values greater than +-- one correspond to increasing inside the @g@. function applied afterwards with function composition and the values with an absolute values less +-- than one and not equal to zero correspond to decreasing inside the @g@ function.  -- The second 'Double' parameter is a usual frequency which is used instead of the 11440.0 (Hz) value.  -- The third 'Double' parameter is a main argument -- the frequency for which the 'OvertonesO' are generated as a first step of the computation.  overMeloPar :: (Double -> OvertonesO) -> (Double -> Double) -> Params -> Double -> Double -> Double -> IO ()
DobutokO/Sound/IntermediateF.hs view
@@ -813,7 +813,7 @@ filterToBnds lbnd hbnd = filter (\x -> compare x lbnd /= LT && compare x hbnd /= GT)  -- | Applies a special chain of the SoX effects to a file to obtain a somewhat similar to some instruments sound for some values of the 'Int' parameters. --- These last ones are used (after some normalizing transformation) as a arguments for the SoX \"reverb -w\" effect. For more information about their +-- These last ones are used (after some normalizing transformation) as the arguments for the SoX \"reverb -w\" effect. For more information about their  -- meaning, please, refer to the SoX and reverberation documentation, besides you can give them a try.  soxREw1 :: Int -> Int -> Int -> Int -> Int -> Int -> FilePath -> IO () soxREw1 reverberance damping roomscale stereodepth predelay wetgain file = do @@ -829,9 +829,9 @@   soxE file (concat [["channels", "2", "rate", "44100", "reverb"], map (\n -> show (abs n `rem` 101)) [reverberance, damping, roomscale, stereodepth],       [show (abs predelay `rem` 501), show (abs wetgain `rem` 7), "trim", "0", showFFloat (Just 5) durat "", "reverse", "fade", "q", "0.002", "-0.0", "earwax"]]) --- | Applies a special chain of the SoX effects to the files which are obtained as a result of the 'listVDirectory3G' to the current directory. --- For some values of the first six 'Int' parameters you obtain a somewhat similar to some instruments sounds. --- These parameters are used (after some normalizing transformation) as a arguments for the SoX \"reverb -w\" effect. For more information about their +-- | Applies a special chain of the SoX effects to the files which are obtained as a result of the 'listVDirectory3G' in the current directory. +-- For some values of the first six 'Int' parameters you obtain somewhat similar to some instruments sounds. +-- These parameters are used (after some normalizing transformation) as the arguments for the SoX \"reverb -w\" effect. For more information about their  -- meaning, please, refer to the SoX and reverberation documentation, besides you can give them a try. The last 'Int' parameter is the first argument  -- for the afterwards general SoX "reverb" effect. 'String' arguments are that ones for the 'listVDirectory3G'. The 'FilePath' argument is a name  -- for the resulting file (in the supported by the SoX format). 
dobutokO2.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                dobutokO2-version:             0.39.0.0+version:             0.39.0.1 synopsis:            Helps to create experimental music from a file (or its part) and a Ukrainian text. description:         It can also generate a timbre for the notes. Uses SoX inside. homepage:            https://hackage.haskell.org/package/dobutokO2