Copyright | (c) David Janin, 2017 |
---|---|
License | see the LICENSE file in the distribution |
Maintainer | janin@labri.fr |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
This module extends midi data types with adhoc parameters.
- data Pattern = Pattern {}
- rescale :: Pattern -> Int -> Int -> Pattern
- density :: Integer -> Pattern -> Pattern
- interpolate :: Integer -> [Int] -> Integer -> Int
- makeRythmPattern :: Fractional d => Pattern -> d -> [d]
- randomPermute :: [t] -> [t]
- dodecaphonicMode :: Num t => () -> [t]
- larUpdate :: Eq a => [a] -> a -> [a]
- cutLast :: [t] -> [t]
- larPc :: (Integral a, Num a, Eq a) => [a] -> [a] -> [a]
- data ScaleS a = ScaleS [a] (a, ScaleType)
- majorC :: ScaleS MidiPitch
- pentatonicC :: ScaleS Integer
- minorC :: ScaleS Integer
- indianC :: ScaleS Integer
- toneC :: ScaleS Integer
- betweenC :: ScaleS Integer
- diminished1C :: ScaleS Integer
- diminished2C :: ScaleS Integer
- chromaticC :: ScaleS Integer
- scaleS :: (Integral a, Num a) => a -> ScaleS a -> ScaleS a
- generateAllKeys :: (Functor f, Integral a) => f (ScaleS a) -> f [ScaleS a]
- allKeys :: [ScaleS MidiPitch]
- getCompatibleKeys :: [MidiPitch] -> [(MidiPitch, ScaleType)]
- changeKey :: (PitchClass, ScaleType, [MidiPitch]) -> (PitchClass, ScaleType)
- scaleDist :: [MidiPitch] -> [MidiPitch] -> Int
- pcDist :: PitchClass -> PitchClass -> Int
- pcstDist :: (PitchClass, ScaleType) -> (PitchClass, ScaleType) -> Int
- pcstOrd :: (PitchClass, ScaleType) -> (PitchClass, ScaleType) -> (PitchClass, ScaleType) -> Ordering
Documentation
Pattern of bounded integers with explicit (dynamic) bounds
density :: Integer -> Pattern -> Pattern Source #
Linear interpolation of pattern to change its length
makeRythmPattern :: Fractional d => Pattern -> d -> [d] Source #
randomPermute :: [t] -> [t] Source #
dodecaphonicMode :: Num t => () -> [t] Source #
Some basic functions handling lastest appeareance record (LAR) and key detection from augmented fifth detection
larPc :: (Integral a, Num a, Eq a) => [a] -> [a] -> [a] Source #
update the LAR by the arrival of a list of new element
update the LAR by the arrival of a list of pitches, read as pitch classes (modulo 12)
Scales generators
generateAllKeys :: (Functor f, Integral a) => f (ScaleS a) -> f [ScaleS a] Source #
Generates a sorted lists of all pitches in a every given keys
allKeys :: [ScaleS MidiPitch] Source #
All keys and scales among which the computer may choose when analyzing the input
getCompatibleKeys :: [MidiPitch] -> [(MidiPitch, ScaleType)] Source #
Gets keys that are compatible with an LAR sorted list of last pitches
changeKey :: (PitchClass, ScaleType, [MidiPitch]) -> (PitchClass, ScaleType) Source #
Changes key according to previous key and an LAR sorted list of last pitches
scaleDist :: [MidiPitch] -> [MidiPitch] -> Int Source #
Distance between scale seen as ordered pitch classes (from 0 to 11)
pcDist :: PitchClass -> PitchClass -> Int Source #
Distance between pitchclesses seen as keys
pcstDist :: (PitchClass, ScaleType) -> (PitchClass, ScaleType) -> Int Source #
Distance between scales
pcstOrd :: (PitchClass, ScaleType) -> (PitchClass, ScaleType) -> (PitchClass, ScaleType) -> Ordering Source #
Partial ordering of scales with respect to a given scale