#include <Silvet.h>

Inheritance diagram for Silvet:
Inheritance graph
Collaboration diagram for Silvet:
Collaboration graph

Classes

struct  FeatureChunk
 

Public Types

enum  ProcessingMode { LiveMode = 0, HighQualityMode = 1 }
 

Public Member Functions

 Silvet (float inputSampleRate)
 
virtual ~Silvet ()
 
string getIdentifier () const
 
string getName () const
 
string getDescription () const
 
string getMaker () const
 
int getPluginVersion () const
 
string getCopyright () const
 
InputDomain getInputDomain () const
 
size_t getPreferredBlockSize () const
 
size_t getPreferredStepSize () const
 
size_t getMinChannelCount () const
 
size_t getMaxChannelCount () const
 
ParameterList getParameterDescriptors () const
 
float getParameter (string identifier) const
 
void setParameter (string identifier, float value)
 
ProgramList getPrograms () const
 
string getCurrentProgram () const
 
void selectProgram (string name)
 
OutputList getOutputDescriptors () const
 
bool initialise (size_t channels, size_t stepSize, size_t blockSize)
 
void reset ()
 
FeatureSet process (const float *const *inputBuffers, Vamp::RealTime timestamp)
 
FeatureSet getRemainingFeatures ()
 

Protected Types

typedef vector< vector< double > > Grid
 

Protected Member Functions

const InstrumentPackgetPack (int instrument) const
 
Grid preProcess (const Grid &)
 
std::pair< vector< double >, vector< int > > applyEM (const InstrumentPack &pack, const vector< double > &column)
 
void postProcess (const vector< double > &pitches, const vector< int > &bestShifts)
 
int getShiftCount () const
 
FeatureChunk noteTrack ()
 
void emitNoteAndOffset (int start, int end, int note, FeatureList &noteFeatures, FeatureList &onOffsetFeatures)
 
void emitOnset (int start, int note, FeatureList &onOffsetFeatures)
 
Vamp::RealTime getColumnTimestamp (int column)
 
Feature makeNoteFeature (int start, int end, int note, int shift, double strength)
 
Feature makeOnsetFeature (int start, int note, int shift, double strength)
 
Feature makeOffsetFeature (int col, int note, int shift)
 
int getVelocityFor (double strength, int column)
 
float getInputGainAt (Vamp::RealTime t)
 
void insertTemplateFeatures (FeatureSet &)
 
void transcribe (const Grid &, FeatureSet &)
 
string getChromaName (int n) const
 
string getNoteName (int n, int shift) const
 
float getNoteFrequency (int n, int shift) const
 

Protected Attributes

const std::vector< InstrumentPackm_instruments
 
const std::vector< InstrumentPackm_liveInstruments
 
Resampler * m_resampler
 
FlattenDynamics * m_flattener
 
CQSpectrogram * m_cq
 
ProcessingMode m_mode
 
bool m_fineTuning
 
int m_instrument
 
int m_colsPerSec
 
vector< MedianFilter< double > * > m_postFilter
 
vector< map< int, double > > m_pianoRoll
 
vector< map< int, int > > m_pianoRollShifts
 
map< Vamp::RealTime, float > m_inputGains
 
set< int > m_current
 
int m_blockSize
 
int m_columnCount
 
int m_resampledCount
 
Vamp::RealTime m_startTime
 
bool m_haveStartTime
 
int m_notesOutputNo
 
int m_onsetsOutputNo
 
int m_onOffsetsOutputNo
 
int m_fcqOutputNo
 
int m_pitchOutputNo
 
int m_templateOutputNo
 
int m_chromaOutputNo
 

Member Typedef Documentation

typedef vector<vector<double> > Silvet::Grid
protected

Member Enumeration Documentation

Enumerator
LiveMode 
HighQualityMode 

Constructor & Destructor Documentation

Silvet::Silvet ( float  inputSampleRate)
Silvet::~Silvet ( )
virtual

Member Function Documentation

