dobutokO2-0.44.1.0: Helps to create experimental music from a file (or its part) and a Ukrainian text.
Copyright(c) OleksandrZhabenko 2020 2024
LicenseMIT
Maintaineroleksandr.zhabenko@yahoo.com
StabilityExperimental
Safe HaskellNone
LanguageHaskell2010

DobutokO.Sound.Overtones

Description

Helps to create experimental music from a file (or its part) and a Ukrainian text. It can also generate a timbre for the notes. Uses SoX inside.

Synopsis

Library and executable functions

For the fixed timbre

overSoXSynthN :: Int -> Float -> Float -> String -> Vector Float -> IO () Source #

Function to create a melody for the given arguments. String is used to provide a rhythm. The main component of the sound includes the lower pure quint, which can be in the same octave or in the one with the number lower by one. The first Float argument from the range [0.01..1.0] is used as a maximum amplitude for Overtones. If it is set to 1.0 the overTones amplitudes are just the maximum ones, otherwise they are multiplied by the parameter and this results in their becoming more silent ones. The second Float argument is a basic sound duration. The default one is 0.5 (second). Please, check before executing whether there is no "x.wav", "test*", "result*" files in the current directory, because they can be overwritten.

For the fixed timbre with different signs for harmonics coefficients

overTones2 :: Float -> String -> OvertonesO Source #

For the given frequency of the note and a Ukrainian text it generates a Vector of the tuples, each one of which contains the harmonics' frequency and amplitude. The String is used to produce the signs for harmonics coefficients.

overSoXSynth2 :: Float -> String -> IO () Source #

For the given frequency it generates a musical sound with a timbre. The main component of the sound includes the lower pure quint, which can be in the same octave or in the one with the number lower by one. Please, check before executing whether there is no "x.wav", "test*", "result*" files in the current directory, because they can be overwritten. The String argument is used to define signs of the harmonics coefficients for Overtones.

overSoXSynthN2 :: Int -> Float -> Float -> String -> String -> Vector Float -> IO () Source #

Function to create a melody for the given arguments. String is used to provide a rhythm. The main component of the sound includes the lower pure quint, which can be in the same octave or in the one with the number lower by one. The first Float argument from the range [0.01..1.0] is used as a maximum amplitude for Overtones. If it is set to 1.0 the overTones amplitudes are just the maximum ones, otherwise they are multiplied by the parameter and this results in their becoming more silent ones. The second Float argument is a basic sound duration. The default one is 0.5 (second). Please, check before executing whether there is no "x.wav", "test*", "result*" files in the current directory, because they can be overwritten.

overSoXSynthN3 :: Int -> Float -> Float -> Float -> String -> String -> String -> Vector Float -> IO () Source #

Function to create a melody for the given arguments. String is used to provide a rhythm. The main component of the sound includes the lower pure quint, which can be in the same octave or in the one with the number lower by one. The first Float argument from the range [0.01..1.0] is used as a maximum amplitude for Overtones. If it is set to 1.0 the overTones amplitudes are just the maximum ones, otherwise they are multiplied by the parameter and this results in their becoming more silent ones. The second Float argument is a basic sound duration. The default one is 0.5 (second). Please, check before executing whether there is no "x.wav", "test*", "result*" files in the current directory, because they can be overwritten. The third String argument is used to define the intervals for the notes if any. The third Float parameter basically is used to define in how many times the volume for the second lower note is less than the volume of the main note. If it is rather great, it can signal that the volume for the second note overTones are greater than for the main note obetones. The last one is experimental feature.

Use additional parameters

overSoXSynthDN :: Float -> String -> IO () Source #

Similar to overSoXSynth except that takes not necessarily pure lower quint note as the second one, but the one specified by the String parameter as an argument to dNote. If you begin the String with space characters, or "сь", or "ць", or dash, or apostrophe, or soft sign, than there will be no interval and the sound will be solely one with its OvertonesO.

overSoXSynth2DN :: Float -> Float -> String -> IO () Source #

Similar to overSoXSynthDN except that the resulting duration is specified by the second Float parameter in seconds. For overSoXSynthDN it is equal to 0.5.

Use a file for information

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

Similar to overSoXSynthN, but uses a sound file to obtain the information analogous to Vector in the latter one. Besides, the function lifts the frequencies to the octave with the given by Int parameter number (better to use from the range [1..8]). The first Float argument from the range [0.01..1.0] is used as a maximum amplitude for Overtones. If it is set to 1.0 the overTones amplitudes are just maximum ones, otherwise they are multiplied by the parameter and this results in their becoming more silent ones. The second Float argument is a basic sound duration. The default one is 0.5 (second). Please, check before executing whether there is no "x.wav", "test*", "result*" and "end.wav" files in the current directory, because they can be overwritten.

