-
jameslo
@whale-av Let me rephrase your answers to test my understanding:
My test doesn't cause the slider to produce more intermediate values because I'm moving the slider really fast, and the logical time values are not meaningful because the slider is moved in real time, whereas the computer is free to process logical time faster than real time.
I've always suspected I was living in real time, but it's reassuring to have hard evidence
I combined your last test with mine, and got the same result. I'm concluding that metro intervals shorter than an audio tick preserve the order of processing, but the evaluation of the following graph may be bunched up in-between audio ticks, i.e. so fast that the slider is effectively not moving as it is being polled.
How did I do?
-
jameslo
Sorry to hijack this topic, but here's what I thought should be a simple control rate solution, but it looks like a slider only updates its own value every 8 mS. I was expecting to see 2.9 mS intervals.
slider update rate.pd -
jameslo
@CalBassist If [snapshot~] every 3 mS is too coarse-grained for you, the next and fastest thing you can get at control rate is 1.45 mS. Otherwise you're gonna have to switch to audio rate, which is what @oid suggested above when he mentioned [line~]. Another way would be to put [sig~] after the slider and then [slop~] or [lop~] its output. Edit: Note however that if you use [lop~] the output value may not reach its input value. I don't think [slop~] has that issue.
-
jameslo
@Juicy-Jr Some additional thoughts:
- In case you thought otherwise, [block~ 1 1 1] does not oversample, it just makes the block size 1.
- You could apply the smaller block size to a subpatch or abstraction and isolate the feedback portion inside it. That way you only pay the CPU price for the stuff that needs it.
- MIDI 120 = ~8372 hz, and 44100/8372 = ~5, so [block~ 4 1 1] would suffice and be a bit cheaper. [block~ 8 1 1] would get you to MIDI 112.
- I know I'm in the minority, but I feel that my CPU works for me, not the other way around, so if something is computationally expensive, I don't worry about it until my machine can't keep up. Pd's load meter seems to exaggerate in Win10 because I routinely run at loads >100%. Finally, you can use [pd~] to distribute computation among several cores if necessary.
-
jameslo
@Juicy-Jr Caveat: if you have feedback, then that ordering technique won't be possible. In that case, I think your best option would be to reduce the block size, e.g. [block~ 1 1 1].
-
jameslo
@Juicy-Jr Are you making sure that delwrite~ is executed before delread4~? If not, I'm guessing that at sample rate 44100 and block size 64 your frequency can't go above 689 (44100/64). If I'm right, take a look at Pd vanilla help 3.audio.examples/G05.execution.order.pd.
-
jameslo
@whale-av I'm guessing that when @KoaN writes about MIDI latency, what they are measuring is interval between when a MIDI note message is sent and the onset of sound from the plugin. That's why I'm curious about those audio settings, which I didn't see mentioned among their replies.
-
jameslo
@KoaN In the File->Preferences->Edit Preferences... pop up, on the Audio tab, what have you selected for Delay (msec) and Block size?
-
jameslo
@waffles If the patch is still popping because it's missing real time audio deadlines, try staggering the bangs from [metro 50] by substituting different length delays (e.g. 2, 4, 6, 8...) for the [bang] objects. That will distribute the control rate processing more evenly. Another thing to try is to delete any UI element you don't need. The patch stopped locking up my machine once I removed the vertical sliders near the AR oscillators. Finally, I noticed that sometimes it triggers a chime a couple of 50 ms intervals in a row, which is kind of a waste, so I added a 1 second lockout to ARosc~ to enforce a minimum interval between triggers. You can change the lockout time by changing the delay. ARosc~.pd
-
jameslo
@waffles On Windows 10/Pd 0.55.2, this patch somehow prevents me from switching between windows or accessing the taskbar, except when task manager is open. I'm guessing it's related to the fact that all the bangs hanging off of the [sel 0]s are solidly on, suggesting that the patch is falling behind in the control domain and perhaps missing realtime audio deadlines in the audio processing. That would definitely cause clicks.
I also notice that the connections coming from each of those same bangs are not explicitly sequenced with a trigger object. I'm assuming the author intended [line] to jump to 1 first, which could also be a source of noise due to the discontinuity. Even if you took @seb-harmonik.ar's suggestion to replace it with [line~], that discontinuity would still be there.
If I could somehow get this patch to let me edit it, my first experiment would be to cut out most of the repetition to see how various subsets behave. I think that would give me a lot of information about why the patch is making so much noise.
Edit: just learned about the -noloadbang flag. <other silly BS deleted
>
Another edit: Let me know if this works better for you--this version doesn't freeze my computer. calm-generative 4.zip I replaced the loadbang with a toggle so it wouldn't start immediately. I added abstractions for each LFO and each AR oscillator to help me see what was going on. The latter lengthens the attack to 20 ms (from 0) and also controls the final volume using the LFO signal itself, rather than the one sampled every 50 ms, in case that was the cause of the zipper noise you were hearing. I deleted the oscillators that weren't connected to the dac in case they were eating CPU. It should be easy to add them back in now that you have the abstractions. I combined all the metros into one in case it helps reduce the control rate processing, and in an earlier version I staggered the bangs by 2 ms, but that didn't seem to make a difference. Finally, I noticed some light, occasional clipping, mostly in the left channel, so I halved the signal.