Marsyas  0.6.0-alpha
/usr/src/RPM/BUILD/marsyas-0.6.0/src/marsyas/PeUtilities.h
Go to the documentation of this file.
00001 /*
00002 ** Copyright (C) 1998-2006 George Tzanetakis <gtzan@cs.uvic.ca>
00003 **
00004 ** This program is free software; you can redistribute it and/or modify
00005 ** it under the terms of the GNU General Public License as published by
00006 ** the Free Software Foundation; either version 2 of the License, or
00007 ** (at your option) any later version.
00008 **
00009 ** This program is distributed in the hope that it will be useful,
00010 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 ** GNU General Public License for more details.
00013 **
00014 ** You should have received a copy of the GNU General Public License
00015 ** along with this program; if not, write to the Free Software
00016 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00017 */
00018 
00019 #ifndef MARSYAS_PEUTILITIES_H
00020 #define MARSYAS_PEUTILITIES_H
00021 
00022 #include <marsyas/system/MarSystemManager.h>
00023 #include <marsyas/realvec.h>
00024 #include <marsyas/export.h>
00025 #include <fstream>
00026 #include <string>
00027 
00028 namespace Marsyas
00029 {
00042 //  typedef enum {
00043 //      pkFrequency,
00044 //      pkAmplitude,
00045 //      pkPhase,
00046 //      pkDeltaFrequency,
00047 //      pkDeltaAmplitude,
00048 //      pkFrame,
00049 //      pkGroup,
00050 //      pkVolume,
00051 //      pkPan,
00052 //      pkBinLow,
00053 //      pkBin,
00054 //      pkBinHigh,
00055 //      nbPkParameters
00056 //  } pkParameter;
00057 //
00058 //
00059 //
00060 //  int peaks2M (realvec&, realvec&, realvec&, mrs_natural maxNbPeaks, mrs_natural *nbPkFrame, mrs_natural start=0);
00061 //  void peaks2V (realvec&, realvec&, realvec&, mrs_natural maxNbPeaks, mrs_natural label=-1);
00062 //
00063 //  void extractParameter(realvec&, std::vector<realvec>&, pkParameter, mrs_natural);
00064 //
00065 //  void selectPeaks (realvec&, realvec&, pkParameter type, int value, int maxNbPeaks);
00066 //
00067 //  void updateLabels(realvec&, realvec&);
00068 //
00069 //  mrs_real correlatePeakSets(realvec&, realvec&, realvec&, realvec&);
00070 //  mrs_real cosinePeakSets(realvec&, realvec&, realvec&, realvec&, realvec&, realvec&, realvec&, realvec&, realvec&, realvec&, mrs_natural);
00071 //
00072 //  mrs_real compareTwoPeakSets(realvec&, realvec&, realvec&, realvec&);
00073 //  mrs_real compareTwoPeakSets2(realvec&, realvec&, realvec&, realvec&);
00074 //  mrs_real compareTwoPeakSets3(realvec&, realvec&, realvec&, realvec&);
00075 
00076 marsyas_EXPORT  void synthNetCreate(MarSystemManager *mng, std::string outsfname, bool microphone, mrs_natural synType, bool residual=0);
00077 marsyas_EXPORT  void synthNetConfigure(MarSystem *pvseries, std::string sfName, std::string outsfname, std::string ressfname, std::string panningInfo, mrs_natural nbChannels, mrs_natural Nw,
00078                                        mrs_natural D, mrs_natural S, mrs_natural accSize, bool microphone, mrs_natural synType, mrs_natural bopt, mrs_natural delay, mrs_real fs, bool residual=0);
00079 
00080 //  mrs_real harmonicWeighting(mrs_real, mrs_real, mrs_real);
00081 //  mrs_real harmonicWeightingBasic(mrs_real, mrs_real);
00082 //  void discrete2labels(realvec &labels, realvec& n, mrs_natural nbClusters, mrs_natural nbPeaks);
00083 //
00084 //  void peakStore(realvec& peaks, std::string filename, mrs_real fs, mrs_natural hopSize);
00085 //  void peakLoad(realvec& peaks, std::string filename, mrs_real &fs, mrs_natural &nbSines, mrs_natural &nbFrames, mrs_natural &hopSize, bool tf_format = true);
00086 //
00087 //  void computeHarmonicityMap(realvec& map, mrs_natural nbBins);
00088 }
00089 
00090 #endif
00091