comparison src/Silvet.h @ 314:f98ba4f47e49 livemode

Merge from default branch
author Chris Cannam
date Tue, 28 Apr 2015 11:24:23 +0100
parents cac0be04c43c fa2ffbb786df
children f3e10617a60d
comparison
equal deleted inserted replaced
308:26be240475b5 314:f98ba4f47e49
105 vector<map<int, int> > m_pianoRollShifts; 105 vector<map<int, int> > m_pianoRollShifts;
106 map<Vamp::RealTime, float> m_inputGains; 106 map<Vamp::RealTime, float> m_inputGains;
107 107
108 Grid preProcess(const Grid &); 108 Grid preProcess(const Grid &);
109 109
110 std::pair<vector<double>, vector<int> > applyEM(const InstrumentPack &pack,
111 const vector<double> &column,
112 bool wantShifts);
113
110 vector<double> postProcess(const vector<double> &pitches, 114 vector<double> postProcess(const vector<double> &pitches,
111 const vector<int> &bestShifts, 115 const vector<int> &bestShifts,
112 bool wantShifts); // -> piano roll column 116 bool wantShifts); // -> piano roll column
113 117
114 FeatureList noteTrack(int shiftCount); 118 FeatureList noteTrack(int shiftCount);
115 119
116 void emitNote(int start, int end, int note, int shiftCount, 120 void emitNote(int start, int end, int note, int shiftCount,
117 FeatureList &noteFeatures); 121 FeatureList &noteFeatures);
118 122
123 Vamp::RealTime getColumnTimestamp(int column);
124
119 Feature makeNoteFeature(int start, int end, int note, int shift, 125 Feature makeNoteFeature(int start, int end, int note, int shift,
120 int shiftCount, int velocity); 126 int shiftCount, int velocity);
121 127
122 float getInputGainAt(Vamp::RealTime t); 128 float getInputGainAt(Vamp::RealTime t);
123 129
124 void insertTemplateFeatures(FeatureSet &); 130 void insertTemplateFeatures(FeatureSet &);
125 131
126 void transcribe(const Grid &, FeatureSet &); 132 void transcribe(const Grid &, FeatureSet &);
127 133
134 string chromaName(int n) const;
128 string noteName(int n, int shift, int shiftCount) const; 135 string noteName(int n, int shift, int shiftCount) const;
129 float noteFrequency(int n, int shift, int shiftCount) const; 136 float noteFrequency(int n, int shift, int shiftCount) const;
130 137
131 int m_blockSize; 138 int m_blockSize;
132 int m_columnCount; 139 int m_columnCount;
133 int m_resampledCount; 140 int m_resampledCount;
134 Vamp::RealTime m_startTime; 141 Vamp::RealTime m_startTime;
142 bool m_haveStartTime;
135 143
136 mutable int m_notesOutputNo; 144 mutable int m_notesOutputNo;
137 mutable int m_fcqOutputNo; 145 mutable int m_fcqOutputNo;
138 mutable int m_pitchOutputNo; 146 mutable int m_pitchOutputNo;
139 mutable int m_templateOutputNo; 147 mutable int m_templateOutputNo;
148 mutable int m_chromaOutputNo;
140 }; 149 };
141 150
142 #endif 151 #endif