# P5.js highPass is not working as expected

**URL:** https://discourse.processing.org/t/p5-js-highpass-is-not-working-as-expected/25950
**Category:** Libraries
**Created:** [December 4, 2020, 6:46pm UTC](https://discourse.processing.org/t/p5-js-highpass-is-not-working-as-expected/25950 "2020-12-04T18:46:53Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![exactspace](https://avatars.discourse-cdn.com/v4/letter/e/fbc32d/32.png) [@exactspace](https://discourse.processing.org/u/exactspace)
#### Post date: [December 4, 2020, 6:46pm UTC](https://discourse.processing.org/t/p5-js-highpass-is-not-working-as-expected/25950/1 "2020-12-04T18:46:53Z")

</div>

I thought highPass would only let frequencies pass above a set frequency.

For example, if I have a tone at 1000 Hz, and I set the high pass 18000, I still hear frequencies well below 18000 Hz. It changes the sound overall, just not the way I would expect. There has to be something else at play here, but I don’t know what it is.

```auto
var osc = new p5.Oscillator('sine');

osc.freq(1000, 0.1);
osc.amp(1, 0.1);

var highPass = new p5.HighPass();

highPass.freq(18000)

osc.disconnect();
osc.connect(highPass);

osc.start();

```
