mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 16:48:00 +00:00
code cleanup a bit
This commit is contained in:
parent
63f264ad6f
commit
343ab3dee4
1 changed files with 4 additions and 6 deletions
|
@ -41,14 +41,12 @@ define(["Tone/core/Tone", "Tone/signal/Threshold"], function(Tone){
|
||||||
var curveLength = 1024;
|
var curveLength = 1024;
|
||||||
var curve = new Float32Array(curveLength);
|
var curve = new Float32Array(curveLength);
|
||||||
for (var i = 0; i < curveLength; i++){
|
for (var i = 0; i < curveLength; i++){
|
||||||
var normalized = (i / (curveLength));
|
var normalized = (i / (curveLength)) * 2 - 1;
|
||||||
var val;
|
if (normalized === 0){
|
||||||
if (normalized === 0.5){
|
curve[i] = 1;
|
||||||
val = 1;
|
|
||||||
} else {
|
} else {
|
||||||
val = 0;
|
curve[i] = 0;
|
||||||
}
|
}
|
||||||
curve[i] = val;
|
|
||||||
}
|
}
|
||||||
this._equals.curve = curve;
|
this._equals.curve = curve;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue