dobutokO4-0.3.0.0: Helps to create experimental music. Uses SoX inside.

Copyright(c) OleksandrZhabenko 2020
LicenseMIT
StabilityExperimental
Safe HaskellNone
LanguageHaskell2010

DobutokO.Sound.Faded

Contents

Description

Maintainer : olexandr543@yahoo.com

Helps to create experimental music. Uses SoX fade (in a special 2D way) effect and frequency modulation.

Synopsis

Provide special faded effects and frequency modulation

overChangeVolGN :: FilePath -> String -> String -> Int -> Double -> Double -> Double -> Double -> ((Double, Double), (Double, Double)) -> IO () Source #

A generalized version of the overChangeVolG with a possibility to specify the name of the resulting file (by default it is "test" based).

overChangeVolG :: String -> String -> Int -> Double -> Double -> Double -> Double -> ((Double, Double), (Double, Double)) -> IO () Source #

Generates a sound, the volume of which (being plotted graphically) comes through the given 2D points at the time-volume scale with possibly changing frequency (they are specified by the first and the second Double arguments). Uses SoX inside especially the "fade" and "synth" effects. For the equal frequencies generates specifically faded output without frequency modulation.

overChangeVolGC :: String -> String -> Int -> Double -> Double -> Double -> Double -> (Double, Double) -> (Double, Double) -> IO () Source #

Generates a sound, the volume of which (being plotted graphically) comes through the given 2D points in the time-volume scale with possibly changing frequency (they are specified by the first and the second Double arguments). Uses SoX inside especially the "fade" and "synth" effects. For the equal frequencies generates specifically faded output without frequency modulation. Is a curried variant of the overChangeVolG in its two last arguments.

overChangeVolGF :: String -> String -> Int -> Double -> Double -> (Double, Double) -> (Double, Double) -> Double -> Double -> IO () Source #

Generates a sound, the volume of which (being plotted graphically) comes through the given 2D points in the time-volume scale with possibly changing frequency (they are specified by the first and the second Double arguments). Uses SoX inside especially the "fade" and "synth" effects. For the equal frequencies generates specifically faded output without frequency modulation. Is a somewhat flipped variant of the overChangeVolGC with changed order of the arguments (is provided here for convenience).

overChangeVol :: String -> Char -> Int -> Double -> Double -> Double -> ((Double, Double), (Double, Double)) -> IO () Source #

Generates a sound, the volume of which (being plotted graphically) comes through the given 2D points at the time-volume scale. Uses SoX inside especially the "fade" and "synth" effects. A frequency does not change and is specified (in Hz) by the first Double argument.

overChangeVolC :: String -> Char -> Int -> Double -> Double -> Double -> (Double, Double) -> (Double, Double) -> IO () Source #

Generates a sound, the volume of which (being plotted graphically) comes through the given 2D points in the time-volume scale. Uses SoX inside especially the "fade" and "synth" effects. A frequency does not change and is specified (in Hz) by the first Double argument. Is a curried variant of the overChangeVol in its two last arguments.

overChangeVolF :: String -> Char -> Int -> Double -> Double -> (Double, Double) -> (Double, Double) -> Double -> IO () Source #

Generates a sound, the volume of which (being plotted graphically) comes through the given 2D points in the time-volume scale. Uses SoX inside especially the "fade" and "synth" effects. Is a somewhat flipped variant of the overChangeVol with changed order of the arguments (is provided here for convenience).

overChangeVolGCN :: FilePath -> String -> String -> Int -> Double -> Double -> Double -> Double -> (Double, Double) -> (Double, Double) -> IO () Source #

A generalized version of the overChangeVolGC with a possibility to specify the name for the mixed files (by default is "test" based).

overChangeVolGFN :: FilePath -> String -> String -> Int -> Double -> Double -> (Double, Double) -> (Double, Double) -> Double -> Double -> IO () Source #

A generalized version of the overChangeVolGF with a possibility to specify the name for the mixed files (by default is "test" based).

overChangeVolN :: FilePath -> String -> Char -> Int -> Double -> Double -> Double -> ((Double, Double), (Double, Double)) -> IO () Source #

A generalized version of the overChangeVol with a possibility to specify the name for the mixed files (by default is "test" based).

