notam02 / supercollider-plugin-tutorial

A tutorial on how to write SuperCollider plugins in C++
24 stars 3 forks source link

Minor discrepancies between tutorial and plugin code #5

Open jordanwhitede opened 2 months ago

jordanwhitede commented 2 months ago

This is in the pdf description of the private part of the class:

// State variables
// Ramp generator phase. Initialized to 0.0.
double m_phase{0.0};
// Ramp generator frequency. Uninitialized — remember to initialize in the const
float m_frequency;

And this is in the hpp file:

        // Calc function
    void next_a(int nSamples);
    void next_k(int nSamples);

        // Helper functions
        inline float progressPhasor(double phase, float frequency);

        // Parameter names corresponding to our argument indices
        enum Inputs { Frequency };

        // State variables
        double m_phase{0.0};
        float m_frequency; // will be initialized in the constructor

I assume that this was an update made to the code at some point but not to the pdf?

madskjeldgaard commented 2 months ago

Thanks for reporting, I think you're right !