Comments (7)
yeah, that could end up being the best option and surely would run the fastest. i have been meaning to learn SC plugin development anyway.. might be a few weeks till i have the time though.
from superdirt.
as per the Fb1 docs, that does not work:
What cannot / shouldn't be done (ar case considerations):
Writing ar UGens in func that produce a time-varying signal itself (e.g. SinOsc.ar, in contrast to SinOsc.kr and operator UGens like '+', '*' etc.) - instead, if such ar UGens aren't applied to data from inside func, they can be passed via Fb1's and func's 'in' arg. It remains the case of such ar UGens that should process data that is provided by func (e.g. letting the fb out modulate a parameter of a VarSaw.ar). This is currently not possible and I don't have a clear picture if and how it would be possible at all or if it would make much sense.
i do think the current version sounds good, but would like to match the original.
edit: i do also use Compander a lot, but the goal here was to reimplement the algorithm from Dirt ^^
from superdirt.
The UGen is a control rate ugen (Select.kr) so it doesn't need Fb1 really.
Can't test it right now, but this should be about what is needed:
(
Ndef(\dirtComp, { |amount=1, speed=50|
var input, max, env, n, prod;
var ctrl;
n = 2; //~dirt.numChannels;
input = In.ar(0, n);
ctrl = input[0];// maybe we want to multichannel expand or sum rathen than taking the first channel?
max = ArrayMax.ar(input.abs);
env = LocalIn.kr(n);
env = env + (speed / SampleRate.ir); // needs fix: making it depend on the sample rate and on block size
prod = (ctrl * env).abs;
env = Select.kr(prod > 1, [env, env/prod]);
LocalOut.kr(env);
ReplaceOut.ar(0, input * amount.linlin(0, 1, 1, env * 0.2));
}).play(
group: RootNode(Server.default),
addAction: \addToTail
);
)
It would be good if we could just add the Fb1 part of the library otherwise, yes!
from superdirt.
The UGen is a control rate ugen (Select.kr) so it doesn't need Fb1 really.
that is a mistake on my part. the original C code runs this conditional at audio rate, but i am not entirely sure how to achieve that here.
from superdirt.
Ah I see, well, all you have to do is to use a Select.ar
in the Fb1
. But if it sounds good as it is now, maybe that is not necessary? Btw. have you checked the Compander
UGen? (here is the source: https://github.com/supercollider/supercollider/blob/71d5d1841bc1b26a59560c6544f3996765f6ff63/server/plugins/FilterUGens.cpp#L3242). It may be similar, but I am not sure. Also there is a CompanderD
, a slightly different one.
Just to be sure!
from superdirt.
Another idea: What about writing the thing as a ugen plugin? We could add it to sc3plugins.
from superdirt.
Most people say it is quite easy. You could take Compander
as a starting point.
from superdirt.
Related Issues (20)
- delay stops working sometimes HOT 4
- amp parameter scaling HOT 3
- playing samples in tune using pitch metadata HOT 2
- unit "s" unexpected behavior HOT 1
- How to add a custom DirtEventType for MIDI over OSC HOT 10
- Supercollider 3.13.0-rc1 / SuperDirt 1.7.3 - High Cpu Usage At Idle - macOS HOT 17
- SuperDirt does not recognize SynthDef variants HOT 2
- superchip is way out of tune HOT 2
- cut groups break on simultaneous events HOT 29
- Should we send RPN Null after NRPN? HOT 4
- d3 onwards not sounding HOT 1
- Lazy Sample Loading doesn't find any samples (Windows 11/SuperCollider 3.12.1) HOT 3
- Effect "dj-filter" should be inactive when value is 0.5 HOT 7
- Time stretching + Reverb can break an orbit's global effects HOT 2
- Add a simple way to add modules after another specific module HOT 2
- dirt_rms ambiguity. should it be running to not? HOT 11
- Tuning name parameters HOT 5
- New Release? HOT 6
- Merging StrudelDirt ? HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from superdirt.