Answered
0
0

Hi, I want to play sound with effect.

In example, I’m using low and highpass, I want to set the parameters of two effect with the mouse location (x, y).

I used DSP.reset() and DSP.setParameter(), but, there is a problem.

If I moved the mouse faster and faster, the Sound is not smooth.

The original sound is played between time of the code reset() and setParameter() .

Therefore I can hear a sound like spark( ‘tick! tick!’).

I want to make it smooth.

Is there any way??

 private void mouse_effect_move(object sender, MouseEventArgs e)
        {

            int i;
            i = e.Y / 10;

            dsplowpass.reset();
            dsphighpass.reset();

            if (i < 9)
            {
                dsphighpass.setParameter(0, 6310 - 700 * i);
                //dsphighpass.setParameter(1, 1);

            }
            else
            {
                dsplowpass.setParameter(0, 22000 - 2200 * (i - 9));
                //dsplowpass.setParameter(1, 1);
            }

        }
  • launcher
    its my current code.
  • You must to post comments
Best Answer
0
0

Using DSP::reset is usually reserved for when you are reusing a DSP on a different FMOD::Sound and you want to reset any state. You shouldn’t call it when you are simply updating parameters.

  • launcher
    should I use DSP.remove ??
  • Mathew Block
    No, the DSP::setParameter is sufficient on its own.
  • launcher
    You mean do not use DSP::remove(), do use just DSP::setParameter?
  • Mathew Block
    Yes
  • launcher
    Thank you. I thought, the effect piled up when use just setParameter. I fixed thx.
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.