```Date: Dec 12, 2012 9:52 PM
Author: Tanner Handa
Subject: Re: Matlab

bartekltg <bartekltg@gmail.com> wrote in message <kabfcf\$oa5\$1@node1.news.atman.pl>...> W dniu 2012-12-13 03:22, Tanner Handa pisze:> > bartekltg <bartekltg@gmail.com> wrote in message> > <kabas4\$jv1\$1@node1.news.atman.pl>...> >> W dniu 2012-12-13 01:56, Tanner Handa pisze:> >> > I am working on a Matlab project and trying to shorten the sound of> >> this> >> > frequency. Can you please further explain how to make the sound about> >> > half a second instead of about 1 second??> >> >> >> > This is what I am working with.> >> >> >> > freqsamp = 10000;> >> >> >> > t = linspace(0,1,freqsamp);> >>> >> t = linspace(0, 0.5, freqsamp);> >>> >> >> >> >> >> >> >> > a = (sin(1.5*pi*220*t) + sin(1.5*pi*440*t));> >> > sound(a, freqsamp)> >>> >>> > thanks i have already tried that and it only makes the sound deeper> > > oh, sorry.> > t = linspace(0, 0.5, 0.5 * freqsamp);> > If we have one seconds, we need freqsamp samples.> But, if we have 0.5s, we need only half.> > > bartekltgso how would I be able to make my happy birthday song sound better to make the sounds shorter??This is what I have and now when i do t = linspace(0, 0.5, 0.5 * freqsamp); it make the frequencies really high pitched.clearfreqsamp = 10000;t = linspace(0,1,freqsamp);a = sin(1.5*pi*220*t) + sin(1.5*pi*440*t);b = sin(2*pi*220*t) + sin(2*pi*440*t);c = sin(2.5*pi*220*t) + sin(2.5*pi*440*t); d = sin(3*pi*220*t) + sin(3*pi*440*t); e = sin(4*pi*220*t) + sin(4*pi*440*t);f = sin(4.5*pi*220*t) + sin(4.5*pi*440*t);g = (sin(5*pi*220*t) + sin(5*pi*440*t))/1.5; h = sin(5.5*pi*220*t) + sin(5.5*pi*440*t);i = sin(6*pi*220*t) + sin(6*pi*440*t);j = sin(6.5*pi*220*t) + sin(6.5*pi*440*t);sound(a, freqsamp) %HA      %3sound(a, freqsamp) %ppy     %3sound(b, freqsamp) %Birth   %5sound(a, freqsamp) %day     %3sound(f, freqsamp) %TO      %8sound(e, freqsamp) %you     %7sound(a, freqsamp)  %Ha     %3sound(a, freqsamp)  %ppy    %3sound(b, freqsamp)  %Birth  %5sound(a, freqsamp)  %day    %3sound(g, freqsamp)  %TOOO   %10sound(f, freqsamp)  %YOUUU  %8sound(a, freqsamp)  %HA     %3sound(a, freqsamp)  %PPY    %3sound(j, freqsamp)  %BIRTH  %15sound(h, freqsamp)  %DAY    %12sound(f, freqsamp)  %DEAR   %8sound(e, freqsamp)  %JOE     %7sound(b, freqsamp)  %EEYY   %5sound(i, freqsamp)  %HA     %13sound(i, freqsamp)  %PPY    %13sound(h, freqsamp)  %BIRTH  %12sound(f, freqsamp)  %DAY    %8sound(g, freqsamp)  %TO     %10sound(f, freqsamp)  %YOU    %8
```