algorithmic-composition-basic-0.1.1.0: Helps to create experimental music from a file (or its part) and a Ukrainian text.

Composition.Sound.DIS5G6G

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

## 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

Function is used to get numbers of intervals from a Ukrainian String. It is used internally in the uniqOverSoXSynthN4 function.

The default way to get Intervals from a converted Ukrainian text.

The default way to get number of semi-tones between notes in a single element of Intervals.

Durations accounting the desired average duration.

A conversion to the Float that is used inside str2Durations.

A full conversion to the Durations from a Ukrainian text. The String must be not empty Ukrainian text and the Float must be greater than 0.0.

A conversion to the Float that is used inside str2Volume.

A full conversion to the Strengths from a Ukrainian text.

Arithmetic average for the Array Int is used as a weight for a duration.

Geometric average for the Array Int is used as a weight for a strength.

equalize2Vec :: Array Int [a] -> Array Int [a] Source #

Auxiliary function to make all lists in an Array Int equal by length (the minimum one).

Generatlized version of the intervalsFromString with a possibility to specify your own Intervals.

For the given non-existing FilePath for a sound file supported by SoX generates a silence of the specified duration and quality (see, soxBasicParams).

Strengths accounting the desired average strength.

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.

apply6G2 :: Strengths -> String -> String -> Float -> IO () Source #

Variant of the apply6G function which can be applied also to the silent files. Whether a file is silent is defined using the Float argument so that if the maximum by absolute value amplitude is less by absolute value than the Float argument then the file is not changed.

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 the silent ones. Otherwise, it leads to likely noise sounding or errors.

apply6GS2 :: String -> String -> String -> Float -> IO () Source #

Variant of the apply6G2 where you use as a Strengths parameter that one obtained from a Ukrainian text provided as the first String argument. It uses str2Volume inside.