I have just written an MSP pitch detector object in java. It works perfectly but has a very high load on the CPU. In fact, if I use a signal vector size of more than 256 it causes clicking artefacts in the audio. The code isn't really that big and I am using a brand new intel mac book 2.2 GHz machine.
Is this because of some speed limitation of using mxj quickie to build java objects? How could I improve the speed?
I am normally a C programmer and have coded much much larger things that run in real-time as VST plug-ins for example - and they generally are not that much of a burden on the CPU. I know Java is slower than C but I didn't expect it to be quite so limiting, is there something I am doing wrong?
Alternatively, if anyone could point me to a good introduction to programming Max/MSP objects in C I would be very grateful (apologies as this question prob should go in the other forum but the first question should be here...).
I'd be very happy if someone could point me in the right direction,