|
|
|
|
|
|
Synopsis |
|
|
|
|
Duration
|
|
|
The duration (of a note, e. g).
|
|
|
Calculates the absolute duration by dividing the numerator with the denominator.
Because of rounding error this makes only sense if the result is a relative big
number.
|
|
|
| Methods | | | Instances | |
|
|
|
Constructors | | Instances | |
|
|
Music Notation
|
|
|
A Notation is a constant, tree-like structure that represents a musical
notation. It has a type parameter for flexible usage reasons.
| Constructors | Note Dur a | A note with given duration and a value of type a.
| Rest Dur | A rest with given duration.
| (Notation a) :+: (Notation a) | Sequential composition of two notations.
| (Notation a) :=: (Notation a) | Parallel composition of two notations.
| Stretch Dur (Notation a) | Stretches the duration of the sub-music by given factor.
|
| Instances | |
|
|
|
A Notation can be interpreted if the contained type is an
instance of class Musical.
|
|
|
|
Musical class
|
|
class Stretchable a where | Source |
|
A type/structure that can be stretched.
| | Methods | | | Instances | |
|
|
class Arrangeable a where | Source |
|
Types/structures that can be composed in two ways, parallel and sequent.
| | Methods | | | Instances | |
|
|
|
|
|
|
|
|
|
|
|
|
A sequence of sounds
|
|
|
A sequence of sounds that will be stretched to length=1
|
|
|
|
|
Composes the notations sequentially and stretches them proportionally.
|
|
Notation and Midi
|
|
|
A convenient function to write a set of midi notations to a synchronous MIDI-file.
NOTE: For unknown reasons not any Ticks value seemes to work. This function uses
96 Ticks per quarter.
|
|
|
A Notation MidiNote can be interpreted using runNotationWith and midi.
|
|
|
|
|
|
More Notation functions
|
|
|
Creates a note with length 1. Is a synonym for Note (1%1)
|
|
|
Notation is instance of the class Functor.
|
|
|
Notation is instance of the class Monad. Joining will replace
every (outer) Note by its contained (inner) Notation. The inner
Notation will be stretched by the duration of the (outer) Note.
|
|
|
Replaces any Note that contains Nothing by a rest (with same duration).
|
|
|
Calculates the (relative) duration of a Notation (Must be finite!).
|
|
|
Calculates the offset for each note.
|
|
|
Reverses a Notation (Must be finite!).
|
|
|
Takes the beginning of Notation, result has the given duration if possible or is shorter otherwise.
Notes that overlap with the end of duration are not taken but replaced by the (fitted) rests.
|
|
|
Drops the beginning of Notation. Notes that would be split are replaced by fitted rests.
|
|
|
Replaces notes where the predicate fails with rests.
filterNotation :: (a -> Bool) -> Notation a -> Notation a
|
|
|
|
|
A parallel composition of a sequence of values and a Notation
Each value of the sequence has the same given duration.
Every Note is updated by a function that gets the actual value of the sequence.
NOTE: This function is not tested yet!
|
|
Produced by Haddock version 2.4.2 |