Question
Now write a simple M-file bell.m that implements (1) to synthesize a bell sound. Your function should call bellenv.m to generate A.t/ D A0e A(t)=Ao*exp(-t/tau)
Now write a simple M-file bell.m that implements (1) to synthesize a bell sound. Your function should call bellenv.m to generate A.t/ D A0e A(t)=Ao*exp(-t/tau) and I(t)=Io*exp(-t/tau) . function xx = bell(ff, Io, tau, dur, fsamp) %BELL produce a bell sound % % usage: xx = bell(ff, Io, tau, dur, fsamp) % % where: ff = frequency vector (containing fc and fm) % Io = scale factor for modulation index % tau = decay parameter for A(t) and I(t) % dur = duration (in sec.) of the output signal % fsamp = sampling rate
I don't understand what is a ff vector. i'm supoose to also include this function into my main function so that can use my general fm equation.
function yy = bellenv(tau, dur, fsamp) %BELLENV produces envelope function for bell sounds % % usage: yy = bellenv(tau, dur, fsamp); % % where tau = time constant % dur = duration of the envelope % fsamp = sampling frequency % returns: % yy = decaying exponential envelope % note: produces exponential decay for positive tau TTs=1/fsamp; t=0:TTs:dur; yy=exp(-t/tau); end
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started