supercollider / example-plugins Goto Github PK
View Code? Open in Web Editor NEW**This project is deprecated!** See https://github.com/supercollider/cookiecutter-supercollider-plugin instead.
**This project is deprecated!** See https://github.com/supercollider/cookiecutter-supercollider-plugin instead.
Hi ! Just a tiny bug:
I suspect there's an error here. Shouldn't maxdelay
be delay
here? Otherwise the delay
argument is unused (and the delay time unchangeable). Thanks!
Won't get around to these for a while, but here are my plans for future examples:
This repository is a very nice addition that helps getting over the outdated chapter on writing UGens of the SC Book.
Maybe this could be mentioned in the README somewhere?
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
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:
example-plugins/01b-BoringMixer/BoringMixer.cpp
Lines 14 to 18 in d0622ac
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.
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".
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.