@@ -212,7 +212,17 @@ define(function (require) {
212
212
// these are now the same thing
213
213
p5 . Oscillator . prototype . fade = p5 . Oscillator . prototype . amp ;
214
214
215
- p5 . Oscillator . prototype . getAmp = function ( ) {
215
+
216
+ /**
217
+ * Returns the value of output gain
218
+ *
219
+ * @method getAmp
220
+ * @for p5.Oscillator
221
+ *
222
+ * @returns {number } Amplitude value between 0.0 and 1.0
223
+ */
224
+ p5 . Oscillator . prototype . getAmp = function ( ) {
225
+
216
226
return this . output . gain . value ;
217
227
} ;
218
228
@@ -293,6 +303,13 @@ define(function (require) {
293
303
return this . oscillator . frequency ;
294
304
}
295
305
} ;
306
+ /**
307
+ * Returns the value of frequency of oscillator
308
+ *
309
+ * @method getFreq
310
+ * @for p5.Oscillator
311
+ * @returns {number } Frequency of oscillator in Hertz
312
+ */
296
313
297
314
p5 . Oscillator . prototype . getFreq = function ( ) {
298
315
return this . oscillator . frequency . value ;
@@ -308,6 +325,13 @@ define(function (require) {
308
325
p5 . Oscillator . prototype . setType = function ( type ) {
309
326
this . oscillator . type = type ;
310
327
} ;
328
+ /**
329
+ * Returns current type of oscillator eg. 'sine', 'triangle', 'sawtooth' or 'square'.
330
+ *
331
+ * @method getType
332
+ * @for p5.Oscillator
333
+ * @returns {String } type of oscillator eg . 'sine', 'triangle', 'sawtooth' or 'square'.
334
+ */
311
335
312
336
p5 . Oscillator . prototype . getType = function ( ) {
313
337
return this . oscillator . type ;
@@ -365,7 +389,17 @@ define(function (require) {
365
389
this . panner . pan ( pval , tFromNow ) ;
366
390
} ;
367
391
368
- p5 . Oscillator . prototype . getPan = function ( ) {
392
+ /**
393
+ * Returns the current value of panPosition , between Left (-1) and Right (1)
394
+ *
395
+ * @method getPan
396
+ * @for p5.Oscillator
397
+ *
398
+ * @returns {number } panPosition of oscillator , between Left (-1) and Right (1)
399
+ */
400
+
401
+ p5 . Oscillator . prototype . getPan = function ( ) {
402
+
369
403
return this . panPosition ;
370
404
} ;
371
405
0 commit comments