Mercurial > hg > jvamp
comparison org/vamp_plugins/OutputDescriptor.java @ 28:f2914a92b553
Docs
author | Chris Cannam |
---|---|
date | Mon, 19 Nov 2012 15:12:44 +0000 |
parents | 7b1740a9020a |
children | c9515589be7d |
comparison
equal
deleted
inserted
replaced
27:59b4150c69cb | 28:f2914a92b553 |
---|---|
1 | 1 |
2 package org.vamp_plugins; | 2 package org.vamp_plugins; |
3 | 3 |
4 /** | |
5 * OutputDescriptor describes the properties of an output of a Vamp | |
6 * plugin. Returned by e.g. Plugin.getOutputDescriptors(). | |
7 */ | |
4 public class OutputDescriptor { | 8 public class OutputDescriptor { |
9 | |
10 /** | |
11 * The name of the output, in computer-usable form. Will contain | |
12 * the characters [a-zA-Z0-9_-] only. | |
13 */ | |
5 public String identifier; | 14 public String identifier; |
15 | |
16 /** | |
17 * The human-readable name of the output. | |
18 */ | |
6 public String name; | 19 public String name; |
20 | |
21 /** | |
22 * A human-readable short text describing the output. May be | |
23 * empty if the name has said it all already. | |
24 */ | |
7 public String description; | 25 public String description; |
26 | |
27 /** | |
28 * The unit of the output, in human-readable form. | |
29 */ | |
8 public String unit; | 30 public String unit; |
31 | |
32 /** | |
33 * True if the output has the same number of values per sample | |
34 * for every output sample. | |
35 */ | |
9 public boolean hasFixedBinCount; | 36 public boolean hasFixedBinCount; |
37 | |
38 /** | |
39 * The number of values per result of the output. Undefined | |
40 * if hasFixedBinCount is false. If this is zero, the output | |
41 * is point data (i.e. only the time of each output is of | |
42 * interest, the value list will be empty). | |
43 */ | |
10 public int binCount; | 44 public int binCount; |
45 | |
46 /** | |
47 * The (human-readable) names of each of the bins, if | |
48 * appropriate. This is always optional. | |
49 */ | |
11 public String[] binNames; | 50 public String[] binNames; |
51 | |
52 /** | |
53 * True if the results in each output bin fall within a fixed | |
54 * numeric range (minimum and maximum values). Undefined if | |
55 * binCount is zero. | |
56 */ | |
12 public boolean hasKnownExtents; | 57 public boolean hasKnownExtents; |
58 | |
59 /** | |
60 * Minimum value of the results in the output. Undefined if | |
61 * hasKnownExtents is false or binCount is zero. | |
62 */ | |
13 public float minValue; | 63 public float minValue; |
64 | |
65 /** | |
66 * Maximum value of the results in the output. Undefined if | |
67 * hasKnownExtents is false or binCount is zero. | |
68 */ | |
14 public float maxValue; | 69 public float maxValue; |
70 | |
71 /** | |
72 * True if the output values are quantized to a particular | |
73 * resolution. Undefined if binCount is zero. | |
74 */ | |
15 public boolean isQuantized; | 75 public boolean isQuantized; |
76 | |
77 /** | |
78 * Quantization resolution of the output values (e.g. 1.0 if | |
79 * they are all integers). Undefined if isQuantized is false | |
80 * or binCount is zero. | |
81 */ | |
16 public float quantizeStep; | 82 public float quantizeStep; |
83 | |
17 public static enum SampleType { | 84 public static enum SampleType { |
18 OneSamplePerStep, FixedSampleRate, VariableSampleRate | 85 /// Results from each process() align with that call's block start |
86 OneSamplePerStep, | |
87 | |
88 /// Results are evenly spaced in time (sampleRate specified below) | |
89 FixedSampleRate, | |
90 | |
91 /// Results are unevenly spaced and have individual timestamps | |
92 VariableSampleRate | |
19 }; | 93 }; |
94 | |
95 /** | |
96 * Positioning in time of the output results. | |
97 */ | |
20 public SampleType sampleType; | 98 public SampleType sampleType; |
99 | |
100 /** | |
101 * Sample rate of the output results, as samples per second. | |
102 * Undefined if sampleType is OneSamplePerStep. | |
103 * | |
104 * If sampleType is VariableSampleRate and this value is | |
105 * non-zero, then it may be used to calculate a resolution for | |
106 * the output (i.e. the "duration" of each sample, in time, | |
107 * will be 1/sampleRate seconds). It's recommended to set | |
108 * this to zero if that behaviour is not desired. | |
109 */ | |
21 public float sampleRate; | 110 public float sampleRate; |
111 | |
112 /** | |
113 * True if the returned results for this output are known to | |
114 * have a duration field. | |
115 */ | |
22 public boolean hasDuration; | 116 public boolean hasDuration; |
23 | 117 |
24 OutputDescriptor() { | 118 OutputDescriptor() { |
25 hasFixedBinCount = false; | 119 hasFixedBinCount = false; |
26 hasKnownExtents = false; | 120 hasKnownExtents = false; |