Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
chord_selections.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2019, 2021 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
10#ifndef __GUI_BACKEND_CHORD_SELECTIONS_H__
11#define __GUI_BACKEND_CHORD_SELECTIONS_H__
12
13#include "dsp/chord_object.h"
15#include "utils/yaml.h"
16
23#define CHORD_SELECTIONS_SCHEMA_VERSION 1
24
25#define CHORD_SELECTIONS (PROJECT->chord_selections)
26
31typedef struct ChordSelections
32{
35
36 int schema_version;
37
43 int num_chord_objects;
44 size_t chord_objects_size;
45
47
48static const cyaml_schema_field_t
49 chord_selections_fields_schema[] = {
52 base,
53 arranger_selections_fields_schema),
54 YAML_FIELD_INT (ChordSelections, schema_version),
57 chord_objects,
58 chord_object_schema),
59
60 CYAML_FIELD_END
61 };
62
63static const cyaml_schema_value_t chord_selections_schema = {
66 chord_selections_fields_schema),
67};
68
75int
77 ChordSelections * ts,
78 Position * pos,
79 ZRegion * region);
80
85#endif
Chord object in the TimelineArranger.
int chord_selections_can_be_pasted(ChordSelections *ts, Position *pos, ZRegion *region)
Returns if the selections can be pasted.
#define YAML_FIELD_MAPPING_EMBEDDED(owner, member, schema)
Mapping embedded inside the struct.
Definition yaml.h:32
#define YAML_FIELD_DYN_ARRAY_VAR_COUNT(owner, member, schema)
Dynamic-width (reallocated) array of structs with variable count.
Definition yaml.h:123
#define YAML_VALUE_PTR(cc, fields_schema)
Schema to be used as a pointer.
Definition yaml.h:221
Common data structures and functions for *ArrangerSelections.
A ChordObject to be shown in the TimelineArrangerWidget.
Selections to be used for the ChordArrangerWidget's current selections, copying, undoing,...
ArrangerSelections base
Base struct.
ChordObject ** chord_objects
Selected ChordObject's.
A Position is made up of bars.beats.sixteenths.ticks.
Definition position.h:137
A region (clip) is an object on the timeline that contains either MidiNote's or AudioClip's.
Definition region.h:78
YAML utils.