Вы находитесь на странице: 1из 6

ANALYSIS OF REAL TIME AUDIO EFFECT DESIGN USING TMS320 C6713 DSK

Rio Harlan, Fajar Dwisatyo, Hafizh Fazha, M. Suryanegara, Dadang Gunawan Departemen Elektro Fakultas Teknik Universitas Indonesia Kampus Baru UI Depok rioharlan@gmail.com, msurya@ee.ui.ac.id

Abstract---We review the design of three audio effect using TMS320 C6713 DSK. The effect has different types, which are fuzz, echo, and reverb. The applications of the effects are widely used in music and entertainment industry. Our design has effectively implemented the algorithm on a low cost platform DSP board using C programming. The results are analyzed using FFT method and to be assesed for meeting the design purpose. The results shows that TMS320 C6713 DSK designs, can be develop into a real-time application for audio effects in electronic devices and acoustic. Keyword---Audio effect, Algorithm I. INTRODUCTION Audio effects are one of many applications of DSP. The principle of an audio effect is to manipulate input signals to a new output signal just as expected. In daily life, audio effects are commonly used in entertainment industry. Before digital era, audio effects are created using analog circuit, but the use of analog circuit for multiple audio effects in one circuit needs a very complex circuit. This complex circuit refers to time, budget, and also inflexibility. Audio effects using a DSP processor is not as complex as the audio effects build using an analog circuit. Even though using a DSP processor can create multiple audio signals in one project, the circuit is not significantly change or added, but the program will be much more complex. The DSP processor that is use in this audio effects design is the DSK TMS320C6713. In the DSK, applications build in algorithms using the C language, or the Assembler language. So the first thing to do is to do the coding. Then after the coding is done, the algorithm can be implicated directly to the DSK, and then the output and the performance of the program can be analyzed. In general, audio effects are classified into three types, which are Drive/Distortion, Modulation, and Ambience. Before implementing these effects in the DSK TMS320C6713, we have to know how these audio effects works. Knowing how it works will help us to make the algorithm of the audio effects.

This paper will review about the performance of a real-time audio effects design for fuzz, echo, and reverb. The DSK TMS320C6713 is used for the design process. The result shows that designing using the DSP board, can be develop into a real-time application for audio effects in electronic devices and acoustic. So then the design can be written in the C6713 chip device and can be fabricated. II. AUDIO EFFECT IN DSP BOARD A. DSP BOARD TMS320 C6713 DSK TMS320 C6713 is a DSP board, a platform where someone can build a signal processing application by writing a program in the DSP board [1]. The process of the DSP board is very simple, the analog signal coming from port mic in/line in then, it is sampled to digital signal by the codec. After that, the signal will be processed digitally by the DSP. How the DSP process this signal depends on how the user program the DSP board. Then, the output signal will be release thru line out/headphone. As mentioned before, signal processing by DSP depends on program algorithm given from user to the DSP processor. Writing a program in the DSP processor is as same as writing a program in other processors, which is using the machine language or assembler. As an alternative, we can also use C language to program the DSP processor. To development an application with DSK, Texas Instrument provides software called Code Composer Studio (CCS). CCS is software that is used for interfacing user and the DSP board. CCS provides a work environment that contains all of the tools needed to program the DSP processor [3]. The tools are integrated with the CCS. It is also flexible software that can work together with popular software, such as MATLAB, LabView, Visual Basic, etc. B. FUZZ Basic principle of fuzz is making a harmonic distortion from a signal, it means occurrence of another frequency component other than fundamental frequency.

The method used to make harmonic distortion is clipping method. In this method, output value is limited in some range. When the output value surpasses this limit, output signal will automatically clip.
Grafik input 1 0.8 0.6 0.4 A m p litu d o 0.2 0 -0.2 -0.4 -0.6 -0.8 -1

goes to the wall and then reflected to the user. The second process will takes more time than the first process, so the listener will hear two sounds in a different period of time. The signal power from the second process will be attenuated due to the reflection process. D. REVERBERATION Reverb is the sum of all sound reflections. The principle of reverberations is more like echo, but in reverb the sound reflections comes very often in a short period of time. In reverb effect, usually the listener can not tell the difference between the original sound and the reflected sound. The mechanism can be seen below.

6 Waktu

10

12

14

Fig. 1. Input signal


