0
0

Trying to get PITCHSHIFT working in C#, but it only sounds like a bad flanger…

I’m useing the C# classes that was with Fmod, running 0.4.0.29 fmodex.dll

This how I do it :

Start play…

[code:sfdao43q]private void PlayAudio(string filename)
{
FMOD.RESULT result;
result = m_system.createSound(filename,(FMOD.MODE._2D | FMOD.MODE.SOFTWARE | FMOD.MODE.CREATESTREAM), ref m_sound1);
ERRCHECK(result);

        result = m_system.createDSPByType(FMOD.DSP_TYPE.PITCHSHIFT, ref m_dsp);

        result = m_system.playSound(FMOD.CHANNELINDEX.FREE, m_sound1, false, ref m_channel);
        ERRCHECK(result);

        result = m_system.addDSP(m_dsp);
        ERRCHECK(result);

    }[/code:sfdao43q]

Set pich…

[code:sfdao43q]private void SetPitchShift(float pitch)
{
FMOD.RESULT result;
result = m_dsp.setParameter(0,pitch);
ERRCHECK(result);

    }[/code:sfdao43q]
  • You must to post comments
0
0

Yes I have tried it, but what I get is only a list of plugins, I can’t use the plugin, or?

  • You must to post comments
0
0

I’ve tried that, both VB and CS example. There is no code in the listboxes that handles clicke event in the example. Do the example work for you?

  • You must to post comments
0
0

Think I looked at the wrong example. I looked at “useplugins”

I tested the c++ example. And it works, but it’s not the function that I’m after. Here you change the pitch of the “singing voice” and the temo/bpm stays. I wanna do the opposit. The “singing voice” shal stay and the temp/bpm change. (like Master temp on a DJ cd player)

Thanks!

  • You must to post comments
0
0

Ok it become two questions after testing it.

1) What did I do wrong in the example I posted, I don’t get the result that “dsppluginview” do.

2) I was asking if there was I way to get “pitchshift” to do “tempo” also. I will try what you explained.

But my main question was to get it working in C#.

Sorry for the confusion.

  • You must to post comments
0
0

it looks like the dsp header for c# was out of date, so PITCHSHIFT was actually corresponding to CHORUS.

Just remove the FFT enum value and it should be fixed

  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.