Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
modulator_macro_processor.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2021-2022 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
10#ifndef __AUDIO_MODULATOR_MACRO_PROCESSOR_H__
11#define __AUDIO_MODULATOR_MACRO_PROCESSOR_H__
12
13#include "dsp/port.h"
14#include "utils/yaml.h"
15
16typedef struct Track Track;
17
24#define MODULATOR_MACRO_PROCESSOR_SCHEMA_VERSION 1
25
26#define modulator_macro_processor_is_in_active_project(self) \
27 (self->track && track_is_in_active_project (self->track))
28
38{
39 int schema_version;
40
47 char * name;
48
51
59
62
65
67
68static const cyaml_schema_field_t modulator_macro_processor_fields_schema[] = {
69 YAML_FIELD_INT (ModulatorMacroProcessor, schema_version),
70 YAML_FIELD_STRING_PTR (ModulatorMacroProcessor, name),
71 YAML_FIELD_MAPPING_PTR (ModulatorMacroProcessor, cv_in, port_fields_schema),
72 YAML_FIELD_MAPPING_PTR (ModulatorMacroProcessor, cv_out, port_fields_schema),
73 YAML_FIELD_MAPPING_PTR (ModulatorMacroProcessor, macro, port_fields_schema),
74
75 CYAML_FIELD_END
76};
77
78static const cyaml_schema_value_t modulator_macro_processor_schema = {
81 modulator_macro_processor_fields_schema),
82};
83
84static inline const char *
85modulator_macro_processor_get_name (ModulatorMacroProcessor * self)
86{
87 return self->name;
88}
89
90COLD void
91modulator_macro_processor_init_loaded (
93 Track * track);
94
95void
96modulator_macro_processor_set_name (
98 const char * name);
99
100Track *
101modulator_macro_processor_get_track (ModulatorMacroProcessor * self);
102
106void
109 const EngineProcessTimeInfo * const time_nfo);
110
112modulator_macro_processor_new (Track * track, int idx);
113
114void
115modulator_macro_processor_free (ModulatorMacroProcessor * self);
116
121#endif
Ports that transfer audio/midi/other signals to one another.
void modulator_macro_processor_process(ModulatorMacroProcessor *self, const EngineProcessTimeInfo *const time_nfo)
Process.
#define YAML_FIELD_MAPPING_PTR(owner, member, schema)
Mapping pointer to a struct.
Definition yaml.h:37
#define YAML_VALUE_PTR(cc, fields_schema)
Schema to be used as a pointer.
Definition yaml.h:202
Common struct to pass around during processing to avoid repeating the data in function arguments.
Definition types.h:138
Modulator macro button processor.
char * name
Name to be shown in the modulators tab.
Port * cv_out
CV output after macro is applied.
Port * macro
Control port controlling the amount.
Track * track
Pointer to owner track, if any.
Port * cv_in
CV input port for connecting CV signals to.
Must ONLY be created via port_new()
Definition port.h:138
Track to be inserted into the Project's Tracklist.
Definition track.h:186
YAML utils.