Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
arranger_objects.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2023 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
10#ifndef __IO_SERIALIZATION_ARRANGER_OBJECTS_H__
11#define __IO_SERIALIZATION_ARRANGER_OBJECTS_H__
12
13#include "utils/types.h"
14
15#include <glib.h>
16
17#include <yyjson.h>
18
19TYPEDEF_STRUCT (ArrangerObject);
20TYPEDEF_STRUCT (RegionIdentifier);
21TYPEDEF_STRUCT (ZRegion);
22TYPEDEF_STRUCT (Marker);
23TYPEDEF_STRUCT (ScaleObject);
24TYPEDEF_STRUCT (ChordObject);
25TYPEDEF_STRUCT (AutomationPoint);
26TYPEDEF_STRUCT (MidiNote);
27
28bool
29arranger_object_serialize_to_json (
30 yyjson_mut_doc * doc,
31 yyjson_mut_val * ao_obj,
32 const ArrangerObject * ao,
33 GError ** error);
34
35bool
36region_identifier_serialize_to_json (
37 yyjson_mut_doc * doc,
38 yyjson_mut_val * id_obj,
39 const RegionIdentifier * id,
40 GError ** error);
41
42bool
43midi_note_serialize_to_json (
44 yyjson_mut_doc * doc,
45 yyjson_mut_val * mn_obj,
46 const MidiNote * mn,
47 GError ** error);
48
49bool
50automation_point_serialize_to_json (
51 yyjson_mut_doc * doc,
52 yyjson_mut_val * ap_obj,
53 const AutomationPoint * ap,
54 GError ** error);
55
56bool
57chord_object_serialize_to_json (
58 yyjson_mut_doc * doc,
59 yyjson_mut_val * co_obj,
60 const ChordObject * co,
61 GError ** error);
62
63bool
64region_serialize_to_json (
65 yyjson_mut_doc * doc,
66 yyjson_mut_val * r_obj,
67 const ZRegion * r,
68 GError ** error);
69
70bool
71scale_object_serialize_to_json (
72 yyjson_mut_doc * doc,
73 yyjson_mut_val * so_obj,
74 const ScaleObject * so,
75 GError ** error);
76
77bool
78marker_serialize_to_json (
79 yyjson_mut_doc * doc,
80 yyjson_mut_val * m_obj,
81 const Marker * m,
82 GError ** error);
83
84bool
85arranger_object_deserialize_from_json (
86 yyjson_doc * doc,
87 yyjson_val * ao_obj,
88 ArrangerObject * ao,
89 GError ** error);
90
91bool
92region_identifier_deserialize_from_json (
93 yyjson_doc * doc,
94 yyjson_val * id_obj,
96 GError ** error);
97
98bool
99midi_note_deserialize_from_json (
100 yyjson_doc * doc,
101 yyjson_val * mn_obj,
102 MidiNote * mn,
103 GError ** error);
104
105bool
106automation_point_deserialize_from_json (
107 yyjson_doc * doc,
108 yyjson_val * ap_obj,
109 AutomationPoint * ap,
110 GError ** error);
111
112bool
113chord_object_deserialize_from_json (
114 yyjson_doc * doc,
115 yyjson_val * co_obj,
116 ChordObject * co,
117 GError ** error);
118
119bool
120region_deserialize_from_json (
121 yyjson_doc * doc,
122 yyjson_val * r_obj,
123 ZRegion * r,
124 GError ** error);
125
126bool
127scale_object_deserialize_from_json (
128 yyjson_doc * doc,
129 yyjson_val * so_obj,
130 ScaleObject * so,
131 GError ** error);
132
133bool
134marker_deserialize_from_json (
135 yyjson_doc * doc,
136 yyjson_val * m_obj,
137 Marker * m,
138 GError ** error);
139
140#endif // __IO_SERIALIZATION_ARRANGER_OBJECTS_H__
Base struct for arranger objects.
An automation point inside an AutomationTrack.
A ChordObject to be shown in the TimelineArrangerWidget.
Marker for the MarkerTrack.
Definition marker.h:49
A MIDI note inside a ZRegion shown in the piano roll.
Definition midi_note.h:49
Index/identifier for a Region, so we can get Region objects quickly with it without searching by name...
A ScaleObject to be shown in the TimelineArrangerWidget.
A region (clip) is an object on the timeline that contains either MidiNote's or AudioClip's.
Definition region.h:72
Custom types.