mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-15 08:17:07 +00:00
linting
This commit is contained in:
parent
8e0c626149
commit
45e40a8498
1 changed files with 1 additions and 3 deletions
|
@ -84,10 +84,8 @@ define(["Tone/core/Tone", "Tone/instrument/Synth", "Tone/source/Source"], functi
|
|||
* @private
|
||||
*/
|
||||
Tone.PolySynth.prototype._getClosestVoice = function(time, note){
|
||||
var closestVoice = this.voices[0];
|
||||
|
||||
//play the note which has the same frequency, if that exists
|
||||
var sameNote = this.voices.find(function(voice, i){
|
||||
var sameNote = this.voices.find(function(voice){
|
||||
//break if it's within a small epsion of the voice's frequency
|
||||
if (Math.abs(voice.frequency.getValueAtTime(time) - Tone.Frequency(note)) < 1e-4 &&
|
||||
//and that note is currently active
|
||||
|
|
Loading…
Reference in a new issue