No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
1 changed files with
13 additions and
2 deletions
-
vocoder/static/vocoder.js
|
|
@ -104,8 +104,19 @@ function getSoundInfo() { |
|
|
|
**/ |
|
|
|
amplitude = recording.getPeaks(); |
|
|
|
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?
|
|
|
|
// "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 { |
|
|
@ -191,7 +202,7 @@ class GeneratedShape { |
|
|
|
* Show the shape on the canvas. |
|
|
|
**/ |
|
|
|
// 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); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|