LEAF icon indicating copy to clipboard operation
LEAF copied to clipboard

Pitch Detector documentation/example?

Open lucasburkholder opened this issue 1 year ago • 2 comments

Huge fan of this library. I just am a little confused about how to use the tPeriodDetection and tDualPitchDetector modules. tPeriodDetection_init() and tDualPitchDetector_init() both take in an input buffer and buffer size arguments, and tPeriodDetection_init() also takes in a separate frame size argument that is confusing me a little as well.

What are these used for, and how can I determine the right sizes for these arguments and buffers? The comments for tPeriodDetection don't seem to say anything, and this documentation doesn't include the tPeriodDetection_init() function. I assume these arguments don't refer to actual buffers of audio that get passed into the object, since tPerioDetection_tick() just takes in a single input sample, right?

Let me know if there are any examples or documentation somewhere that I'm missing. Thanks for your help!

lucasburkholder avatar Jul 30 '24 23:07 lucasburkholder

Hi, Thanks for reaching out! I’ll look at it tomorrow and get back to you. I can’t remember offhand. They are about the internal buffer sizes, since they do operate per sample

Composer, musician, instrument designer scattershot.org * @snyderphonics

On Tue, Jul 30, 2024 at 7:25 PM lucasburkholder @.***> wrote:

Huge fan of this library. I just am a little confused about how to use the tPeriodDetection and tDualPitchDetector modules. tPeriodDetection_init() and tDualPitchDetector_init() both take in an input buffer and buffer size arguments, and tPeriodDetection_init() also takes in a separate frame size argument that is confusing me a little as well.

What are these used for, and how can I determine the right sizes for these arguments and buffers? The comments for tPeriodDetection don't seem to say anything, and this documentation https://spiricom.github.io/LEAF/docs/leaf/group__tperioddetection.html doesn't include the tPeriodDetection_init() function. I assume these arguments don't refer to actual buffers of audio that get passed into the object, since tPerioDetection_tick() just takes in a single input sample, right?

Let me know if there are any examples or documentation somewhere that I'm missing. Thanks for your help!

— Reply to this email directly, view it on GitHub https://github.com/spiricom/LEAF/issues/19, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGAY7FGYOEEV3ECWUF5TT3ZPAOG5AVCNFSM6AAAAABLXKJ2MWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQZTQOBSHAZDKOA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

spiricom avatar Jul 31 '24 00:07 spiricom

Okay that makes sense, thanks. So basically the user just allocates/frees the buffer and passes the object a pointer to it, rather than the object allocating its own?

If you are able to take a look and let me know, that'd be super helpful. Thanks so much!

lucasburkholder avatar Jul 31 '24 00:07 lucasburkholder