[chuck-users] stupid n00bie question: Part III

Kassen signal.automatique at gmail.com
Tue Oct 16 08:37:26 EDT 2007

On 10/16/07, AlgoMantra <algomantra at gmail.com> wrote:
> 1. What is the simplest way to detect the pitch
> of an audio signal (from the mic) in Chuck?

To add to Joerg's sugestion;

Tracking zero crossings is a viable option, it gets used in a fair amount of
hardware but due to it's limitations it tends to work best on simple signals
and such hardware tends to be aimed at specific instruments (say bass
guitar) because it helps if you can make a good guess what range the ouput
should be in. Typically I'd only use zero-crossing for sub-octave

Another option is a phase-locked loop which comes down to synthesising a
sine, comparing it to the signal to be analysed, look at the difference in
phase, then tweak the sine until this difference becomes as small as
possible. It has some of the same weaknesses but should be more accurate
most of the time, it's less simple.

It kinda depends in what way you want it to be simple; FFT analysis is not
at all simple on a fundamental level but it's simplified considerably if Ge
& Rebecca do all of the hard stuff for you :¬). Have a look at
/chuck1.2.1.1/examples/analysis/tracking/tracking.ck (I think that's your

2. How much wood could a woodChucK ChucK
> if a woodchucK could chucK wood?

That's on the wish-list, Ge said it depends on garbage collection because of
the splinters. Perry commented a while back that woodChucKs might be
protected as well so that would further complicate matters. Obviously it
won't be useful at all until we have trees which are generally a form of
lists and we don't have lists (yet?).


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20071016/e53be173/attachment.htm 

More information about the chuck-users mailing list