mirror of
https://github.com/Tonejs/Tone.js
synced 2024-12-30 21:48:45 +00:00
new build
This commit is contained in:
parent
63a6501eb3
commit
9b1475039c
3 changed files with 122 additions and 10 deletions
|
@ -7,22 +7,120 @@ define(["Tone/core/Tone", "Tone/effect/AutoWah"], function(Tone){
|
|||
* @type {Object}
|
||||
*/
|
||||
Tone.AutoWah.prototype.preset = {
|
||||
"talker" : {
|
||||
"baseFrequency" : 100,
|
||||
"octaves" : 4,
|
||||
"sensitivity" : 0,
|
||||
"Q" : 2,
|
||||
"gain" : 10,
|
||||
"rolloff" : -12,
|
||||
/** attributes for the envelope follower */
|
||||
"follower" : {
|
||||
"attack" : 0.05,
|
||||
"release" : 0.2
|
||||
}
|
||||
},
|
||||
"yes" : {
|
||||
"baseFrequency" : 250,
|
||||
"octaves" : 5,
|
||||
"sensitivity" : 0,
|
||||
"Q" : 2,
|
||||
"gain" : 20,
|
||||
"rolloff" : -24,
|
||||
/** attributes for the envelope follower */
|
||||
"follower" : {
|
||||
"attack" : 0.1,
|
||||
"release" : 0.2
|
||||
}
|
||||
},
|
||||
"springy" : {
|
||||
"baseFrequency" : 10,
|
||||
"octaves" : 8,
|
||||
"sensitivity" : 0,
|
||||
"Q" : 20,
|
||||
"Q" : 1,
|
||||
"gain" : 10,
|
||||
"rolloff" : -48,
|
||||
/** attributes for the envelope follower */
|
||||
"follower" : {
|
||||
"attack" : 1,
|
||||
"release" : 2
|
||||
"attack" : 0.02,
|
||||
"release" : 1
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return Tone.AutoWah.prototype.preset;
|
||||
});
|
||||
define(["Tone/core/Tone", "Tone/effect/AutoWah"], function(Tone){
|
||||
|
||||
/**
|
||||
* named presets for the AutoWah
|
||||
* @const
|
||||
* @static
|
||||
* @type {Object}
|
||||
*/
|
||||
Tone.Chorus.prototype.preset = {
|
||||
"ether" : {
|
||||
"rate" : 0.3,
|
||||
"delayTime" : 8,
|
||||
"type" : "triangle",
|
||||
"depth" : 0.8,
|
||||
"feedback" : 0.7
|
||||
},
|
||||
"harmony" : {
|
||||
"rate" : 12,
|
||||
"delayTime" : 3.5,
|
||||
"type" : "sine",
|
||||
"depth" : 0.8,
|
||||
"feedback" : 0.2
|
||||
},
|
||||
"rattler" : {
|
||||
"rate" : "16n",
|
||||
"delayTime" : 15,
|
||||
"type" : "square",
|
||||
"depth" : 0.2,
|
||||
"feedback" : 0.8
|
||||
}
|
||||
};
|
||||
|
||||
return Tone.Chorus.prototype.preset;
|
||||
});
|
||||
define(["Tone/core/Tone", "Tone/effect/AutoWah"], function(Tone){
|
||||
|
||||
/**
|
||||
* named presets for the Phaser
|
||||
* @const
|
||||
* @static
|
||||
* @type {Object}
|
||||
*/
|
||||
Tone.Phaser.prototype.preset = {
|
||||
"testing" : {
|
||||
"rate" : 10,
|
||||
"depth" : 0.2,
|
||||
"stages" : 4,
|
||||
"Q" : 2,
|
||||
"baseFrequency" : 700,
|
||||
"feedback" : 0
|
||||
},
|
||||
"landing" : {
|
||||
"rate" : 0.5,
|
||||
"depth" : 1.2,
|
||||
"stages" : 12,
|
||||
"Q" : 20,
|
||||
"baseFrequency" : 800,
|
||||
"feedback" : 0.9
|
||||
},
|
||||
"bubbles" : {
|
||||
"rate" : 4.5,
|
||||
"depth" : 0.4,
|
||||
"stages" : 6,
|
||||
"Q" : 2,
|
||||
"baseFrequency" : 300,
|
||||
"feedback" : 0.6
|
||||
}
|
||||
};
|
||||
|
||||
return Tone.Phaser.prototype.preset;
|
||||
});
|
||||
define(["Tone/core/Tone", "Tone/instrument/DuoSynth"], function(Tone){
|
||||
|
||||
/**
|
||||
|
|
|
@ -5715,7 +5715,7 @@ define('Tone/effect/AutoWah',["Tone/core/Tone", "Tone/component/Follower", "Tone
|
|||
* @private
|
||||
*/
|
||||
this._bandpass = new Tone.Filter("bandpass");
|
||||
this._bandpass.setRolloff(-48);
|
||||
this._bandpass.setRolloff(options.rolloff);
|
||||
// this._bandpass.type = "bandpass";
|
||||
// this._bandpass.Q.value = options.Q;
|
||||
|
||||
|
@ -5750,6 +5750,7 @@ define('Tone/effect/AutoWah',["Tone/core/Tone", "Tone/component/Follower", "Tone
|
|||
"sensitivity" : 0,
|
||||
"Q" : 2,
|
||||
"gain" : 2,
|
||||
"rolloff" : -48,
|
||||
/** attributes for the envelope follower */
|
||||
"follower" : {
|
||||
"attack" : 0.3,
|
||||
|
@ -6312,6 +6313,7 @@ function(Tone){
|
|||
//set the initial values
|
||||
this.setDepth(this._depth);
|
||||
this.setRate(options.rate);
|
||||
this.setType(options.type);
|
||||
};
|
||||
|
||||
Tone.extend(Tone.Chorus, Tone.StereoXFeedbackEffect);
|
||||
|
@ -6324,7 +6326,8 @@ function(Tone){
|
|||
"rate" : 1.5,
|
||||
"delayTime" : 3.5,
|
||||
"depth" : 0.7,
|
||||
"feedback" : 0.4
|
||||
"feedback" : 0.4,
|
||||
"type" : "sine"
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -6357,6 +6360,15 @@ function(Tone){
|
|||
this._lfoL.setFrequency(rate);
|
||||
};
|
||||
|
||||
/**
|
||||
* set the LFO type
|
||||
* @param {number} type
|
||||
*/
|
||||
Tone.Chorus.prototype.setType = function(type){
|
||||
this._lfoL.setType(type);
|
||||
this._lfoR.setType(type);
|
||||
};
|
||||
|
||||
/**
|
||||
* set multiple parameters at once with an object
|
||||
* @param {Object} params the parameters as an object
|
||||
|
@ -6365,6 +6377,7 @@ function(Tone){
|
|||
if (!this.isUndef(params.rate)) this.setRate(params.rate);
|
||||
if (!this.isUndef(params.delayTime)) this.setDelayTime(params.delayTime);
|
||||
if (!this.isUndef(params.depth)) this.setDepth(params.depth);
|
||||
if (!this.isUndef(params.type)) this.setType(params.type);
|
||||
Tone.FeedbackEffect.prototype.set.call(this, params);
|
||||
};
|
||||
|
||||
|
@ -6596,7 +6609,7 @@ function(Tone){
|
|||
* @type {Array.<Tone.Filter>}
|
||||
* @private
|
||||
*/
|
||||
this._filtersR = this._makeFilters(options.stages, this._lfoR);
|
||||
this._filtersR = this._makeFilters(options.stages, this._lfoR, options.Q);
|
||||
|
||||
//connect them up
|
||||
this.effectSendL.connect(this._filtersL[0]);
|
||||
|
@ -6627,6 +6640,7 @@ function(Tone){
|
|||
"rate" : 0.5,
|
||||
"depth" : 1,
|
||||
"stages" : 4,
|
||||
"Q" : 6,
|
||||
"baseFrequency" : 400,
|
||||
"feedback" : 0.6
|
||||
};
|
||||
|
@ -6636,13 +6650,13 @@ function(Tone){
|
|||
* @returns {Array} the number of filters all connected together
|
||||
* @private
|
||||
*/
|
||||
Tone.Phaser.prototype._makeFilters = function(stages, connectToFreq){
|
||||
Tone.Phaser.prototype._makeFilters = function(stages, connectToFreq, Q){
|
||||
var filters = new Array(stages);
|
||||
//make all the filters
|
||||
for (var i = 0; i < stages; i++){
|
||||
var filter = this.context.createBiquadFilter();
|
||||
filter.type = "allpass";
|
||||
filter.Q.value = 6;
|
||||
filter.Q.value = Q;
|
||||
connectToFreq.connect(filter.frequency);
|
||||
filters[i] = filter;
|
||||
}
|
||||
|
|
4
build/Tone.min.js
vendored
4
build/Tone.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue