Advertisement
Matthen

Nonsense Music

Oct 2nd, 2012
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. x = Import["http://infolab.stanford.edu/~yangc/musicir/e043.wav",
  2. "Data"];
  3. data = First[x];
  4. p = 1/22050;
  5. r = Table[
  6. If[RandomReal[] < p, RandomInteger[Length@data], 1], {i,
  7. 3 Length@data}];
  8. datar = Map[data[[Mod[#, Length@data] + 1]] &, FoldList[Plus, 1, r]];
  9. ListPlay[datar, SampleRate -> 22050]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement