Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
transport.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2018-2022 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
9
10#ifndef __SCHEMAS_AUDIO_TRANSPORT_H__
11#define __SCHEMAS_AUDIO_TRANSPORT_H__
12
13#include <cstdint>
14
17#include "utils/types.h"
18
19typedef struct Transport_v1
20{
21 int schema_version;
22 int total_bars;
23 Position_v1 playhead_pos;
24 Position_v1 cue_pos;
25 Position_v1 loop_start_pos;
26 Position_v1 loop_end_pos;
27 Position_v1 punch_in_pos;
28 Position_v1 punch_out_pos;
29 Position_v1 range_1;
30 Position_v1 range_2;
31 int has_range;
32 nframes_t position;
33 Port_v1 * roll;
34 Port_v1 * stop;
35 Port_v1 * backward;
36 Port_v1 * forward;
37 Port_v1 * loop_toggle;
38 Port_v1 * rec_toggle;
40
41static const cyaml_schema_field_t transport_fields_schema_v1[] = {
42 YAML_FIELD_INT (Transport_v1, schema_version),
43 YAML_FIELD_INT (Transport_v1, total_bars),
44 YAML_FIELD_MAPPING_EMBEDDED (
46 playhead_pos,
47 position_fields_schema_v1),
48 YAML_FIELD_MAPPING_EMBEDDED (Transport_v1, cue_pos, position_fields_schema_v1),
49 YAML_FIELD_MAPPING_EMBEDDED (
51 loop_start_pos,
52 position_fields_schema_v1),
53 YAML_FIELD_MAPPING_EMBEDDED (
55 loop_end_pos,
56 position_fields_schema_v1),
57 YAML_FIELD_MAPPING_EMBEDDED (
59 punch_in_pos,
60 position_fields_schema_v1),
61 YAML_FIELD_MAPPING_EMBEDDED (
63 punch_out_pos,
64 position_fields_schema_v1),
65 YAML_FIELD_MAPPING_EMBEDDED (Transport_v1, range_1, position_fields_schema_v1),
66 YAML_FIELD_MAPPING_EMBEDDED (Transport_v1, range_2, position_fields_schema_v1),
67 YAML_FIELD_INT (Transport_v1, has_range),
68 YAML_FIELD_INT (Transport_v1, position),
69 YAML_FIELD_MAPPING_PTR_OPTIONAL (Transport_v1, roll, port_fields_schema_v1),
70 YAML_FIELD_MAPPING_PTR_OPTIONAL (Transport_v1, stop, port_fields_schema_v1),
71 YAML_FIELD_MAPPING_PTR_OPTIONAL (Transport_v1, backward, port_fields_schema_v1),
72 YAML_FIELD_MAPPING_PTR_OPTIONAL (Transport_v1, forward, port_fields_schema_v1),
73 YAML_FIELD_MAPPING_PTR_OPTIONAL (Transport_v1, loop_toggle, port_fields_schema_v1),
74 YAML_FIELD_MAPPING_PTR_OPTIONAL (Transport_v1, rec_toggle, port_fields_schema_v1),
75
76 CYAML_FIELD_END
77};
78
79static const cyaml_schema_value_t transport_schema_v1 = {
80 YAML_VALUE_PTR (Transport_v1, transport_fields_schema_v1),
81};
82
83#endif
Port schema.
uint32_t nframes_t
Frame count.
Definition types.h:62
Position schema.
Definition port.h:18
Custom types.