hsc3-0.19.1: Haskell SuperCollider
Safe HaskellNone
LanguageHaskell2010

Sound.SC3.Server.NRT.Edit

Contents

Description

NRT operations.

Synopsis

List

insertBy_post :: (a -> a -> Ordering) -> a -> [a] -> [a] Source #

Inserts at the first position where it compares less but not equal to the next element.

import Data.Function
insertBy (compare `on` fst) (3,'x') (zip [1..5] ['a'..])
insertBy_post (compare `on` fst) (3,'x') (zip [1..5] ['a'..])

at_last :: (a -> b) -> (a -> b) -> [a] -> [b] Source #

Apply f at all but last element, and g at last element.

at_last (* 2) negate [1..4] == [2,4,6,-4]

NRT

nrt_merge :: NRT -> NRT -> NRT Source #

Merge two NRT scores. Retains internal nrt_end messages.

nrt_merge_set :: [NRT] -> NRT Source #

Merge a set of NRT. Retains internal nrt_end messages.

nrt_empty :: NRT Source #

The empty NRT.

nrt_insert_pre :: Bundle -> NRT -> NRT Source #

Add bundle at first permissable location of NRT.

nrt_insert_post :: Bundle -> NRT -> NRT Source #

Add bundle at last permissable location of NRT.

bundle_map :: (Time -> Time) -> ([Message] -> [Message]) -> Bundle -> Bundle Source #

Apply temporal and message functions to bundle.

nrt_close :: NRT -> NRT Source #

Delete any internal nrt_end messages, and require one at the final bundle.

nrt_append :: NRT -> NRT -> NRT Source #

Append q to p, assumes last timestamp at p precedes first at q.