pair< vector< double >, vector< int > > Silvet::applyEM ( const InstrumentPack pack,
const vector< double > &  column 
)
protected
void Silvet::emitNoteAndOffset ( int  start,
int  end,
int  note,
FeatureList &  noteFeatures,
FeatureList &  onOffsetFeatures 
)
protected
void Silvet::emitOnset ( int  start,
int  note,
FeatureList &  onOffsetFeatures 
)
protected
std::string Silvet::getChromaName ( int  n) const
protected
RealTime Silvet::getColumnTimestamp ( int  column)
protected
string Silvet::getCopyright ( ) const
string Silvet::getCurrentProgram ( ) const
string Silvet::getDescription ( ) const
string Silvet::getIdentifier ( ) const
Silvet::InputDomain Silvet::getInputDomain ( ) const
float Silvet::getInputGainAt ( Vamp::RealTime  t)
protected
string Silvet::getMaker ( ) const
size_t Silvet::getMaxChannelCount ( ) const
size_t Silvet::getMinChannelCount ( ) const
string Silvet::getName ( ) const
float Silvet::getNoteFrequency ( int  n,
int  shift 
) const
protected
std::string Silvet::getNoteName ( int  n,
int  shift 
) const
protected
Silvet::OutputList Silvet::getOutputDescriptors ( ) const
const InstrumentPack& Silvet::getPack ( int  instrument) const
inlineprotected
float Silvet::getParameter ( string  identifier) const
Silvet::ParameterList Silvet::getParameterDescriptors ( ) const
int Silvet::getPluginVersion ( ) const
size_t Silvet::getPreferredBlockSize ( ) const
size_t Silvet::getPreferredStepSize ( ) const
Silvet::ProgramList Silvet::getPrograms ( ) const
Silvet::FeatureSet Silvet::getRemainingFeatures ( )
int Silvet::getShiftCount ( ) const
protected
int Silvet::getVelocityFor ( double  strength,
int  column 
)
protected
bool Silvet::initialise ( size_t  channels,
size_t  stepSize,
size_t  blockSize 
)
void Silvet::insertTemplateFeatures ( FeatureSet &  fs)
protected
Silvet::Feature Silvet::makeNoteFeature ( int  start,
int  end,
int  note,
int  shift,
double  strength 
)
protected
Silvet::Feature Silvet::makeOffsetFeature ( int  col,
int  note,
int  shift 
)
protected
Silvet::Feature Silvet::makeOnsetFeature ( int  start,
int  note,
int  shift,
double  strength 
)
protected
Silvet::FeatureChunk Silvet::noteTrack ( )
protected
void Silvet::postProcess ( const vector< double > &  pitches,
const vector< int > &  bestShifts 
)
protected
Silvet::Grid Silvet::preProcess ( const Grid in)
protected
Silvet::FeatureSet Silvet::process ( const float *const *  inputBuffers,
Vamp::RealTime  timestamp 
)
void Silvet::reset ( )
void Silvet::selectProgram ( string  name)
void Silvet::setParameter ( string  identifier,
float  value 
)
void Silvet::transcribe ( const Grid ,
FeatureSet &   
)
protected

Member Data Documentation

int Silvet::m_blockSize
protected
int Silvet::m_chromaOutputNo
mutableprotected
int Silvet::m_colsPerSec
protected
int Silvet::m_columnCount
protected
CQSpectrogram* Silvet::m_cq
protected
set<int> Silvet::m_current
protected
int Silvet::m_fcqOutputNo
mutableprotected
bool Silvet::m_fineTuning
protected
FlattenDynamics* Silvet::m_flattener
protected
bool Silvet::m_haveStartTime
protected
map<Vamp::RealTime, float> Silvet::m_inputGains
protected
int Silvet::m_instrument
protected
const std::vector<InstrumentPack> Silvet::m_instruments
protected
const std::vector<InstrumentPack> Silvet::m_liveInstruments
protected
ProcessingMode Silvet::m_mode
protected
int Silvet::m_notesOutputNo
mutableprotected
int Silvet::m_onOffsetsOutputNo
mutableprotected
int Silvet::m_onsetsOutputNo
mutableprotected
vector<map<int, double> > Silvet::m_pianoRoll
protected
vector<map<int, int> > Silvet::m_pianoRollShifts
protected
int Silvet::m_pitchOutputNo
mutableprotected
vector<MedianFilter<double> *> Silvet::m_postFilter
protected
int Silvet::m_resampledCount
protected
Resampler* Silvet::m_resampler
protected
Vamp::RealTime Silvet::m_startTime
protected
int Silvet::m_templateOutputNo
mutableprotected

The documentation for this class was generated from the following files: