@@ -11,6 +11,50 @@ static CLAP_CONSTEXPR const char CLAP_EXT_MINI_CURVE_DISPLAY[] = "clap.mini-curv
11
11
extern "C" {
12
12
#endif
13
13
14
+ enum clap_mini_curve_display_curve_kind {
15
+ // The mini curve is intended to draw the total gain response of the plugin.
16
+ // In this case the y values are in dB and the x values are in hz (logarithmic).
17
+ // This would be useful in for example an equalizer.
18
+ CLAP_MINI_CURVE_DISPLAY_CURVE_KIND_GAIN_RESPONSE = 1 ,
19
+
20
+ // The mini curve is intended to draw the total phase response of the plugin.
21
+ // In this case the y values are in radians and the x values are in hz (logarithmic).
22
+ // This would be useful in for example an equalizer.
23
+ CLAP_MINI_CURVE_DISPLAY_CURVE_KIND_PHASE_RESPONSE = 2 ,
24
+
25
+ // The mini curve is intended to draw the transfer curve of the plugin.
26
+ // In this case the both x and y values are in dB.
27
+ // This would be useful in for example a compressor or distortion plugin.
28
+ CLAP_MINI_CURVE_DISPLAY_CURVE_KIND_TRANSFER_CURVE = 3 ,
29
+
30
+ // This mini curve is intended to draw gain reduction over time. In this case
31
+ // x refers to the window in seconds and y refers to level in dB, x_min is
32
+ // always 0, and x_max would be the duration of the window.
33
+ // This would be useful in for example a compressor or limiter.
34
+ CLAP_MINI_CURVE_DISPLAY_CURVE_KIND_GAIN_REDUCTION = 4 ,
35
+
36
+ // This curve is intended as a generic time series plot. In this case
37
+ // x refers to the window in seconds. x_min is always 0, and x_max would be the duration of the
38
+ // window.
39
+ // Y is not specified and up to the plugin.
40
+ CLAP_MINI_CURVE_DISPLAY_CURVE_KIND_TIME_SERIES = 5 ,
41
+
42
+ // Note: more entries could be added here in the future
43
+ };
44
+
45
+ typedef struct clap_mini_display_curve_hints {
46
+
47
+ // Range for the x axis.
48
+ double x_min ;
49
+ double x_max ;
50
+
51
+ // Range for the y axis.
52
+ double y_min ;
53
+ double y_max ;
54
+
55
+ } clap_mini_display_curve_hints_t ;
56
+
57
+
14
58
typedef struct clap_plugin_mini_curve_display {
15
59
// Renders the curve into the data buffer.
16
60
// The value 0 will be at the bottom of the curve and UINT16_MAX will be at the top.
@@ -49,6 +93,13 @@ enum clap_mini_curve_display_change_flags {
49
93
};
50
94
51
95
typedef struct clap_host_mini_curve_display {
96
+ // Fills in the given clap_mini_display_curve_hints_t structure and returns
97
+ // true if succesful. If not, return false.
98
+ // [main-thread]
99
+ bool (CLAP_ABI * get )(const clap_host_t * host ,
100
+ uint32_t kind ,
101
+ clap_mini_display_curve_hints_t * hints );
102
+
52
103
// Mark the curve as being static or dynamic.
53
104
// The curve is initially considered as static, though the plugin should explicitely
54
105
// initialize this state.
0 commit comments