📄 chowning.m
字号:
function y = chowning(t,fc,fm,e1,e2)
%CHOWNING FM synthesized note using Chowning's formula.
% y = chowning(t,fc,fm,e1,e2)
% t=time array, fc=carrier freq, fm=modulating freq
% e1 and e2 are envelopes produced by asr (Type help asr for details)
% The output corresponds to
% y=e1.*sin(2*pi*fc*t+e2.*sin(2*pi*fm*t)) Defaults: e1=1, e2=1
%
% If no input arguments are given, the follwoing example is implemented
%
% t1=(0:8191)/8192;[m1,m2]=asr(t1);y1=chowning(t1,400,3,m1,m2);sound(y1);
% ADSP Toolbox: Version 2.0
% For use with "Analog and Digital Signal Processing", 2nd Ed.
% Published by PWS Publishing Co.
%
% Ashok Ambardar, EE Dept. MTU, Houghton, MI 49931, USA
% http://www.ee.mtu/faculty/akambard.html
% e-mail: akambard@mtu.edu
% Copyright (c) 1998
if nargin==0,help chowning, disp('strike a key to hear the example sound'),
pause,t1=(0:8191)/8192;[m1,m2]=asr(t1);
y1=chowning(t1,400,3,m1,m2);sound(y1);return,end
if nargin<5,e2=1;end
if nargin<4,e1=1;end
y=e1.*sin(2*pi*fc*t+e2.*sin(2*pi*fm*t));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -