While using the beginShape(), endShape() and vertex() functions, I noticed some undesired beeping sounds (followed by low pitch “drumming” sounds). I tried searching for discussions over this topic, but couldn’t find it anywhere.
The problem came up while testing the functions in this sketch: https://editor.p5js.org/jusastronomer/sketches/1isTlv-LK
Whenever I run the sketch, I get the following sound: https://instaud.io/3vNY
After that, I tried a simpler sketch, with just a few vertices in the draw() function, but still got a beep. I can’t post more links because of the restrictions to new users, so I will paste the second test below:
function setup(){
createCanvas(400,400);
background(0);
}
function draw(){
beginShape();
vertex(75,75);
vertex(75,25);
vertex(25,50);
endShape();
}
I can hear the beeping in my Linux machine (on both Chrome and Firefox browsers) and on my Android mobile device (on the Chrome browser app).
Is the problem in my computer (and mobile phone) or in my code? Is this an expected behavior for the Vertex functions? I was trying to use it in an intonation app for music students, however the beeping renders the app useless.
Thank you very much for the attention!!