Copyright | (c) OleksandrZhabenko 2020 2024 |
---|---|
License | MIT |
Maintainer | oleksandr.zhabenko@yahoo.com |
Stability | Experimental |
Safe Haskell | None |
Language | Haskell2010 |
DobutokO.Sound.Functional.Split
Description
Helps to create experimental music from a file (or its part) and a Ukrainian text. It can also generate a timbre for the notes. Uses SoX inside.
Synopsis
- splitO :: Int -> OvertonesO -> Vector OvertonesO
- splitO2 :: (OvertonesO -> OvertonesO) -> Int -> OvertonesO -> Vector OvertonesO
- overConcat :: Vector OvertonesO -> OvertonesO
- splitHelp1 :: Int -> Int -> Int -> Int -> OvertonesO -> (Float, Float) -> Vector OvertonesO
- splitHelp2 :: (OvertonesO -> OvertonesO) -> Int -> Int -> Int -> Int -> OvertonesO -> (Float, Float) -> Vector OvertonesO
- splitOG1 :: String -> Int -> OvertonesO -> Vector OvertonesO
- splitOG2 :: (OvertonesO -> OvertonesO) -> String -> Int -> OvertonesO -> Vector OvertonesO
- splitOG12 :: (Int, Int, Int, Int) -> Vector (String, Int -> OvertonesO -> (Int, Int, Int, Int)) -> String -> Int -> OvertonesO -> Vector OvertonesO
- splitOG12S :: (Int, Int, Int, Int) -> Vector (String, Int -> OvertonesO -> (Int, Int, Int, Int)) -> String -> Int -> OvertonesO -> Vector OvertonesO
- splitOG22 :: (Int, Int, Int, Int) -> Vector (String, Int -> OvertonesO -> (Int, Int, Int, Int)) -> (OvertonesO -> OvertonesO) -> String -> Int -> OvertonesO -> Vector OvertonesO
- splitOG22S :: (Int, Int, Int, Int) -> Vector (String, Int -> OvertonesO -> (Int, Int, Int, Int)) -> (OvertonesO -> OvertonesO) -> String -> Int -> OvertonesO -> Vector OvertonesO
Splitting and concatenating OvertonesO
splitO :: Int -> OvertonesO -> Vector OvertonesO Source #
Splits (with addition of the new overtones) a given OvertonesO
into a number n
(specified by the first Int
argument) of OvertonesO
(represented finally as a Vector
of them respectively) so that all except the first n
greatest by the absolute value of the amplitude
tuples of Floats are considered overtones for the greatest by the absolute value one in the given OvertonesO
and all the next n - 1
are treated as the greatest by the absolute value and each of them produces the similar by the f :: Float -> OvertonesO
function overtones.
It is expected to obtain by such a conversion a splitted one sound into several simultaneous similar ones with different heights.
To provide a rich result, the given first argument must be strictly less than the length of the given OvertonesO
minus one.
splitO2 :: (OvertonesO -> OvertonesO) -> Int -> OvertonesO -> Vector OvertonesO Source #
Splits (with addition of the new overtones) a given OvertonesO
into a number of OvertonesO
(represented finally as a Vector
of them repsectively)
so that it intermediately uses a special function before applying the "similarization" splitting function. Is a generalization of the splitO
,
which can be considered a splitO2
with a first command line argument equals to id
.
It is expected to obtain by such a conversion a splitted one sound into several simultaneous similar (less or more, depending on h :: OvertonesO -> OvertonesO
)
ones with different heights. To provide a rich result, the given first argument must be strictly less than the length of the given OvertonesO
minus one.
overConcat :: Vector OvertonesO -> OvertonesO Source #
Concatenates a Vector
of OvertonesO
into a single OvertonesO
. Can be easily used with splitO
.
Generalization of the previous ones splitting functions
splitHelp1 :: Int -> Int -> Int -> Int -> OvertonesO -> (Float, Float) -> Vector OvertonesO Source #
Auxiliary function that is used inside splitOG1
.
splitHelp2 :: (OvertonesO -> OvertonesO) -> Int -> Int -> Int -> Int -> OvertonesO -> (Float, Float) -> Vector OvertonesO Source #
Auxiliary function that is used inside splitOG2
.
splitOG1 :: String -> Int -> OvertonesO -> Vector OvertonesO Source #
splitOG2 :: (OvertonesO -> OvertonesO) -> String -> Int -> OvertonesO -> Vector OvertonesO Source #
splitOG12 :: (Int, Int, Int, Int) -> Vector (String, Int -> OvertonesO -> (Int, Int, Int, Int)) -> String -> Int -> OvertonesO -> Vector OvertonesO Source #
Generalized variant of the splitOG1
with a possibility to specify a default value for splitting parameters as the first argument
(Int,Int,Int,Int)
and the sorted by the first element in the tuple (actually a String
) in ascending order Vector
(the second one).
Each String
in the Vector
must be unique and consist of lowercase ASCII letters.
splitOG12S :: (Int, Int, Int, Int) -> Vector (String, Int -> OvertonesO -> (Int, Int, Int, Int)) -> String -> Int -> OvertonesO -> Vector OvertonesO Source #
splitOG22 :: (Int, Int, Int, Int) -> Vector (String, Int -> OvertonesO -> (Int, Int, Int, Int)) -> (OvertonesO -> OvertonesO) -> String -> Int -> OvertonesO -> Vector OvertonesO Source #
Generalized variant of the splitOG2
with a possibility to specify a default value for splitting parameters as the first argument
(Int,Int,Int,Int)
and the sorted by the first element in the tuple (actually a String
) in ascending order Vector
(the second one).
Each String
in the Vector
must be unique and consist of lowercase ASCII letters.
splitOG22S :: (Int, Int, Int, Int) -> Vector (String, Int -> OvertonesO -> (Int, Int, Int, Int)) -> (OvertonesO -> OvertonesO) -> String -> Int -> OvertonesO -> Vector OvertonesO Source #