Skip to content

Instantly share code, notes, and snippets.

@symdesign
Created December 8, 2017 11:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save symdesign/1d677cfa2bcc1785786d4c36803f6b57 to your computer and use it in GitHub Desktop.
Save symdesign/1d677cfa2bcc1785786d4c36803f6b57 to your computer and use it in GitHub Desktop.
freq = 2;
decay = 1;
mult = .05;
if (numKeys > 1 && time > key(2).time){
t = time - key(2).time;
a = velocityAtTime(key(2).time-.01)[0];
d = a*mult*Math.sin(t*freq*Math.PI*2)/Math.exp(t*decay);
value + [d,d]
}else{
value
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment