SampleType » History » Version 10

Chris Cannam, 2014-02-10 01:13 PM

1 1 Chris Cannam
h1. Output Sample Type and Sample Rate
2 1 Chris Cannam
3 10 Chris Cannam
A Vamp plugin takes audio as input, as a series of process blocks with associated timestamps, and returns a series of "feature" structures. The plugin may return any number of features from each @process@ call, and any number of features from @getRemainingFeatures@ once all audio has been received.
4 1 Chris Cannam
5 10 Chris Cannam
Features are associated with a particular output of the plugin. The plugin declares that each output has certain properties, which constrain the sort of feature data the host can expect to see. (See diagram.)
6 10 Chris Cannam
7 7 Chris Cannam
!/attachments/download/980/feature-structures-20pc.png!
8 9 Chris Cannam
9 9 Chris Cannam
A feature may or may not have a timestamp. Whether a timestamp is provided -- and, if it is provided, what it means -- are determined by the @SampleType@ and @SampleRate@ properties of the plugin output on which the feature is returned.
10 7 Chris Cannam
11 8 Chris Cannam
h2. SampleType
12 1 Chris Cannam
13 8 Chris Cannam
A plugin output's @SampleType@ property may be either @OneSamplePerStep@, @FixedSampleRate@, or @VariableSampleRate@. Here's what they mean.
14 8 Chris Cannam
15 1 Chris Cannam
h3. OneSamplePerStep
16 8 Chris Cannam
17 10 Chris Cannam
This is the simplest option. If an output is declared as having a @SampleType@ of @OneSamplePerStep@, then any features returned from