Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Enumeration of SC3 server commands.
Synopsis
- type SC3_Command = String
- sc3_cmd_enumeration :: [(SC3_Command, Int)]
- sc3_cmd_number :: SC3_Command -> Maybe Int
- known_sc3_cmd :: SC3_Command -> Bool
- async_cmds :: [SC3_Command]
- isAsync :: Message -> Bool
- partition_async :: [Message] -> ([Message], [Message])
- b_info_fields :: [(String, String)]
- n_info_fields :: [(String, String, String)]
Documentation
type SC3_Command = String Source #
SC3 server commands are strings.
sc3_cmd_enumeration :: [(SC3_Command, Int)] Source #
Enumerate server command numbers.
sc3_cmd_number :: SC3_Command -> Maybe Int Source #
Lookup command number in sc3_cmd_enumeration
.
map sc3_cmd_number ["/b_alloc","/s_new"] == [Just 28,Just 9]
known_sc3_cmd :: SC3_Command -> Bool Source #
isJust
of sc3_cmd_number
.
async_cmds :: [SC3_Command] Source #
List of asynchronous server commands, ie. commands that reply with /done
.
isAsync :: Message -> Bool Source #
True
if Message
is an asynchronous Message
.
import Sound.Sc3 map isAsync [b_close 0,n_set1 0 "0" 0,status] == [True,False,False]
partition_async :: [Message] -> ([Message], [Message]) Source #
Asynchronous commands are at the left. This function should preserve the ordering of both branches.
partition_async [b_close 0,n_set1 0 "0" 0]
b_info_fields :: [(String, String)] Source #
Types & names for b_info
message fields.