Giter Club home page Giter Club logo

example-plugins's People

Contributors

cianoc avatar dyfer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

example-plugins's Issues

Future ugens

Won't get around to these for a while, but here are my plans for future examples:

  • MultiOutUGen
  • RGen
  • PV and FFT analysis
  • Demand rate
  • RT/NRT communication
  • DefineUnitCmd
  • Wavetables

[FR] AnalogEcho in the style of the new wrapper

Hi!
First of all thanks so much for these examples. They are a really great resource when learning about plugins!

I am writing a plugin using the "new" wrapper style based on the AnalogEcho example and most of the code is easily translatable to the new style but I cannot figure out how to set the calculcation function to the output clear function:

    if (unit->buf == NULL) {
        // Avoid retaining AnalogEcho_next as the calculation function.
        SETCALC(ft->fClearUnitOutputs);
        ClearUnitOutputs(unit, 1);

        if(unit->mWorld->mVerbosity > -2) {
            Print("Failed to allocate memory for AnalogEcho ugen.\n");
        }

        return;
    }

I've "translated" the ClearUnitOutputs line to ClearUnitOutputs(this, 1); but how do I translate the SETCALC macro to use set_calc_function ? As a newbie I'm struggling to figure this out

BoringMixer example initializes the first sample of output twice.

As noted in #8, set_calc_function also calls (mCalcFunc)(this, 1);.

Whether or not this is the right approach (I'm thinking probably not for the reasons in #8, as well as other Ctor/initial sample related concerns), the result is that the BoringMixer example initializes the first sample of output twice:

BoringMixer2() {
// New way of setting calc function.
set_calc_function<BoringMixer2, &BoringMixer2::next>();
next(1);
}

It would be great if the examples showed either a consistent way of initializing the first sample (if there is a consistent way), or, more likely, be explicit about when you need to use SETCALC, set_calc_function, as well as next(1), or directly set ZOUT(0). Though I realize that a larger, possibly unresolved issue.

c++ wrapper set_calc_function also calculates a sample of output

I just got down to debugging random server hangs in a plugin I built off the c++ wrapper examples, and I discovered that set_calc_function also calculates a sample of output, so calling it first before initializing state variables sometimes results in problems. I feel that either the wrapper should be changed to mimic the behavior of SETCALC, or the examples should be changed to put calls to set_calc_function after initializing state variables, and getting rid of step 3, "calculate one sample of output".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.