Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
track_processor.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2019-2022 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
9
10#ifndef __SCHEMAS_AUDIO_TRACK_PROCESSOR_H__
11#define __SCHEMAS_AUDIO_TRACK_PROCESSOR_H__
12
14#include "utils/types.h"
15#include "utils/yaml.h"
16
17typedef enum TrackProcessorMidiAutomatable_v1
18{
19 MIDI_AUTOMATABLE_MOD_WHEEL_v1,
20 MIDI_AUTOMATABLE_PITCH_BEND_v1,
21 NUM_MIDI_AUTOMATABLES_v1,
22} TrackProcessorMidiAutomatable_v1;
23
24typedef struct TrackProcessor_v1
25{
26 int schema_version;
27 Port_v1 * mono;
28 Port_v1 * input_gain;
29 Port_v1 * output_gain;
30 Port_v1 * midi_in;
31 Port_v1 * midi_out;
32 Port_v1 * piano_roll;
33 Port_v1 * monitor_audio;
34 StereoPorts_v1 * stereo_in;
35 StereoPorts_v1 * stereo_out;
36 Port_v1 * midi_cc[128 * 16];
37 Port_v1 * pitch_bend[16];
38 Port_v1 * poly_key_pressure[16];
39 Port_v1 * channel_pressure[16];
41
42static const cyaml_schema_field_t track_processor_fields_schema_v1[] = {
43 YAML_FIELD_INT (TrackProcessor_v1, schema_version),
44 YAML_FIELD_MAPPING_PTR_OPTIONAL (TrackProcessor_v1, mono, port_fields_schema_v1),
45 YAML_FIELD_MAPPING_PTR_OPTIONAL (
47 input_gain,
48 port_fields_schema_v1),
49 YAML_FIELD_MAPPING_PTR_OPTIONAL (
51 output_gain,
52 port_fields_schema_v1),
53 YAML_FIELD_MAPPING_PTR_OPTIONAL (
55 midi_in,
56 port_fields_schema_v1),
57 YAML_FIELD_MAPPING_PTR_OPTIONAL (
59 midi_out,
60 port_fields_schema_v1),
61 YAML_FIELD_MAPPING_PTR_OPTIONAL (
63 piano_roll,
64 port_fields_schema_v1),
65 YAML_FIELD_MAPPING_PTR_OPTIONAL (
67 monitor_audio,
68 port_fields_schema_v1),
69 YAML_FIELD_MAPPING_PTR_OPTIONAL (
71 stereo_in,
72 stereo_ports_fields_schema_v1),
73 YAML_FIELD_MAPPING_PTR_OPTIONAL (
75 stereo_out,
76 stereo_ports_fields_schema_v1),
77 YAML_FIELD_FIXED_SIZE_PTR_ARRAY (
79 midi_cc,
80 port_schema_v1,
81 128 * 16),
82 YAML_FIELD_FIXED_SIZE_PTR_ARRAY (
84 pitch_bend,
85 port_schema_v1,
86 16),
87 YAML_FIELD_FIXED_SIZE_PTR_ARRAY (
89 poly_key_pressure,
90 port_schema_v1,
91 16),
92 YAML_FIELD_FIXED_SIZE_PTR_ARRAY (
94 channel_pressure,
95 port_schema_v1,
96 16),
97
98 CYAML_FIELD_END
99};
100
101static const cyaml_schema_value_t track_processor_schema_v1 = {
102 YAML_VALUE_PTR (TrackProcessor_v1, track_processor_fields_schema_v1),
103};
104
105#endif
Port schema.
Definition port.h:18
L & R port, for convenience.
Definition port.h:54
Custom types.
YAML utils.