overChangeVolCN :: FilePath -> String -> Char -> Int -> Double -> Double -> Double -> (Double, Double) -> (Double, Double) -> IO () Source #

A generalized version of the overChangeVolC with a possibility to specify the name for the mixed files (by default is "test" based).

overChangeVolFN :: FilePath -> String -> Char -> Int -> Double -> Double -> (Double, Double) -> (Double, Double) -> Double -> IO () Source #

A generalized version of the overChangeVolF with a possibility to specify the name for the mixed files (by default is "test" based).

Mixing function

mixGTest :: String -> IO () Source #

Using SoX mixes all the "testG*" (of the WAV or FLAC extension specified by the String argument -- see endingWF) in the current directory. If there are "resultG.*" (wav or flac respectively) file in the directory, it is overwritten. Also the "testG*" files are deleted afterwards if the mixing is successful.

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

A generalized version of the mixGTest with a possibility to specify the name for the mixed files (by default is "test" based).

Generate several files

basicFN :: FilePath -> String -> String -> Double -> Double -> Double -> Double -> (Double -> Double) -> Vector Double -> IO () Source #

A generalized version of the basicF with a possibility to specify the name for the generated files (by default is "test" based).

basicF :: String -> String -> Double -> Double -> Double -> Double -> (Double -> Double) -> Vector Double -> IO () Source #

Generates a sequence of sounds using overChangeVol so that their time-volume characteristic is going through the 2D points obtained with the last two arguments. Uses fadeEndsTMB, the arguments for which are specified by the second symbol in the second String and by the third Double argument.

basicFC :: String -> Double -> Double -> Double -> Double -> (Double -> Double) -> Vector Double -> IO () Source #

Generates a sequence of sounds using overChangeVol so that their time-volume characteristic (if being plotted graphically) is going through the 2D points obtained with the last two arguments. The String should consist of 6 alphanumeric characters. The first four as for the soxBasicParams, and the fifth one -- a letter from the "hlpqt". The sixth one is one of the "els" or some other symbol. Otherwise, the default values are used ("221w" for the first and "ll" for the second one).

basicF2 :: String -> String -> Double -> Double -> Double -> Double -> Double -> (Double -> Double) -> Vector Double -> IO () Source #

Generates a sequence of sounds using overChangeVol so that their time-volume characteristic (if being plotted graphically) is going through the 2D points obtained with the last two arguments. Uses fadeEndsTMN, the arguments for which are specified by the second symbol in the second String and by the third and fourth Double arguments.

basicF2C :: String -> Double -> Double -> Double -> Double -> Double -> (Double -> Double) -> Vector Double -> IO () Source #

Generates a sequence of sounds using overChangeVol so that their time-volume characteristic (if being plotted graphically) is going through the 2D points obtained with the last two arguments. The String should consist of 6 alphanumeric characters. The first four as for the soxBasicParams and the the fifth one -- a letter from the "hlpqt". The sixth one is one of the "els" or some other symbol. Otherwise, the default values are used ("221w" for the first and "ll" for the second one).

basicFCN :: FilePath -> String -> Double -> Double -> Double -> Double -> (Double -> Double) -> Vector Double -> IO () Source #

A generalized version of the basicFC with a possibility to specify the name for the mixed files (by default is "test" based).

basicF2N :: FilePath -> String -> String -> Double -> Double -> Double -> Double -> Double -> (Double -> Double) -> Vector Double -> IO () Source #

A generalized version of the basicF2 with a possibility to specify the name for the mixed files (by default is "test" based).

basicF2CN :: FilePath -> String -> Double -> Double -> Double -> Double -> Double -> (Double -> Double) -> Vector Double -> IO () Source #

A generalized version of the basicF2C with a possibility to specify the name for the mixed files (by default is "test" based).

Auxiliary functions

endingWF :: String -> String Source #

A simplified variant of the soxBasicParameters function with defining only a file extension.

charFadeType :: Char -> String Source #

Converts a character into a corresponding string using "l" (a logarithmic one) as the default one. An output can specify then the fade type for SoX.

argString :: String -> (String, String) Source #

Splits its argument (the first six symbols if present) (like splitAt) into two String with the length of (if possible) 4 and 2 characters. The rest of the argument is not used.