Browse Source

Calculate pitch

main
Luke Murphy 4 years ago
parent
commit
1aac136c65
No known key found for this signature in database GPG Key ID: 5E2EF5A63E3718CC
  1. 11
      voicegardens/static/voicegardens.js

11
voicegardens/static/voicegardens.js

@ -419,3 +419,14 @@ function windowResized() {
**/
resizeCanvas(windowWidth, windowHeight);
}
function getMaxPitch(spectrum) {
/**
* Get max pitch.
*/
for (let x = spectrum.length - 1; x > 0; x--) {
if (spectrum[x] != 0) {
return x;
}
}
}

Loading…
Cancel
Save