hsc3-0.16: Haskell SuperCollider

Safe HaskellSafe
LanguageHaskell98

Sound.SC3.Server.Status

Contents

Description

Request and display status information from the synthesis server.

Synopsis

Documentation

extractStatusField :: Floating n => Int -> [Datum] -> n Source #

Get nth field of status as Floating.

statusFields :: [String] Source #

Names of status fields.

statusFormat :: [Datum] -> [String] Source #

Status pretty printer.

Query Group

type Query_Ctl = (Either String Int, Either Double Int) Source #

Name or index and value or bus mapping.

queryTree_ctl :: (Datum, Datum) -> Query_Ctl Source #

Control (parameter) data may be given as names or indices and as values or bus mappings.

queryTree_ctl (string "freq",float 440) == (Left "freq",Left 440.0)
queryTree_ctl (int32 1,string "c0") == (Right 1,Right 0)

queryTree_synth :: Bool -> Int -> String -> [Datum] -> (Query_Node, [Datum]) Source #

If rc is True then Query_Ctl data is expected (ie. flag was set at /g_queryTree). k is the synth-id, and nm the name.

let d = [int32 1,string "freq",float 440]
in queryTree_synth True 1000 "saw" d

queryTree :: [Datum] -> Query_Node Source #

Parse result of g_queryTree.

let r = [int32 1,int32 0,int32 2,int32 1,int32 1
        ,int32 100,int32 1
        ,int32 1000,int32 (-1),string "saw"
        ,int32 1,string "freq",float 440.0
        ,int32 2,int32 0]
in queryTree r

queryNode_to_group_seq :: Query_Node -> [Int] Source #

Extact sequence of group-ids from Query_Node.

queryTree_rt :: Query_Node -> Tree Query_Node Source #

Transform Query_Node to Tree.

putStrLn (T.drawTree (fmap query_node_pp (queryTree_rt (queryTree r))))
> 0
> |
> +- 1
> |  |
> |  `- 100
> |     |
> |     `- (1000,"saw","freq:440.0")
> |
> `- 2