hsc3-0.21: Haskell SuperCollider
Safe HaskellSafe-Inferred
LanguageHaskell2010

Sound.Sc3.Server.Graphdef.Text

Contents

Description

.scsyndef file encoded in plain text. There are reader and writer functions.

Synopsis

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.

print_graphdef :: Bool -> Graphdef -> String Source #

encode_graphdef_f of enc_text with optional semi-colon delimited comments.

dir = "/home/rohan/sw/rsc3-disassembler/scsyndef/"
pp nm = Sound.Sc3.Server.Graphdef.Io.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.

is_nil_or_comment :: String -> Bool Source #

Is line empty or starts with ';'

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"