Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Repeating Sound sequences' topicStudent Support Forum > General > "Repeating Sound sequences"

Next Comment >Help | Reply To Topic
Author Comment/Response
Bill
07/19/08 05:39am

Hi:

I have the following tune, and the code below works.

tune = Sound[SoundNote[#, 0.5, "Polysynth"] & /@ {2, 4, 0, -12, -5}];
EmitSound[tune]
Timing[Pause[3]];
EmitSound[tune]
Timing[Pause[3]];
EmitSound[tune]
Timing[Pause[3]];
EmitSound[tune]

What I'd like to know is, how can I play the tune 4 times without repeating the code (EmitSound[tune]
Timing[Pause[3]];), as I have above? I'd like to loop it 4 times, but I don't know how to code that using less code. Could someone please help me?


tia,

Bill

PS. I'm using Mathematica 6.0.1 with Win XP on a PC.

URL: ,

Subject (listing for 'Repeating Sound sequences')
Author Date Posted
Repeating Sound sequences Bill 07/19/08 05:39am
Re: Repeating Sound sequences yehuda ben-s... 07/20/08 09:32am
Re: Repeating Sound sequences Xavier 07/20/08 11:22am
Re: Repeating Sound sequences Bill 07/21/08 12:52pm
Next Comment >Help | Reply To Topic