Safe Haskell | None |
---|---|
Language | Haskell2010 |
- densityToDurations :: Density -> [(Weight, Duration)]
- relativeWeights :: [(Weight, Interval)]
- intervalWeights :: PitchClass -> [Interval] -> [(Weight, PitchClass)]
- semiChordWeights :: PitchClass -> SemiChord -> [(Weight, PitchClass)]
- mergeWeights :: Eq a => [(Weight, a)] -> [(Weight, a)] -> [(Weight, a)]
- inScale :: PitchClass -> [Interval] -> Constraint PitchClass
- beamSelector :: (Eq a, Enum a) => Double -> Accessor st s a -> Selector a a
- getDistributions :: (Eq a, Enum a) => a -> Double -> [(Weight, a)] -> [(Weight, a)]
- stripList :: [(Weight, a)] -> [a]
- genAspect :: (Eq a, Enum a) => Accessor GenState a a -> a -> Int -> Double -> [(Weight, a)] -> MusicGenerator () [a]
- diatonicPhrase :: Duration -> Density -> PitchClass -> [Interval] -> SemiChord -> [(Int, Octave)] -> MusicGenerator () MusicCore
- diatonicMelody :: GenConfig -> MusicGenerator () MusicCore
- melodyInC :: MusicGenerator () MusicCore
- randomMelody :: MusicGenerator () MusicCore
- phraseLength :: Density -> IO Duration
- pauseLength :: IO Duration
- fromDistribution :: [(Int, a)] -> IO a
- chordalTimeline :: Music SemiChord -> [(SemiChord, Duration)]
- getTimeline :: [(Maybe a, Duration)] -> Duration -> [(a, Duration)]
- trimToLength :: Duration -> [Duration] -> [Duration]
- boundedRhythm :: Duration -> Density -> MusicGenerator () [Duration]
- concatM :: Monad m => [m [a]] -> m [a]
Documentation
densityToDurations :: Density -> [(Weight, Duration)] Source #
Sample weights for note durations during a cerain density
relativeWeights :: [(Weight, Interval)] Source #
Weights table containing the relative importance
of all
possible intervals
intervalWeights :: PitchClass -> [Interval] -> [(Weight, PitchClass)] Source #
Get the relative note importance
from a certain scale using
the global weights table
semiChordWeights :: PitchClass -> SemiChord -> [(Weight, PitchClass)] Source #
inScale :: PitchClass -> [Interval] -> Constraint PitchClass Source #
Constraint that requires all generated notes to be in a certain scale
beamSelector :: (Eq a, Enum a) => Double -> Accessor st s a -> Selector a a Source #
Note selector that generates a distribution based on the last note that was generated
genAspect :: (Eq a, Enum a) => Accessor GenState a a -> a -> Int -> Double -> [(Weight, a)] -> MusicGenerator () [a] Source #
diatonicPhrase :: Duration -> Density -> PitchClass -> [Interval] -> SemiChord -> [(Int, Octave)] -> MusicGenerator () MusicCore Source #
Generate a diatonic phrase. Strictly speaking, the generated melodies don't have to be diatonic, as any possible scale can be given to function as the generator's basis
diatonicMelody :: GenConfig -> MusicGenerator () MusicCore Source #
Generate a diatonic melody over a given chord progression. This is done by generating separate phrases that are linked together with a rest in between. The phraseses are aware of the chord they are over, so that they will use notes from the current chord with a higher probability.
melodyInC :: MusicGenerator () MusicCore Source #
phraseLength :: Density -> IO Duration Source #
Generate a (random) length for a phrase. A higher density will result in phrases with more notes allowed, in order to enforce that the average high density phrase will take roughly the same amount of time as the average low density phrase.
pauseLength :: IO Duration Source #
Choose a random rest length
fromDistribution :: [(Int, a)] -> IO a Source #
Generate an element from a distribution
chordalTimeline :: Music SemiChord -> [(SemiChord, Duration)] Source #
Convert a sequential piece of music to a timeline, containing pairs of all musical elements in the piece with the point in time they occur on
getTimeline :: [(Maybe a, Duration)] -> Duration -> [(a, Duration)] Source #
Convert a list of musical elements and durations to a list of all elements and the absolute point in time they occur on.
trimToLength :: Duration -> [Duration] -> [Duration] Source #
Trim a generated rhythm sequence to a certain length.
boundedRhythm :: Duration -> Density -> MusicGenerator () [Duration] Source #
Generate a rythm piece with a maximum length.