Copyright | (c) OleksandrZhabenko 2020 |
---|---|

License | MIT |

Stability | Experimental |

Safe Haskell | None |

Language | Haskell2010 |

Maintainer : olexandr543@yahoo.com

Helps to create experimental music.
Uses SoX fade (in a special 2D way) effect and frequency modulation.
Since 0.7.0.0 version it uses `Float`

instead of `Double`

. This change is inspired by:
https://www.youtube.com/watch?v=FYTZkE5BZ-0
For conversion it uses functions from the `Float`

module.

## Synopsis

- overChangeVolGNC :: String -> FilePath -> String -> String -> Int -> Float -> Float -> Float -> Float -> ((Float, Float), (Float, Float)) -> IO ()
- overChangeVolGN :: FilePath -> String -> String -> Int -> Float -> Float -> Float -> Float -> ((Float, Float), (Float, Float)) -> IO ()
- overChangeVolG :: String -> String -> Int -> Float -> Float -> Float -> Float -> ((Float, Float), (Float, Float)) -> IO ()
- overChangeVolGC :: String -> String -> Int -> Float -> Float -> Float -> Float -> (Float, Float) -> (Float, Float) -> IO ()
- overChangeVolGF :: String -> String -> Int -> Float -> Float -> (Float, Float) -> (Float, Float) -> Float -> Float -> IO ()
- overChangeVol :: String -> Char -> Int -> Float -> Float -> Float -> ((Float, Float), (Float, Float)) -> IO ()
- overChangeVolC :: String -> Char -> Int -> Float -> Float -> Float -> (Float, Float) -> (Float, Float) -> IO ()
- overChangeVolF :: String -> Char -> Int -> Float -> Float -> (Float, Float) -> (Float, Float) -> Float -> IO ()
- overChangeVolGCN :: FilePath -> String -> String -> Int -> Float -> Float -> Float -> Float -> (Float, Float) -> (Float, Float) -> IO ()
- overChangeVolGFN :: FilePath -> String -> String -> Int -> Float -> Float -> (Float, Float) -> (Float, Float) -> Float -> Float -> IO ()
- overChangeVolN :: FilePath -> String -> Char -> Int -> Float -> Float -> Float -> ((Float, Float), (Float, Float)) -> IO ()
- overChangeVolCN :: FilePath -> String -> Char -> Int -> Float -> Float -> Float -> (Float, Float) -> (Float, Float) -> IO ()
- overChangeVolFN :: FilePath -> String -> Char -> Int -> Float -> Float -> (Float, Float) -> (Float, Float) -> Float -> IO ()
- mixGTest :: String -> IO ()
- mixGTestN :: FilePath -> String -> IO ()
- basicFN :: FilePath -> String -> String -> Float -> Float -> Float -> Float -> (Float -> Float) -> Vector Float -> IO ()
- basicF :: String -> String -> Float -> Float -> Float -> Float -> (Float -> Float) -> Vector Float -> IO ()
- basicFC :: String -> Float -> Float -> Float -> Float -> (Float -> Float) -> Vector Float -> IO ()
- basicF2 :: String -> String -> Float -> Float -> Float -> Float -> Float -> (Float -> Float) -> Vector Float -> IO ()
- basicF2C :: String -> Float -> Float -> Float -> Float -> Float -> (Float -> Float) -> Vector Float -> IO ()
- basicFCN :: FilePath -> String -> Float -> Float -> Float -> Float -> (Float -> Float) -> Vector Float -> IO ()
- basicF2N :: FilePath -> String -> String -> Float -> Float -> Float -> Float -> Float -> (Float -> Float) -> Vector Float -> IO ()
- basicF2CN :: FilePath -> String -> Float -> Float -> Float -> Float -> Float -> (Float -> Float) -> Vector Float -> IO ()
- moreFNC :: String -> FilePath -> String -> String -> Float -> Float -> Float -> Float -> Float -> (Float -> Float) -> Vector Float -> IO ()
- moreFN :: FilePath -> String -> String -> Float -> Float -> Float -> Float -> Float -> (Float -> Float) -> Vector Float -> IO ()
- moreFCN :: FilePath -> String -> Float -> Float -> Float -> Float -> Float -> (Float -> Float) -> Vector Float -> IO ()
- reverbFix :: FilePath -> IO ()
- endingWF :: String -> String
- charFadeType :: Char -> String
- argString :: String -> (String, String)
- freqChange :: String -> Float -> Float -> String
- sameConst :: Int -> Float