For better usage the FilePath should be a filepath for the .wav file.

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

Similar to overSoXSynthN2, but uses a sound file to obtain the information analogous to Vector in the latter one. Besides, the function lifts the frequencies to the octave with the given by Int parameter number (better to use from the range [1..8]). The first Float argument from the range [0.01..1.0] is used as a maximum amplitude for Overtones. If it is set to 1.0 the overTones amplitudes are just maximum ones, otherwise they are multiplied by the parameter and this results in their becoming more silent ones. The second Float argument is a basic sound duration. The default one is 0.5 (second). Please, check before executing whether there is no "x.wav", "test*", "result*" and "end.wav" files in the current directory, because they can be overwritten.

For better usage the FilePath should be a filepath for the .wav file. The second String argument is used to define signs of the harmonics coefficients in the generated sounds.

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

Similar to overSoXSynthN2, but uses a sound file to obtain the information analogous to Vector in the latter one. Besides, the function lifts the frequencies to the octave with the given by Int parameter number (better to use from the range [1..8]). The first Float argument from the range [0.01..1.0] is used as a maximum amplitude for Overtones. If it is set to 1.0 the overTones amplitudes are just maximum ones, otherwise they are multiplied by the parameter and this results in their becoming more silent ones. The second Float argument is a basic sound duration. The default one is 0.5 (second). Please, check before executing whether there is no "x.wav", "test*", "result*" and "end.wav" files in the current directory, because they can be overwritten.

For better usage the FilePath should be a filepath for the .wav file. The second String argument is used to define signs of the harmonics coefficients in the generated sounds. The third String argument is used to define the intervals for the notes if any. The third Float parameter basically is used to define in how many times the volume for the second lower note is less than the volume of the main note. If it is rather great, it can signal that the volume for the second note overTones are greater than for the main note obetones. The last one is experimental feature.

Extended generation using enky functionality

With somewhat fixed timbre

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

Similar to overSoXSynthNGen, but uses additional second Int parameter. It defines, to which n-th elements set (see nkyT) belongs the obtained higher notes in the intervals. If that parameter equals to 12, then the function is practically equivalent to overSoXSynthNGen. To obtain its modifications, please, use 2, 3, 4, 6, or 9.

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

Similar to overSoXSynthNGen2, but uses additional second Int parameter. It defines, to which n-th elements set (see nkyT) belongs the obtained higher notes in the intervals. If that parameter equals to 12, then the function is practically equivalent to overSoXSynthNGen2. To obtain its modifications, please, use 2, 3, 4, 6, or 9.

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

Similar to overSoXSynthNGen3, but uses additional second Int parameter. It defines, to which n-th elements set (see nkyT) belongs the obtained higher notes in the intervals. If that parameter equals to 12, then the function is practically equivalent to overSoXSynthNGen3. To obtain its modifications, please, use 2, 3, 4, 6, or 9.

New 4G functions to work with Durations

overSoXSynthN4G :: Int -> Float -> Durations -> Vector Float -> IO () Source #

Function to create a melody for the given arguments. Durations is used to provide a rhythm.

overSoXSynthN24G :: Int -> Float -> Durations -> String -> Vector Float -> IO () Source #

Function to create a melody for the given arguments. Durations is used to provide a rhythm.

overSoXSynthN34G :: Int -> Float -> Float -> Durations -> String -> String -> Vector Float -> IO () Source #

Function to create a melody for the given arguments. Duraitons is used to provide a rhythm.

overSoXSynthNGenE4G :: FilePath -> Int -> Int -> Float -> Durations -> IO () Source #

4G genaralized version of the overSoXSynthNGenE where you provide your own Durations.

overSoXSynthNGen2E4G :: FilePath -> Int -> Int -> Float -> Durations -> String -> IO () Source #

4G genaralized version of the overSoXSynthNGen2E where you provide your own Durations.

overSoXSynthNGen3E4G :: FilePath -> Int -> Int -> Float -> Float -> Durations -> String -> String -> IO () Source #

4G generalized function for overSoXSynthNGen3E where you provide your own Durations. Note that Int arguments are used by liftInEnku in that order so it returns a Maybe number (actually frequency) for the n-th elements set of notes (see nkyT). The second Int parameter defines that n.

4G with speech-like composition

overSoXSynthN4GS :: Int -> Float -> Float -> String -> Vector Float -> IO () Source #

Variant of the overSoXSynthN4G where Durations are obtained from the String using str2Durations function. Helps to create a speech-like composition.

overSoXSynthN24GS :: Int -> Float -> Float -> String -> String -> Vector Float -> IO () Source #

Variant of the overSoXSynthN24G where Durations are obtained from the String using str2Durations function. Helps to create a speech-like composition.

overSoXSynthN34GS :: Int -> Float -> Float -> Float -> String -> String -> String -> Vector Float -> IO () Source #

Variant of the overSoXSynthN34G where Durations are obtained from the String using str2Durations function. Helps to create a speech-like composition.

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

Variant of the overSoXSynthNGenE4G where Durations are obtained from the String using str2Durations function. Helps to create a speech-like composition.

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

Variant of the overSoXSynthNGen2E4G where Durations are obtained from the String using str2Durations function. Helps to create a speech-like composition.

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

Variant of the overSoXSynthNGen3E4G where Durations are obtained from the String using str2Durations function. Helps to create a speech-like composition. Note that Int arguments are used by liftInEnku in that order so it returns a Maybe number (actually frequency) for the n-th elements set of notes (see nkyT). The second Int parameter defines that n.

New 5G functions to work also with Intervals

overSoXSynthN35G :: Int -> Float -> Float -> Durations -> String -> Intervals -> Vector Float -> IO () Source #

Generalized variant of the overSoXSynthN34G where you specify your own Intervals. For more information, please, refer to intervalsFromStringG.

overSoXSynthNGen3E5G :: FilePath -> Int -> Int -> Float -> Float -> Durations -> String -> Intervals -> IO () Source #

5G generalized function for overSoXSynthNGen3E4G where you provide your own Intervals. Note that Int arguments are used by liftInEnku in that order so it returns a Maybe number (actually frequency) for the n-th elements set of notes (see nkyT). The second Int parameter defines that n.

5G with obtained from the text arbitraty length Intervals

overSoXSynthN35GS :: Int -> Float -> Float -> Float -> String -> String -> Intervals -> String -> Vector Float -> IO () Source #

Variant of the overSoXSynthN34G where intervals are obtained from the basic Intervals with the length no more than 29 and a Ukrainian text specified as the last String argument so that you can produce Intervals of the arbitrary length. For more information, please, refer to intervalsFromStringG and strToIntG.

overSoXSynthNGen3E5GS :: FilePath -> Int -> Int -> Float -> Float -> Float -> String -> String -> Intervals -> String -> IO () Source #

Variant of the overSoXSynthNGen3E5G where Intervals are obtained from the basic Intervals with the length no more than 29 and a Ukrainian text specified as the last String argument so that you can produce Intervals of the arbitrary length. For more information, please, refer to intervalsFromStringG and strToIntG. Note that Int arguments are used by liftInEnku in that order so it returns a Maybe number (actually frequency) for the n-th elements set of notes (see nkyT). The second Int parameter defines that n.

New 6G function to work also with Strengths

overSoXSynthNGen3E6G :: FilePath -> Int -> Int -> Float -> Float -> Durations -> String -> Intervals -> Strengths -> Float -> IO () Source #

6G generalized function for overSoXSynthNGen3E5G where you provide your own Strengths. Note that Int arguments are used by liftInEnku in that order so it returns a Maybe number (actually frequency) for the n-th elements set of notes (see nkyT). The second Int parameter defines that n.

6G with obtained from the text arbitrary length Strengths

overSoXSynthNGen3E6GS :: FilePath -> Int -> Int -> Float -> Float -> Durations -> String -> Intervals -> String -> Float -> IO () Source #

A variant of overSoXSynthNGen3E6G where Strengths are obtained from a Ukrainian text specified as the last String argument. Note that Int arguments are used by liftInEnku in that order so it returns a Maybe number (actually frequency) for the n-th elements set of notes (see nkyT). The second Int parameter defines that n.

overSoXSynthNGen3E6GSu :: FilePath -> Int -> Int -> Float -> Float -> Float -> String -> Intervals -> String -> Float -> IO () Source #

A variant of overSoXSynthNGen3E6GS where Strengths and Durations are obtained from the same Ukrainian text specified as the last String argument. The third Float argument is an average duration of the sounds in seconds. Note that Int arguments are used by liftInEnku in that order so it returns a Maybe number (actually frequency) for the n-th elements set of notes (see nkyT). The second Int parameter defines that n.

New generalized functions working with Params

overSoXSynthNGenEPar :: FilePath -> Params -> Float -> Float -> String -> IO () Source #

