File tree Expand file tree Collapse file tree 1 file changed +0
-86
lines changed Expand file tree Collapse file tree 1 file changed +0
-86
lines changed Original file line number Diff line number Diff line change @@ -138,92 +138,6 @@ define(function (require) {
138
138
this . _isOn = false ;
139
139
} ;
140
140
141
-
142
- /**
143
- * Set cutoms parameters to a specific synth implementation.
144
- * This method does nothing by default unless you implement
145
- * something for it.
146
- * For instance if you want to build a complex synthesizer
147
- * with one or more filters, effects etc. this is where you
148
- * will want to set their values.
149
- *
150
- * @method setParams
151
- * @param
152
- *
153
- */
154
-
155
- p5 . MonoSynth . prototype . setParams = function ( params ) {
156
- } ;
157
-
158
- /**
159
- * loads preset values
160
- * @param {String } preset A preset that has been written for MonoSynth
161
- * @return {Object } Return the MonoSynth
162
- */
163
- p5 . MonoSynth . prototype . loadPreset = function ( preset ) {
164
- var options = this [ preset ] ;
165
- this . oscillator . setType ( options . oscillator . type ) ;
166
-
167
- this . env . setADSR ( options . env . attack , options . env . decay ,
168
- options . env . sustain , options . env . release ) ;
169
-
170
- this . filter . setType ( options . filter . type ) ;
171
- this . filter . set ( options . filter . freq , options . filter . res ) ;
172
- return this ;
173
- } ;
174
-
175
- //PRESETS
176
- p5 . MonoSynth . prototype . default = {
177
- 'oscillator' : {
178
- 'type' : 'sine'
179
- } ,
180
- 'env' : {
181
- 'attack' : 0.02 ,
182
- 'decay' : 0.25 ,
183
- 'sustain' : 0.05 ,
184
- 'release' : 0.35
185
- } ,
186
- 'filter' : {
187
- 'type' : 'highpass' ,
188
- 'freq' : 5 ,
189
- 'res' : 1
190
- }
191
- } ;
192
-
193
- p5 . MonoSynth . prototype . simpleBass = {
194
- 'oscillator' : {
195
- 'type' : 'square'
196
- } ,
197
- 'env' : {
198
- 'attack' : 0 ,
199
- 'decay' : .60 ,
200
- 'sustain' : 0.1 ,
201
- 'release' : .28
202
- } ,
203
- 'filter' : {
204
- 'type' : 'lowpass' ,
205
- 'freq' : 15000 ,
206
- 'res' : 1
207
- }
208
- } ;
209
-
210
- p5 . MonoSynth . prototype . electricPiano = {
211
- 'oscillator' : {
212
- 'type' : 'sine'
213
- } ,
214
- 'env' : {
215
- 'attack' : 0.029 ,
216
- 'decay' : .16 ,
217
- 'sustain' : 0.1 ,
218
- 'release' : .1
219
- } ,
220
- 'filter' : {
221
- 'type' : 'lowpass' ,
222
- 'freq' : 15000 ,
223
- 'res' : 1
224
- }
225
- } ;
226
-
227
141
/**
228
142
* Set values like a traditional
229
143
* <a href="https://en.wikipedia.org/wiki/Synthesizer#/media/File:ADSR_parameter.svg">
You can’t perform that action at this time.
0 commit comments