Portability | non-portable (TF,GNTD) |
---|---|
Stability | experimental |
Maintainer | hans@hanshoglund.se |
Safe Haskell | None |
- type Transformable a = (Stretchable a, Delayable a)
- following :: (HasOffset a, Delayable b, HasOnset b) => a -> b -> b
- preceding :: (Delayable a, HasOffset a, HasOnset b) => a -> b -> a
- during :: (Delayable a, Stretchable a, HasOnset a, HasDuration a, HasOnset b, HasDuration b) => a -> b -> a
- (|>) :: (Semigroup a, HasOnset a, HasOffset a, Delayable a) => a -> a -> a
- (>|) :: (Semigroup a, HasOnset a, HasOffset a, Delayable a) => a -> a -> a
- (<|) :: (Semigroup a, HasOnset a, HasOffset a, Delayable a) => a -> a -> a
- scat :: (Monoid' a, HasOnset a, HasOffset a, Delayable a) => [a] -> a
- pcat :: Monoid' a => [a] -> a
- sustain :: (Semigroup a, Stretchable a, HasDuration a, Fractional d, d ~ Duration) => a -> a -> a
- anticipate :: (Semigroup a, Transformable a, HasOnset a, HasOffset a, Ord d, d ~ Duration) => d -> a -> a -> a
- times :: (Monoid' a, Transformable a, HasOnset a, HasOffset a) => Int -> a -> a
- repeated :: (Monoid' b, Transformable b, HasOnset b, HasOffset b) => [a] -> (a -> b) -> b
- group :: (Monoid' a, Transformable a, Fractional d, d ~ Duration, HasOnset a, HasOffset a) => Int -> a -> a
Prerequisites
type Transformable a = (Stretchable a, Delayable a)Source
This pseudo-class gathers the restrictions needed to implement position a value at any point and duration in time.
Juxtaposing values
following :: (HasOffset a, Delayable b, HasOnset b) => a -> b -> bSource
a `following` b
moves score b so that its onset is at the offset of score
a and returns the moved score.
preceding :: (Delayable a, HasOffset a, HasOnset b) => a -> b -> aSource
a `preceding` b
moves score a so that its offset is at the onset of score
b and returns the moved score.
during :: (Delayable a, Stretchable a, HasOnset a, HasDuration a, HasOnset b, HasDuration b) => a -> b -> aSource
a `during` b
places a at the same era as b and returns the moved score.
Composing values
scat :: (Monoid' a, HasOnset a, HasOffset a, Delayable a) => [a] -> aSource
Sequential catenation.
[Score a] -> Score a
Special composition
sustain :: (Semigroup a, Stretchable a, HasDuration a, Fractional d, d ~ Duration) => a -> a -> aSource
Like <>
, but scaling the second agument to the duration of the first.
Score a -> Score a -> Score a
anticipate :: (Semigroup a, Transformable a, HasOnset a, HasOffset a, Ord d, d ~ Duration) => d -> a -> a -> aSource
Like |>
but with a negative delay on the second element.
Duration -> Score a -> Score a -> Score a
Repetition
times :: (Monoid' a, Transformable a, HasOnset a, HasOffset a) => Int -> a -> aSource
Repeat exact amount of times.
Duration -> Score Note -> Score Note
repeated :: (Monoid' b, Transformable b, HasOnset b, HasOffset b) => [a] -> (a -> b) -> bSource
Repeat once for each element in the list.
Example:
repeated [1,2,1] (c^*)
Simple type:
[a] -> (a -> Score Note) -> Score Note
group :: (Monoid' a, Transformable a, Fractional d, d ~ Duration, HasOnset a, HasOffset a) => Int -> a -> aSource
Repeat a number of times and scale down by the same amount.
Duration -> Score a -> Score a