Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
scale_object.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2018-2021 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
11#ifndef __AUDIO_SCALE_OBJECT_H__
12#define __AUDIO_SCALE_OBJECT_H__
13
14#include <cstdint>
15
16#include "dsp/position.h"
17#include "dsp/scale.h"
19
20typedef struct MusicalScale MusicalScale;
21
28#define scale_object_is_selected(r) \
29 arranger_object_is_selected ((ArrangerObject *) r)
30
31#define SCALE_OBJECT_MAGIC 13187994
32#define IS_SCALE_OBJECT(tr) (tr && tr->magic == SCALE_OBJECT_MAGIC)
33
40typedef struct ScaleObject
41{
44
45 MusicalScale * scale;
46
47 int index;
48
49 int magic;
50
52 PangoLayout * layout;
54
60
61void
62scale_object_set_index (ScaleObject * self, int index);
63
64int
65scale_object_is_equal (ScaleObject * a, ScaleObject * b);
66
71#endif
Macros for arranger object backends.
ScaleObject * scale_object_new(MusicalScale *descr)
Creates a ScaleObject.
Position struct and API.
Musical scales.
Base struct for arranger objects.
Musical scale descriptor.
Definition scale.h:130
A ScaleObject to be shown in the TimelineArrangerWidget.
ArrangerObject base
Base struct.
PangoLayout * layout
Cache layout for drawing the name.