# Volume dips when connecting to p5.Amp

**URL:** https://discourse.processing.org/t/volume-dips-when-connecting-to-p5-amp/20285
**Category:** Libraries
**Created:** [April 29, 2020, 8:17pm UTC](https://discourse.processing.org/t/volume-dips-when-connecting-to-p5-amp/20285 "2020-04-29T20:17:03Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![unofficial](https://avatars.discourse-cdn.com/v4/letter/u/8491ac/32.png) [@unofficial](https://discourse.processing.org/u/unofficial)
#### Post date: [April 29, 2020, 8:17pm UTC](https://discourse.processing.org/t/volume-dips-when-connecting-to-p5-amp/20285/1 "2020-04-29T20:17:03Z")

</div>

Hey all I have been crazy about what I thought was a more complicated problem, but it seems like it is perhaps just a simple bug? If you connect an audio source to a p5.Gain it seems to drastically reduce the level of the audio?

If you try the code below you will see the oscillator will play normally but then when it is connected to the gain node it gets way quieter, anyone have any ideas?

Press ‘p’ to start the osc  
Press ‘i’ to connect the osc to the gain node

```auto
let osk, chan;

function setup() {
  createCanvas(400, 400);
  
  osk = new p5.TriOsc(100);
  chan = new p5.Gain();
  chan.connect();
}

function draw() {
  background(220);
}

function keyPressed(){
  if(key == 'p') osk.start();
  
  if(key === 'o') 
  if(key === 'i'){
   osk.disconnect();
   osk.connect(chan);
  } 
}

```
