Copiste  0.1
 All Classes Functions Variables Enumerations Friends Pages
corpusbuilder.h
1 /*
2  * This file is part of Copiste.
3  *
4  * Copiste is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * Copiste is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with Copiste. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 
19 #ifndef INCLUDED_FILEANALYSERH
20 #define INCLUDED_FILEANALYSERH
21 
22 class CorpusBuilder;
23 
24 // Needed to read directories
25 #include <boost/filesystem.hpp>
26 #include <boost/version.hpp>
27 
28 #include "core/soundanalyser.h"
29 
32 {
33  public:
35  CorpusBuilder();
38 
40  void setElementLength(int sec) { mElemLength = sec; }
41 
43  void setComputingOffset(int sec) { mCompOffset = sec; }
44 
46  bool setup(string fileName);
48  bool write(Corpus* corpus);
49 
51  void compute();
52 
54  void setVerbose(bool verbose) { mVerbose = verbose; }
55 
57  bool setupPipeline(string filename) { return ((SoundAnalyser*)this)->setupPipeline(filename); }
58 
59  private:
60  string mBasePath;
61  vector<string> mFiles;
62  vector<bool> mGoals;
63  vector<string> mSampleNames;
64  vector<double*> mResults;
65  vector<int> mNbElems;
66  int mCurrentFile;
67  bool mVerbose;
68  int mElemLength;
69  int mCompOffset;
70 };
71 
72 #endif