00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef MARSYAS_TALK_H
00020 #define MARSYAS_TALK_H
00021
00022 #include <string.h>
00023 #include <stdio.h>
00024 #include <stdlib.h>
00025
00026 #include "AbsMax.h"
00027 #include "SoundFileSource.h"
00028 #include "Series.h"
00029 #include "Accumulator.h"
00030
00031 #include <string>
00032
00033 #include "Communicator.h"
00034 #include "TimeLine.h"
00035 #include "SoundFileSource.h"
00036 #include "AudioSink.h"
00037
00038 #define SEPCHARS " \t\n"
00039 #define UNSPECIFIED -1
00040 #define WIN_SIZE 512
00041
00042 #ifdef WIN32
00043 #define MARSYAS_MFDIR ""
00044 #endif
00045
00046 namespace Marsyas
00047 {
00058 class Talk
00059 {
00060 private:
00061 Communicator* communicator_;
00062 void cmd_load(std::string fname, mrs_natural lineSize);
00063 void cmd_play(mrs_natural start, mrs_natural end, mrs_natural lineSize);
00064
00065 void cmd_merge(std::string systemName, unsigned int pstart, unsigned int pend,
00066 unsigned int start, unsigned int end,
00067 unsigned int winSize);
00068 void cmd_classify(std::string system, std::string classifier, unsigned int start, unsigned int end, unsigned int winSize);
00069 void cmd_extract(std::string systemName, std::string fileName, TimeLine tline);
00070 void cmd_segment(std::string systemName, unsigned int memSize, unsigned int numPeaks, unsigned int peakSpacing, unsigned int start, unsigned int end, unsigned int winSize);
00071
00072 void cmd_fullfft(unsigned int winSize);
00073 void cmd_fft(unsigned int start, unsigned int winSize);
00074 void cmd_colorgram(std::string collection, std::string system, unsigned int start, unsigned int end, unsigned int win_size);
00075 SoundFileSource *src_;
00076 AudioSink *dest_;
00077
00078 std::string fname_;
00079
00080 public:
00081 Talk();
00082 ~Talk();
00083 void init(Communicator* communicator);
00084 void process(char *message);
00085 };
00086
00087 }
00088
00089
00090
00091
00092 #endif
00093
00094
00095
00096
00097