@@ -213,6 +213,14 @@ define(function (require) {
213
213
// these are now the same thing
214
214
p5 . Oscillator . prototype . fade = p5 . Oscillator . prototype . amp ;
215
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
+ */
216
224
p5 . Oscillator . prototype . getAmp = function ( ) {
217
225
return this . output . gain . value ;
218
226
} ;
@@ -294,6 +302,13 @@ define(function (require) {
294
302
return this . oscillator . frequency ;
295
303
}
296
304
} ;
305
+ /**
306
+ * Returns the value of frequency of oscillator
307
+ *
308
+ * @method getFreq
309
+ * @for p5.Oscillator
310
+ * @returns {number } Frequency of oscillator in Hertz
311
+ */
297
312
298
313
p5 . Oscillator . prototype . getFreq = function ( ) {
299
314
return this . oscillator . frequency . value ;
@@ -309,6 +324,13 @@ define(function (require) {
309
324
p5 . Oscillator . prototype . setType = function ( type ) {
310
325
this . oscillator . type = type ;
311
326
} ;
327
+ /**
328
+ * Returns current type of oscillator eg. 'sine', 'triangle', 'sawtooth' or 'square'.
329
+ *
330
+ * @method getType
331
+ * @for p5.Oscillator
332
+ * @returns {String } type of oscillator eg . 'sine', 'triangle', 'sawtooth' or 'square'.
333
+ */
312
334
313
335
p5 . Oscillator . prototype . getType = function ( ) {
314
336
return this . oscillator . type ;
@@ -368,6 +390,15 @@ define(function (require) {
368
390
this . panner . pan ( pval , tFromNow ) ;
369
391
} ;
370
392
393
+ /**
394
+ * Returns the current value of panPosition , between Left (-1) and Right (1)
395
+ *
396
+ * @method getPan
397
+ * @for p5.Oscillator
398
+ *
399
+ * @returns {number } panPosition of oscillator , between Left (-1) and Right (1)
400
+ */
401
+
371
402
p5 . Oscillator . prototype . getPan = function ( ) {
372
403
return this . panPosition ;
373
404
} ;
0 commit comments