13#ifndef __AUDIO_REGION_IDENTIFIER_H__
14#define __AUDIO_REGION_IDENTIFIER_H__
27#define REGION_IDENTIFIER_SCHEMA_VERSION 1
37 REGION_TYPE_MIDI = 1 << 0,
38 REGION_TYPE_AUDIO = 1 << 1,
39 REGION_TYPE_AUTOMATION = 1 << 2,
40 REGION_TYPE_CHORD = 1 << 3,
43static const cyaml_bitdef_t region_type_bitvals[] = {
44 {.name =
"midi", .offset = 0, .bits = 1},
45 { .name =
"audio", .offset = 1, .bits = 1},
46 { .name =
"automation", .offset = 2, .bits = 1},
47 { .name =
"chord", .offset = 3, .bits = 1},
62 unsigned int track_name_hash;
77region_identifier_is_equal (
81 return a->
idx == b->
idx && a->track_name_hash == b->track_name_hash
86NONNULL
static inline void
90 dest->track_name_hash = src->track_name_hash;
91 dest->lane_pos = src->lane_pos;
93 dest->type = src->type;
100static inline const char *
101region_identifier_get_region_type_name (
RegionType type)
103 g_return_val_if_fail (
104 type >= REGION_TYPE_MIDI && type <= REGION_TYPE_CHORD, NULL);
113 "Region identifier: "
114 "type: %s, track name hash %u, lane pos %d, "
115 "at index %d, index %d, link_group: %d",
116 region_identifier_get_region_type_name (self->type), self->track_name_hash,
RegionType
Type of Region.
unsigned int utils_get_uint_from_bitfield_val(unsigned int bitfield)
From https://graphics.stanford.edu/~seander/bithacks.html#ZerosOnRightLinear.
Index/identifier for a Region, so we can get Region objects quickly with it without searching by name...
int link_group
Link group index, if any, or -1.
int at_idx
Automation track index in the automation tracklist, if automation region.
int idx
Index inside lane or automation track.