I've got a
Pseq([
Ppar(),
Ppar()
])

And when I play it sounds fine, but when I record it, there's a massive glitch between the Ppars. This is whether i do it with a .record on the Pseq. Or an s.record before the Pseq starts, even if I play the Pseq with a Quant

#SuperCollider

I quintupled the s.options.memSize and it makes no difference.

The CPU doesn't seem to be spiking

Ways of recording tried in SuperCollider

s.record
Pseq(....).record
Cutting and pasting from the DiskOut help file

*All* of them glitch. The audio is fine if I don't record, but is fucked up if I do.

Workaround:
If you set Audacity to be a jack device,
1. In Audacity, click on the record meter to enable silent monitoring
2. Boot the SC server.
3. In Audacity, click on audio setup (big icon in the middle of the top) and set the recording device to be supercollider. (You should not need to change pipewire or jack routing. Hopefully.)
4. I went to Audacity preferences and made sure the sample rate was the same as it is for SC, but I think this step is optional.
5. Click the record button in audacity
6. Tell your pattern to play
7. You should see Audacity drawing the wave form while you wait for the pattern to finish, or eventually stop the pattern manually.
8. Stop recording in Audacity.
9. Try to find a way to be less irritated, because this is actually super fucked up.

#SuperCollider #PipeWire #Jack #Audacity #Grrrrrrrrr

I added some tiny delay lines to make the panning more interesting and now they are also glitching.

What is going on with scsynth??

Things I have tried to get the clicks out of my delay lines:

* Switching from DelayN to DelayC
* Increasing the maximum delay time to be 1.2 times the actual maximum
* Making sure the maximum delay time is always at least 4 samples.
* Making sure no sound has zero delay, but always delays by at least one sample.
* Adding a .tanh to the output

Eyeballing the audio, I can't _see_ any serious discontinuities.

The clicks are subtle, but they're definitely there.

So I guess I'm giving up.

I spent about 4 days writing this piece of music and about a week trying to chase down errors which do not appear to be my fault. Especially the distortion that only shows up when I record - there is just something really fucked up happening with timing when it's also writing to disk.

Maybe I can move to an earlier version of SuperCollider and that might fix everything. This is honestly the most disappointed I've ever felt with this language.

@celesteh clicks are the bane of my work as well. i'm getting better at diagnosing, and squashing them in my vcvrack systems, but they still take up a lot of time and effort. damn clicks!

@c_reider

Do you have any advice that might carry over from one system to another?

@celesteh probably nothing you haven't already tried... namely going back through the entire signal chain to be totally sure where the click is originating, and doing something about it there.

also, when i can't finesse away the clicks, sometimes i can get rid of them by using a slew on the audio... this can distort the sound though (not always a bad thing). i don't know if there's a SC port for the Airwindows effects, but they have a variety of slew fx that are perfect for this.

@celesteh i try audacity with 64 samples fft size, log display to sr/2 for high time resolution, clicks visible as spikes in high frequencies. that lets me localize in time and hopefully correlate to my code.