Grafik output 0.8 0.6 0.4 0.2 A m p litu d o 0 -0.2 -0.4 -0.6 -0.8

Fig.4. Reverb mechanism


0 2 4 6 Waktu 8 10 12 14

Fig. 2. Clipped input signal

Fig. 1 show input signal with assumed amplitude 1 volt. After the fuzz effect applied to the input, the result will showed in Fig. 2. It can be seen from this figure that signal is clipped at 0.7 volt changing the signal shape. C. ECHO Echo is a sound reflection that comes to the listener in a period amount of time after the original sound. Generally, echo has a time delay that is relative long, which is more than 1 second. So that in echo effect, the true sound and the artificial sound are clearly separated, so that human hearings can tell the difference. The mechanism of echo can be seen below.

Fig. 4 shows the mechanism of reverb effect. Every reflection from the source can be a new sound source. There are two important parameters in reverberation [5], which are: - Predelay, is the period amount of time of the first sound reflection - Reverb decay, is the period amount of time of reverb since the input stops. III. DESIGN There are a few steps taken working in this project. The first step is to do an initialization on the board. There are many types of initialization. We initialize the board components that we use for the project. For example, in this audio effects project, the codec for audio input and output jack in this board must be initialized. If the other components like the switches and LEDs are used, its must be initialize first. The initialization can be written in C language. The next step is to write the main program. In this section, the input signal will be manipulated with a certain algorithm so that the output will create signals as expected. With the help of CCS features and external analysis tools, the performance of the output such as attenuation, delay, and noise can be analyzed. From here, the performance of DSP also can be seen, and it represents the efficiency of the algorithm created by the user.

Fig. 3. Echo mechanism As seen in Fig. 3, the signal goes from the source to the listener in two paths [2]. First, the signal from the source goes directly to the listener. Second, the signal

C. REVERB A. FUZZ From the principles explained above, the algorithm of fuzz effect can be made using C language. int fuzz(int input) { int output; output = gain * input; if (output > batasclip) { output = batasclip; } else if (output < -batasclip) { output = -batasclip; } return(output); } From the program above, the gain parameter and batasclip are the parameters that have been defined before. The use of the batasclip parameter is for the limit where a signal will be clipped. The gain parameter is needed to strengthen the signal that is located under the clipping limit, so the signal will also be clipped. B. ECHO The algorithm of this effect can be seen below. int echo(int input) { int temp,output; static int i=0; temp = buffer[i]; buffer[i] = input; i++; if (i==buffer_size) i=0; output = temp * 0.5; output = output + input; return(output); } The main line of the algorithm is located in the end of the algorithm. In the end of the algorithm, the latest output will come together with the new output. The output will be attenuated, just like the theory of this effect. The attenuation value used in this algorithm is 50%. The buffer[i] parameter is an array that helps the delay process. In echo, the delay process is done in the input. The algorithm to implement this effect in DSK TMS320C6713 can bee seen below int reverb(int input) { int temp,output; static int i=0; temp = buffer1[i]; output = temp * 0.5; output = output + input; buffer1[i] = output; i++; if (i==buffer_length) i=0; return(output); } The difference between the reverb algorithm and the echo algorithm is not significant. The difference takes place in the program structure, and the delay process. In reverb, the delay process is applied in the output. These differences create a different effect character. IV. RESULT AND DISCUSSION The result of this application is analyzed with audio editor software. A sinusoid signal with 1 kHz frequency applied as the input to the board. This signal is generated using computer software and sent to the line in on the board. Then output from the board is sent to the computer to be analyzed in the same software.

Fig. 6. Input signal in frequency domain

Fig. 7. FFT graph of output signal without effect

Fig. 6 and Fig. 7 show the FFT (Fast Fourier Transform) graph of input and output signal without using audio effect algorithm where the axis represents the frequency of a signal in Hertz and ordinate represent the signal power in dB. It can be seen from the graph that in the output, there are some other frequency component beside the fundamental frequency. These frequency components are not wanted and known as noise. But if we look from signal intensity, the noise signals have a very low power compare to the main signal, which is causing the noise effect not significant. Next, if the input and output is compared, it will be found that there are 9,64 dB of attenuation between these signal. This attenuation occurs because of the characteristic and setting from the board. But the attenuation will not be a big problem, because when the application running, the output can be amplified using an external amplifier. When fuzz effect algorithm is implemented to the input, the harmonic distortion will occur as can be seen in Fig. 8.

