-
Notifications
You must be signed in to change notification settings - Fork 74
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
how do I "add (something from dirt-hacks) to supercollider startup file"? #259
Comments
ah, is this #231 (comment) ? I still don't get it. I put this extra line (
then when starting
|
Hi @jwaldmann, it is confusing, yes. |
Thanks! I was still getting the above syntax error. The file I wanted to include https://github.com/musikinformatik/SuperDirt/blob/develop/hacks/adding-a-compressor.scd has this structure
The error message refers to the beginning of the second block. Are we just missing separators here?
Well, "work" - at least it gives no syntax errors, so we can start thinking about semantics ... |
The main thing is that the file (like all other files in the folder) are not meant to be used that way. It is not like a module system. I decided to use this "extension by example" style to encourage a more active involvement with the code. It is also a common way supercollider is organised: files which have many snippets of code that you can use, but not intended to be used all at once. This allows you to vary it in place, by writing series of minor modifications. It is more tedious out of the box, but more flexible to experiment with. |
If you wanted to have a file you can load, you'd copy the variant you prefer in a file like this: (
// add a compressor module
(
~dirt.orbits.do { |x|
x.globalEffects = [
GlobalDirtEffect(\dirt_delay, [\delaytime, \delayfeedback, \delaySend, \delayAmp, \lock, \cps]),
GlobalDirtEffect(\dirt_reverb, [\size, \room, \dry]),
GlobalDirtEffect(\dirt_leslie, [\leslie, \lrate, \lsize]),
GlobalDirtEffect(\dirt_rms, [\rmsReplyRate, \rmsPeakLag]).alwaysRun_(true),
GlobalDirtEffect(\dirt_monitor, [\limitertype]).alwaysRun_(true),
]
};
);
// now play with different variants while you listen to tidal:
// a dirty hyperbolic tangens
(
SynthDef("dirt_compressor" ++ ~dirt.numChannels, { |dryBus, effectBus, gate = 1|
var signal = In.ar(dryBus, ~dirt.numChannels);
signal = (signal * 5).tanh;
signal = signal * EnvGen.kr(Env.asr, gate, doneAction:2);
Out.ar(effectBus, signal);
}, [\ir, \ir]).add;
s.freeAll; // restart all synths
)
) |
the syntax correction is correct, but the SynthDefs override each other (they all have the same name). |
Yes, I see now. Perhaps make this intended usage more explicit in the README of that directory? Something like:
|
Thanks! Better now? https://github.com/musikinformatik/SuperDirt/pull/260/files |
Yes, fine! - This issue was actually brought up by students (they wanted side chain compression for Tidal). I will point them to these improved instructions, and I'll forward any remaining complaints :-) |
Yes, thanks, that would be good :) It is hard for me to un-understand these things. |
please feel free to reopen this issue with suggestions. |
It's recommended at https://github.com/musikinformatik/SuperDirt/blob/develop/hacks/README.scd but I don't see what to write where.
I am using this startup file https://github.com/musikinformatik/SuperDirt/blob/develop/superdirt_startup.scd
Do I put some "include" directive there? Or do I literally copy the code? In both cases- where? (before, inside, or after other declarations/statements?)
The text was updated successfully, but these errors were encountered: