float square(float n)
{
    return n*n;
}
float bounce = 0.25;
float bounce2 = 0.25;

void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
    vec2 uv = fragCoord.xy / iResolution.xy;
    vec2 res = vec2(1.0, 8.0);
    vec2 iuv = floor( uv * res )/res;


    float ww = iResolution.x;
    float hh = iResolution.y;
    float sound = texture( iChannel0, vec2(iuv.y, 1.0) ).x*1.0;
    if (bounce2 < sound*5.0){bounce2 += sound*5.0;}
    if (bounce2 > sound*13.0){bounce2 -= sound*13.0;}
    bounce2 /= 2.0;
    if (bounce < bounce2){bounce += bounce2/5.0;}
    if (bounce > bounce2){bounce -= bounce2/5.0;}
    bounce = clamp(bounce, 1.0, 233.0);
    float time2 = iTime+2.0*(sin(square(1.0*(uv.x-0.5)) + square(1.0*(uv.y-0.5))));

    float r = sin(time2/2.0)*20.0*bounce;
    float p = (square(fragCoord.x-ww/2.0) + square(fragCoord.y-hh/5.0))*((sin(time2/8.0)+1.0)/2.0)*((time2-2.0)*5.0)*(bounce/8.0);

    fragColor.r = sin(p/500.0)+1.0*bounce/2.0;
    fragColor.g = sin(p/300.0+r/0.5)+1.*bounce/2.0;
    fragColor.b = sin(p/300.0+r/0.2)+1.0*bounce/3.0;
}
