Skip to content

Commit e08ba9f

Browse files
committed
update docs for subclass of filter and oscillator
1 parent 9373141 commit e08ba9f

File tree

2 files changed

+37
-31
lines changed

2 files changed

+37
-31
lines changed

src/filter.js

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ define(function (require) {
55
var Effect = require('effect');
66

77
/**
8-
* A p5.Filter uses a Web Audio Biquad Filter to filter
9-
* the frequency response of an input source. Inheriting
10-
* classes include:<br/>
11-
* * <code>p5.LowPass</code> - allows frequencies below
12-
* the cutoff frequency to pass through, and attenuates
13-
* frequencies above the cutoff.<br/>
14-
* * <code>p5.HighPass</code> - the opposite of a lowpass
15-
* filter. <br/>
16-
* * <code>p5.BandPass</code> - allows a range of
17-
* frequencies to pass through and attenuates the frequencies
18-
* below and above this frequency range.<br/>
8+
* <p>A p5.Filter uses a Web Audio Biquad Filter to filter
9+
* the frequency response of an input source. Subclasses
10+
* include:</p>
11+
* * <a href="/reference/#/p5.LowPass"><code>p5.LowPass</code></a>:
12+
* Allows frequencies below the cutoff frequency to pass through,
13+
* and attenuates frequencies above the cutoff.<br/>
14+
* * <a href="/reference/#/p5.HighPass"><code>p5.HighPass</code></a>:
15+
* The opposite of a lowpass filter. <br/>
16+
* * <a href="/reference/#/p5.BandPass"><code>p5.BandPass</code></a>:
17+
* Allows a range of frequencies to pass through and attenuates
18+
* the frequencies below and above this frequency range.<br/>
1919
*
2020
* The <code>.res()</code> method controls either width of the
2121
* bandpass, or resonance of the low/highpass cutoff frequency.
@@ -213,8 +213,9 @@ define(function (require) {
213213
* its method <code>setType('lowpass')</code>.
214214
* See p5.Filter for methods.
215215
*
216-
* @method LowPass
217-
* @for p5
216+
* @class p5.LowPass
217+
* @constructor
218+
* @extends {p5.Filter}
218219
*/
219220
p5.LowPass = function() {
220221
p5.Filter.call(this, 'lowpass');
@@ -227,8 +228,9 @@ define(function (require) {
227228
* its method <code>setType('highpass')</code>.
228229
* See p5.Filter for methods.
229230
*
230-
* @method HighPass
231-
* @for p5
231+
* @class p5.HighPass
232+
* @constructor
233+
* @extends {p5.Filter}
232234
*/
233235
p5.HighPass = function() {
234236
p5.Filter.call(this, 'highpass');
@@ -241,8 +243,9 @@ define(function (require) {
241243
* its method <code>setType('bandpass')</code>.
242244
* See p5.Filter for methods.
243245
*
244-
* @method BandPass
245-
* @for p5
246+
* @class BandPass
247+
* @constructor
248+
* @extends {p5.Filter}
246249
*/
247250
p5.BandPass = function() {
248251
p5.Filter.call(this, 'bandpass');

src/oscillator.js

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,11 @@ define(function (require) {
1515
* 440 oscillations per second (440Hz, equal to the pitch of an
1616
* 'A' note).</p>
1717
*
18-
* <p>Set the type of oscillation with setType(), or by creating a
19-
* specific oscillator.</p> For example:
20-
* <code>new p5.SinOsc(freq)</code>
21-
* <code>new p5.TriOsc(freq)</code>
22-
* <code>new p5.SqrOsc(freq)</code>
23-
* <code>new p5.SawOsc(freq)</code>.
18+
* <p>Set the type of oscillation with setType(), or by instantiating a
19+
* specific oscillator: <a href="/reference/#/p5.SinOsc">p5.SinOsc</a>, <a
20+
* href="/reference/#/p5.TriOsc">p5.TriOsc</a>, <a
21+
* href="/reference/#/p5.SqrOsc">p5.SqrOsc</a>, or <a
22+
* href="/reference/#/p5.SawOsc">p5.SawOsc</a>.
2423
* </p>
2524
*
2625
* @class p5.Oscillator
@@ -496,8 +495,9 @@ define(function (require) {
496495
* its method <code>setType('sine')</code>.
497496
* See p5.Oscillator for methods.
498497
*
499-
* @method SinOsc
500-
* @for p5
498+
* @class p5.SinOsc
499+
* @constructor
500+
* @extends {p5.Oscillator}
501501
* @param {Number} [freq] Set the frequency
502502
*/
503503
p5.SinOsc = function(freq) {
@@ -514,8 +514,9 @@ define(function (require) {
514514
* its method <code>setType('triangle')</code>.
515515
* See p5.Oscillator for methods.
516516
*
517-
* @method TriOsc
518-
* @for p5
517+
* @class p5.TriOsc
518+
* @constructor
519+
* @extends {p5.Oscillator}
519520
* @param {Number} [freq] Set the frequency
520521
*/
521522
p5.TriOsc = function(freq) {
@@ -532,8 +533,9 @@ define(function (require) {
532533
* its method <code>setType('sawtooth')</code>.
533534
* See p5.Oscillator for methods.
534535
*
535-
* @method SawOsc
536-
* @for p5
536+
* @class p5.SawOsc
537+
* @constructor
538+
* @extends {p5.Oscillator}
537539
* @param {Number} [freq] Set the frequency
538540
*/
539541
p5.SawOsc = function(freq) {
@@ -550,8 +552,9 @@ define(function (require) {
550552
* its method <code>setType('square')</code>.
551553
* See p5.Oscillator for methods.
552554
*
553-
* @method SqrOsc
554-
* @for p5
555+
* @class p5.SqrOsc
556+
* @constructor
557+
* @extends {p5.Oscillator}
555558
* @param {Number} [freq] Set the frequency
556559
*/
557560
p5.SqrOsc = function(freq) {

0 commit comments

Comments
 (0)