




ain   audio_in chs:2  gain:[.5 .3]
lpf   bquad    chs:2  type:[lpf hpf] fc:100 Q:3.2
aout  audio_out chs:2 gain:.4


igain.val ->  gain.ain

ain.out -> in.lpf.out -> in.aout
                      -> in.oscope



ain.out[0] -> [0].in.lpf.out ->in.aout


Built-in Data Types:
--------------------
bool
int
uint
float
double
symbol
string

boolM
intM
uintM
floatM
doubleM
symbolM
stringM

function

array   : mixed type arrays 
struct  : user definable structures


Support Functions:
copy()
toString()
fromString()
Math Op's.
String Op's.
Custom ops of the form: function( const struct* inputs, struct* outputs ).  



Functions:
----------
List of named inputs and outputs, implemented according to the
above data types, along with known functions:

Constructor()  : Allocate object based on resource struct.
Destructor()   : Release object.
Setup()        : Determine runtime configuration based on input types.
Exec()         : Audio rate execution.
SetInput()     : Control rate updates.
GetValue()     : Query state values.
StoreState()   : Store the current state of the object as a preset.
RestoreState() : Recall a previously stored preset.


User Interface:
---------------
The user interface is formed by instantiating user interface
elements for function inputs.  In this way most user interface
elements do not have to be explicitely connected because they
are inherently connected.  This does not preclude either
connecting the same control to other functions or the use
of UI-only functions.


Sub-Programs:
-------------



Generic System Changes:
-----------------------
1) Error handling:
  - Use a predefined set of generic error codes with the possiblity of
  adding custom codes.

  - Use a generic error handler macro which jumps to 'errLabel' on fail.
    cmErrTry( err, rc, function_returning_error_code() )
    cmErrTryMsg( err, rc, function_returning_error_code(), "Error msg  %i ", value );


  - Global functions, (i.e, those functions which do not have a manager) should
    take optional error object points.  These functions include memory mgmt,
    file mgmt, text mgmt, ...

2) Develop a transparent, multi-dimensional, matrix class.

3) cmCtx_t extensions.
  - The cmCtx_t context should be considered a singleton global object, whose
  life extends for the entire program.  This will eliminate needing to duplicate
  the context.

  - Possibly add a JSON tree to pass global program cfg. information.

4) Simplify the low level processing object design.
  - Eliminate the alternative cmCtx type and use the cmCtx_t class.
  - Eliminate the distinction between allocation and initialization.

5) Make use of thread local memory for allocating scratch memory
   which does not need to be deleted.

6) Add a cmMemPrintf() function to create dynamcially allocated formatted strings.

7) Figure out the text encoding thing.

8) Eliminate the cmXXXIsValid() function - this can be provided
   by a generic function (or macro).

9) Make the documentation work from the start.

