26#ifndef __AUDIO_QUANTIZE_OPTIONS_H__
27#define __AUDIO_QUANTIZE_OPTIONS_H__
39#define QUANTIZE_OPTIONS_SCHEMA_VERSION 1
41#define QUANTIZE_OPTIONS_IS_EDITOR(qo) \
42 (PROJECT->quantize_opts_editor == qo)
43#define QUANTIZE_OPTIONS_IS_TIMELINE(qo) \
44 (PROJECT->quantize_opts_timeline == qo)
45#define QUANTIZE_OPTIONS_TIMELINE \
46 (PROJECT->quantize_opts_timeline)
47#define QUANTIZE_OPTIONS_EDITOR \
48 (PROJECT->quantize_opts_editor)
50#define MAX_SNAP_POINTS 120096
92static const cyaml_schema_field_t quantize_options_fields_schema[] = {
108static const cyaml_schema_value_t quantize_options_schema = {
111 quantize_options_fields_schema),
115quantize_options_init (
117 NoteLength note_length);
136quantize_options_set_swing (
141quantize_options_set_amount (
146quantize_options_set_randomization (
148 float randomization);
157 NoteLength note_length,
183quantize_options_new (
void);
void quantize_options_update_quantize_points(QuantizeOptions *self)
Updates snap points.
void quantize_options_free(QuantizeOptions *self)
Free's the QuantizeOptions.
QuantizeOptions * quantize_options_clone(const QuantizeOptions *src)
Clones the QuantizeOptions.
double quantize_options_quantize_position(QuantizeOptions *self, Position *pos)
Quantizes the given Position using the given QuantizeOptions.
char * quantize_options_stringize(NoteLength note_length, NoteType note_type)
Returns the grid intensity as a human-readable string.
#define YAML_VALUE_PTR(cc, fields_schema)
Schema to be used as a pointer.
A Position is made up of bars.beats.sixteenths.ticks.
NoteLength note_length
See SnapGrid.
float amount
Percentage to apply quantize (0-100).
int adj_start
Adjust start position or not (only applies to objects with length.
NoteType note_type
See SnapGrid.
float swing
Swing amount (0-100).
double rand_ticks
Number of ticks for randomization.
int adj_end
Adjust end position or not (only applies to objects with length.
Position q_points[MAX_SNAP_POINTS]
Quantize points.