大家好,又见面了,我是你们的朋友全栈君。
fs=44100;dt=1/fs;T16=0.125;t16=[0:dt:T16];
[temp k]=size(t16);t4=linspace(0,4*T16,4*k);
t8=linspace(0,2*T16,2*k);[temp i]=size(t4);
[temp j]=size(t8);%Modification functions
mod4=(t4.^4).*exp(-30*(t4.^0.5));
mod4=mod4*(1/max(mod4));
mod8=(t8.^4).*exp(-50*(t8.^0.5));
mod8=mod8*(1/max(mod8));
mod16=(t16.^4).*exp(-90*(t16.^0.5));
mod16=mod16*(1/max(mod16));f0=2*146.8;%reference frequency
ScaleTable=[2/33/45/615/16…
19/85/44/33/25/39/515/8…
29/4528/3310/315/44…
1/29/165/8];%1/4notes
do0f=mod4.*cos(2*pi*ScaleTable(21)*f0*t4);
re0f=mod4.*cos(2*pi*ScaleTable(22)*f0*t4);
mi0f=mod4.*cos(2*pi*ScaleTable(23)*f0*t4);fa0f=mod4.*cos(2*pi*ScaleTable(1)*f0*t4); so0f=mod4.*cos(2*pi*ScaleTable(2)*f0*t4);
la0f=mod4.*cos(2*pi*ScaleTable(3)*f0*t4);
ti0f=mod4.*cos(2*pi*ScaleTable(4)*f0*t4);
do1f=mod4.*cos(2*pi*ScaleTable(5)*f0*t4);
re1f=mod4.*cos(2*pi*ScaleTable(6)*f0*t4);
mi1f=mod4.*cos(2*pi*ScaleTable(7)*f0*t4);
fa1f=mod4.*cos(2*pi*ScaleTable(8)*f0*t4);
so1f=mod4.*cos(2*pi*ScaleTable(9)*f0*t4);
la1f=mod4.*cos(2*pi*ScaleTable(10)*f0*t4);
tb1f=mod4.*cos(2*pi*ScaleTable(11)*f0*t4);
ti1f=mod4.*cos(2*pi*ScaleTable(12)*f0*t4);
do2f=mod4.*cos(2*pi*ScaleTable(13)*f0*t4);
re2f=mod4.*cos(2*pi*ScaleTable(14)*f0*t4);
mi2f=mod4.*cos(2*pi*ScaleTable(15)*f0*t4);
fa2f=mod4.*cos(2*pi*ScaleTable(16)*f0*t4);
so2f=mod4.*cos(2*pi*ScaleTable(17)*f0*t4);
la2f=mod4.*cos(2*pi*ScaleTable(18)*f0*t4);
ti2f=mod4.*cos(2*pi*ScaleTable(19)*f0*t4);
do3f=mod4.*cos(2*pi*ScaleTable(20)*f0*t4);
blkf=zeros(1,i);%1/8notes
do0e=mod8.*cos(2*pi*ScaleTable(21)*f0*t8);
re0e=mod8.*cos(2*pi*ScaleTable(22)*f0*t8);
mi0e=mod8.*cos(2*pi*ScaleTable(23)*f0*t8);fa0e=mod8.*cos(2*pi*ScaleTable(1)*f0*t8); so0e=mod8.*cos(2*pi*ScaleTable(2)*f0*t8);
la0e=mod8.*cos(2*pi*ScaleTable(3)*f0*t8);
ti0e=mod8.*cos(2*pi*ScaleTable(4)*f0*t8);
do1e=mod8.*cos(2*pi*ScaleTable(5)*f0*t8);
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/190624.html原文链接:https://javaforall.cn