I'm new to pure data, and have been trying to construct a granular synthesis patch for use in the prototype module in the program VCVRack. My current goal with this patch is to get pitch shift and time stretch functionality working properly. I'm running into an issue in the form of some buzzing or glitchy sound whenever I play the audio. I made sure to have envelopes on each grain, however it still has that sound when I play a sound. My other guess is it has to do with the metro controlling the snapshot in the player abstract, but I'm not sure of how to properly adjust that.
Granular synthesis in VCVRack audio issue
@Jazzercise Not my subject....... but as I understand the hanning windowing the curve should be a single half cycle from 0 to 1 and back to 0.
That will mute the grains at the start and end of their playback when multiplied by the audio over the same timeframe..
Also, because you have not used [trigger] in some places it is hard to see whether the timing of the application of the window is correct...... although the hanning window should be very close to zero at the crossover points anyway if those timeframes are matched.
Also it looks like you could be re-starting the player many times for a grain.
The use of [line] in [pd rack] suggests that you are trying to smooth incoming messages..... maybe a knob is being turned and so you have a great number of "fromrack" messages arriving...... which will make for a very jittery start as multiple messages are sent from the [metro] to "play" and [metro] sends a bang every time it receives one.
I would have expected that the duration message should arrive once...... before that metro is started....... so maybe introduce a short [delay] before the bang to [s play] that is reset by the repeated bangs and only bangs once when no more bangs arrive from [metro] during that time.
None of that is gospel....... as I said it is not my subject but no-one else has replied.