Programmable real-time audio signal processing application
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

new_dsp.txt 2.9KB

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