| Copyright | (c) OleksandrZhabenko 2020 |
|---|---|
| License | MIT |
| Stability | Experimental |
| Safe Haskell | None |
| Language | Haskell2010 |
DobutokO.Sound.Functional
Contents
Description
Maintainer : olexandr543@yahoo.com
A program and a library to create experimental music from a mono audio and a Ukrainian text.
Synopsis
- oberSoXSynth2FDN :: (Double -> Vector (Double, Double)) -> (Double, Double) -> String -> IO ()
- oberSoXSynth2FDN_B :: (Double -> Vector (Double, Double)) -> (Double, Double, Double) -> String -> IO ()
- oberSoXSynth2FDN_S :: (Double -> Vector (Double, Double)) -> (Double, Double) -> String -> IO ()
- oberSoXSynth2FDN_Sf :: (Double -> Vector (Double, Double)) -> (Double, Double) -> String -> IO ()
- oberSoXSynth2FDN_Sf3 :: (Double -> Vector (Double, Double)) -> (Double, Double, Double) -> String -> IO ()
Use additional function as a parameter
oberSoXSynth2FDN :: (Double -> Vector (Double, Double)) -> (Double, Double) -> String -> IO () Source #
Similar to oberSoXSynth2DN but instead of oberTones function, it uses volatile function f::Double -> Vector (Double, Double) with
somewhat sophisticated mechanism to normalize the resulting Vector elements (Double, Double). The last one is experimental feature, so
it is your responsibility to provide a function so that it does not lead to clipping. In such a case, the result of application of the
convertToProperUkrainian to the String parameter must not be empty.
Be aware that the result can be rather unpredictable (the program can even obtain segmentation fault) for not very suitable function. But for a lot of functions this works well.
It is recommended to fully simplify the computation for "f" function before using it in the oberSoXSynth2FDN.
oberSoXSynth2FDN_B :: (Double -> Vector (Double, Double)) -> (Double, Double, Double) -> String -> IO () Source #
Similar to oberSoXSynth2DN but instead of oberTones function, it uses volatile function f::Double -> Vector (Double, Double) with
somewhat sophisticated mechanism to normalize the resulting Vector elements (Double, Double). The last one is experimental feature, so
it is your responsibility to provide a function so that it does not lead to clipping. In such a case, the result of application of the
convertToProperUkrainian to the String parameter must not be empty. The function also tries to perform filtering to avoid possible beating.
The third Double parameter in the tuple is used as a limit for frequencies difference in Hz to be filtered out from the resulting sound. It is
considered to be from the range [0.1..10.0].
Be aware that the result can be rather unpredictable (the program can even obtain segmentation fault) for not very suitable function. But for a lot of functions this works well.
It is recommended to fully simplify the computation for "f" function before using it in the oberSoXSynth2FDN_B.
Just simple function application
oberSoXSynth2FDN_S :: (Double -> Vector (Double, Double)) -> (Double, Double) -> String -> IO () Source #
Similar to oberSoXSynth2FDN but it does not make any normalizing transformations with the Vector argument. To be used properly, it is needed
that every second element in the tuple in the Vector argument must be in the range [-1.0..1.0] and every first element must be in between
16.351597831287414 and 7902.132820097988 (Hz).
Be aware that the result can be rather unpredictable (the program can even obtain segmentation fault) for not very suitable function. But for a lot of functions this works well.
It is recommended to fully simplify the computation for "f" function before using it in the oberSoXSynth2FDN_S.
With additional filtering
oberSoXSynth2FDN_Sf :: (Double -> Vector (Double, Double)) -> (Double, Double) -> String -> IO () Source #
Similar to oberSoXSynth2FDN_S but additionally the program filters out from the resulting Vector after "f" application values that are smaller
by absolute value than 0.001.
Be aware that the result can be rather unpredictable (the program can even obtain segmentation fault) for not very suitable function. But for a lot of functions this works well.
It is recommended to fully simplify the computation for "f" function before using it in the oberSoXSynth2FDN_Sf.
oberSoXSynth2FDN_Sf3 :: (Double -> Vector (Double, Double)) -> (Double, Double, Double) -> String -> IO () Source #
Similar to oberSoXSynth2FDN_S but additionally the program filters out from the resulting Vector after "f" application values that are smaller
than the third Double parameter by an absolute value in the triple of Double's.
Be aware that the result can be rather unpredictable (the program can even obtain segmentation fault) for not very suitable function. But for a lot of functions this works well.
It is recommended to fully simplify the computation for "f" function before using it in the oberSoXSynth2FDN_Sf3.