Comments (3)
c = {
Just in general: better not use single letter variables in library code, because it may easily be broken by other code ...
I realize the problem with this is that dirt_monitor is a GlobalDirtEffect whose alwaysRun property is true, therefore the synth does never free and when commpressor ratio goes to 0, nothing is stopping it from a division by zero error.
I think you could arrange the parameter ranges in a way that this won't happen.
But then I also wonder how are dirt_reverb and friends freed when they simply stop being referenced?
This happens in DirtPause
, which pauses when there hasn't been any message for graceTime
. This is also how parameter values are kept (a paused synth keeps the values).
from superdirt.
This isn't set anywhere, the synths are just freed and when a new one comes to life, it has new parameters. We need to think about whether it is tidal's or superdirt's job to keep these values. @yaxu what do you think?
For completeness, can you post some code?
from superdirt.
I was working again on the idea of adding a compressor that can also do sidechain compression from any orbit. As discussed on #251 and with what I learned from your post about orbit routing in the club. I thought a good idea might be to just add the compressor inside the dirt monitor, since I see it as a final process before limiting and I thought it might have been as easy as adding it in.
I realize the problem with this is that dirt_monitor is a GlobalDirtEffect
whose alwaysRun
property is true
, therefore the synth does never free and when commpressor ratio goes to 0, nothing is stopping it from a division by zero error. But then I also wonder how are dirt_reverb
and friends freed when they simply stop being referenced?
Also, I started this issue with the same question in mind. "Tidal or SuperDirt to keep default values?", after all I do know how to set that from Tidal in some way. But I decided to go for the SuperDirt route to keep all my code on the SC side. Hence this issue.
Anyway here's my code, messy as it is rn:
(
~dirt.orbits.do { |x|
var l = x.globalEffects.size;
x.globalEffects[4] = GlobalDirtEffect(\dirt_monitor,['limitertype','comp','thresh','atktime','reltime','upcomp','makeup','sidechain']);
x.initNodeTree;
};
~dryBuses = [];
~dirt.orbits.do { |x|
~dryBuses = ~dryBuses ++ x.dryBus
};
c =
{|signal, comp=1, thresh=0.5, atktime=0.01, reltime=0.1, upcomp=1, makeup=1, sidechain=(-1)|
var sound, control, chs;
chs = ~dirt.numChannels;
//control = In.ar(Select.kr(sidechain+1,[signal]++~dryBuses),2);
control = signal;
Compander.ar(signal, control, thresh: thresh, slopeAbove: (1/(comp+0.00001)),
clampTime: atktime, relaxTime: reltime, mul: makeup+0.00001, slopeBelow: (1/(upcomp+0.00001)));
};
d = SynthDef("dirt_monitor" ++ ~dirt.numChannels, { |dryBus, effectBus, outBus, gate = 1, limitertype = 1|
var drySignal = In.ar(dryBus, ~dirt.numChannels);
var wetSignal = In.ar(effectBus, ~dirt.numChannels);
//var signal = XFade2.ar(wetSignal, drySignal, dry * 2 - 1);
var signal = wetSignal + drySignal;
var post = if(SuperDirt.postBadValues) { 2 } { 0 };
signal = SynthDef.wrap(c,[\ir,\kr,\kr,\kr,\kr,\kr,\kr,\kr],[signal]); // compressor
signal = Select.ar(CheckBadValues.ar(signal, post: post) > 0, [signal, DC.ar(0)]);
signal = Select.ar(limitertype,
[
signal,
Limiter.ar(signal),
softclip(signal * 0.5) * 2
]
);
DirtPause.ar(signal, graceTime:4);
signal = signal * EnvGen.kr(Env.asr, gate, doneAction:2);
Out.ar(outBus, signal)
}, [\ir, \ir, \kr, \kr, \kr],nil);
d.add;
s.freeAll;
~dirt.orbits.do { |x|
var l = x.globalEffects.size;
x.globalEffects[4].paramNames = ['limitertype', 'comp', 'thresh', 'atktime', 'reltime', 'upcomp', 'makeup', 'sidechain'];
x.initNodeTree;
};
)
from superdirt.
Related Issues (20)
- NRPN fails to send value 0 for CC 38
- 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
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.