-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Helps to create experimental music. Uses SoX inside.
--
-- Uses SoX fade (in a special 2D way) and frequency modulation. Provides
-- a special representation for the composition.
@package algorithmic-composition-frequency-shift
@version 0.1.0.0
-- | Helps to create experimental music. Uses SoX fade (in a special 2D
-- way) effect and frequency modulation. 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. Is rewritten from the
-- dobutokO4 package.
module Composition.Sound.Faded
-- | 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.
overChangeVolGNC :: String -> FilePath -> String -> String -> Int -> Float -> Float -> Float -> Float -> ((Float, Float), (Float, Float)) -> IO ()
-- | A generalized version of the overChangeVolG with a possibility
-- to specify the name of the resulting file (by default it is "test"
-- based).
overChangeVolGN :: FilePath -> String -> String -> Int -> Float -> Float -> Float -> Float -> ((Float, Float), (Float, Float)) -> IO ()
-- | 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.
overChangeVolG :: String -> String -> Int -> Float -> Float -> Float -> Float -> ((Float, Float), (Float, Float)) -> IO ()
-- | 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.
overChangeVolGC :: String -> String -> Int -> Float -> Float -> Float -> Float -> (Float, Float) -> (Float, Float) -> IO ()
-- | 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).
overChangeVolGF :: String -> String -> Int -> Float -> Float -> (Float, Float) -> (Float, Float) -> Float -> Float -> IO ()
-- | 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.
overChangeVol :: String -> Char -> Int -> Float -> Float -> Float -> ((Float, Float), (Float, Float)) -> IO ()
-- | 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.
overChangeVolC :: String -> Char -> Int -> Float -> Float -> Float -> (Float, Float) -> (Float, Float) -> IO ()
-- | 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).
overChangeVolF :: String -> Char -> Int -> Float -> Float -> (Float, Float) -> (Float, Float) -> Float -> IO ()
-- | A generalized version of the overChangeVolGC with a possibility
-- to specify the name for the mixed files (by default is "test" based).
overChangeVolGCN :: FilePath -> String -> String -> Int -> Float -> Float -> Float -> Float -> (Float, Float) -> (Float, Float) -> IO ()
-- | A generalized version of the overChangeVolGF 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 ()
-- | A generalized version of the overChangeVol 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 ()
-- | A generalized version of the overChangeVolC 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 ()
-- | A generalized version of the overChangeVolF 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 ()
-- | 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.
mixGTest :: String -> IO ()
-- | A generalized version of the mixGTest with a possibility to
-- specify the name for the mixed files (by default is "test" based).
mixGTestN :: FilePath -> String -> IO ()
-- | A generalized version of the basicF with a possibility to
-- specify the name for the generated files (by default is "test" based).
basicFN :: FilePath -> String -> String -> Float -> Float -> Float -> Float -> (Float -> Float) -> [Float] -> IO ()
-- | 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.
basicF :: String -> String -> Float -> Float -> Float -> Float -> (Float -> Float) -> [Float] -> IO ()
-- | 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).
basicFC :: String -> Float -> Float -> Float -> Float -> (Float -> Float) -> [Float] -> IO ()
-- | 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.
basicF2 :: String -> String -> Float -> Float -> Float -> Float -> Float -> (Float -> Float) -> [Float] -> IO ()
-- | 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).
basicF2C :: String -> Float -> Float -> Float -> Float -> Float -> (Float -> Float) -> [Float] -> IO ()
-- | A generalized version of the basicFC with a possibility to
-- specify the name for the mixed files (by default is "test" based).
basicFCN :: FilePath -> String -> Float -> Float -> Float -> Float -> (Float -> Float) -> [Float] -> IO ()
-- | A generalized version of the basicF2 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) -> [Float] -> IO ()
-- | A generalized version of the basicF2C 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) -> [Float] -> IO ()
-- | 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.
moreFNC :: String -> FilePath -> String -> String -> Float -> Float -> Float -> Float -> Float -> (Float -> Float) -> [Float] -> IO ()
-- | A generalized version of the basicFN with a frequency
-- modulation.
moreFN :: FilePath -> String -> String -> Float -> Float -> Float -> Float -> Float -> (Float -> Float) -> [Float] -> IO ()
-- | A generalized version of the basicFCN with a frequency
-- modulation.
moreFCN :: FilePath -> String -> Float -> Float -> Float -> Float -> Float -> (Float -> Float) -> [Float] -> IO ()
-- | 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.
reverbFix :: FilePath -> IO ()
-- | A simplified variant of the soxBasicParameters function with
-- defining only a file extension.
endingWF :: String -> String
-- | 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.
charFadeType :: Char -> String
-- | Splits its argument (the first six symbols if present) (like
-- splitAt) into two String with the length of (if
-- possible) 4 and 2 characters. The rest of the argument is not used.
argString :: String -> (String, String)
freqChange :: String -> Float -> Float -> String
-- | Approximately equals to 2 ** (1/48) if the argument is zero (0) and
-- the inverse value otherwise.
sameConst :: Int -> Float
-- | Helps to create experimental music. This module contains different
-- representations for the data. Is rewritten from the dobutokO4 package.
module Composition.Sound.Presentation
-- | An Int parameter is an index of the SoundI sound file in
-- the sorted in the ascending order Vector of them (the
-- corresponding files or their names) representing the whole
-- composition.
data SoundI
Si :: Int -> Float -> Float -> OvertonesO -> SoundI
SAi :: Int -> Float -> Float -> Float -> OvertonesO -> SoundI
SAbi :: Int -> Float -> Float -> Float -> OvertonesO -> SoundI
-- | An FilePath parameter is a name of the sound file in the
-- current directory with the filetype (supported by SoX) being given by
-- String representing the whole composition.
data SoundFN
Sn :: FilePath -> String -> Float -> Float -> SoundFN
SAn :: FilePath -> String -> Float -> Float -> Float -> SoundFN
SAbn :: FilePath -> String -> Float -> Float -> Float -> SoundFN
-- | The first Float parameter is a time moment (starting from 0) of
-- the playing the sound being represented by OvertonesO, the
-- second one is its duration. The third one is its maximum amplitude by
-- an absolute value. The fourth one is the minimum duration that can
-- provide a needed human feeling of perception (some impression) for the
-- sound. The further one(s) is(are) some adjustment(s) parameter(s).
data SoundT
StO :: Float -> Float -> Float -> Float -> OvertonesO -> SoundT
SAtO :: Float -> Float -> Float -> Float -> Float -> OvertonesO -> SoundT
SAbtO :: Float -> Float -> Float -> Float -> Float -> OvertonesO -> SoundT
-- | The first Float parameter is a time moment (starting from 0) of
-- the playing the sound, the second one is its duration in seconds (with
-- a negative values corresponding to the pause duration --- the silent
-- "sound"), the third one is the minimum duration that can provide a
-- needed human feeling of perception (some impression) for the sound.
data Timity
Time :: Float -> Float -> Float -> Timity
-- | The first Float parameter is a time moment (starting from 0) of
-- the playing the sound, the second one is its duration in seconds (with
-- a negative values corresponding to the pause duration --- the silent
-- "sound"), the third one is a parameter to specify more complex
-- behaviour for the sound.
data Timity1 a
Time1 :: Float -> Float -> a -> Timity1 a
-- | Float interval representation with no order of the arguments
-- preserved.
data IntervalTim
Empty :: IntervalTim
I :: Float -> Float -> IntervalTim
UniversalI :: IntervalTim
-- | Another Float interval representation with no order of the
-- arguments preserved. Since base-4.9.0.0 has different instance of
-- Semigroup than IntervalTim.
data IntervalTimI
Empty2 :: IntervalTimI
II :: Float -> Float -> IntervalTimI
UniversalII :: IntervalTimI
-- | Generalized interval representation.
data IntervalG a b
IG :: a -> b -> IntervalG a b
-- | Generalized interval representation which is a Monoid instance.
data IntervalMG a
IMG :: a -> a -> IntervalMG a
UniversalG :: IntervalMG a
instance GHC.Classes.Eq Composition.Sound.Presentation.SoundI
instance GHC.Classes.Eq Composition.Sound.Presentation.SoundFN
instance GHC.Classes.Eq Composition.Sound.Presentation.SoundT
instance GHC.Classes.Eq Composition.Sound.Presentation.Timity
instance GHC.Show.Show Composition.Sound.Presentation.SoundTim
instance GHC.Classes.Ord Composition.Sound.Presentation.SoundTim
instance GHC.Classes.Eq Composition.Sound.Presentation.SoundTim
instance (GHC.Classes.Ord a, GHC.Classes.Ord b) => GHC.Classes.Ord (Composition.Sound.Presentation.IntervalG a b)
instance (GHC.Classes.Eq a, GHC.Classes.Eq b) => GHC.Classes.Eq (Composition.Sound.Presentation.IntervalG a b)
instance GHC.Classes.Ord a => GHC.Classes.Ord (Composition.Sound.Presentation.IntervalMG a)
instance GHC.Classes.Eq a => GHC.Classes.Eq (Composition.Sound.Presentation.IntervalMG a)
instance GHC.Show.Show a => GHC.Show.Show (Composition.Sound.Presentation.IntervalMG a)
instance GHC.Base.Semigroup (Composition.Sound.Presentation.IntervalMG a)
instance GHC.Base.Monoid (Composition.Sound.Presentation.IntervalMG a)
instance (GHC.Show.Show a, GHC.Show.Show b) => GHC.Show.Show (Composition.Sound.Presentation.IntervalG a b)
instance GHC.Base.Semigroup (Composition.Sound.Presentation.IntervalG a b)
instance GHC.Base.Functor (Composition.Sound.Presentation.IntervalG a)
instance Data.Bifunctor.Bifunctor Composition.Sound.Presentation.IntervalG
instance GHC.Classes.Eq Composition.Sound.Presentation.IntervalTimI
instance GHC.Classes.Ord Composition.Sound.Presentation.IntervalTimI
instance GHC.Show.Show Composition.Sound.Presentation.IntervalTimI
instance GHC.Base.Semigroup Composition.Sound.Presentation.IntervalTimI
instance GHC.Base.Monoid Composition.Sound.Presentation.IntervalTimI
instance GHC.Classes.Eq Composition.Sound.Presentation.IntervalTim
instance GHC.Classes.Ord Composition.Sound.Presentation.IntervalTim
instance GHC.Show.Show Composition.Sound.Presentation.IntervalTim
instance GHC.Base.Semigroup Composition.Sound.Presentation.IntervalTim
instance GHC.Base.Monoid Composition.Sound.Presentation.IntervalTim
instance GHC.Classes.Eq a => GHC.Classes.Eq (Composition.Sound.Presentation.Timity1 a)
instance GHC.Classes.Ord a => GHC.Classes.Ord (Composition.Sound.Presentation.Timity1 a)
instance GHC.Show.Show a => GHC.Show.Show (Composition.Sound.Presentation.Timity1 a)
instance GHC.Base.Functor Composition.Sound.Presentation.Timity1
instance GHC.Base.Semigroup a => GHC.Base.Semigroup (Composition.Sound.Presentation.Timity1 a)
instance GHC.Classes.Ord Composition.Sound.Presentation.Timity
instance GHC.Show.Show Composition.Sound.Presentation.Timity