Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Translations of some functions from https://github.com/nosuchtim/keykit/blob/master/lib/basic1.k
Synopsis
- phrase_arpeggio :: Phrase t -> Phrase t
- phrase_echo :: Ord t => Phrase t -> Int -> Time -> Phrase t
- phrase_step :: Phrase t -> Duration -> Phrase t
- phrase_shuffle :: Phrase t -> Phrase t
Documentation
phrase_arpeggio :: Phrase t -> Phrase t Source #
Returns an arpeggiated version of the phrase. One way of describing desc it is that all the notes have been separated and then put back together, back-to-back.
phrase_arpeggio (wseq_to_phrase (zip (repeat (0,1)) [60, 64, 67]))
phrase_echo :: Ord t => Phrase t -> Int -> Time -> Phrase t Source #
Return phrase ph echoed num times, with rtime delay between each echo.
phrase_step :: Phrase t -> Duration -> Phrase t Source #
Convert a phrase to be in step time, ie. all notes with the same spacing and duration. Overlapped notes (no matter how small the overlap) are played at the same time.
phrase_step (wseq_to_phrase [((0, 1), 60), ((5, 2), 64), ((23, 3), 67)]) 1
phrase_shuffle :: Phrase t -> Phrase t Source #
This function takes a phrase, splits in in 2 halves (along time) and shuffles the result (ie. first a note from the first half, then a note from the second half, etc.). The timing of the original phrase is applied to the result.
phrase_to_wseq (phrase_shuffle (useq_to_phrase (1,[1..9])))