Copyright | (c) OleksandrZhabenko 2020-2021 |
---|---|

License | MIT |

Maintainer | olexandr543@yahoo.com |

Stability | Experimental |

Safe Haskell | None |

Language | Haskell2010 |

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 -> [OvertonesO]
- splitO2 :: (OvertonesO -> OvertonesO) -> Int -> OvertonesO -> [OvertonesO]
- overConcat :: [OvertonesO] -> OvertonesO
- splitHelp1 :: Int -> Int -> Int -> Int -> [(Float, Float)] -> (Float, Float) -> [OvertonesO]
- splitHelp2 :: (OvertonesO -> OvertonesO) -> Int -> Int -> Int -> Int -> [(Float, Float)] -> (Float, Float) -> [OvertonesO]
- splitOG1 :: String -> Int -> OvertonesO -> [OvertonesO]
- splitOG2 :: (OvertonesO -> OvertonesO) -> String -> Int -> [(Float, Float)] -> [OvertonesO]
- splitOG12 :: (Int, Int, Int, Int) -> [(String, Int -> [(Float, Float)] -> (Int, Int, Int, Int))] -> String -> Int -> [(Float, Float)] -> [OvertonesO]
- splitOG12S :: (Int, Int, Int, Int) -> [(String, Int -> [(Float, Float)] -> (Int, Int, Int, Int))] -> String -> Int -> [(Float, Float)] -> [OvertonesO]
- splitOG22 :: (Int, Int, Int, Int) -> [(String, Int -> [(Float, Float)] -> (Int, Int, Int, Int))] -> (OvertonesO -> OvertonesO) -> String -> Int -> [(Float, Float)] -> [OvertonesO]
- splitOG22S :: (Int, Int, Int, Int) -> [(String, Int -> [(Float, Float)] -> (Int, Int, Int, Int))] -> (OvertonesO -> OvertonesO) -> String -> Int -> [(Float, Float)] -> [OvertonesO]

# Splitting and concatenating OvertonesO

splitO :: Int -> OvertonesO -> [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 list 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 -> [OvertonesO] Source #

Splits (with addition of the new overtones) a given `OvertonesO`

into a number of `OvertonesO`

(represented finally as a `Array`

`Int`

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 :: [OvertonesO] -> OvertonesO Source #

Concatenates a list of `OvertonesO`

into a single `OvertonesO`

. Can be easily used with `splitO`

.

## Generalization of the previous ones splitting functions

splitHelp1 :: Int -> Int -> Int -> Int -> [(Float, Float)] -> (Float, Float) -> [OvertonesO] Source #

Auxiliary function that is used inside `splitOG1`

.

splitHelp2 :: (OvertonesO -> OvertonesO) -> Int -> Int -> Int -> Int -> [(Float, Float)] -> (Float, Float) -> [OvertonesO] Source #

Auxiliary function that is used inside `splitOG2`

.

splitOG1 :: String -> Int -> OvertonesO -> [OvertonesO] Source #

splitOG2 :: (OvertonesO -> OvertonesO) -> String -> Int -> [(Float, Float)] -> [OvertonesO] Source #

splitOG12 :: (Int, Int, Int, Int) -> [(String, Int -> [(Float, Float)] -> (Int, Int, Int, Int))] -> String -> Int -> [(Float, Float)] -> [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 list (the second one).
Each `String`

in the list must be unique and consist of lowercase ASCII letters.

splitOG12S :: (Int, Int, Int, Int) -> [(String, Int -> [(Float, Float)] -> (Int, Int, Int, Int))] -> String -> Int -> [(Float, Float)] -> [OvertonesO] Source #

splitOG22 :: (Int, Int, Int, Int) -> [(String, Int -> [(Float, Float)] -> (Int, Int, Int, Int))] -> (OvertonesO -> OvertonesO) -> String -> Int -> [(Float, Float)] -> [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 list (the second one).
Each `String`

in the list must be unique and consist of lowercase ASCII letters.