# Provide special faded effects and frequency modulation

overChangeVolGNC :: String -> FilePath -> String -> String -> Int -> Float -> Float -> Float -> Float -> ((Float, Float), (Float, Float)) -> IO () Source #

A generalized version of the `overChangeVolGN`

with a possibility to make lower the noisy clipping by specifying the first parameter. The default parameter
"rev" it uses reverberation to transform the distortion on the edges in case of existing root on fro the 2D line connection points.

overChangeVolGN :: FilePath -> String -> String -> Int -> Float -> Float -> Float -> Float -> ((Float, Float), (Float, Float)) -> 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 -> Float -> Float -> Float -> Float -> ((Float, Float), (Float, Float)) -> 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 `Float`

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 -> Float -> Float -> Float -> Float -> (Float, Float) -> (Float, Float) -> 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 `Float`

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 -> Float -> Float -> (Float, Float) -> (Float, Float) -> Float -> Float -> 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 `Float`

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 -> Float -> Float -> Float -> ((Float, Float), (Float, Float)) -> 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 `Float`

argument.

overChangeVolC :: String -> Char -> Int -> Float -> Float -> Float -> (Float, Float) -> (Float, Float) -> 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 `Float`

argument. Is a curried variant of the
`overChangeVol`

in its two last arguments.

overChangeVolF :: String -> Char -> Int -> Float -> Float -> (Float, Float) -> (Float, Float) -> Float -> 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 -> Float -> Float -> Float -> Float -> (Float, Float) -> (Float, Float) -> 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 -> Float -> Float -> (Float, Float) -> (Float, Float) -> Float -> Float -> 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 -> Float -> Float -> Float -> ((Float, Float), (Float, Float)) -> 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 -> Float -> Float -> Float -> (Float, Float) -> (Float, Float) -> 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 -> Float -> Float -> (Float, Float) -> (Float, Float) -> Float -> 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 -> Float -> Float -> Float -> Float -> (Float -> Float) -> Vector Float -> 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 -> Float -> Float -> Float -> Float -> (Float -> Float) -> Vector Float -> 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 `Float`

argument.

basicFC :: String -> Float -> Float -> Float -> Float -> (Float -> Float) -> Vector Float -> 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 -> Float -> Float -> Float -> Float -> Float -> (Float -> Float) -> Vector Float -> 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 `Float`

arguments.

basicF2C :: String -> Float -> Float -> Float -> Float -> Float -> (Float -> Float) -> Vector Float -> 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 -> Float -> Float -> Float -> Float -> (Float -> Float) -> Vector Float -> 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 -> Float -> Float -> Float -> Float -> Float -> (Float -> Float) -> Vector Float -> 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 -> Float -> Float -> Float -> Float -> Float -> (Float -> Float) -> Vector Float -> IO () Source #

A generalized version of the `basicF2C`

with a possibility to specify the name for the mixed files (by default is "test" based).

# Generate several files with frequency modulation

moreFNC :: String -> FilePath -> String -> String -> Float -> Float -> Float -> Float -> Float -> (Float -> Float) -> Vector Float -> IO () Source #

A generalized version of the `moreFN`

with a possibility to change the behaviour for the situation with existing roots on the interval for the line connecting the 2D
points.

moreFN :: FilePath -> String -> String -> Float -> Float -> Float -> Float -> Float -> (Float -> Float) -> Vector Float -> IO () Source #

A generalized version of the `basicFN`

with a frequency modulation.

moreFCN :: FilePath -> String -> Float -> Float -> Float -> Float -> Float -> (Float -> Float) -> Vector Float -> IO () Source #

A generalized version of the `basicFCN`

with a frequency modulation.

reverbFix :: FilePath -> IO () Source #

Auxiliary function that can be used to apply a "reverb" effect or in this module context to fix unpleasant noise for concatenated parts. Usually, can be used after application of the other functions in the module to transform the noise into more music sound. It is usually applied after all the other functions.

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