INNER CODE UNIT · JavaScript

r

ren-yuan/c2.js · examples for p5.js/Analyser.js:66

    let r = rms * width;
    circle(width/2, 0, r);

    fill(color2);
    beginShape();
    for(let i=0; i<timeDomain.length; i++){
        let x = map(i, 0, timeDomain.length, 0, width);
        let y = height/2 + timeDomain[i] * height/2;
        vertex(x, y);
    }
    vertex(width, height);
    vertex(0, height);
    endShape(CLOSE);

    fill(color3);
    beginShape();
    for(let i=0; i<freqDomain.length; i++){
        let x = map(i, 0, freqDomain.length, 0, width);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…