Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
.scsyndef file encoded in plain text. There are reader and writer functions.
Synopsis
- print_string :: Ascii -> String
- enc_text :: (String -> String) -> Encode_Functions String
- print_graphdef :: Bool -> Graphdef -> String
- list_read_f :: (t -> u) -> State [t] u
- read_float :: (Fractional p, Read p) => String -> p
- text_get_f :: Get_Functions (StateT [String] Identity)
- read_graphdef :: String -> Graphdef
- read_graphdef_file :: FilePath -> IO Graphdef
Documentation
print_string :: Ascii -> String Source #
- Printer
Print string. Strings must not have internal whitespace or semi-colons. A quoting system could allow these if required.
enc_text :: (String -> String) -> Encode_Functions String Source #
Encode_Functions
for plain text output.
print_graphdef :: Bool -> Graphdef -> String Source #
encode_graphdef_f
of enc_text
with optional semi-colon delimited comments.
import Sound.Sc3.Server.Graphdef.Binary dir = "/home/rohan/sw/rsc3-disassembler/scsyndef/" pp nm = read_graphdef_file (dir ++ nm) >>= putStrLn . print_graphdef True pp "simple.scsyndef" pp "with-ctl.scsyndef" pp "mce.scsyndef" pp "mrg.scsyndef"
List Input
list_read_f :: (t -> u) -> State [t] u Source #
Read the next value from a list.
read_float :: (Fractional p, Read p) => String -> p Source #
Read function for floating point that admits inf and infinity.
text_get_f :: Get_Functions (StateT [String] Identity) Source #
Get_Functions for text representation of Graphdef.
read_graphdef :: String -> Graphdef Source #
Read text representation of Graphdef, as written by print_graphdef
.
read_graphdef "1396926310 0 1 simple 2 0.0 440.0 0 0 2 SinOsc 2 2 1 0 -1 1 -1 0 2 Out 2 2 0 0 -1 0 0 0"