Ping-pong delay to start normal?

Hi,

SonicPi : version 3.2

live_loop :metro do
  
  sample :bd_ada
  sleep 1
end


live_loop :foo_reverb do
  stop
  sync "/live_loop/metro"
  use_synth :prophet
  with_fx :reverb do
    play [:c3, :c2, :b6, :b5+0.15,
          72, 72.25,72.5, :c2-0.15].tick, sustain: 0.1
  end
end

live_loop :foo_pingPong do
  sync "/live_loop/metro"
  use_synth :piano
  with_fx :ping_pong do
    play [:c3, :c2, :b6, :b5+0.15,
          72, 72.25,72.5, :c2-0.15].tick, sustain: 0.1
  end
end

You will notice there is a delay with the fx ping-pong. Is it normal ?

@nlb: I can tell you why that is happening: in the synth design, as seen at https://github.com/samaaron/sonic-pi/blob/master/etc/synthdefs/designs/supercollider/ping_pong.scd#L16, the sound that is output from the FX by default contains 0% ‘dry’ sound - ie, you only hear the echo, not the ‘raw’ sound.
@samaaron: I’m guessing we’ll consider this a bug?

Is this “fixed” by setting mix: to 0.5 or so?

That’d let some of the dry sound through, sure. I was contemplating in the synthdef to wrap the last line in a Mix(…) to mix the dry sound into the returned sound.
Eg:

Mix.new([PingPong.ar(LocalBuf(SampleRate.ir * max_phase, 2).clear, panned, phase, feedback, 1), [dry_l, dry_r]]);

Will push up a PR if the above looks correct :+1:

Thinking auto it I would suggest that it has a similar behaviour to :echo which is to include the original signal by default. So a mix: 1 includes the original and the echo and mix: 0 is just the original. :slight_smile:

Doesn’t the above do that?
(The makeFX script already adds the additional bits of plumbing to the FX, like mix: etc?)