Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
curve.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2021-2022 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
9
10#ifndef __SCHEMAS_AUDIO_CURVE_H__
11#define __SCHEMAS_AUDIO_CURVE_H__
12
13#include "utils/yaml.h"
14
15typedef enum CurveAlgorithm_v1
16{
17 CURVE_ALGORITHM_EXPONENT_v1,
18 CURVE_ALGORITHM_SUPERELLIPSE_v1,
19 CURVE_ALGORITHM_VITAL_v1,
20 CURVE_ALGORITHM_PULSE_v1,
21 CURVE_ALGORITHM_LOGARITHMIC_v1,
22 NUM_CURVE_ALGORITHMS_v1,
23} CurveAlgorithm_v1;
24
25static const cyaml_strval_t curve_algorithm_strings_v1[] = {
26 { ("Exponent"), CURVE_ALGORITHM_EXPONENT_v1 },
27 { ("Superellipse"), CURVE_ALGORITHM_SUPERELLIPSE_v1 },
28 { ("Vital"), CURVE_ALGORITHM_VITAL_v1 },
29 { ("Pulse"), CURVE_ALGORITHM_PULSE_v1 },
30 { ("Logarithmic"), CURVE_ALGORITHM_LOGARITHMIC_v1 },
31};
32
33typedef struct CurveOptions_v1
34{
35 int schema_version;
36 CurveAlgorithm_v1 algo;
37 double curviness;
39
40static const cyaml_schema_field_t curve_options_fields_schema_v1[] = {
41 YAML_FIELD_INT (CurveOptions_v1, schema_version),
42 YAML_FIELD_ENUM (CurveOptions_v1, algo, curve_algorithm_strings_v1),
43 YAML_FIELD_FLOAT (CurveOptions_v1, curviness),
44
45 CYAML_FIELD_END
46};
47
48static const cyaml_schema_value_t curve_options_schema_v1 = {
49 YAML_VALUE_PTR (CurveOptions_v1, curve_options_fields_schema_v1),
50};
51
52#endif
YAML utils.