| Copyright | (c) OleksandrZhabenko 2020 |
|---|---|
| License | MIT |
| Stability | Experimental |
| Safe Haskell | None |
| Language | Haskell2010 |
DobutokO.Sound.Faded
Description
Maintainer : olexandr543@yahoo.com
Helps to create experimental music. Uses SoX fade (in a special 2D way) and frequency modulation.
Synopsis
- overChangeVolG :: String -> String -> Int -> Double -> Double -> Double -> Double -> ((Double, Double), (Double, Double)) -> IO ()
- overChangeVolGC :: String -> String -> Int -> Double -> Double -> Double -> Double -> (Double, Double) -> (Double, Double) -> IO ()
- overChangeVolGF :: String -> String -> Int -> Double -> Double -> (Double, Double) -> (Double, Double) -> Double -> Double -> IO ()
- overChangeVol :: String -> Char -> Int -> Double -> Double -> Double -> ((Double, Double), (Double, Double)) -> IO ()
- overChangeVolC :: String -> Char -> Int -> Double -> Double -> Double -> (Double, Double) -> (Double, Double) -> IO ()
- overChangeVolF :: String -> Char -> Int -> Double -> Double -> (Double, Double) -> (Double, Double) -> Double -> IO ()
- mixGTest :: String -> IO ()
- basicF :: String -> String -> Double -> Double -> Double -> Double -> (Double -> Double) -> Vector Double -> IO ()
- basicFC :: String -> Double -> Double -> Double -> Double -> (Double -> Double) -> Vector Double -> IO ()
- basicF2 :: String -> String -> Double -> Double -> Double -> Double -> Double -> (Double -> Double) -> Vector Double -> IO ()
- basicF2C :: String -> Double -> Double -> Double -> Double -> Double -> (Double -> Double) -> Vector Double -> IO ()
- endingWF :: String -> String
- charFadeType :: Char -> String
- argString :: String -> (String, String)
- freqChange :: String -> Double -> Double -> String
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.