Skip to content

Commit eb7d04b

Browse files
committed
extract P5SoundBiquad children to separate files
1 parent a61ccca commit eb7d04b

File tree

3 files changed

+54
-0
lines changed

3 files changed

+54
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { P5SoundBiquad } from "./P5SoundBiquad.js";
2+
3+
/**
4+
* Creates a Bandpass P5SoundBiquad filter.
5+
* @class P5SoundBandPass
6+
* @constructor
7+
* @extends P5SoundBiquad
8+
* @param {Number} [freq] Set the cutoff frequency of the filter
9+
*/
10+
export class P5SoundBandPass extends P5SoundBiquad
11+
{
12+
constructor(frequency)
13+
{
14+
super(frequency, "bandpass");
15+
}
16+
17+
isP5SoundBandPass = true;
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { P5SoundBiquad } from "./P5SoundBiquad.js";
2+
3+
/**
4+
* Creates a Highpass P5SoundBiquad filter.
5+
* @class P5SoundHighPass
6+
* @constructor
7+
* @extends P5SoundBiquad
8+
* @param {Number} [freq] Set the cutoff frequency of the filter
9+
*/
10+
export class P5SoundHighPass extends P5SoundBiquad
11+
{
12+
constructor(frequency)
13+
{
14+
super(frequency, "highpass");
15+
}
16+
17+
isP5SoundHighPass = true;
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { P5SoundBiquad } from "./P5SoundBiquad.js";
2+
3+
/**
4+
* Creates a Lowpass P5SoundBiquad filter.
5+
* @class P5SoundLowPass
6+
* @constructor
7+
* @extends P5SoundBiquad
8+
* @param {Number} [freq] Set the cutoff frequency of the filter
9+
*/
10+
export class P5SoundLowPass extends P5SoundBiquad
11+
{
12+
constructor(frequency)
13+
{
14+
super(frequency, "lowpass");
15+
}
16+
17+
isP5SoundLowPass = true;
18+
}

0 commit comments

Comments
 (0)