/*---------------------------------------------------------------------------*\
FILE........: tnlp.c
AUTHOR......: David Rowe
DATE CREATED: 23/3/93
Test program for non linear pitch estimation functions.
\*---------------------------------------------------------------------------*/
/*
Copyright (C) 2009 David Rowe
All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License version 2, as
published by the Free Software Foundation. This program is
distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, see .
*/
#define N 80 /* frame size */
#define M 320 /* pitch analysis window size */
#define PITCH_MIN 20
#define PITCH_MAX 160
#define TNLP
#include
#include
#include
#include
#include "defines.h"
#include "dump.h"
#include "sine.h"
#include "nlp.h"
#include "kiss_fft.h"
int frames;
/*---------------------------------------------------------------------------*\
switch_present()
Searches the command line arguments for a "switch". If the switch is
found, returns the command line argument where it ws found, else returns
NULL.
\*---------------------------------------------------------------------------*/
int switch_present(sw,argc,argv)
char sw[]; /* switch in string form */
int argc; /* number of command line arguments */
char *argv[]; /* array of command line arguments in string form */
{
int i; /* loop variable */
for(i=1; i