Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.






                var mic;//I created the var of the microphone
function setup() {
createCanvas(1200,700);//the size of the dimension of the pixels
// Create an Audio input
mic = new p5.AudioIn();
  // start the Audio Input.
  // Because by default it isn't connected
mic.start();//start the microphone
function draw() {
  background(100, 400, 200);
  fill(153, 021, 202);//set the color of the ellipse
ellipse(600, 200, 400, 400); //create the elipse(Xposition,Yposition,Width,Height)
ellipse(500, 120, 80, 80);
ellipse(690, 120, 80, 80);
ellipse(500, 120, 50, 50);
ellipse(690, 120, 50, 50);
triangle(575,200, 600, 200, 585, 150);//create the triangle(firstXposition,firstYposition,secondXposition,secondYposition,thirdXposition,thirdYposition)

// Get the overall volume (between 0 and 1.0)
  var vol = mic.getLevel();//to measure the volume
// Draw an ellipse with height based on volume
var h = map(vol, 0, 1, 220, 0);//the var h is defindided by the volume, that is, the height varies according to the microphone 
arc(600,240,120,120-h,0,PI);//I created the mouth