70 likes | 180 Vues
This project demonstrates the implementation of sound effects, specifically chorus and echo, using microcomputer systems. The chorus effect combines nearly identical sounds at slightly varying pitches to create a richer audio experience. The echo effect provides a time-delayed reflection of sounds, enhancing the audio depth. The project includes coding for each effect, detailing how the parameters influence sound output. The demonstration runs through the functions, showcasing the original sound and the processed effects, inviting feedback for potential improvements.
E N D
SulTan BINHUMOOD Final Project Presentation Microcomputer Systems 1
Project Info • My project idea is based on playing sound displaying different effects seen in everyday experiences.
EFFECTS • CHORUS chorus effect (sometimes chorusing effect) occurs when individual sounds are roughly the same and nearly (but never exactly) the same pitch converge and are perceived as one • ECHO A time-delayed electronic reflection of a speaker's voice.
Chorus - CODING • for(i = 0; i < BUFLEN; i++) • { • delay = (int)((1 - (cos(6.28 * 0.4 * input / 1000))) * 20); //eq'n for delay = D/2(1-(cos(2*pi*n*f)) • delay = input - delay; //usage of the delay in the output equation • if (delay < 0) • { • delay = 1000 + delay; //if the value of the delay go below 0, it retakes 5000 samples • } //it basically "goes back to the start" • buffer1[input] = (short) (pIn[i * 2]); • buffer2[input] = (short) (pIn[i * 2 + 1]); • x = (int)(buffer1[input] + 2 * buffer1[delay] / 3); //2/3 is alpha, which is like a volume control;it controls the intensity of the effect's signal • y = (int)(buffer2[input] + 2 * buffer1[delay] / 3); //x and y both have 16 bits stored in them • if(input >= 1000 - 1) //if the number of samples go beyond 5000, resets it to 0 • input = 0; • else • input++; • pOut[i * 2]= (x); • pOut[i * 2 + 1]= (y); // display output in the output buffer • } • }
Echo - CODING • void Echo_Effect(short *pIn, short *pOut) • { • inti; • short buffer1[1000]; • short buffer2[1000]; • static int input = 0; • int x, y=0; • for(i = 0; i < BUFLEN; i++) • { • buffer1[input] = (pIn[i * 2]) + (0.6 * buffer1[input]); • buffer2[input] = (pIn[i * 2 + 1]) + (0.6 * buffer2[input]); • x = (int) (buffer1[input]); • y = (int) (buffer2[input]); • if(input>= 1000-1) • input = 0; • else • input++; • pOut[i * 2] = (x); • pOut[i * 2 + 1] = (y); // display output in the output buffer • } • }
Run project • Run the actual project and show how the effects work. • > First select Passthrough to show the actual sound • > Next show Chorus Effect • > Show Echo Effect
The End • Any questions about the project or suggestions to improve the project?