dobutokO4-0.1.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) and frequency modulation.

Synopsis

Create special faded effects

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

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

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

Generates sound the volume of which comes through the given 2D points in the time-volume scale with possibily changing frequency (they are specified by the first and the second Double arguments). Uses SoX inside especially "fade" and "synth" effects. For the equal frequencies generates specifically faded output. 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 sound the volume of which comes through the given 2D points in the time-volume scale with possibily changing frequency (they are specified by the first and the second Double arguments). Uses SoX inside especially "fade" and "synth" effects. For the equal frequencies generates specifically faded output. Is a somewhat flipped variant of the overChangeVolG 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 sound the volume of which comes through the given 2D points in the time-volume scale. Uses SoX inside especially "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 sound the volume of which comes through the given 2D points in the time-volume scale. Uses SoX inside especially "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 sound the volume of which comes through the given 2D points in the time-volume scale. Uses SoX inside especially "fade" and "synth" effects. Is a somewhat flipped variant of the overChangeVol with changed order of the arguments (is provided here for convenience).

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.

Generate several files

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 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 last two -- letters from the "hlpqt". 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 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 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 last two -- letters from the "hlpqt". Otherwise, the default values are used ("221w" for the first and "ll" for the second one).

Auxiliary functions

endingWF :: String -> String Source #

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

charFadeType :: Char -> String Source #

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

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

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