Every and any sound and tone I generate in pure data (This is only isolated to pure data) continually makes a very loud snap crackle and pop, although this only occurs when I multiply the original signal by the number 1 to let it through to the dac~ object. Does anyone else have similar issues or a solution to this problem?
-
Digital to audio processing issues
-
@Joseph-Mikkelson When you send a 0 or 1 to the *~ object, the change is instantaneous and this causes a discontinuity, which causes the pop. You need to make it a smooth transition, and you can do that with [line~].
-
@weightless The issue is not an initial pop, that I already know of. This is a sound that persists as long as the volume is on even to pure tones, it follows the volume that I set as well.. This began after I have owned Pure data for a while. For example I put osc~ 440 and then connect to dac~ there will be the normal tone with a large amount of distortion , snaps, crackles, and pops.
-
@Joseph-Mikkelson In that case try relaxing the audio by increasing the "Delay (msec):" in the Pd .... Media.... Audio Settings.
Those are the exact symptoms of too small an audio buffer.
For a computer in-built sound card "30" and above should be fine..... I have mine set to "80" for everyday use.... to be safe.
That causes increased latency, by increasing the buffer size so that more can be done by the computer between it collecting the lumps of audio from Pd. At the moment your computer is interrupting the audio to do other things.
Latency (for the sound card) only matters if you are using the audio in a "live" situation where delay would be upsetting for a musician. You would need a professional outboard soundcard in that case.
If that doesn't work then let us know more about your computer, operating system, and sound card.If you are doing important audio and video work on your computer then read "GlitchFree" here.....
https://forum.pdpatchrepo.info/topic/10125/audio-and-video-why-do-i-have-problems
Bluetooth and Wi-Fi drivers can be particularly problematic.
David. -
@whale-av Thanks, that fixed the issue, but I do contain another question relating to this. My sample rate is fairly high right now (I am rarely live) but I am brought to wonder if I lowered my sample rate could I lesson the delay time needed?
-
@Joseph-Mikkelson No, changing the samplerate will not help, except that matching it to the soundcard reduces the load on the cpu......but there are more important issues...... see below.....
I should have expanded on latency.
Using a live input [adc~] and doing some Pd processing effects and then sending that to speakers [dac~] latency is not so much of a problem. Often it involves delays anyway (echo, reverb, etc.) and our ears are used to that.
Latency for playback of an audio track, or generated audio, is no problem...... it is heard when it arrives at the speakers and that is all.
Problems arise when the input goes straight to the output....... as with a monitor mixer built in Pd for example..... with live acoustic instruments...... where the musician hears their own instrument acoustically and the same sound delayed in the monitor. Essentially a chorus effect is produced, caused by the latency, and that will make it harder for a violinist for example to pitch correctly.
Chorus in a reverb effect really upsets violinists..... anything much over 5ms.
Of course a massive latency...... 100ms+..... will cause timing problems even for a guitarist, and even if they are the rare musician that didn't have such issues in the first place.
I have met classical and jazz musicians that have learnt to dissociate what they play from what they hear...... for example playing through a delay, but in sync with everyone else...... so playing say 1 second before everyone else....... but......SAMPLE RATE
You should match your samplerate to your soundcard, or you will have re-sampling artefacts....... usually a low level high pitched whine when your patch is not producing any sound.
It is slightly more complicated than that.
If you play an audio file that was recorded at 44.1KHz while the Pd samplerate is set to 48KHz it will play back at the wrong speed....... Pd will not resample it and so the pitch will be wrong.
It's a PITA.
So the Pd samplerate must be set to match all the audio files that you use in Pd.
To avoid the artefacts you then need to set your soundcard to match Pd.
Other programs will adjust..... so that is not a problem.
External cards can make that change through their control panel, and internal cards should have the option somewhere.
In windows it is here in the speaker control panel..... https://forum.pdpatchrepo.info/topic/12094/newbie-clipping-on-pure-data-portable-with-mmio/4
and I am pretty sure that windows always sets the on-board soundcard to 48KHz "out of the box".
David.