TinyChan

New reply in topic: Bytebeat/Floatbeat/Funcbeat

You are not recognized as the original poster of this topic.

:

You are required to fill in a captcha for your first 5 posts. Sorry, but this is required to stop people from posting while drunk. Please be responsible and don't drink and post!
If you receive this often, consider not clearing your cookies.

Please familiarise yourself with the rules and markup syntax before posting.


Replying to Anonymous J…

Glitchy noise thing…
let t=0,b=0,c=0,a=-1,d=1,l=(a,b,t)=>a+t*(b-a),bl=16e3,ba=[],bc=[0];
function f1(T){
  t=t+.01+(Math.sin(t+.1)*4.01);
  t+=b^(T%4);b=(t*(T%2.25))&5;
  c=(t+c)/2.005;t=c-2;
  t=(t%256+256)%256;
  let o=(2*(t/255))-1;
  a=l(-1,max(a,o),.98);d=l(1,min(d,o),.98);
  return ((o-a)/max(.001,abs(d-a)))-1;
}
function f2(T){
  let o=f1(T);
  if(ba.length<bl){
    ba.push(o);
  }else{
    bc=ba.reverse();ba=[];
  }
  return(((2*o-bc[(bl-1)-(Math.floor(T*2.9e3)%bl)]-bc[Math.floor(T*6.4e3)%bl])%2+1)%2)*.5;
}
for(let i=0;i<bl;i++)f2(i/8e3);
return f2;