19 #include <vamp-sdk/Plugin.h> 28 #ifndef MAX_EM_THREADS 29 #define MAX_EM_THREADS 8 39 class FlattenDynamics;
44 Silvet(
float inputSampleRate);
70 bool initialise(
size_t channels,
size_t stepSize,
size_t blockSize);
73 FeatureSet
process(
const float *
const *inputBuffers,
74 Vamp::RealTime timestamp);
89 return m_liveInstruments[instrument];
91 return m_instruments[instrument];
105 typedef vector<vector<double> >
Grid;
116 const vector<double> &column);
119 const vector<int> &bestShifts);
132 FeatureList ¬eFeatures,
133 FeatureList &onOffsetFeatures);
136 FeatureList &onOffsetFeatures);
140 Feature
makeNoteFeature(
int start,
int end,
int note,
int shift,
double strength);
int m_pitchOutputNo
Definition: Silvet.h:166
Feature makeOnsetFeature(int start, int note, int shift, double strength)
Definition: Silvet.cpp:1270
int m_blockSize
Definition: Silvet.h:156
void setParameter(string identifier, float value)
Definition: Silvet.cpp:208
set< int > m_current
Definition: Silvet.h:111
void emitOnset(int start, int note, FeatureList &onOffsetFeatures)
Definition: Silvet.cpp:1209
float getInputGainAt(Vamp::RealTime t)
Definition: Silvet.cpp:1331
int m_instrument
Definition: Silvet.h:102
Feature makeOffsetFeature(int col, int note, int shift)
Definition: Silvet.cpp:1292
size_t getPreferredStepSize() const
Definition: Silvet.cpp:128
FeatureSet getRemainingFeatures()
Definition: Silvet.cpp:623
Definition: Instruments.h:32
vector< MedianFilter< double > * > m_postFilter
Definition: Silvet.h:107
Resampler * m_resampler
Definition: Silvet.h:95
int getPluginVersion() const
Definition: Silvet.cpp:104
int m_resampledCount
Definition: Silvet.h:158
Feature makeNoteFeature(int start, int end, int note, int shift, double strength)
Definition: Silvet.cpp:1246
string getNoteName(int n, int shift) const
Definition: Silvet.cpp:403
const std::vector< InstrumentPack > m_liveInstruments
Definition: Silvet.h:85
OutputList getOutputDescriptors() const
Definition: Silvet.cpp:238
size_t getPreferredBlockSize() const
Definition: Silvet.cpp:122
FeatureList onOffsets
Definition: Silvet.h:124
int m_onsetsOutputNo
Definition: Silvet.h:163
string getCopyright() const
Definition: Silvet.cpp:110
int getShiftCount() const
Definition: Silvet.cpp:678
ProgramList getPrograms() const
Definition: Silvet.cpp:220
FeatureList onsets
Definition: Silvet.h:123
string getName() const
Definition: Silvet.cpp:86
string getDescription() const
Definition: Silvet.cpp:92
CQSpectrogram * m_cq
Definition: Silvet.h:97
void reset()
Definition: Silvet.cpp:494
std::pair< vector< double >, vector< int > > applyEM(const InstrumentPack &pack, const vector< double > &column)
Definition: Silvet.cpp:823
string getMaker() const
Definition: Silvet.cpp:98
bool initialise(size_t channels, size_t stepSize, size_t blockSize)
Definition: Silvet.cpp:462
vector< map< int, int > > m_pianoRollShifts
Definition: Silvet.h:109
int m_columnCount
Definition: Silvet.h:157
vector< vector< double > > Grid
Definition: Silvet.h:105
string getChromaName(int n) const
Definition: Silvet.cpp:393
void selectProgram(string name)
Definition: Silvet.cpp:233
int m_colsPerSec
Definition: Silvet.h:103
int m_templateOutputNo
Definition: Silvet.h:167
int m_chromaOutputNo
Definition: Silvet.h:168
FlattenDynamics * m_flattener
Definition: Silvet.h:96
Vamp::RealTime m_startTime
Definition: Silvet.h:159
void transcribe(const Grid &, FeatureSet &)
Definition: Silvet.cpp:690
size_t getMaxChannelCount() const
Definition: Silvet.cpp:140
size_t getMinChannelCount() const
Definition: Silvet.cpp:134
string getCurrentProgram() const
Definition: Silvet.cpp:227
void insertTemplateFeatures(FeatureSet &)
Definition: Silvet.cpp:660
ProcessingMode
Definition: Silvet.h:78
Vamp::RealTime getColumnTimestamp(int column)
Definition: Silvet.cpp:1236
void emitNoteAndOffset(int start, int end, int note, FeatureList ¬eFeatures, FeatureList &onOffsetFeatures)
Definition: Silvet.cpp:1125
int m_fcqOutputNo
Definition: Silvet.h:165
ParameterList getParameterDescriptors() const
Definition: Silvet.cpp:146
FeatureList notes
Definition: Silvet.h:122
int m_notesOutputNo
Definition: Silvet.h:162
Grid preProcess(const Grid &)
Definition: Silvet.cpp:881
string getIdentifier() const
Definition: Silvet.cpp:80
float getParameter(string identifier) const
Definition: Silvet.cpp:195
const std::vector< InstrumentPack > m_instruments
Definition: Silvet.h:84
void postProcess(const vector< double > &pitches, const vector< int > &bestShifts)
Definition: Silvet.cpp:968
InputDomain getInputDomain() const
Definition: Silvet.cpp:116
int getVelocityFor(double strength, int column)
Definition: Silvet.cpp:1313
virtual ~Silvet()
Definition: Silvet.cpp:69
vector< map< int, double > > m_pianoRoll
Definition: Silvet.h:108
bool m_haveStartTime
Definition: Silvet.h:160
bool m_fineTuning
Definition: Silvet.h:101
int m_onOffsetsOutputNo
Definition: Silvet.h:164
float getNoteFrequency(int n, int shift) const
Definition: Silvet.cpp:431
map< Vamp::RealTime, float > m_inputGains
Definition: Silvet.h:110
ProcessingMode m_mode
Definition: Silvet.h:99
const InstrumentPack & getPack(int instrument) const
Definition: Silvet.h:87
FeatureSet process(const float *const *inputBuffers, Vamp::RealTime timestamp)
Definition: Silvet.cpp:568
Silvet(float inputSampleRate)
Definition: Silvet.cpp:54
FeatureChunk noteTrack()
Definition: Silvet.cpp:1042