Author Topic: playing sounds with matlab  (Read 2498 times)

Offline mathieulapointe

  • Newbie
  • *
  • Posts: 1
  • Matlab Forum
    • View Profile
playing sounds with matlab
« on: February 18, 2010, 06:15:50 AM »
hello here is a sample of a song played with matlab
 t1=1/10000:1/10000:0.5;
t2=1/10000:1/10000:0.25;
si=(sin(2*pi*246.94*t1));
ret2=sin(2*pi*293.66*t2);
sit2=sin(2*pi*246.94*t2);
fadt1=(sin(2*pi*369.99*t1));
solt1=(sin(2*pi*196*t1));
solupt1=(sin(2*pi*392*t1));
sound(si,10000)
sound(si,10000)
sound(si,10000)
sound(solt1,10000)
sound(ret2,10000)
sound(si,10000)
sound(solt1,10000)
sound(ret2,10000)
sound(si,10000)
sound(fadt1,10000)
sound(fadt1,10000)
sound(fadt1,10000)
sound(solupt1,10000)
sound(ret2,10000)
sound(si,10000)
sound(solt1,10000)
sound(ret2,10000)
sound(si,10000)
 
 
« Last Edit: April 22, 2010, 04:56:06 PM by Matlab »

Offline hero_hont

  • Newbie
  • *
  • Posts: 12
  • Matlab Forum
    • View Profile
Re: playing sounds with matlab
« Reply #1 on: September 02, 2010, 08:47:46 AM »
ok you..
We can use command:
soundsc(y,Fs)
soundsc(y,Fs,bits)
soundsc(y,Fs,bits,range)

In the matlab, help processing sound.
or import video:
info = mmfileinfo('myfile.avi');
info.Video.Format


Offline abrahampalace

  • Newbie
  • *
  • Posts: 1
  • Matlab Forum
    • View Profile
Re: playing sounds with matlab
« Reply #2 on: September 26, 2010, 05:55:05 AM »
how to make program work on fs=8000, Nbit=8, channel = stereo ??? please help my deadline task. i'm newbie for matlab.
thanks

Matlab and SimuLink Development Forum

Re: playing sounds with matlab
« Reply #2 on: September 26, 2010, 05:55:05 AM »