You are not recognized as the original poster of this topic.
f=t=>{
if(t<0)return 0;
let at=(t*tempo)%melody.length,
e=melody[floor(at)],
swing=.4,
f=(typeof e==="number"?noteHz(e):noteHz(e[+(at%1>swing)]))+16.9;
return(((t*(f*(at%1<=swing?.25:.5))*1.702%1>at%1)+(t*f%1))-1)*(.3-((at%1<=swing?at%1:(at%1)-swing)**.3)*.28)*2;
};
return t=>{
t*=.87;
return f(t*2)*.4+f(t*1.5)+f(t)+f(t-.502)*.7+f(t-1.04)*.4;
};