Hello:
I am the novice using the C6713 DSK to do a small audio signal processing project.
Although the TI websites have tons of reference materials and some example tutorials are available, it is still very difficult for me to figure out the solution to a very specific problem.
First, I designed an audio input and output template using the CODEC and Mcbsp to read in the sampled music signal and then output it without modification. The signal reading and writing is at ISR.
What I want to do is that I want to use the DSPlib FIR filter function in ISR and do the real-time low-pass or high-pass filtering of the music or a deterministic signal and then send the filtered signal out.
It sounds not difficult, but I was stuck by three difficulties:
First, I refered to the DSPlib application material and the FIR function might be like DSPF_sp_fir( ).
But how could I set the cut-off frequency, passband stopband and the magnitude of this FIR function? or I have to desgin my own FIR filter?
(The textbook taught that I should design a FIR filter and do the filtering by the frame-based dot product between ten samples and the impulse response h[i]. But I want to call FIR function at DSPlib directly in order to save the execution cycles for real-time processing).
This is my ISR code out of guess:
The filtered signal temp.channel[0] will be put out with write function.
My second trouble is that I need to input the audio signal of 16-bit and it is single channel signal. But this template is used for the music input(the music usually has two channels).
Could I use this template to receive the audio signal of single channel?
Do I need to do some modifications?
My third problem that troubled me for a long time is that:
I want to use the matlab to generate a sinewave signal of four frequency components like this:
x=2*cos(1000*n)+4*cos(2000*n)+8*cos(3000*n)+10*cos(8000*n);
And then I want to input this signal (about 16000 samples) into my project and do the low-pass filtering. Then I
want to see the spectrum of the output signal and check whether the filter has successfully filtered out the high
frequency components.
The problem is: How to input the signal generated from matlab into the DSK line in?
And if I received the output signal already filtered, how could I accumulate them or can I output them into the matlab and check its spectrum? Or I need the external memory to store them and see the spectrum of them later?
My original c file (main part):
Please give me the suggestions in detail.
Thank you very much!