166683
This is just so sick. Really nice demo sounding tune.
>7,k=b ..." />
"You are walking in the dark through a winter forest among huge frozen trees. It seems that someone is watching you from the darkness..."
Here the code (262 bytes):
T=t/5E3,b=T>>7,k=b+2&4?8:4,S=(s,p,d=0)=>(t*2**(p+'037'[(T-d)/s%3|0]/12+((1-(T>>5&3))%2+1)/4)&128)/3,N=p=>1E5*sin(T*p|0)&64,S(2,0)+S(2,0,3)/2+(b&&S(0,-2))+(b>1&&S(.25,1)*(1-T%16/20))+(b>2&&.4*N(1E6)*(1-(T+k/2)%k/k))+(b>3&&(64/(T%k)&64)+(T&k&&.6*N(330)*(1-T%k/k)))
Play in bytebeat player
Sample rate: 44100Hz
Initially my challenge was to write the code that would fit in 255 characters (bytebeat256). The challenge has been completed, here 248 bytes version. But then I decided to add some variety so that the drums tempo would change over time.
The code generates chrods progressions from the initial pattern '037'. We can generate another harmonies by changing coefficients, for example:
'Chase in the Forest' version
'Foggy Forest' version
The code uses a square wave generator that generates various arpeggios, an echo and decay effects are applied to them. Also made a noise generator for drums, without using random()