Hello guys, As final project, I want say say something to microphone and it will be ehard from the left speaker and it will go to the right speaker not immediately, assume a car it moves from left to right.
in my process data, i wrote a function which will decrease the left speaker's volume while right speaker's volume increasing. however, it has a problem with incrementing. I also have doubts as well, because i still could not figure out that whether, this for function will move very fast, so i her the voice very fast, so i want to also put a timer. so i can control the cars speed.( my voices) while moving left to right.
if some one help me i would be glad. thanks alot;
Process data,
#include "Talkthrough.h"
#include "math.h"
void Process_Data(void)
{
iChannel0LeftOut = iChannel0LeftIn;
iChannel0RightOut = iChannel0RightIn;
iChannel1LeftOut = iChannel1LeftIn;
iChannel1RightOut = iChannel1RightIn;
}
void bounce(void)
{
int y;
float gl;
float gr;
float Leftin;
float Leftout;
float Rightin;
float Rightout;
float Rightout1;
float Leftout1;
float Rightout2;
float Leftout2;
Leftin=iChannel0LeftIn;
Rightin=iChannel0RightIn;
Rightout[n]=Rightin[n]+2*Rightin[n-1]+4*Rightin[n-2];
Leftout[n]=Leftin[n]+2Leftin[n-1]+4*Leftin[n-2];
for(y=-90; y<=90; y+=1)
{
gl=( (sin(90)*cos(y)+sin(y)*cos(90)) / (2*sin(90)*cos(y)) );
for(x=gl; x<=gl; x+=1)
gr=1-gl;
}
iChannel0LeftIn = iRxBuffer1[INTERNAL_ADC_L0];
iChannel0RightIn = iRxBuffer1[INTERNAL_ADC_R0];
Leftout=Leftout1
Rightout=Rightout1
Leftout2=gl[]*Leftout1;
Rightout2=gr[]*Rightout1;
iChannel0LeftOut=Leftout2;
iChannel0RightOut=Rightout2;
}
the delay function is not ready
No replies to this topic
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









