Browse Source

Leave some notes on pitch/nuance gathering

main
Luke Murphy 5 years ago
parent
commit
3385cfa726
No known key found for this signature in database GPG Key ID: 5E2EF5A63E3718CC
  1. 15
      vocoder/static/vocoder.js

15
vocoder/static/vocoder.js

@ -104,8 +104,19 @@ function getSoundInfo() {
**/ **/
amplitude = recording.getPeaks(); amplitude = recording.getPeaks();
duration = recording.duration(); duration = recording.duration();
// pitch?
// pitch (frequency?) I think we can use fft.analyze() and then find the
// highest value (0 -> 1024) that has a non-zero value this gives us the
// highest frequency from the recording
// https://p5js.org/reference/#/p5.FFT
// https://p5js.org/reference/#/p5.FFT/analyze
// nuance? // nuance?
// "I meant the amount of variation in the voice - i.e is it one single
// monotone note or does it go up and down octaves or start soft and high and
// become deep and guttural etc."
//
// How do to do this? Unsure ...
} }
class GeneratedShape { class GeneratedShape {
@ -191,7 +202,7 @@ class GeneratedShape {
* Show the shape on the canvas. * Show the shape on the canvas.
**/ **/
// TODO: use getSoundInfo function to influence how shape is drawn // TODO: use getSoundInfo function to influence how shape is drawn
ellipse(this.x, this.y, this.w, this.h); // TODO: experimenting for now ... ellipse(this.x, this.y, this.w, this.h);
} }
} }

Loading…
Cancel
Save