I've made quite a big complex synth with lots of choices of LFO, oscillator etc.
These get created dynamically in order save on CPU, so if you change the shape of an oscillator or LFO it clears a window and creates the correct abstraction, eg. LFO0, LFO1, LFO2 etc.
This works really seamlessly when I use it as a monosynth but when I scale up to 8 note polyphony, each time you change waveform it takes about a second or so for the action to take place. You don't see the button "bang" until after the abstractions are loaded. Not the end of the world but it makes things feel unresponsive.
Should I be using switch~ instead? This will make the patch a LOT bigger because I'll need to have every possible OSC & LFO loaded at once. Any other ideas?
-
Time taken to load abstractions when using dynamic patching
-
In case it's relevant, I am only at about 40% CPU.
-
@nuromantix This can be the case. The problem should be clearing the patch, as each object is deleted on its own, then all objects are redrawn, then the next object is deleted. It is still a bit surprising that this is happening already with eight objects.
So first i would check if really clearing the patch is the problem. Next i would try to reduce my patches, i.e deleting all unnecessary GUI elements like number boxes.
-
I'll try it, thanks.
-
@nuromantix Hmm didn't make any perceivable difference. Quite a lot of the code for each oscillator is the same so I will see if I can streamline the amount that has to be loaded/cleared at the cost of routing simplicity.
-
@nuromantix Are the modules abstractions or are you dyn creating the whole code? Would expect no problems if they where abstractions, but not sure...
-
They are abstractions plus a couple of "inlet" objects and a few "connect" messages. They are only a few Kb each. Hmm.........
-
@nuromantix Sorry, no more good ideas. Maybe try DSP off, [del 0] between clear and each abstraction creation, but probably no solution...
-
My current theory is that it could be because there are a lot of receive~ objects, perhaps PD takes time to check they all have a valid send~. If I delete all the send~ objects, obviousy I get lots of errors but the abstractions load much quicker. Thanks for your suggestions.
-
Ahhhh... turning off DSP for half a second has fixed it. Thanks again.