Generalized version of the overSoXSynthNGenE where instead of lifting with liftInEnkuV liftInParamsV is used. It allows e. g. to use some tonality. For more information, please, refer to filterInParams.

overSoXSynthNGenE4GSPar :: FilePath -> Params -> Float -> Float -> String -> IO () Source #

Generalized version of the overSoXSynthNGenE4GS where instead of lifting with liftInEnkuV liftInParamsV is used. It allows e. g. to use some tonality. For more information, please, refer to filterInParams.

overSoXSynthNGenE4GPar :: FilePath -> Params -> Float -> Durations -> IO () Source #

Generalized version of the overSoXSynthNGenE4G where instead of lifting with liftInEnkuV liftInParamsV is used. It allows e. g. to use some tonality. For more information, please, refer to filterInParams.

overSoXSynthNGen2EPar :: FilePath -> Params -> Float -> Float -> String -> String -> IO () Source #

Generalized version of the overSoXSynthNGen2E where instead of lifting with liftInEnkuV liftInParamsV is used. It allows e. g. to use some tonality. For more information, please, refer to filterInParams.

overSoXSynthNGen2E4GSPar :: FilePath -> Params -> Float -> Float -> String -> String -> IO () Source #

Generalized version of the overSoXSynthNGen2E4GS where instead of lifting with liftInEnkuV liftInParamsV is used. It allows e. g. to use some tonality. For more information, please, refer to filterInParams.

overSoXSynthNGen2E4GPar :: FilePath -> Params -> Float -> Durations -> String -> IO () Source #

Generalized version of the overSoXSynthNGen2E4G where instead of lifting with liftInEnkuV liftInParamsV is used. It allows e. g. to use some tonality. For more information, please, refer to filterInParams.

overSoXSynthNGen3EPar :: FilePath -> Params -> Float -> Float -> Float -> String -> String -> String -> IO () Source #

Generalized version of the overSoXSynthNGen3E where instead of lifting with liftInEnkuV liftInParamsV is used. It allows e. g. to use some tonality. For more information, please, refer to filterInParams.

overSoXSynthNGen3E4GSPar :: FilePath -> Params -> Float -> Float -> Float -> String -> String -> String -> IO () Source #

Generalized version of the overSoXSynthNGen3E4GS where instead of lifting with liftInEnkuV liftInParamsV is used. It allows e. g. to use some tonality. For more information, please, refer to filterInParams.

overSoXSynthNGen3E4GPar :: FilePath -> Params -> Float -> Float -> Durations -> String -> String -> IO () Source #

Generalized version of the overSoXSynthNGen3E4G where instead of lifting with liftInEnkuV liftInParamsV is used. It allows e. g. to use some tonality. For more information, please, refer to filterInParams.

overSoXSynthNGen3E5GPar :: FilePath -> Params -> Float -> Float -> Durations -> String -> Intervals -> IO () Source #

Generalized version of the overSoXSynthNGen3E5G where instead of lifting with liftInEnkuV liftInParamsV is used. It allows e. g. to use some tonality. For more information, please, refer to filterInParams.

overSoXSynthNGen3E5GSPar :: FilePath -> Params -> Float -> Float -> Float -> String -> String -> Intervals -> String -> IO () Source #

Generalized version of the overSoXSynthNGen3E5GS where instead of lifting with liftInEnkuV liftInParamsV is used. It allows e. g. to use some tonality. For more information, please, refer to filterInParams.

overSoXSynthNGen3E6GPar :: FilePath -> Params -> Float -> Float -> Durations -> String -> Intervals -> Strengths -> Float -> IO () Source #

Generalized version of the overSoXSynthNGen3E6G where instead of lifting with liftInEnkuV liftInParamsV is used. It allows e. g. to use some tonality. For more information, please, refer to filterInParams.

overSoXSynthNGen3E6GSPar :: FilePath -> Params -> Float -> Float -> Durations -> String -> Intervals -> String -> Float -> IO () Source #

Generalized version of the overSoXSynthNGen3E6GS where instead of lifting with liftInEnkuV liftInParamsV is used. It allows e. g. to use some tonality. For more information, please, refer to filterInParams.

overSoXSynthNGen3E6GSuPar :: FilePath -> Params -> Float -> Float -> Float -> String -> Intervals -> String -> Float -> IO () Source #

Generalized version of the overSoXSynthNGen3E6GSu where instead of lifting with liftInEnkuV liftInParamsV is used. It allows e. g. to use some tonality. For more information, please, refer to filterInParams.