I am trying to play a sequence of sounds in Mathematica using Table
. My real example is much more complicated so that is why I got to using Table
,
Why doesn't the follow code work?
frequencies = {{100, 200}, {200, 300}, {400, 600}};
Sound[
Table[
Sound[Play[Total[Sin[# 2 Pi t] & /@ frequencies[[i]]], {t, 0, 0.5}]],
{i, 1, 3, 1}]]
If I run the sounds as a list it works fine, but when using table it does not, I just get the following:
Sound[{Sound[ Sound[SampledSoundFunction[ Function[{Play`Time494}, Block[{t = 0. + 0.000125 Play`Time494}, (Total[(Sin[#1 2 \[Pi] t] &) /@ frequencies[[i]]] - 4.44089*10^-16) 0.568158]], 4000, 8000]]], Sound[Sound[ SampledSoundFunction[ Function[{Play`Time495}, Block[{t = 0. + 0.000125 Play`Time495}, (Total[(Sin[#1 2 \[Pi] t] &) /@ frequencies[[i]]] + 1.88738*10^-15) 0.525731]], 4000, 8000]]], Sound[Sound[ SampledSoundFunction[ Function[{Play`Time496}, Block[{t = 0. + 0.000125 Play`Time496}, (Total[(Sin[#1 2 \[Pi] t] &) /@ frequencies[[i]]] + 8.88178*10^-16) 0.525731]], 4000, 8000]]]}]
Any help appreciated