# How to debug p5 mic input

**URL:** https://discourse.processing.org/t/how-to-debug-p5-mic-input/8082
**Category:** Libraries
**Created:** [February 3, 2019, 6:01pm UTC](https://discourse.processing.org/t/how-to-debug-p5-mic-input/8082 "2019-02-03T18:01:52Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![blkpanther](https://avatars.discourse-cdn.com/v4/letter/b/d9b06d/32.png) [@blkpanther](https://discourse.processing.org/u/blkpanther)
#### Post date: [February 3, 2019, 6:01pm UTC](https://discourse.processing.org/t/how-to-debug-p5-mic-input/8082/1 "2019-02-03T18:01:52Z")

</div>

I’m using the sample [code](https://p5js.org/examples/sound-mic-input.html) on p5 website for mic input, but the screen doesn’t change on sound input - the circle doesn’t change height. I have p5.sound.js in the library folder, and another song input sample works, so there’s no issue with my mic or my library. There’s no error message though. Is there any way to tell what went wrong?

---

<div class="post-metadata">

### Author: ![Pr0tonX](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/pr0tonx/32/2590_2.png) [@Pr0tonX](https://discourse.processing.org/u/Pr0tonX)
#### Post date: [February 4, 2019, 1:54am UTC](https://discourse.processing.org/t/how-to-debug-p5-mic-input/8082/2 "2019-02-04T01:54:56Z")

</div>

Did you check if you had authorized your browser to access to your mic ?

---

<div class="post-metadata">

### Author: ![blkpanther](https://avatars.discourse-cdn.com/v4/letter/b/d9b06d/32.png) [@blkpanther](https://discourse.processing.org/u/blkpanther)
#### Post date: [February 4, 2019, 3:40am UTC](https://discourse.processing.org/t/how-to-debug-p5-mic-input/8082/3 "2019-02-04T03:40:11Z")

</div>

yes I did. there was a pop up window. I clicked yes.

---

<div class="post-metadata">

### Author: ![Pr0tonX](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/pr0tonx/32/2590_2.png) [@Pr0tonX](https://discourse.processing.org/u/Pr0tonX)
#### Post date: [February 4, 2019, 11:19pm UTC](https://discourse.processing.org/t/how-to-debug-p5-mic-input/8082/4 "2019-02-04T23:19:37Z")

</div>

Well, do you use Chrome or Safari for this ? I can’t run the sketch on Chrome if my local server whereas the online sketch run correctly ; according to the doc ([https://p5js.org/reference/#/p5.AudioIn](https://p5js.org/reference/#/p5.AudioIn)) it needs a https to be supported.  
Firefox does not cause any troubles though.  
Otherwise, verify every steps of your input with some **console.log** :

```auto
    console.log("mic active ? : " + mic.enabled)
    console.log("mic source ? : " + mic.currentSource)
    console.log("mic input ? : " + mic.input)

```

Maybe you will can see an error here ?

---

<div class="post-metadata">

### Author: ![blkpanther](https://avatars.discourse-cdn.com/v4/letter/b/d9b06d/32.png) [@blkpanther](https://discourse.processing.org/u/blkpanther)
#### Post date: [February 5, 2019, 4:36pm UTC](https://discourse.processing.org/t/how-to-debug-p5-mic-input/8082/5 "2019-02-05T16:36:52Z")

</div>

I’m using safari and the console.log is not showing as expected.

 ![54%20AM](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/c/c1aa08853d2b5f4f65c3cfcad4b1470e374809d8.png)
