1
+ < << << << Updated upstream
1
2
import 'audioworklet-polyfill' ;
2
3
import './shims' ;
3
4
@@ -129,6 +130,168 @@ p5.Distortion = Distortion;
129
130
import Gain from './gain' ;
130
131
p5 . Gain = Gain ;
131
132
133
+ import Envelope from './envelope' ;
134
+ p5 . Envelope = Envelope ;
135
+
136
+ import Env from './deprecations/Env' ;
137
+ p5 . Env = Env ;
138
+
139
+ import AudioVoice from './audioVoice' ;
140
+ p5 . AudioVoice = AudioVoice ;
141
+
142
+ import MonoSynth from './monosynth' ;
143
+ p5 . MonoSynth = MonoSynth ;
144
+
145
+ import OnsetDetect from './onsetDetect' ;
146
+ p5 . OnsetDetect = OnsetDetect ;
147
+
148
+ import PolySynth from './polysynth' ;
149
+ p5 . PolySynth = PolySynth ;
150
+
151
+ import PeakDetect from './peakDetect' ;
152
+ p5 . PeakDetect = PeakDetect ;
153
+
154
+ // Following are the deprecated classes
155
+ import Signal from './deprecations/Signal' ;
156
+ p5 . Signal = Signal ;
157
+ = === ===
158
+ import 'audioworklet-polyfill' ;
159
+ import './shims' ;
160
+
161
+ import { getAudioContext , userStartAudio } from './audiocontext' ;
162
+ p5 . prototype . getAudioContext = getAudioContext ;
163
+ p5 . prototype . userStartAudio = userStartAudio ;
164
+
165
+ import './main' ;
166
+
167
+ import {
168
+ sampleRate ,
169
+ freqToMidi ,
170
+ midiToFreq ,
171
+ noteToFreq ,
172
+ soundFormats ,
173
+ disposeSound ,
174
+ _checkFileFormats ,
175
+ _mathChain ,
176
+ convertToWav ,
177
+ interleave ,
178
+ writeUTFBytes ,
179
+ safeBufferSize ,
180
+ saveSound ,
181
+ } from './helpers' ;
182
+ p5 . prototype . sampleRate = sampleRate ;
183
+ p5 . prototype . freqToMidi = freqToMidi ;
184
+ p5 . prototype . midiToFreq = midiToFreq ;
185
+ p5 . prototype . noteToFreq = noteToFreq ;
186
+ p5 . prototype . soundFormats = soundFormats ;
187
+ p5 . prototype . disposeSound = disposeSound ;
188
+ p5 . prototype . _checkFileFormats = _checkFileFormats ;
189
+ p5 . prototype . _mathChain = _mathChain ;
190
+ p5 . prototype . convertToWav = convertToWav ;
191
+ p5 . prototype . interleave = interleave ;
192
+ p5 . prototype . writeUTFBytes = writeUTFBytes ;
193
+ p5 . prototype . safeBufferSize = safeBufferSize ;
194
+ p5 . prototype . saveSound = saveSound ;
195
+
196
+ // register removeSound to dispose of p5sound SoundFiles, Convolvers,
197
+ // Oscillators etc when sketch ends
198
+ p5 . prototype . registerMethod ( 'remove' , p5 . prototype . disposeSound ) ;
199
+
200
+ import './errorHandler' ;
201
+ import './audioWorklet' ;
202
+
203
+ import Panner from './panner' ;
204
+ p5 . Panner = Panner ;
205
+
206
+ import SoundFile , { loadSound } from './soundfile' ;
207
+ p5 . SoundFile = SoundFile ;
208
+ p5 . prototype . loadSound = loadSound ;
209
+ // register preload handling of loadSound
210
+ p5 . prototype . registerPreloadMethod ( 'loadSound' , p5 . prototype ) ;
211
+
212
+ import Amplitude from './amplitude' ;
213
+ p5 . Amplitude = Amplitude ;
214
+
215
+ import FFT from './fft' ;
216
+ p5 . FFT = FFT ;
217
+
218
+ import Oscillator , { SinOsc , TriOsc , SawOsc , SqrOsc } from './oscillator' ;
219
+ p5 . Oscillator = Oscillator ;
220
+ p5 . SinOsc = SinOsc ;
221
+ p5 . TriOsc = TriOsc ;
222
+ p5 . SawOsc = SawOsc ;
223
+ p5 . SqrOsc = SqrOsc ;
224
+
225
+ import './envelope' ;
226
+
227
+ import Noise from './noise' ;
228
+ p5 . Noise = Noise ;
229
+
230
+ import Pulse from './pulse' ;
231
+ p5 . Pulse = Pulse ;
232
+
233
+ import AudioIn from './audioin' ;
234
+ p5 . AudioIn = AudioIn ;
235
+
236
+ import Effect from './effect' ;
237
+ p5 . Effect = Effect ;
238
+
239
+ import Filter , { LowPass , HighPass , BandPass } from './filter' ;
240
+ p5 . Filter = Filter ;
241
+ p5 . LowPass = LowPass ;
242
+ p5 . HighPass = HighPass ;
243
+ p5 . BandPass = BandPass ;
244
+
245
+ import EQ from './eq' ;
246
+ p5 . EQ = EQ ;
247
+
248
+ import Listener3D from './listener3d' ;
249
+ p5 . Listener3D = Listener3D ;
250
+
251
+ import Panner3D from './panner3d' ;
252
+ p5 . Panner3D = Panner3D ;
253
+
254
+ import Delay from './delay' ;
255
+ p5 . Delay = Delay ;
256
+
257
+ import { Reverb , Convolver , createConvolver } from './reverb' ;
258
+ p5 . Reverb = Reverb ;
259
+ p5 . Convolver = Convolver ;
260
+ p5 . prototype . createConvolver = createConvolver ;
261
+ p5 . prototype . registerPreloadMethod ( 'createConvolver' , p5 . prototype ) ;
262
+
263
+ import Metro from './metro' ;
264
+ p5 . Metro = Metro ;
265
+
266
+ import { Phrase , Part , Score } from './looper' ;
267
+ p5 . Phrase = Phrase ;
268
+ p5 . Part = Part ;
269
+ p5 . Score = Score ;
270
+
271
+ import SoundLoop from './soundLoop' ;
272
+ p5 . SoundLoop = SoundLoop ;
273
+
274
+ import Compressor from './compressor' ;
275
+ p5 . Compressor = Compressor ;
276
+
277
+ import peakDetect from './peakDetect' ;
278
+ p5 . peakDetect = peakDetect ;
279
+
280
+ import SoundRecorder from './soundRecorder' ;
281
+ p5 . SoundRecorder = SoundRecorder ;
282
+
283
+ import Distortion from './distortion' ;
284
+ p5 . Distortion = Distortion ;
285
+
286
+ import Gain from './gain' ;
287
+ p5 . Gain = Gain ;
288
+
289
+ import Envelope from './envelope' ;
290
+ p5 . Envelope = Envelope ;
291
+
292
+ import Env from './deprecations/Env' ;
293
+ p5 . Env = Env ;
294
+
132
295
import AudioVoice from './audioVoice' ;
133
296
p5 . AudioVoice = AudioVoice ;
134
297
@@ -147,3 +310,4 @@ p5.PeakDetect = PeakDetect;
147
310
// Following are the deprecated classes
148
311
import Signal from './deprecations/Signal' ;
149
312
p5 . Signal = Signal ;
313
+ > >>> >>> Stashed changes
0 commit comments