Copyright | (c) OleksandrZhabenko 2020 |
---|---|
License | MIT |
Stability | Experimental |
Safe Haskell | None |
Language | Haskell2010 |
Maintainer : olexandr543@yahoo.com
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
- syllableStr :: Int -> String -> [Int]
- intervalsFromString :: String -> Intervals
- vStrToVInt :: Vector String -> Intervals
- strToInt :: String -> Int
- durationsAver :: Durations -> Double -> Durations
- str2Durat1 :: String -> Double
- str2Durations :: String -> Double -> Durations
- str2Vol1 :: String -> Double
- str2Volume :: String -> Strengths
- doublesAveragedA :: Vector Double -> Double -> Vector Double
- doublesAveragedG :: Vector Double -> Double -> Vector Double
- equalize2Vec :: Vector (Vector a) -> Vector (Vector a)
- intervalsFromStringG :: Intervals -> String -> Intervals
- silentSound2G :: FilePath -> Double -> String -> IO ()
- strengthsAver :: Strengths -> Double -> Strengths
- strengthsDbAver :: StrengthsDb -> Double -> StrengthsDb
- apply6G :: Strengths -> String -> String -> IO ()
- apply6G2 :: Strengths -> String -> String -> Double -> IO ()
- apply6GS :: String -> String -> String -> IO ()
- apply6GS2 :: String -> String -> String -> Double -> IO ()
Auxiliary functions
syllableStr :: Int -> String -> [Int] Source #
Function is used to generate a rhythm of the resulting file 'end.wav' from the Ukrainian text and a number of sounds either in the syllables or in the words without vowels.
Working with Intervals, Durations, Strengths and StrengthDb
intervalsFromString :: String -> Intervals Source #
Function is used to get numbers of intervals from a Ukrainian String
. It is used internally in the uniqOverSoXSynthN4
function.
vStrToVInt :: Vector String -> Intervals Source #
The default way to get Intervals
from a converted Ukrainian text.
strToInt :: String -> Int Source #
The default way to get number of semi-tones between notes in a single element of Intervals
.
durationsAver :: Durations -> Double -> Durations Source #
Durations
accounting the desired average duration.
str2Durat1 :: String -> Double Source #
A conversion to the Double
that is used inside str2Durations
.
str2Durations :: String -> Double -> Durations Source #
A full conversion to the Durations
from a Ukrainian text.
doublesAveragedA :: Vector Double -> Double -> Vector Double Source #
Arithmetic average for the Vector
is used as a weight for a duration.
doublesAveragedG :: Vector Double -> Double -> Vector Double Source #
Geometric average for the Vector
is used as a weight for a strength.
equalize2Vec :: Vector (Vector a) -> Vector (Vector a) Source #
Auxiliar function to make all vectors in a Vector
equal by length (the minimum one).
intervalsFromStringG :: Intervals -> String -> Intervals Source #
Generatlized version of the intervalsFromString
with a possibility to specify your own Intervals
.
silentSound2G :: FilePath -> Double -> String -> IO () Source #
For the given non-existing FilePath
for a sound file supported by SoX generates a silence of the specified duration and quality (see,
soxBasicParams
).
strengthsAver :: Strengths -> Double -> Strengths Source #
Strengths
accounting the desired average strength.
strengthsDbAver :: StrengthsDb -> Double -> StrengthsDb Source #
StrengthsDb
accounting the desired average strength in dB.
New generalized 6G functions that works with Strengths
apply6G :: Strengths -> String -> String -> IO () Source #
After producing sounds as WAV or FLAC files you can apply to them volume adjustments using Strengths
. The first String
is used accordingly to
soxBasicParams
and the second one -- as a prefix of the filenames for the files that the function is applied to. The files must not be silent ones.
Otherwise, it leads to likely noise sounding or errors.
apply6GS :: String -> String -> String -> IO () Source #
Variant of the apply6G
where you use as a Strengths
parameter that one obtained from a Ukrainian text provided as a first String
argument.
It uses str2Volume
inside. The files must not be silent ones. Otherwise, it leads to likely noise sounding or errors.