dobutokO2-0.1.0.0: A program and a library to create experimental music from a mono audio and a Ukrainian text

Copyright(c) OleksandrZhabenko 2020
LicenseMIT
StabilityExperimental
Safe HaskellNone
LanguageHaskell2010

DobutokO.Sound

Contents

Description

Maintainer : olexandr543@yahoo.com

A program and a library to create experimental music from the mono audio and a Ukrainian text.

Synopsis

Basic functions for the executable

dobutokO2 :: IO () Source #

Function that actually makes processing in the dobutokO2 executable.

recAndProcess :: String -> Int -> IO String Source #

Function records and process the sound data needed to generate the "end.wav" file in the dobutokO2 function.

Library and executable functions

For the fixed timbre

oberTones :: Double -> Vector (Double, Double) Source #

For the given frequency of the note it generates a Vector of the tuples, each one of which contains the harmonics' frequency and amplitude.

oberSoXSynth :: Double -> IO () Source #

For the given frequency it generates a musical sound with a timbre.

oberSoXSynthN :: Int -> String -> Vector Double -> IO () Source #

Function to create a melody for the given arguments. String is used to provide a rhythm.

oberSoXSynthNGen :: FilePath -> String -> IO () Source #

Similar to oberSoXSynthN, but uses a sound file to obtain the information analogous to Vector in the latter one.

For the unique for the String structure timbre

uniqOberTonesV :: Double -> String -> Vector (Double, Double) Source #

For the given frequency of the note it generates a Vector of the tuples, each one of which contains the harmonics' frequency and amplitude. For every given String structure of the uniqueness (see the documentation for mmsyn7s package and its MMSyn7.Syllable module) it produces the unique timbre.

uniqOberSoXSynth :: Double -> String -> IO () Source #

For the given frequency and a Ukrainian text it generates a musical sound with the timbre obtained from the Ukrainian text (see the documentation for mmsyn7s package). The timbre for the another given text usually is another one, but can be the same. The last one is only if the uniqueness structure and length are the same for both String. Otherwise, they differs. This gives an opportunity to practically and quickly synthesize differently sounding notes.

uniqOberSoXSynthN :: Int -> String -> String -> Vector Double -> IO () Source #

Function to create a melody for the given arguments. The first String is used to provide a rhythm. The second one -- to provide a timbre. The timbre for the another given text usually is another one, but can be the same. This gives an opportunity to practically and quickly synthesize differently sounding notes.

uniqOberSoXSynthNGen :: FilePath -> String -> String -> IO () Source #

Similar to uniqOberSoXSynthN, but uses a sound file to obtain the information analogous to Vector in the latter one.

Auxiliary functions

notes :: Vector Double Source #

Vector of musical notes in Hz.

neighbourNotes :: Double -> Vector Double -> (Double, Double) Source #

Function returns either a nearest two musical notes if note is higher than C0 and lower than B8 or a nearest note duplicated in a tuple.

closestNote :: Double -> Double Source #

Returns the closest note to the given frequency in Hz.

pureQuintNote :: Double -> Double Source #

Returns a pure quint lower than the given note.

syllableStr :: Int -> String -> [Int] Source #

Function is used to generate a rhythm of the resulting file from the Ukrainian text and number of sounds in the syllables or words without vowels.

prependZeroes :: Int -> String -> String Source #

Additional function to prepend zeroes to the given String. The number of them are just that one to fulfill the length to the given Int parameter.