Mon Jan 10 12:42:02 EST 2011

Sawtooth generator

I have an interesting driver case for some DSP code generation.
Simple enough to understand, yet hard enough to implement in C due to
manual memory management.

What I want to do is to perform a proper model based design of a
differentiated piecewize polynomial sawtooth generator.

It has the following elements:
    - Ramp increment phasor (state)
    - Fractional part operator in phasor feedback loop
    - Nonlinear function evaluation (polynomial)
    - 2 cascaded differentiators (state + possible different implementations)

I just started writing in C and what I miss is:

  - Inspection of my code.  I.e. what is the actual transfer function
    graph, am I actually adding the right numbers, etc...  Doing this
    kind of design in C and having to set up a test suite in Pd,
    requiring recompile and restart is a real drag.

    I want to get the algorithm right and want to only worry about
    some ad-hoc C glue when I do the Pd testing.

  - Automatic allocation of filter state variables and loop iteration.
    This always comes back and should be quite straightforward to