andrew@0: /* andrew@0: Copyright (C) 2003 Paul Brossier andrew@0: andrew@0: This program is free software; you can redistribute it and/or modify andrew@0: it under the terms of the GNU General Public License as published by andrew@0: the Free Software Foundation; either version 2 of the License, or andrew@0: (at your option) any later version. andrew@0: andrew@0: This program is distributed in the hope that it will be useful, andrew@0: but WITHOUT ANY WARRANTY; without even the implied warranty of andrew@0: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the andrew@0: GNU General Public License for more details. andrew@0: andrew@0: You should have received a copy of the GNU General Public License andrew@0: along with this program; if not, write to the Free Software andrew@0: Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. andrew@0: andrew@0: */ andrew@0: andrew@0: /** \file andrew@0: andrew@0: Pitch detection using a Schmitt trigger andrew@0: andrew@0: This pitch extraction method implements a Schmitt trigger to estimate the andrew@0: period of a signal. andrew@0: andrew@0: This file was derived from the tuneit project, written by Mario Lang to andrew@0: detect the fundamental frequency of a sound. andrew@0: andrew@0: see http://delysid.org/tuneit.html andrew@0: andrew@0: */ andrew@0: andrew@0: #ifndef _PITCHSCHMITT_H andrew@0: #define _PITCHSCHMITT_H andrew@0: andrew@0: #ifdef __cplusplus andrew@0: extern "C" { andrew@0: #endif andrew@0: andrew@0: /** pitch detection object */ andrew@0: typedef struct _aubio_pitchschmitt_t aubio_pitchschmitt_t; andrew@0: andrew@0: /** execute pitch detection on an input buffer andrew@0: andrew@0: \param p pitch detection object as returned by new_aubio_pitchschmitt andrew@0: \param input input signal window (length as specified at creation time) andrew@0: andrew@0: */ andrew@0: smpl_t aubio_pitchschmitt_detect (aubio_pitchschmitt_t *p, fvec_t * input); andrew@0: /** creation of the pitch detection object andrew@0: andrew@0: \param size size of the input buffer to analyse andrew@0: \param samplerate sampling rate of the signal andrew@0: andrew@0: */ andrew@0: aubio_pitchschmitt_t * new_aubio_pitchschmitt (ba_uint_t size, ba_uint_t samplerate); andrew@0: /** deletion of the pitch detection object andrew@0: andrew@0: \param p pitch detection object as returned by new_aubio_pitchschmitt andrew@0: andrew@0: */ andrew@0: void del_aubio_pitchschmitt (aubio_pitchschmitt_t *p); andrew@0: andrew@0: andrew@0: #ifdef __cplusplus andrew@0: } andrew@0: #endif andrew@0: andrew@0: #endif /* _PITCHSCHMITT_H */ andrew@0: