2

I couldn't find the reason why the following code consumming my time (1min no output results):

lis = {1, 3, 7, 19};
Sound[Table[
 Play[Sum[4/(Pi j) Sin[440*j*(t + Pi/2/440)], {j, 1, i, 2}], {t, 0, 
   0.7 2 Pi/440}],
 {i, lis}
 ]
]
van abel
  • 1,235
  • 1
  • 11
  • 27

1 Answers1

2

Like this:

lis = {1, 3, 7, 19};
Sound[Play[
           Sum[4/(Pi j) Sin[440*j*(t + Pi/2/440)], {j, 1, #, 2}],
          {t, 0, 0.7 2 Pi/440}] & /@ lis]

enter image description here

xyz
  • 605
  • 4
  • 38
  • 117