Browse Source

upgrade old project format (drop undo history)

libpanel_detach v1.0.0-beta.3.0
Alexandros Theodotou 2 months ago
parent
commit
7bbb1ab0fa
Signed by: alex
GPG Key ID: 022EAE42313D70F3
  1. 2
      inc/actions/undo_stack.h
  2. 20
      inc/audio/automation_tracklist.h
  3. 20
      inc/audio/channel.h
  4. 20
      inc/audio/channel_send.h
  5. 20
      inc/audio/chord_descriptor.h
  6. 20
      inc/audio/fader.h
  7. 20
      inc/audio/marker.h
  8. 20
      inc/audio/midi_mapping.h
  9. 20
      inc/audio/midi_region.h
  10. 20
      inc/audio/modulator_macro_processor.h
  11. 20
      inc/audio/port.h
  12. 20
      inc/audio/port_connection.h
  13. 20
      inc/audio/port_connections_manager.h
  14. 1
      inc/audio/region.h
  15. 20
      inc/audio/region_identifier.h
  16. 20
      inc/audio/sample_processor.h
  17. 20
      inc/audio/scale.h
  18. 24
      inc/audio/scale_object.h
  19. 102
      inc/audio/snap_grid.h
  20. 20
      inc/audio/tempo_track.h
  21. 20
      inc/audio/track_lane.h
  22. 20
      inc/audio/track_processor.h
  23. 20
      inc/audio/velocity.h
  24. 20
      inc/gui/backend/mixer_selections.h
  25. 20
      inc/gui/backend/piano_roll.h
  26. 20
      inc/gui/backend/timeline.h
  27. 23
      inc/plugins/lv2_plugin.h
  28. 20
      inc/plugins/plugin.h
  29. 20
      inc/plugins/plugin_identifier.h
  30. 20
      inc/plugins/plugin_preset.h
  31. 10
      inc/project.h
  32. 29
      inc/schemas/audio/automation_track.h
  33. 22
      inc/schemas/audio/automation_tracklist.h
  34. 33
      inc/schemas/audio/channel.h
  35. 81
      inc/schemas/audio/channel_send.h
  36. 110
      inc/schemas/audio/chord_descriptor.h
  37. 49
      inc/schemas/audio/clip.h
  38. 22
      inc/schemas/audio/curve.h
  39. 130
      inc/schemas/audio/engine.h
  40. 54
      inc/schemas/audio/fader.h
  41. 31
      inc/schemas/audio/marker.h
  42. 21
      inc/schemas/audio/midi_mapping.h
  43. 21
      inc/schemas/audio/midi_note.h
  44. 197
      inc/schemas/audio/port.h
  45. 43
      inc/schemas/audio/port_connection.h
  46. 35
      inc/schemas/audio/port_connections_manager.h
  47. 174
      inc/schemas/audio/port_identifier.h
  48. 24
      inc/schemas/audio/quantize_options.h
  49. 69
      inc/schemas/audio/region.h
  50. 24
      inc/schemas/audio/region_identifier.h
  51. 22
      inc/schemas/audio/region_link_group.h
  52. 20
      inc/schemas/audio/region_link_group_manager.h
  53. 43
      inc/schemas/audio/sample_processor.h
  54. 274
      inc/schemas/audio/scale.h
  55. 27
      inc/schemas/audio/scale_object.h
  56. 34
      inc/schemas/audio/snap_grid.h
  57. 28
      inc/schemas/audio/tempo_track.h
  58. 66
      inc/schemas/audio/track.h
  59. 36
      inc/schemas/audio/track_lane.h
  60. 66
      inc/schemas/audio/track_processor.h
  61. 22
      inc/schemas/audio/tracklist.h
  62. 121
      inc/schemas/audio/transport.h
  63. 46
      inc/schemas/audio/velocity.h
  64. 29
      inc/schemas/gui/backend/arranger_object.h
  65. 23
      inc/schemas/gui/backend/audio_clip_editor.h
  66. 23
      inc/schemas/gui/backend/automation_editor.h
  67. 29
      inc/schemas/gui/backend/chord_editor.h
  68. 30
      inc/schemas/gui/backend/clip_editor.h
  69. 24
      inc/schemas/gui/backend/mixer_selections.h
  70. 42
      inc/schemas/gui/backend/piano_roll.h
  71. 35
      inc/schemas/gui/backend/timeline.h
  72. 36
      inc/schemas/gui/backend/timeline_selections.h
  73. 58
      inc/schemas/plugins/plugin.h
  74. 26
      inc/schemas/plugins/plugin_identifier.h
  75. 22
      inc/schemas/plugins/plugin_preset.h
  76. 135
      inc/schemas/project.h
  77. 5
      inc/utils/yaml.h
  78. 10
      src/actions/actions.c
  79. 10
      src/audio/sample_processor.c
  80. 10
      src/plugins/cached_plugin_descriptors.c
  81. 6
      src/plugins/collections.c
  82. 59
      src/project.c
  83. 10
      src/settings/chord_preset_pack_manager.c
  84. 10
      src/settings/plugin_settings.c
  85. 7
      src/settings/user_shortcuts.c
  86. 39
      src/utils/yaml.c
  87. 37
      tests/project.c
  88. 22
      tests/utils/yaml.c

2
inc/actions/undo_stack.h

@ -31,7 +31,7 @@ typedef struct AudioClip AudioClip; @@ -31,7 +31,7 @@ typedef struct AudioClip AudioClip;
* @{
*/
#define UNDO_STACK_SCHEMA_VERSION 1
#define UNDO_STACK_SCHEMA_VERSION 2
/**
* Serializable stack for undoable actions.

20
inc/audio/automation_tracklist.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2018-2022 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2018-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file

20
inc/audio/channel.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2018-2021 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2018-2021 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file

20
inc/audio/channel_send.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2020-2021 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2020-2021 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file

20
inc/audio/chord_descriptor.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2018-2022 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2018-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file

20
inc/audio/fader.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2019-2022 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2019-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file

20
inc/audio/marker.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2019-2021 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2019-2021 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file

20
inc/audio/midi_mapping.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2019-2021 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2019-2021 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file

20
inc/audio/midi_region.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2019-2022 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2019-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file

20
inc/audio/modulator_macro_processor.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2021-2022 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2021-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file

20
inc/audio/port.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2018-2022 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2018-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file

20
inc/audio/port_connection.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2021-2022 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2021-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file

20
inc/audio/port_connections_manager.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2021 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2021 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file

1
inc/audio/region.h

@ -12,7 +12,6 @@ @@ -12,7 +12,6 @@
#include "audio/automation_point.h"
#include "audio/chord_object.h"
#include "audio/midi_note.h"
#include "audio/midi_region.h"
#include "audio/position.h"
#include "audio/region_identifier.h"
#include "gui/backend/arranger_object.h"

20
inc/audio/region_identifier.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2020-2022 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2020-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file

20
inc/audio/sample_processor.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2019-2022 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2019-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file

20
inc/audio/scale.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2018-2022 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2018-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file

24
inc/audio/scale_object.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2018-2021 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2018-2021 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file
@ -42,7 +26,9 @@ typedef struct MusicalScale MusicalScale; @@ -42,7 +26,9 @@ typedef struct MusicalScale MusicalScale;
* @{
*/
/* FIXME upgrade to v2 and upgrade project (see schema below) */
#define SCALE_OBJECT_SCHEMA_VERSION 1
//#define SCALE_OBJECT_SCHEMA_VERSION 2
#define scale_object_is_selected(r) \
arranger_object_is_selected ((ArrangerObject *) r)
@ -77,6 +63,8 @@ static const cyaml_schema_field_t scale_object_fields_schema[] = { @@ -77,6 +63,8 @@ static const cyaml_schema_field_t scale_object_fields_schema[] = {
ScaleObject,
base,
arranger_object_fields_schema),
/* FIXME uncomment before v1 release and upgrade project */
//YAML_FIELD_INT (ScaleObject, schema_version),
YAML_FIELD_INT (ScaleObject, index),
YAML_FIELD_MAPPING_PTR (
ScaleObject,

102
inc/audio/snap_grid.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2018-2022 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2018-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file
@ -63,6 +47,20 @@ typedef enum NoteLength @@ -63,6 +47,20 @@ typedef enum NoteLength
NOTE_LENGTH_1_128
} NoteLength;
static const cyaml_strval_t note_length_strings[] = {
{"bar", NOTE_LENGTH_BAR },
{ "beat", NOTE_LENGTH_BEAT },
{ "2/1", NOTE_LENGTH_2_1 },
{ "1/1", NOTE_LENGTH_1_1 },
{ "1/2", NOTE_LENGTH_1_2 },
{ "1/4", NOTE_LENGTH_1_4 },
{ "1/8", NOTE_LENGTH_1_8 },
{ "1/16", NOTE_LENGTH_1_16 },
{ "1/32", NOTE_LENGTH_1_32 },
{ "1/64", NOTE_LENGTH_1_64 },
{ "1/128", NOTE_LENGTH_1_128},
};
typedef enum NoteType
{
NOTE_TYPE_NORMAL,
@ -70,6 +68,22 @@ typedef enum NoteType @@ -70,6 +68,22 @@ typedef enum NoteType
NOTE_TYPE_TRIPLET ///< 3/2 of its original size
} NoteType;
static const cyaml_strval_t note_type_strings[] = {
{"normal", NOTE_TYPE_NORMAL },
{ "dotted", NOTE_TYPE_DOTTED },
{ "triplet", NOTE_TYPE_TRIPLET},
};
/**
* These are not meant to be serialized, they are
* only used for convenience.
*/
static const cyaml_strval_t note_type_short_strings[] = {
{"", NOTE_TYPE_NORMAL },
{ ".", NOTE_TYPE_DOTTED },
{ "t", NOTE_TYPE_TRIPLET},
};
typedef enum NoteLengthType
{
/** Custom length. */
@ -82,6 +96,12 @@ typedef enum NoteLengthType @@ -82,6 +96,12 @@ typedef enum NoteLengthType
NOTE_LENGTH_LAST_OBJECT,
} NoteLengthType;
static const cyaml_strval_t note_length_type_strings[] = {
{"custom", NOTE_LENGTH_CUSTOM },
{ "link", NOTE_LENGTH_LINK },
{ "last object", NOTE_LENGTH_LAST_OBJECT},
};
/**
* Snap grid type.
*/
@ -91,6 +111,11 @@ typedef enum SnapGridType @@ -91,6 +111,11 @@ typedef enum SnapGridType
SNAP_GRID_TYPE_EDITOR,
} SnapGridType;
static const cyaml_strval_t snap_grid_type_strings[] = {
{"timeline", SNAP_GRID_TYPE_TIMELINE},
{ "editor", SNAP_GRID_TYPE_EDITOR },
};
typedef struct SnapGrid
{
int schema_version;
@ -147,47 +172,6 @@ typedef struct SnapGrid @@ -147,47 +172,6 @@ typedef struct SnapGrid
NoteLengthType length_type;
} SnapGrid;
static const cyaml_strval_t snap_grid_type_strings[] = {
{"timeline", SNAP_GRID_TYPE_TIMELINE},
{ "editor", SNAP_GRID_TYPE_EDITOR },
};
static const cyaml_strval_t note_length_strings[] = {
{"bar", NOTE_LENGTH_BAR },
{ "beat", NOTE_LENGTH_BEAT },
{ "2/1", NOTE_LENGTH_2_1 },
{ "1/1", NOTE_LENGTH_1_1 },
{ "1/2", NOTE_LENGTH_1_2 },
{ "1/4", NOTE_LENGTH_1_4 },
{ "1/8", NOTE_LENGTH_1_8 },
{ "1/16", NOTE_LENGTH_1_16 },
{ "1/32", NOTE_LENGTH_1_32 },
{ "1/64", NOTE_LENGTH_1_64 },
{ "1/128", NOTE_LENGTH_1_128},
};
static const cyaml_strval_t note_type_strings[] = {
{"normal", NOTE_TYPE_NORMAL },
{ "dotted", NOTE_TYPE_DOTTED },
{ "triplet", NOTE_TYPE_TRIPLET},
};
static const cyaml_strval_t note_length_type_strings[] = {
{"custom", NOTE_LENGTH_CUSTOM },
{ "link", NOTE_LENGTH_LINK },
{ "last object", NOTE_LENGTH_LAST_OBJECT},
};
/**
* These are not meant to be serialized, they are
* only used for convenience.
*/
static const cyaml_strval_t note_type_short_strings[] = {
{"", NOTE_TYPE_NORMAL },
{ ".", NOTE_TYPE_DOTTED },
{ "t", NOTE_TYPE_TRIPLET},
};
static const cyaml_schema_field_t snap_grid_fields_schema[] = {
YAML_FIELD_INT (SnapGrid, schema_version),
YAML_FIELD_ENUM (SnapGrid, type, snap_grid_type_strings),

20
inc/audio/tempo_track.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2019-2020 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2019-2020 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file

20
inc/audio/track_lane.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2019-2022 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2019-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file

20
inc/audio/track_processor.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2019-2021 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2019-2021 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file

20
inc/audio/velocity.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2019-2022 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2019-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file

20
inc/gui/backend/mixer_selections.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2019-2022 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2019-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file

20
inc/gui/backend/piano_roll.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2019-2021 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2019-2021 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file

20
inc/gui/backend/timeline.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2020 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2020 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file

23
inc/plugins/lv2_plugin.h

@ -1,23 +1,10 @@ @@ -1,23 +1,10 @@
// SPDX-FileCopyrightText: © 2018-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/*
* Copyright (C) 2018-2022 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*
* This file incorporates work covered by the following copyright and
* permission notice:
*
* ---
*
Copyright 2007-2016 David Robillard <http://drobilla.net>
@ -32,6 +19,8 @@ @@ -32,6 +19,8 @@
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
---
*/
/**

20
inc/plugins/plugin.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2018-2022 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2018-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file

20
inc/plugins/plugin_identifier.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2020-2021 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2020-2021 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file

20
inc/plugins/plugin_preset.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2020-2021 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2020-2021 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file

10
inc/project.h

@ -50,7 +50,7 @@ typedef struct TracklistSelections TracklistSelections; @@ -50,7 +50,7 @@ typedef struct TracklistSelections TracklistSelections;
* @{
*/
#define PROJECT_SCHEMA_VERSION 1
#define PROJECT_SCHEMA_VERSION 2
#define PROJECT ZRYTHM->project
#define DEFAULT_PROJECT_NAME "Untitled Project"
@ -570,6 +570,14 @@ project_clone (const Project * src, bool for_backup); @@ -570,6 +570,14 @@ project_clone (const Project * src, bool for_backup);
COLD Project *
project_new (Zrythm * zrythm);
/**
* Upgrades the given project YAML's schema if needed.
*
* @return True if the schema was upgraded.
*/
COLD bool
project_upgrade_schema (char ** yaml, int src_ver);
/**
* Tears down the project.
*/

29
inc/schemas/audio/automation_track.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2018-2021 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2018-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* @file
@ -77,15 +61,6 @@ typedef struct AutomationTrack_v1 @@ -77,15 +61,6 @@ typedef struct AutomationTrack_v1
void * recording_region;
bool recording_start_sent;
bool recording_paused;
void * top_right_buttons[8];
int num_top_right_buttons;
void * top_left_buttons[8];
int num_top_left_buttons;
void * bot_right_buttons[8];
int num_bot_right_buttons;
void * am_widget;
void * bot_left_buttons[8];
int num_bot_left_buttons;
} AutomationTrack_v1;
static const cyaml_schema_field_t

22
inc/schemas/audio/automation_tracklist.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2018-2021 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2018-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file
@ -36,7 +20,6 @@ typedef struct AutomationTracklist_v1 @@ -36,7 +20,6 @@ typedef struct AutomationTracklist_v1
AutomationTrack_v1 ** ats;
int num_ats;
size_t ats_size;
int track_pos;
} AutomationTracklist_v1;
static const cyaml_schema_field_t
@ -46,7 +29,6 @@ static const cyaml_schema_field_t @@ -46,7 +29,6 @@ static const cyaml_schema_field_t
AutomationTracklist_v1,
ats,
automation_track_schema_v1),
YAML_FIELD_INT (AutomationTracklist_v1, track_pos),
CYAML_FIELD_END
};

33
inc/schemas/audio/channel.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2018-2021 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2018-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file
@ -56,12 +40,9 @@ typedef struct Channel_v1 @@ -56,12 +40,9 @@ typedef struct Channel_v1
Port_v1 * midi_out;
StereoPorts_v1 * stereo_out;
int has_output;
int output_pos;
unsigned int output_name_hash;
int track_pos;
int magic;
void * widget;
int record_set_automatically;
void * track;
int width;
} Channel_v1;
static const cyaml_schema_field_t channel_fields_schema_v1[] = {
@ -101,8 +82,8 @@ static const cyaml_schema_field_t channel_fields_schema_v1[] = { @@ -101,8 +82,8 @@ static const cyaml_schema_field_t channel_fields_schema_v1[] = {
Channel_v1,
stereo_out,
stereo_ports_fields_schema_v1),
YAML_FIELD_INT (Channel_v1, has_output),
YAML_FIELD_INT (Channel_v1, output_pos),
YAML_FIELD_UINT (Channel_v1, has_output),
YAML_FIELD_UINT (Channel_v1, output_name_hash),
YAML_FIELD_INT (Channel_v1, track_pos),
YAML_FIELD_FIXED_SIZE_PTR_ARRAY_VAR_COUNT (
Channel_v1,
@ -125,7 +106,7 @@ static const cyaml_schema_field_t channel_fields_schema_v1[] = { @@ -125,7 +106,7 @@ static const cyaml_schema_field_t channel_fields_schema_v1[] = {
ext_port_schema_v1),
YAML_FIELD_INT (Channel_v1, all_stereo_r_ins),
YAML_FIELD_INT (Channel_v1, all_midi_channels),
YAML_FIELD_INT (Channel_v1, record_set_automatically),
YAML_FIELD_INT (Channel_v1, width),
CYAML_FIELD_END
};

81
inc/schemas/audio/channel_send.h

@ -1,27 +1,5 @@ @@ -1,27 +1,5 @@
/*
* Copyright (C) 2020-2021 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
/**
* \file
*
* Channel send schema.
*/
// SPDX-FileCopyrightText: © 2020-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
#ifndef __SCHEMAS_AUDIO_CHANNEL_SEND_H__
#define __SCHEMAS_AUDIO_CHANNEL_SEND_H__
@ -34,38 +12,47 @@ @@ -34,38 +12,47 @@
typedef struct ChannelSend_v1
{
int schema_version;
int track_pos;
int slot;
float amount;
bool on;
bool is_empty;
bool is_sidechain;
PortIdentifier_v1 dest_l_id;
PortIdentifier_v1 dest_r_id;
PortIdentifier_v1 dest_midi_id;
int schema_version;
int slot;
StereoPorts_v1 * stereo_in;
Port_v1 * midi_in;
StereoPorts_v1 * stereo_out;
Port_v1 * midi_out;
Port_v1 * amount;
Port_v1 * enabled;
bool is_sidechain;
unsigned int track_name_hash;
} ChannelSend_v1;
static const cyaml_schema_field_t channel_send_fields_schema_v1[] = {
YAML_FIELD_INT (ChannelSend_v1, schema_version),
YAML_FIELD_INT (ChannelSend_v1, track_pos),
YAML_FIELD_INT (ChannelSend_v1, slot),
YAML_FIELD_FLOAT (ChannelSend_v1, amount),
YAML_FIELD_INT (ChannelSend_v1, on),
YAML_FIELD_INT (ChannelSend_v1, is_empty),
YAML_FIELD_MAPPING_PTR (
ChannelSend_v1,
amount,
port_fields_schema_v1),
YAML_FIELD_MAPPING_PTR (
ChannelSend_v1,
enabled,
port_fields_schema_v1),
YAML_FIELD_INT (ChannelSend_v1, is_sidechain),
YAML_FIELD_MAPPING_EMBEDDED (
YAML_FIELD_MAPPING_PTR_OPTIONAL (
ChannelSend_v1,
midi_in,
port_fields_schema_v1),
YAML_FIELD_MAPPING_PTR_OPTIONAL (
ChannelSend_v1,
dest_l_id,
port_identifier_fields_schema_v1),
YAML_FIELD_MAPPING_EMBEDDED (
stereo_in,
stereo_ports_fields_schema_v1),
YAML_FIELD_MAPPING_PTR_OPTIONAL (
ChannelSend_v1,
dest_r_id,
port_identifier_fields_schema_v1),
YAML_FIELD_MAPPING_EMBEDDED (
midi_out,
port_fields_schema_v1),
YAML_FIELD_MAPPING_PTR_OPTIONAL (
ChannelSend_v1,
dest_midi_id,
port_identifier_fields_schema_v1),
stereo_out,
stereo_ports_fields_schema_v1),
YAML_FIELD_UINT (ChannelSend_v1, track_name_hash),
CYAML_FIELD_END
};

110
inc/schemas/audio/chord_descriptor.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2018-2021 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2018-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file
@ -64,15 +48,28 @@ static const cyaml_strval_t musical_note_strings_v1[] = { @@ -64,15 +48,28 @@ static const cyaml_strval_t musical_note_strings_v1[] = {
typedef enum ChordType_v1
{
CHORD_TYPE_NONE_v1,
CHORD_TYPE_MAJ_v1,
CHORD_TYPE_MIN_v1,
CHORD_TYPE_DIM_v1,
CHORD_TYPE_SUS4_v1,
CHORD_TYPE_SUS2_v1,
CHORD_TYPE_AUG_v1,
CHORD_TYPE_CUSTOM_v1,
NUM_CHORD_TYPES_v1,
} ChordType_v1;
static const cyaml_strval_t chord_type_strings_v1[] = {
{"Invalid", CHORD_TYPE_NONE_v1 },
{ "Maj", CHORD_TYPE_MAJ_v1 },
{ "min", CHORD_TYPE_MIN_v1 },
{ "dim", CHORD_TYPE_DIM_v1 },
{ "sus4", CHORD_TYPE_SUS4_v1 },
{ "sus2", CHORD_TYPE_SUS2_v1 },
{ "aug", CHORD_TYPE_AUG_v1 },
{ "custom", CHORD_TYPE_CUSTOM_v1},
};
typedef enum ChordAccent_v1
{
CHORD_ACC_NONE_v1,
@ -88,48 +85,67 @@ typedef enum ChordAccent_v1 @@ -88,48 +85,67 @@ typedef enum ChordAccent_v1
NUM_CHORD_ACCENTS_v1,
} ChordAccent_v1;
typedef struct ChordDescriptor_v1
static const cyaml_strval_t chord_accent_strings_v1[] = {
{"None", CHORD_ACC_NONE_v1 },
{ "7", CHORD_ACC_7_v1 },
{ "j7", CHORD_ACC_j7_v1 },
{ "\u266D9", CHORD_ACC_b9_v1 },
{ "9", CHORD_ACC_9_v1 },
{ "\u266F9", CHORD_ACC_S9_v1 },
{ "11", CHORD_ACC_11_v1 },
{ "\u266D5/\u266F11", CHORD_ACC_b5_S11_v1},
{ "\u266F5/\u266D13", CHORD_ACC_S5_b13_v1},
{ "6/13", CHORD_ACC_6_13_v1 },
};
typedef struct ChordDescriptor_v2
{
int schema_version;
bool has_bass;
bool is_custom;
MusicalNote_v1 root_note;
MusicalNote_v1 bass_note;
ChordType_v1 type;
ChordAccent_v1 accent;
bool notes[CHORD_DESCRIPTOR_MAX_NOTES];
int notes[CHORD_DESCRIPTOR_MAX_NOTES];
int inversion;
} ChordDescriptor_v1;
} ChordDescriptor_v2;
static const cyaml_schema_field_t
chord_descriptor_fields_schema_v1[] = {
YAML_FIELD_INT (ChordDescriptor_v1, schema_version),
YAML_FIELD_INT (ChordDescriptor_v1, has_bass),
YAML_FIELD_ENUM (
ChordDescriptor,
root_note,
musical_note_strings_v1),
YAML_FIELD_ENUM (
ChordDescriptor_v1,
bass_note,
musical_note_strings_v1),
CYAML_FIELD_SEQUENCE_FIXED (
"notes",
CYAML_FLAG_OPTIONAL