我老师要我制作一个效果器,自己写代码的。。。
不想说太多原因,因某些原因,我必须做出这个可编程的效果器,可是我目前无从下手,不过我知道GC大神无限,这种问题肯定有爱好者懂的。有人知道该如何做吗?要自己写代码的,不是那种直接焊接电路的效果器~~~求大神帮助 你那个学校的?请与我联系你老师很有意思哦,想认识下 好奇!这个学校,我很感兴趣啊 你该发到DIY板块去问问
回复 2楼 RockBear 的帖子
不是,老师知道我玩这个,所以叫我写个效果器,顺便当做答辩项目做了 是要干这个么……http://msdn.microsoft.com/zh-cn/subscriptions/downloads/jj712231 这个级别的问题,请google, 请检索各大图书馆的数据库回复 1楼 不败拿破仑 的帖子
这个比较难了,一个团队做还差不多,如果你是要做出实物,还得有硬件设计,反正头疼,弄出来的话,差不多可以开公司了。。。 哈哈 我当年就是用做效果器当的毕业设计,我这有些程序代码,回头给你。我qq279237985 附 录用MATLAB仿真
=wavread(‘wei’);
SIZ=wavread(‘wei’,’size’);
Time=1:SIZ(1);
Plot(time,Y);%画图波形图
Sound(Y,FS,BITS);%声音输出
n=SIZ(1);
X=Y;
for i=10001:n
Y(i)=X(i)+0.3*X(i-10000);%0.3即为衰减比例,10000即为延时长度
if Y(i)>1
Y(i)=1;
else
if Y(i)<-1
Y(i)=-1;
end
end
end
length(Y)
time=1:SIZ(1);
plot(time,Y);
sound(Y,FS,BITS);%声音输出
=wavread(‘wei’);
SIZ=wavread(‘wei’,’size’);
Time=1:SIZ(1);
Plot(time,Y);%声音输出
n=SIZ(1);
X=Y;
for i=22051:n
Y(i)=Y(i)+0.7*X(i-22050);%0.7即为衰减比例,22050即为延时长度
ifY(i)>1
Y(i)=1;
else
if Y(i)<-1
Y(i)=-1;
End
End
End
Time=1:SIZ(1);
Plot(time,Y);
Sound(Y,FS,BITS);%声音输出
C语言 实现延时效果
#define delay_time 5000
#define BUFFER_SIZE delay_time+1
Int flag=1;
Int input,output;
Int n;
Int write_position=BUFFER_SIZE-1;
Int read_position=0;
Void main ()
{
for (n=0;n<BUFFER_SIZE;n++)
buffer=0;
while(1)
{
Input=*(unsigned int*)0x021;
Output= buffer;
Output+=(input*22932)>>15;
Buffer-=(output*9830)>>15;
*(unsigned int*)0x0023 =output;
/*calculate read position*/
Read_position++;
If (read_position>(BUFFER_SIZE-1))
Read_position=0;
/*calculate write position*/
Write_position++;
If(write_position>(BUFFER_SIZE-1))
Write_position=0;
}
}
C语言实现合唱效果
#define BUFFER_SIZE 8000
Intbuffer;
Intwrite_position=BUFFER_SIZE-1;
Intread_position;
Intya1,output;
Inta;
Intdepth=30;
Intdelay=100;
Intrate=12;
Intpace , n;
Intstep=1;
Intfinaldelay;
Intinput;
Void main()
{
Finaldelay=delay;
Pace=16000/(rate*depth);
While (1)
{
Input=*(volatile unsigned int*)0x021;
If (n==pace)
{n=0;
Finaldelay+=step;}
Else
n++;
if(finaldelay>=(depth+delay))
step=-1;
if(finaldelay<=(delay))
step=1;
read_position=(write_position-finaldelay+BUFFER_SIZE-1)%(BUFFER_SIZE-1);
ya1=buffer;
buffer=input;
output=(ya1*29730)>>15;
output+=input;
if(output<=-32768){output=-32768;}
else
{if (output>=32767){output=32767;}}
*(volatile unsigned int*)0x0023=output;
Write_position++;
If(write_position>=BUFFER_SIZE-1)
{write_position=0;}
}
}
C语言实现混响效果
#define combdelay1 500
#define combdelay2 700
#define combdelay3 1020
#define combdelay4 1400
#define alldelay9 2600
#define alldelay10 1640
Int input ,sum;
Int y1,y2,y3,y4,y9,y10;
Int input;
Int buffer1;
Int buffer2;
Int buffer3;
Int buffer4;
Int buffer9;
Int buffer10;
Int write_position1=combdelay1-1;
Int write_position2=combdelay2-1;
Int write_position3=combdelay3-1;
Int write_position4=combdelay4-1;
Int write_position9=alldelay9-1;
Int write_position10=alldelay10-1;
Int read_position1=0;
Int read_position2=0;
Int read_position3=0;
Int read_position4=0;
Int read_position9=0;
Int read_position10=0;
Void main()
{
While(1)
{
Input=*(volatile unsigned int*)0x0021;
Y1=(buffer*22938)>>15;
Y1+=(buffer1*9830)>>15;
Buffer1=input;
Y2=(buffer2*21299)>>15;
Y2+=(buffer2*13107)>>15;
Buffer2=intput;
Y3=(buffer3*20316)>>15;
Y2+=(buffer3*24314)>>15;
Buffer3=intput;
Y4=(buffer4*19661)>>15;
Y4+=(buffer4*24019)>>15;
Buffer4=intput;
Sum=y1+y2+y3+y4;
If(sum<=-32768){sum=-32768;}
Else
{if(sum>=32767){sum=32767;}}
Y9=buffer9;
Y9-=(sum*22938)>>15;
Buffer9=sum;
Buffer9+=(y9*22983)>>15;
Y10=buffer10;
Y10-=(y9*22983)>>15;
Buffer10=y9;
Buffer10+=(y10*22938)>>15;
If(y9<=-32768) {y9=-32768;}
Else
{if(y9>=32767){y9=32767;}}
*(volatile unsigned int*)0x0023=y10;
Read_position1++;
If(read_position1>(combdelay1-1))
{read_position1=0;}
Read_position2++;
If(read_position2>(combdelay2-1))
{read_position2=0;}
Read_position3++;
If(read_position3>(combdelay3-1))
{read_position3=0;}
Read_position4++;
If(read_position4>(combdelay4-1))
{read_position4=0;}
Read_position9++;
If(read_position9>(alldelay9-1))
{read_position9=0;}
Read_position10++;
If(read_position10>(alldelay10-1))
{read_position10=0;}
Write_position1++;
If(write_posotion1>combdelay1-1))
Write_position1=0;
Write_position2++;
If(write_posotion2>combdelay2-1))
Write_position2=0;
Write_position3++;
If(write_posotion3>combdelay3-1))
Write_position3=0;
Write_position4++;
If(write_posotion4>combdelay4-1))
Write_position4=0;
Write_position9++;
If(write_posotion9>alldelay9-1))
Write_position9=0;
Write_position10++;
If(write_posotion10>alldelay10-1))
Write_position10=0;
} 吉他这东西在当下搞软件的玩起来还真是其乐无穷啊 大哥,能咨询你一下不,我qq275513557
页:
[1]