tcalculus-1.0.0: A DSL prototype for structured realtime/reactive functional programing

Copyright(c) David Janin, 2017
Licensesee the LICENSE file in the distribution
Maintainerjanin@labri.fr
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

TScore.MidiPlus

Contents

Description

This module extends midi data types with adhoc parameters.

Synopsis

Documentation

data Pattern Source #

Pattern of bounded integers with explicit (dynamic) bounds

Constructors

Pattern 

Fields

rescale :: Pattern -> Int -> Int -> Pattern Source #

Rescales the value of a given pattern

density :: Integer -> Pattern -> Pattern Source #

Linear interpolation of pattern to change its length

interpolate :: Integer -> [Int] -> Integer -> Int Source #

Linear interpolation of integers in list

randomPermute :: [t] -> [t] Source #

dodecaphonicMode :: Num t => () -> [t] Source #

Some basic functions handling lastest appeareance record (LAR) and key detection from augmented fifth detection

larUpdate :: Eq a => [a] -> a -> [a] Source #

Update the LAR by the arrival of a new element

cutLast :: [t] -> [t] Source #

Cuts the last element of a list

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)

data ScaleS a Source #

Scales generators

Constructors

ScaleS [a] (a, ScaleType) 

Instances

Functor ScaleS Source # 

Methods

fmap :: (a -> b) -> ScaleS a -> ScaleS b #

(<$) :: a -> ScaleS b -> ScaleS a #

Eq a => Eq (ScaleS a) Source # 

Methods

(==) :: ScaleS a -> ScaleS a -> Bool #

(/=) :: ScaleS a -> ScaleS a -> Bool #

Ord a => Ord (ScaleS a) Source # 

Methods

compare :: ScaleS a -> ScaleS a -> Ordering #

(<) :: ScaleS a -> ScaleS a -> Bool #

(<=) :: ScaleS a -> ScaleS a -> Bool #

(>) :: ScaleS a -> ScaleS a -> Bool #

(>=) :: ScaleS a -> ScaleS a -> Bool #

max :: ScaleS a -> ScaleS a -> ScaleS a #

min :: ScaleS a -> ScaleS a -> ScaleS a #

Show a => Show (ScaleS a) Source # 

Methods

showsPrec :: Int -> ScaleS a -> ShowS #

show :: ScaleS a -> String #

showList :: [ScaleS a] -> ShowS #

scaleS :: (Integral a, Num a) => a -> ScaleS a -> ScaleS a Source #

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