| Copyright | (c) OleksandrZhabenko 2020 |
|---|---|
| License | MIT |
| Stability | Experimental |
| Safe Haskell | None |
| Language | Haskell2010 |
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
- dobutokO2 :: IO ()
- recAndProcess :: String -> Int -> IO String
- oberTones :: Double -> Vector (Double, Double)
- oberSoXSynth :: Double -> IO ()
- oberSoXSynthN :: Int -> String -> Vector Double -> IO ()
- oberSoXSynthNGen :: FilePath -> String -> IO ()
- uniqOberTonesV :: Double -> String -> Vector (Double, Double)
- uniqOberSoXSynth :: Double -> String -> IO ()
- uniqOberSoXSynthN :: Int -> String -> String -> Vector Double -> IO ()
- uniqOberSoXSynthNGen :: FilePath -> String -> String -> IO ()
- notes :: Vector Double
- neighbourNotes :: Double -> Vector Double -> (Double, Double)
- closestNote :: Double -> Double
- pureQuintNote :: Double -> Double
- syllableStr :: Int -> String -> [Int]
- prependZeroes :: Int -> String -> String
- nOfZeroesLog :: Int -> Maybe Int
- numVZeroesPre :: Vector a -> Int
Basic functions for the 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
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
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.
numVZeroesPre :: Vector a -> Int Source #