@@ -2232,6 +2232,8 @@ amplitude = function () {
2232
2232
this . output . connect ( this . audiocontext . destination ) ;
2233
2233
// connect to p5sound master output by default, unless set by input()
2234
2234
p5sound . meter . connect ( this . processor ) ;
2235
+ // add this p5.SoundFile to the soundArray
2236
+ p5sound . soundArray . push ( this ) ;
2235
2237
} ;
2236
2238
/**
2237
2239
* Connects to the p5sound instance (master output) by default.
@@ -2547,6 +2549,8 @@ fft = function () {
2547
2549
5200 ,
2548
2550
14000
2549
2551
] ;
2552
+ // add this p5.SoundFile to the soundArray
2553
+ p5sound . soundArray . push ( this ) ;
2550
2554
} ;
2551
2555
/**
2552
2556
* Set the input source for the FFT analysis. If no source is
@@ -3729,7 +3733,6 @@ oscillator = function () {
3729
3733
this . output . gain . linearRampToValueAtTime ( currentVol , now + tFromNow ) ;
3730
3734
this . output . gain . linearRampToValueAtTime ( vol , now + tFromNow + rampTime ) ;
3731
3735
} else if ( vol ) {
3732
- console . log ( vol ) ;
3733
3736
vol . connect ( self . output . gain ) ;
3734
3737
} else {
3735
3738
// return the Gain Node
@@ -5188,6 +5191,8 @@ filter = function () {
5188
5191
if ( type ) {
5189
5192
this . setType ( type ) ;
5190
5193
}
5194
+ // add to the soundArray
5195
+ p5sound . soundArray . push ( this ) ;
5191
5196
} ;
5192
5197
/**
5193
5198
* Filter an audio signal according to a set
@@ -5465,6 +5470,8 @@ delay = function () {
5465
5470
// default routing
5466
5471
this . setType ( 0 ) ;
5467
5472
this . _maxDelay = this . leftDelay . delayTime . maxValue ;
5473
+ // add this p5.SoundFile to the soundArray
5474
+ p5sound . soundArray . push ( this ) ;
5468
5475
} ;
5469
5476
/**
5470
5477
* Add delay to an audio signal according to a set
@@ -7394,6 +7401,8 @@ gain = function () {
7394
7401
// otherwise, Safari distorts
7395
7402
this . input . gain . value = 0.5 ;
7396
7403
this . input . connect ( this . output ) ;
7404
+ // add to the soundArray
7405
+ p5sound . soundArray . push ( this ) ;
7397
7406
} ;
7398
7407
/**
7399
7408
* Connect a source to the gain node.
0 commit comments