Skip to content

Instantly share code, notes, and snippets.

@thormagnusson
Created August 31, 2014 15:04
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thormagnusson/89b6507d3562a71f432e to your computer and use it in GitHub Desktop.
Save thormagnusson/89b6507d3562a71f432e to your computer and use it in GitHub Desktop.
Temporal Recursion in SuperCollider
// recursion
f = {arg a;
a = a+1;
a.postln;
if(a<10, { thisFunction.value(a) })
};
f.(2)
// temporal recursion
f = {arg a;
fork{a = a+1;
a.postln;
0.1.wait;
if(a<10, { thisFunction.value(a) })
}};
f.(1)
@cdbzb
Copy link

cdbzb commented Oct 3, 2019

Cool thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment