Comments (17)
when I wrote "so you may not be able to observe a difference" I meant that the workaround is already in SuperDirt, so you don't need to wait and you may not notice later.
from superdirt.
I had a report of high CPU on idle for 3.13 on Linux, too.
from superdirt.
OK, so we need to narrow this down a little.
As a first step, check if this is also the case with the default startup:
(
s.reboot { // server options are only updated on reboot
// configure the sound server: here you could add hardware specific options
// see http://doc.sccode.org/Classes/ServerOptions.html
s.options.numBuffers = 1024 * 256; // increase this if you need to load more samples
s.options.memSize = 8192 * 32; // increase this if you get "alloc failed" messages
s.options.numWireBufs = 64; // increase this if you get "exceeded number of interconnect buffers" messages
s.options.maxNodes = 1024 * 32; // increase this if you are getting drop outs and the message "too many nodes"
s.options.numOutputBusChannels = 2; // set this to your hardware output channel size, if necessary
s.options.numInputBusChannels = 2; // set this to your hardware output channel size, if necessary
// boot the server and start SuperDirt
s.waitForBoot {
~dirt.stop; // stop any old ones, avoid duplicate dirt (if it is nil, this won't do anything)
~dirt = SuperDirt(2, s); // two output channels, increase if you want to pan across more channels
~dirt.loadSoundFiles; // load samples (path containing a wildcard can be passed in)
// for example: ~dirt.loadSoundFiles("/Users/myUserName/Dirt/samples/*");
// s.sync; // optionally: wait for samples to be read
~dirt.start(57120, 0 ! 12); // start listening on port 57120, create two busses each sending audio to channel 0
// optional, needed for convenient access from sclang:
(
~d1 = ~dirt.orbits[0]; ~d2 = ~dirt.orbits[1]; ~d3 = ~dirt.orbits[2];
~d4 = ~dirt.orbits[3]; ~d5 = ~dirt.orbits[4]; ~d6 = ~dirt.orbits[5];
~d7 = ~dirt.orbits[6]; ~d8 = ~dirt.orbits[7]; ~d9 = ~dirt.orbits[8];
~d10 = ~dirt.orbits[9]; ~d11 = ~dirt.orbits[10]; ~d12 = ~dirt.orbits[11];
);
// directly below here, in your own copy of this file, you could add further code that you want to call on startup
// this makes sure the server and ~dirt are running
// you can keep this separate and make it easier to switch between setups
// by using "path/to/my/file.scd".load and if necessary commenting out different load statements
// ...
};
s.latency = 0.3; // increase this if you get "late" messages
};
);
As a second step you could check if this is a per-orbit load, by reducing the orbits to one:
s.reboot {
s.options.numBuffers = 1024 * 256;
s.options.memSize = 8192 * 32;
s.options.numWireBufs = 128;
s.options.maxNodes = 1024 * 32;
s.options.numOutputBusChannels = 2;
s.options.numInputBusChannels = 2;
// boot the server and start SuperDirt
s.waitForBoot {
~dirt = SuperDirt(2, s);
~dirt.loadSoundFiles;
~dirt.start(57120, [0]);
};
};
If this is the case, the next step then would be to find out which of the global effects cause the problem.
This can be done by commenting in step by step the different global effects (this works on the fly).
We assume you have only one orbit (as above).
(
~dirt.orbits.first.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),
];
~dirt.orbits.first.initNodeTree;
)
from superdirt.
Hi Julian. I proceeded as you point me out above, first, booting superDirt with the default startup... The load on the cpu remains high... Then, when booting with a single orbit, obviously the charge dropped significantly by 80/90%.
Finally, I booted again with the default startup, but this time with the global effects disabled in DirtOrbit.sc, and I activated them one by one to check the incidence that each one has on the cpu load. Each one of them adds a significant load on the cpu that fluctuates between the following values:
Monitor: 4 - 6%
RMS: 1 - 3%
Leslie: 8 - 15%
Reverb: 6 - 18%
Delay: 3 - 7%.
all values taken at idle
I reinstalled supercollider 3.12.2, and everything works normally. Maybe the problem is due to the fact that version 3.13 is a release candidate. I will check again later with a final version.
Thanks.
from superdirt.
from superdirt.
good!
each one of them adds a significant load on the cpu that fluctuates between the following values:
...
all values taken at idle
OK, so either they are not paused or the UGens are less efficient.
To distinguish the two cases, could you check if using the effects changes the level or not?
from superdirt.
from superdirt.
reinstalled 3.13, and in my case, triggering some samples and synths through Tidal and applying some of the global fx (room, delay, leslie) doesn't seem to add a significantly higher load on the cpu. Only about 2 to 10% on the more complex patterns, on top of what we have on idle.
from superdirt.
OK, here is another test. When SuperDirt is on idle, the code below should post one set of comments, but not continuously. If it posts continuously, we know that the global effects are not paused.
(
var numChannels = ~dirt.numChannels;
(1..SuperDirt.maxSampleNumChannels).do { |numChannels|
SynthDef("dirt_global_poll" ++ numChannels, { |dryBus, effectBus, gate = 1, restart = 1|
var signal = In.ar(dryBus, numChannels);
effectBus.poll(label: "I am not paused, sorry.");
DirtPause.ar(signal, 1);
}, [\ir, \ir]).add;
};
~dirt.orbits.do { |x|
x.globalEffects = x.globalEffects.addFirst(GlobalDirtEffect(\dirt_global_poll, [\restart]));
x.initNodeTree;
};
)
from superdirt.
ok, that flooded the post window continuously with the message: "I am not paused, sorry" :)
Edit: In SC 3.12.2 it posts the same message but only once.
from superdirt.
Ah very good, so we are closing in.
Now, when you try this one:
(
{
Silent.ar.poll(label: "I am not paused, sorry.");
PauseSelf.kr(Impulse.kr(0));
}.play
)
Does it also flood you?
from superdirt.
Additionally, you could check out this branch:
https://github.com/musikinformatik/SuperDirt/tree/topic-test-pause-change
and see if it solves the issue.
There, I do the initial pausing of effect synths differently, this is a workaround, but not a hack.
Even if it solves it, we should try and find out what is source of the problem.
from superdirt.
Ah very good, so we are closing in.
Now, when you try this one:
( { Silent.ar.poll(label: "I am not paused, sorry."); PauseSelf.kr(Impulse.kr(0)); }.play )Does it also flood you?
Yes. It floods the post window with the same message....I'll try the workaround and report back later.
*Edit: Already tried that branch and I can confirm that it totally solved the problem!. 0% load on cpu at idle.
Thanks Julian!
Cheers!
from superdirt.
Fix here if anyone's ready+able to test it out! supercollider/supercollider#5914
from superdirt.
The change merged here #278 should have fixed it on the superdirt side, so you may not be able to observe a difference.
from superdirt.
@gus74vv or anyone watching, are you able to confirm that this is fixed? there's a binary available now: supercollider/supercollider#5910 (comment)
from superdirt.
As @telephon mentioned, the linked SuperCollider fix would need to be tested with the version of SuperDirt before #278 was merged.
from superdirt.
Related Issues (20)
- how do I "add (something from dirt-hacks) to supercollider startup file"? HOT 11
- SuperDirt WASM?
- `arp` step patterns not working HOT 3
- Start SuperDirt on a server other than default s HOT 1
- startup code works with 1.7.2, fails with 1.7.3 HOT 5
- module arguments default to 0 instead of default value given in SynthDef HOT 6
- NRPN fails to send value 0 for CC 38
- Q: How do default arguments in the SynthDefs SuperDirt use work? HOT 3
- 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
- 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
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.