Browse Source

doc/new_dsp.txt : Initial commit.

master
kevin 8 years ago
parent
commit
daed9ab3a3
1 changed files with 124 additions and 0 deletions
  1. 124
    0
      doc/new_dsp.txt

+ 124
- 0
doc/new_dsp.txt View File

@@ -0,0 +1,124 @@
1
+
2
+
3
+
4
+
5
+
6
+ain   audio_in chs:2  gain:[.5 .3]
7
+lpf   bquad    chs:2  type:[lpf hpf] fc:100 Q:3.2
8
+aout  audio_out chs:2 gain:.4
9
+
10
+
11
+igain.val ->  gain.ain
12
+
13
+ain.out -> in.lpf.out -> in.aout
14
+                      -> in.oscope
15
+
16
+
17
+
18
+ain.out[0] -> [0].in.lpf.out ->in.aout
19
+
20
+
21
+Built-in Data Types:
22
+--------------------
23
+bool
24
+int
25
+uint
26
+float
27
+double
28
+symbol
29
+string
30
+
31
+boolM
32
+intM
33
+uintM
34
+floatM
35
+doubleM
36
+symbolM
37
+stringM
38
+
39
+function
40
+
41
+array   : mixed type arrays 
42
+struct  : user definable structures
43
+
44
+
45
+Support Functions:
46
+copy()
47
+toString()
48
+fromString()
49
+Math Op's.
50
+String Op's.
51
+Custom ops of the form: function( const struct* inputs, struct* outputs ).  
52
+
53
+
54
+
55
+Functions:
56
+----------
57
+List of named inputs and outputs, implemented according to the
58
+above data types, along with known functions:
59
+
60
+Constructor()  : Allocate object based on resource struct.
61
+Destructor()   : Release object.
62
+Setup()        : Determine runtime configuration based on input types.
63
+Exec()         : Audio rate execution.
64
+SetInput()     : Control rate updates.
65
+GetValue()     : Query state values.
66
+StoreState()   : Store the current state of the object as a preset.
67
+RestoreState() : Recall a previously stored preset.
68
+
69
+
70
+User Interface:
71
+---------------
72
+The user interface is formed by instantiating user interface
73
+elements for function inputs.  In this way most user interface
74
+elements do not have to be explicitely connected because they
75
+are inherently connected.  This does not preclude either
76
+connecting the same control to other functions or the use
77
+of UI-only functions.
78
+
79
+
80
+Sub-Programs:
81
+-------------
82
+
83
+
84
+
85
+Generic System Changes:
86
+-----------------------
87
+1) Error handling:
88
+  - Use a predefined set of generic error codes with the possiblity of
89
+  adding custom codes.
90
+
91
+  - Use a generic error handler macro which jumps to 'errLabel' on fail.
92
+    cmErrTry( err, rc, function_returning_error_code() )
93
+    cmErrTryMsg( err, rc, function_returning_error_code(), "Error msg  %i ", value );
94
+
95
+
96
+  - Global functions, (i.e, those functions which do not have a manager) should
97
+    take optional error object points.  These functions include memory mgmt,
98
+    file mgmt, text mgmt, ...
99
+
100
+2) Develop a transparent, multi-dimensional, matrix class.
101
+
102
+3) cmCtx_t extensions.
103
+  - The cmCtx_t context should be considered a singleton global object, whose
104
+  life extends for the entire program.  This will eliminate needing to duplicate
105
+  the context.
106
+
107
+  - Possibly add a JSON tree to pass global program cfg. information.
108
+
109
+4) Simplify the low level processing object design.
110
+  - Eliminate the alternative cmCtx type and use the cmCtx_t class.
111
+  - Eliminate the distinction between allocation and initialization.
112
+
113
+5) Make use of thread local memory for allocating scratch memory
114
+   which does not need to be deleted.
115
+
116
+6) Add a cmMemPrintf() function to create dynamcially allocated formatted strings.
117
+
118
+7) Figure out the text encoding thing.
119
+
120
+8) Eliminate the cmXXXIsValid() function - this can be provided
121
+   by a generic function (or macro).
122
+
123
+9) Make the documentation work from the start.
124
+

Loading…
Cancel
Save