javascript - Pitch detection on array of floating point numbers -


i'm doing voice recording in javascript, , storing recording array of signed floats. need determine (and ultimately, adjust) pitch on array? i've seen various algorithms c++, don't seem helpful in situation. downloaded , tried 1 see if convert parts of javascript:

http://voicerecorder.codeplex.com/sourcecontrol/latest

but did make recording louder, regardless of settings chose.

i'm not going try provide exhaustive answer here, rather describe own findings discovered on journey of wrestling similar issues in audio programming.

pitch detection

if you're sound monophonic (as sounds is based on comment jeff), i've implemented pitch detection using auto-correlation techniques, because it's relatively simple compared other pitch detection algorithms.

the idea, if you're unfamiliar, follows:

  1. slide sample on (with predetermined window size; in 1-sample increments)
  2. at each step, calculate absolute difference between original wave , slid window (hard explain verbally).
    • as slide window, keep record of score calculated in (2)
    • when wave correlates itself, score hit minimum, , time-location of minimum specifies signals periodicity.

in implementation, algorithm worked (when fed samples of voice; didn't try variety of samples however).

that crude explanation of how autocorrelation works, , article provides nice comparison of different pitch-detection algorithms:

https://ccrma.stanford.edu/~pdelac/154/m154paper.htm

pitch shifting

of course, cheap pitch shifting resampling, sounds similar record being played fast, not acceptable in many circumstances.

as far pitch shifting goes, haven't gotten far yet in implementation, last left off, looking @ phase vocoders possible solution. what's hard finding decent explanation of how these algorithms work provides intuition on reason why work way instead of providing soley abstract mathmatical equations.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -