-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Original dirty compressor #304
Comments
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! |
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. |
Ah I see, well, all you have to do is to use a Just to be sure! |
as per the Fb1 docs, that does not work:
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 ^^ |
Another idea: What about writing the thing as a ugen plugin? We could add it to sc3plugins. |
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. |
Most people say it is quite easy. You could take |
I migrated the compressor Here is my implementation: https://github.com/thgrund/SuperDirtMixer/blob/mrreason-setup/synths/synth.scd#L24 WDYT? |
Ah that may also be a good option (we may need to adjust it a little to match with the logic of global effects). |
One thing missing from SuperDirt is the original compressor.
https://github.com/tidalcycles/Dirt/blob/071fd88b3e004a11215afd11b718e92d3ab44d18/audio.c#L770-L777
Thankfully Pulu has ported it, code below. It sounds excellent, very useful for from-scratch performance. I think it would be great to incorporate it into superdirt, although probably default off. It needs miSCellaneous_lib as a dependency, perhaps it's better to hard fork Fb1?
The text was updated successfully, but these errors were encountered: