Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
piano_roll.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_GUI_BACKEND_PIANO_ROLL_H__
11#define __SCHEMAS_GUI_BACKEND_PIANO_ROLL_H__
12
14#include "utils/yaml.h"
15
16typedef enum MidiModifier_v1
17{
18 MIDI_MODIFIER_VELOCITY_v1,
19 MIDI_MODIFIER_PITCH_WHEEL_v1,
20 MIDI_MODIFIER_MOD_WHEEL_v1,
21 MIDI_MODIFIER_AFTERTOUCH_v1,
22} MidiModifier_v1;
23
24static const cyaml_strval_t midi_modifier_strings_v1[] = {
25 { "Velocity", MIDI_MODIFIER_VELOCITY_v1 },
26 { "Pitch Wheel", MIDI_MODIFIER_PITCH_WHEEL_v1 },
27 { "Mod Wheel", MIDI_MODIFIER_MOD_WHEEL_v1 },
28 { "Aftertouch", MIDI_MODIFIER_AFTERTOUCH_v1 },
29};
30
32{
33 int index;
34 int value;
35 int visible;
36 char * custom_name;
37 char * note_name;
38 char * note_name_pango;
39 int marked;
41
42typedef struct PianoRoll_v1
43{
44 int schema_version;
45 float notes_zoom;
46 MidiModifier_v1 midi_modifier;
47 EditorSettings_v1 editor_settings;
49
50static const cyaml_schema_field_t piano_roll_fields_schema_v1[] = {
51 YAML_FIELD_INT (PianoRoll_v1, schema_version),
52 YAML_FIELD_FLOAT (PianoRoll_v1, notes_zoom),
53 YAML_FIELD_ENUM (PianoRoll_v1, midi_modifier, midi_modifier_strings_v1),
54 YAML_FIELD_MAPPING_EMBEDDED (
56 editor_settings,
57 editor_settings_fields_schema_v1),
58
59 CYAML_FIELD_END
60};
61
62static const cyaml_schema_value_t piano_roll_schema_v1 = {
63 YAML_VALUE_PTR (PianoRoll_v1, piano_roll_fields_schema_v1),
64};
65
66#endif
Editor settings schema.
YAML utils.