Presentation is loading. Please wait.

# Mohammed Almajhad Final Project Dr. Kepuska. Intro My project idea is based on playing sound on different effects as we see these days. Also, adding a.

## Presentation on theme: "Mohammed Almajhad Final Project Dr. Kepuska. Intro My project idea is based on playing sound on different effects as we see these days. Also, adding a."— Presentation transcript:

Mohammed Almajhad Final Project Dr. Kepuska

Intro My project idea is based on playing sound on different effects as we see these days. Also, adding a volume gain to these sound effects with out affecting the default mode. I also added a choice of increasing or decreasing the volume manually on the default mode. LED’s will be changing as we choose different mode

Project contains :  Sound Effects  Volume Gain on sound effects  Increase or decrease Volume manually

Chorus static int input=0,delay=0; int x,y=0; delay=(int)((1-(cos(6.28*0.4*input/5000)))*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=5000+delay; //if the value of the delay go below 0, it retakes 5000 samples } //it basically "goes back to the start" buffer1[input]=(iChannel0LeftIn>>8); //shift to the right to make it 16 bits (short) buffer2[input]=(iChannel0RightIn>>8); 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>=5000-1) //if the number of samples go beyond 5000, resets it to 0 input = 0; else input++; iChannel0LeftOut=(x<<8); iChannel0RightOut=(y<<8); //shift back x and y to make them 24 bits to output as sound Volume_UP();

Echo static int input=0; int x,y=0; buffer1[input]=(iChannel0LeftIn>>8)+(0.6*buffer1[input]); buffer2[input]=(iChannel0RightIn>>8)+(0.6*buffer2[input]); x=(int)buffer1[input]; y=(int)buffer2[input]; if(input>=5000-1) input = 0; else input++; iChannel0LeftOut=(x<<8 ); iChannel0RightOut=(y<<8); Volume_UP();

Volume Gain iChannel0LeftOut = (loudness)*(iChannel0LeftOut); iChannel0RightOut = (loudness)*(iChannel0RightOut); iChannel1LeftOut = (loudness)*(iChannel1LeftOut); iChannel1RightOut = (loudness)*(iChannel1RightOut);

Increasing or Decreasing if (*pFIO_FLAG_C == 0x0400) { // confirm PF10 interrupt handling *pFIO_FLAG_C = 0x0400; //PF11 : Volume up if (sound != 0) { sound--; } FIO_ANOM_0311_FLAG_W(0x0400,pFIO_FLAG_C); } if (*pFIO_FLAG_C == 0x0800) { // confirm PF10 interrupt handling *pFIO_FLAG_C = 0x0800; sound++; //PF10 : Volume Down if (sound >= 5) { sound =1; } FIO_ANOM_0311_FLAG_W(0x0800,pFIO_FLAG_C); }

The End Any questions about the project or suggestions to improve the project?

Download ppt "Mohammed Almajhad Final Project Dr. Kepuska. Intro My project idea is based on playing sound on different effects as we see these days. Also, adding a."

Similar presentations

Ads by Google