Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Matlab
Replies: 11   Last Post: Dec 13, 2012 12:12 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Tanner Handa

Posts: 7
Registered: 12/12/12
Re: Matlab
Posted: Dec 13, 2012 12:12 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

bartekltg <bartekltg@gmail.com> wrote in message <kabnrh$fqg$1@node2.news.atman.pl>...
> W dniu 2012-12-13 05:54, Tanner Handa pisze:
> > bartekltg <bartekltg@gmail.com> wrote in message
> > <kablud$ti2$1@node1.news.atman.pl>...

> >> W dniu 2012-12-13 04:41, Tanner Handa pisze:
> >>

> >> >>
> >> >> OK, I think.
> >> >> But you can create function to do this:
> >> >>
> >> >> a= foo (t, 1.5);
> >> >> b= foo (t, 2) ;
> >> >> ...
> >> >> g= foo(t,5)/1.5;
> >> >> ...
> >> >>
> >> >>

> >> >> > sound(a, freqsamp) %HA %3
> >> >> > sound(a, freqsamp) %ppy %3

> >> >>
> >> >> And there is very long pause between sounds.
> >> >> You want to play whole song.
> >> >>
> >> >> sound ( [a,a,b,a,f,e,a,a,b,a,g,f], freqsamp );
> >> >>
> >> >> But now you haven't any pause. Create short 'pause'
> >> >> (vector of silent;) I mean zeros) and add between every note.
> >> >> Better: add this to function foo.
> >> >>
> >> >>
> >> >> bartekltg

> >> >
> >> > Im not sure what foo is doing. This isn't working when I try to program
> >> > this in MATLAB. I believe I understand everything else though.

> >>
> >> You must write 'foo' function. Maybe name it 'tune_generator'
> >> or similar. It takes 'note' - number like 1,2,3.5 or 6
> >> and return
> >>
> >> You wrote " sin( _number_ *pi*220*t) + sin( _number_ *pi*440*t); "
> >> ten times! It's better to use function than copy&paste code.
> >> But of course you code will work.
> >>
> >>
> >> So sound( [a,a,b,a,f,e,a,a,b,a,g,f], freqsamp ); and "pause" work
> >> for you?
> >>
> >> bartekltg
> >>
> >>

> > Thank you it's working but how can I pause between two points. Such as
> > between (a,a)

>
>
> I have written how.
>
> sound( [a,p,a,p,b....
>
> where p is vector of zeros. More zeros - longer pause.
> p = zeros (1, 1000 ); % 0.1s pause
>
> bartekltg


you have been such a huge help thank you so much!!!!!!!!!!!!!!



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.