Pitch detection objects:
sptnk/detect/0x k.axo
sptnk/detect/0x s.axo
These are very naive zero crossing detection objects, the former working at k-rate and the latter at s-rate.
These objects count how many samples occur between consequent zero crossings. The number of samples (green outlet) refers to the corresponding rate: k counts samples at k-rate and s count samples at s-rate.
No interpolation of any kind is implemented in these objects. The k-rate objects outputs a trigger pulse when a zero crossing has occurred.
sptnk/detect/0x k f.axo
sptnk/detect/0x s f.axo
Again, zero crossing detection in s-rate and k-rate. These however are slightly more precise, as they work in floating point and interpolate the wave in zero crossings. A conversion between sample period and frequency is also implemented (it's the frequency of a saw wave that goes from 0 to 64 in a number of samples equal to
the detected period
sptnk/detect/period mono.axo
This object is based on zero crossing detection, however it keeps track of the "mean value" and filters out readings that are too slow or too fast (maximum and minimum periods can be specified in the spinner boxes)
The objects starts to count when it finds a zero crossing in the signal.
While counting it checks if it encounters another zero crossing, and if the mean value of the signal is sufficiently close to zero (how close is specified by the tolerance knob) it outputs the readout.
Output is in number of samples (integer)
sptnk/detect/period mono f.axo
A variation on the previous object. This one interpolates the wave during zero crossings to achieve a better readout, and also outputs a frequency.
sptnk/conv/ftom.axs
This one converts a frequency to a midi note. You can see it as the "inverse" function of mtof. I tried to make it the most precise possible, however it still has a very little error, due to the non perfect logarithm computation. The error however is distributed as evenly as possible inside the whole -64 : 64 range