00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef MARSYAS_OSCBANK_H
00021 #define MARSYAS_OSCBANK_H
00022
00023 #include "MarSystem.h"
00024
00025 namespace Marsyas
00026 {
00037 class PvOscBank: public MarSystem
00038 {
00039 private:
00040 realvec lastamp_;
00041 realvec lastfreq_;
00042 realvec magnitudes_;
00043 realvec regions_;
00044
00045
00046 realvec index_;
00047 realvec table_;
00048 realvec temp_;
00049
00050 mrs_natural L_;
00051 mrs_natural N_;
00052 mrs_natural Nw_;
00053 mrs_natural NP_;
00054 mrs_real P_;
00055 mrs_real PS_;
00056
00057 mrs_real Iinv_;
00058 mrs_real Pinc_;
00059 mrs_real R_;
00060 mrs_natural I_;
00061 mrs_real S_;
00062 mrs_natural size_, psize_;
00063 mrs_real address_,paddress_, ppaddress_,f_, finc_, a_, ainc_;
00064 mrs_natural naddress_;
00065 mrs_real tableval_;
00066
00067 MarControlPtr ctrl_regions_;
00068 MarControlPtr ctrl_peaks_;
00069
00070 MarControlPtr ctrl_frequencies_;
00071 MarControlPtr ctrl_analysisphases_;
00072 MarControlPtr ctrl_phaselock_;
00073 MarControlPtr ctrl_onsetsAudible_;
00074 MarControlPtr ctrl_rmsIn_;
00075
00076 int subband(int bin);
00077 bool isPeak(int bin, mrs_realvec& magnitudes, mrs_real maxAmp);
00078
00079 void addControls();
00080 void myUpdate(MarControlPtr sender);
00081
00082 public:
00083 PvOscBank(std::string name);
00084 PvOscBank(const PvOscBank&);
00085
00086 ~PvOscBank();
00087 MarSystem* clone() const;
00088
00089 void process1(realvec& in, realvec& out);
00090 void myProcess(realvec& in, realvec& out);
00091
00092 };
00093
00094 }
00095
00096 #endif
00097
00098
00099
00100
00101
00102