with lower power and unwanted around two main frequencies. These unwanted frequencies can occur because of the noises that already occur before, when the input is not using fuzz effect. Noise occurs because of some factor, for example a poor audio transmission cable, noise from other instrument that is used, etc. However, the signal that comes out from this fuzz effect is still can be heard as the original signal, it means the frequency that is heard is still 1 kHz, just in a distorted form. It can be proved from the graph where the signal that has the highest power is 1 kHz. In delay based audio effect, the parameter that can be analyzed is the delay time. The delay time must be analyzed in time domain.

Fig. 9. Echo output signal in time domain

Fig. 9 show two output signals from echo effect. The original signal is in the left side while the reflected signal is in the right side. The delay time is measured from the beginning of the first signal to the second signal, resulting 1,024 second. The attenuation between those signals can be measure by comparing the FFT graph.

Fig. 8. FFT graph of output signal from fuzz effect

Fig. 10. FFT graph of original signal from echo effect

As it mention in the theory, that the harmonic distortion should occur in the odd number of harmonic. In the figure above, there are two main frequency components, 1 kHz and 3 kHz, which is match with the theory. However, there are other frequency components

Fig. 11. FFT graph of reflected signal from echo effect

Fig. 13. FFT graph of original output signal from reverb effect

From Fig. 10 and Fig. 11 show the attenuation between original signal and reflected signal is 6,19 dB. Noise in this graph is the same noise as discussed earlier.

Fig. 12. Reverb output signal in time domain

Fig. 14. FFT graph of reverb reflected signal, showing the signal attenuation

Fig. 12 shows the output result from reverb effect. As mention before, there are two parameter that can be measured in reverb effect, predelay and reverb decay, which are 320 ms and 2,239 s respectively. These parameter can be vary depend on buffer variable that is used in reverb algorithm. Same as echo effect, the attenuation between original signal and reflected signal can be seen in FFT (Fig. 13 and Fig. 14). The attenuation is 6,09 dB and constant for every reflected signal.

The time delay that is measured in echo and reverb effect depends on buffer value in its algorithm. A further analysis can be done by finding mathematical expression that shows relationship between these variable with iteration method. With this function, we can easily control the time delay.
30000 25000 20000 Buffer 15000 10000 5000 0 0 0.5 1 Delay (s) 1.5 2 1.536 1.408 1.28 1.152 1.021 0.896 0.768 0.64 0.512 0.384

Fig. 15. Iteration graph for echo effect

25000 20000 Buffer 15000 10000 5000 0 0 0.5 1 Delay (s) 1.5 2 1.472 1.344 1.216 1.088 0.96 0.832 0.704 0.575 0.448 0.32

Fig. 16. Iteration graph for reverb effect

Fig. 15 and Fig. 16 show the iteration graph from echo and reverb respectively. Because both graph are look similar, we may conclude that buffer value have same impact in echo and reverb algorithm. The relation between buffer and time delay can be written in mathematic expression, resulting y = 15627x + 2.6468 and y = 15621x + 4,8843 for echo and reverb respectively. As we can see in both graph, y is defined as the buffer value and x is defined as time delay. However, we found that there is a weakness in both algorithms. The value of buffer is limited in some constant. If the value surpasses this limit, overflow can occur. This weakness shows that the algorithm is not perfect yet and has to be developed further. V. CONCLUSION The design of audio effect can be applied to the DSP board successfully. It also can be used in real time application. The input signal of audio effect can be a music instrument or voice. The measured performances in every effect give a good result and the purpose of the design is met. Noises still occur in this application, but the effect is not significant so this noise will not disturb the process of application. VI. REFERENSI [1] TMS320C6713 DSK Technical Reference, Spectrum Digital, Inc., Mei 2003 [2] Sikora R.,Implementing Echo and Reverberation using the Audio Daughter Card and the TMS320C5402 DSK and the TMS320C6711 DSK, 22 July 2001 [3] Code Composer Studio Help, Texas Instrument, 2003 [4] Chassaing R., Digital Signal Processing and Applications with C6713 and C6416 DSK, John Wiley & Sons, Hoboken, New Jersey, 2005 [5] Lehman,S.,Reverberation, http://www.harmonycentral.com/Effects/Articles/Reverb/, 5 Juni 2006

Вам также может понравиться