Impact-Site-Verification: dbe48ff9-4514-40fe-8cc0-70131430799e

Search This Blog

Play Multiple sounds in MATLAB (Twinkle Twinkle Little Star) m file


%Code:
%Multiple Sounds
clc
clear all
close all
t=0:1/44100:0.5;
c=sin(2*pi*262*t);
g=sin(2*pi*392*t);
a=sin(2*pi*440*t);
f=sin(2*pi*349*t);
e=sin(2*pi*330*t);
d=sin(2*pi*294*t);
offset = zeros(1,500);
g=[c offset c offset g offset g offset a offset a offset g offset offset offset ...
   f offset f  offset e offset e offset d offset d offset c];
sound(g,44100);


No comments

Popular Posts

Followers