This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Chorus Effect

Hello,

I am trying to implement chorus effect in C using intrinsic function and I need a little help with it. I pasted a link for a file containing the code and if it is possible tell me if it is ok cause I cant find any example match this one.Its maide by LFO with cosine with 8192 samples due to modulo adressing.

Input: f s= 48kHz, 16 bit

chorus: delay = 30ms, modulation +- 10ms, gain = 0.707

7142.chorus.c

THX much. I need it fast so if it is possible many thanks to you.

  • Also its read from file using breakpoints. I read that reading input is 32 bit so I create array of 2 shorts to keep the input.

  • Hi,

    Would you mind clarifying your question? I am not sure exactly what you are asking: is it a compiler/link error you are getting or you are not getting the expected output and is unsure about the intrinsics functions used by your code?

    If the former, then we would need to see the output console of the build error. If the latter, then the best resource will be the device forum, as intrinsics are directly translated to assembly opcodes and therefore their details are very hardware-related.

    For example, the discussion below talks about how certain intrinsics expect the data passed to them.

    http://e2e.ti.com/support/dsp/tms320c6000_high_performance_dsps/f/112/t/11606.aspx 

    Hope this helps,

    Rafael

  • Hello,

    thanks for quick reply. Its ok no errors but i dont know if output is ok. Exactly this code:

    int chor = sample[i]; //where sample is type of short

    chor = _smpy(chor, FLOAT2FIXED(0.707)); //FLOAT2FIXED(x) ((short)((x) * 32768 + 0.5))
    chor = _sadd(chor, sample[i]);
    chor = _ext(chor, 0, 16);

    Is it ok if i need then write this to:

    out[i] = chor; //where out is type of short

    Thx.