1 #pragma once
2 
3 // This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild
4 
5 #include "kaitaistruct.h"
6 
7 #include <stdint.h>
8 #include <vector>
9 
10 #if KAITAI_STRUCT_VERSION < 7000L
11 #error "Incompatible Kaitai Struct C++/STL API: version 0.7 or later is required"
12 #endif
13 
14 /**
15  * These files are created by rekordbox when analyzing audio tracks
16  * to facilitate DJ performance. They include waveforms, beat grids
17  * (information about the precise time at which each beat occurs),
18  * time indices to allow efficient seeking to specific positions
19  * inside variable bit-rate audio streams, and lists of memory cues
20  * and loop points. They are used by Pioneer professional DJ
21  * equipment.
22  *
23  * The format has been reverse-engineered to facilitate sophisticated
24  * integrations with light and laser shows, videos, and other musical
25  * instruments, by supporting deep knowledge of what is playing and
26  * what is coming next through monitoring the network communications
27  * of the players.
28  * \sa Source
29  */
30 
31 class rekordbox_anlz_t : public kaitai::kstruct {
32 
33 public:
34     class phrase_up_down_t;
35     class path_tag_t;
36     class wave_preview_tag_t;
37     class beat_grid_tag_t;
38     class wave_color_preview_tag_t;
39     class wave_scroll_tag_t;
40     class phrase_verse_bridge_t;
41     class song_structure_tag_t;
42     class cue_extended_entry_t;
43     class vbr_tag_t;
44     class song_structure_entry_t;
45     class cue_entry_t;
46     class beat_grid_beat_t;
47     class cue_extended_tag_t;
48     class unknown_tag_t;
49     class tagged_section_t;
50     class wave_color_scroll_tag_t;
51     class cue_tag_t;
52 
53     enum cue_entry_status_t {
54         CUE_ENTRY_STATUS_DISABLED = 0,
55         CUE_ENTRY_STATUS_ENABLED = 1
56     };
57 
58     enum cue_list_type_t {
59         CUE_LIST_TYPE_MEMORY_CUES = 0,
60         CUE_LIST_TYPE_HOT_CUES = 1
61     };
62 
63     enum phrase_style_t {
64         PHRASE_STYLE_UP_DOWN = 1,
65         PHRASE_STYLE_VERSE_BRIDGE = 2,
66         PHRASE_STYLE_VERSE_BRIDGE_2 = 3
67     };
68 
69     enum cue_entry_type_t {
70         CUE_ENTRY_TYPE_MEMORY_CUE = 1,
71         CUE_ENTRY_TYPE_LOOP = 2
72     };
73 
74     enum section_tags_t {
75         SECTION_TAGS_CUES_2 = 1346588466,
76         SECTION_TAGS_CUES = 1346588482,
77         SECTION_TAGS_PATH = 1347441736,
78         SECTION_TAGS_BEAT_GRID = 1347507290,
79         SECTION_TAGS_SONG_STRUCTURE = 1347638089,
80         SECTION_TAGS_VBR = 1347830354,
81         SECTION_TAGS_WAVE_PREVIEW = 1347895638,
82         SECTION_TAGS_WAVE_TINY = 1347900978,
83         SECTION_TAGS_WAVE_SCROLL = 1347900979,
84         SECTION_TAGS_WAVE_COLOR_PREVIEW = 1347900980,
85         SECTION_TAGS_WAVE_COLOR_SCROLL = 1347900981
86     };
87 
88     enum phrase_verse_bridge_id_t {
89         PHRASE_VERSE_BRIDGE_ID_INTRO = 1,
90         PHRASE_VERSE_BRIDGE_ID_VERSE1 = 2,
91         PHRASE_VERSE_BRIDGE_ID_VERSE2 = 3,
92         PHRASE_VERSE_BRIDGE_ID_VERSE3 = 4,
93         PHRASE_VERSE_BRIDGE_ID_VERSE4 = 5,
94         PHRASE_VERSE_BRIDGE_ID_VERSE5 = 6,
95         PHRASE_VERSE_BRIDGE_ID_VERSE6 = 7,
96         PHRASE_VERSE_BRIDGE_ID_BRIDGE = 8,
97         PHRASE_VERSE_BRIDGE_ID_CHORUS = 9,
98         PHRASE_VERSE_BRIDGE_ID_OUTRO = 10
99     };
100 
101     enum phrase_up_down_id_t {
102         PHRASE_UP_DOWN_ID_INTRO = 1,
103         PHRASE_UP_DOWN_ID_UP = 2,
104         PHRASE_UP_DOWN_ID_DOWN = 3,
105         PHRASE_UP_DOWN_ID_CHORUS = 5,
106         PHRASE_UP_DOWN_ID_OUTRO = 6
107     };
108 
109     rekordbox_anlz_t(kaitai::kstream* p__io, kaitai::kstruct* p__parent = 0, rekordbox_anlz_t* p__root = 0);
110 
111 private:
112     void _read();
113 
114 public:
115     ~rekordbox_anlz_t();
116 
117     class phrase_up_down_t : public kaitai::kstruct {
118 
119     public:
120 
121         phrase_up_down_t(kaitai::kstream* p__io, rekordbox_anlz_t::song_structure_entry_t* p__parent = 0, rekordbox_anlz_t* p__root = 0);
122 
123     private:
124         void _read();
125 
126     public:
127         ~phrase_up_down_t();
128 
129     private:
130         phrase_up_down_id_t m_id;
131         rekordbox_anlz_t* m__root;
132         rekordbox_anlz_t::song_structure_entry_t* m__parent;
133 
134     public:
id()135         phrase_up_down_id_t id() const { return m_id; }
_root()136         rekordbox_anlz_t* _root() const { return m__root; }
_parent()137         rekordbox_anlz_t::song_structure_entry_t* _parent() const { return m__parent; }
138     };
139 
140     /**
141      * Stores the file path of the audio file to which this analysis
142      * applies.
143      */
144 
145     class path_tag_t : public kaitai::kstruct {
146 
147     public:
148 
149         path_tag_t(kaitai::kstream* p__io, rekordbox_anlz_t::tagged_section_t* p__parent = 0, rekordbox_anlz_t* p__root = 0);
150 
151     private:
152         void _read();
153 
154     public:
155         ~path_tag_t();
156 
157     private:
158         uint32_t m_len_path;
159         std::string m_path;
160         bool n_path;
161 
162     public:
_is_null_path()163         bool _is_null_path() { path(); return n_path; };
164 
165     private:
166         rekordbox_anlz_t* m__root;
167         rekordbox_anlz_t::tagged_section_t* m__parent;
168 
169     public:
len_path()170         uint32_t len_path() const { return m_len_path; }
path()171         std::string path() const { return m_path; }
_root()172         rekordbox_anlz_t* _root() const { return m__root; }
_parent()173         rekordbox_anlz_t::tagged_section_t* _parent() const { return m__parent; }
174     };
175 
176     /**
177      * Stores a waveform preview image suitable for display above
178      * the touch strip for jumping to a track position.
179      */
180 
181     class wave_preview_tag_t : public kaitai::kstruct {
182 
183     public:
184 
185         wave_preview_tag_t(kaitai::kstream* p__io, rekordbox_anlz_t::tagged_section_t* p__parent = 0, rekordbox_anlz_t* p__root = 0);
186 
187     private:
188         void _read();
189 
190     public:
191         ~wave_preview_tag_t();
192 
193     private:
194         uint32_t m_len_preview;
195         uint32_t m__unnamed1;
196         std::string m_data;
197         bool n_data;
198 
199     public:
_is_null_data()200         bool _is_null_data() { data(); return n_data; };
201 
202     private:
203         rekordbox_anlz_t* m__root;
204         rekordbox_anlz_t::tagged_section_t* m__parent;
205 
206     public:
207 
208         /**
209          * The length, in bytes, of the preview data itself. This is
210          * slightly redundant because it can be computed from the
211          * length of the tag.
212          */
len_preview()213         uint32_t len_preview() const { return m_len_preview; }
_unnamed1()214         uint32_t _unnamed1() const { return m__unnamed1; }
215 
216         /**
217          * The actual bytes of the waveform preview.
218          */
data()219         std::string data() const { return m_data; }
_root()220         rekordbox_anlz_t* _root() const { return m__root; }
_parent()221         rekordbox_anlz_t::tagged_section_t* _parent() const { return m__parent; }
222     };
223 
224     /**
225      * Holds a list of all the beats found within the track, recording
226      * their bar position, the time at which they occur, and the tempo
227      * at that point.
228      */
229 
230     class beat_grid_tag_t : public kaitai::kstruct {
231 
232     public:
233 
234         beat_grid_tag_t(kaitai::kstream* p__io, rekordbox_anlz_t::tagged_section_t* p__parent = 0, rekordbox_anlz_t* p__root = 0);
235 
236     private:
237         void _read();
238 
239     public:
240         ~beat_grid_tag_t();
241 
242     private:
243         uint32_t m__unnamed0;
244         uint32_t m__unnamed1;
245         uint32_t m_len_beats;
246         std::vector<beat_grid_beat_t*>* m_beats;
247         rekordbox_anlz_t* m__root;
248         rekordbox_anlz_t::tagged_section_t* m__parent;
249 
250     public:
_unnamed0()251         uint32_t _unnamed0() const { return m__unnamed0; }
_unnamed1()252         uint32_t _unnamed1() const { return m__unnamed1; }
253 
254         /**
255          * The number of beat entries which follow.
256          */
len_beats()257         uint32_t len_beats() const { return m_len_beats; }
258 
259         /**
260          * The entries of the beat grid.
261          */
beats()262         std::vector<beat_grid_beat_t*>* beats() const { return m_beats; }
_root()263         rekordbox_anlz_t* _root() const { return m__root; }
_parent()264         rekordbox_anlz_t::tagged_section_t* _parent() const { return m__parent; }
265     };
266 
267     /**
268      * A larger, colorful waveform preview image suitable for display
269      * above the touch strip for jumping to a track position on newer
270      * high-resolution players.
271      */
272 
273     class wave_color_preview_tag_t : public kaitai::kstruct {
274 
275     public:
276 
277         wave_color_preview_tag_t(kaitai::kstream* p__io, rekordbox_anlz_t::tagged_section_t* p__parent = 0, rekordbox_anlz_t* p__root = 0);
278 
279     private:
280         void _read();
281 
282     public:
283         ~wave_color_preview_tag_t();
284 
285     private:
286         uint32_t m_len_entry_bytes;
287         uint32_t m_len_entries;
288         uint32_t m__unnamed2;
289         std::string m_entries;
290         rekordbox_anlz_t* m__root;
291         rekordbox_anlz_t::tagged_section_t* m__parent;
292 
293     public:
294 
295         /**
296          * The size of each entry, in bytes. Seems to always be 6.
297          */
len_entry_bytes()298         uint32_t len_entry_bytes() const { return m_len_entry_bytes; }
299 
300         /**
301          * The number of waveform data points, each of which takes one
302          * byte for each of six channels of information.
303          */
len_entries()304         uint32_t len_entries() const { return m_len_entries; }
_unnamed2()305         uint32_t _unnamed2() const { return m__unnamed2; }
entries()306         std::string entries() const { return m_entries; }
_root()307         rekordbox_anlz_t* _root() const { return m__root; }
_parent()308         rekordbox_anlz_t::tagged_section_t* _parent() const { return m__parent; }
309     };
310 
311     /**
312      * A larger waveform image suitable for scrolling along as a track
313      * plays.
314      */
315 
316     class wave_scroll_tag_t : public kaitai::kstruct {
317 
318     public:
319 
320         wave_scroll_tag_t(kaitai::kstream* p__io, rekordbox_anlz_t::tagged_section_t* p__parent = 0, rekordbox_anlz_t* p__root = 0);
321 
322     private:
323         void _read();
324 
325     public:
326         ~wave_scroll_tag_t();
327 
328     private:
329         uint32_t m_len_entry_bytes;
330         uint32_t m_len_entries;
331         uint32_t m__unnamed2;
332         std::string m_entries;
333         rekordbox_anlz_t* m__root;
334         rekordbox_anlz_t::tagged_section_t* m__parent;
335 
336     public:
337 
338         /**
339          * The size of each entry, in bytes. Seems to always be 1.
340          */
len_entry_bytes()341         uint32_t len_entry_bytes() const { return m_len_entry_bytes; }
342 
343         /**
344          * The number of waveform data points, each of which takes one
345          * byte.
346          */
len_entries()347         uint32_t len_entries() const { return m_len_entries; }
_unnamed2()348         uint32_t _unnamed2() const { return m__unnamed2; }
entries()349         std::string entries() const { return m_entries; }
_root()350         rekordbox_anlz_t* _root() const { return m__root; }
_parent()351         rekordbox_anlz_t::tagged_section_t* _parent() const { return m__parent; }
352     };
353 
354     class phrase_verse_bridge_t : public kaitai::kstruct {
355 
356     public:
357 
358         phrase_verse_bridge_t(kaitai::kstream* p__io, rekordbox_anlz_t::song_structure_entry_t* p__parent = 0, rekordbox_anlz_t* p__root = 0);
359 
360     private:
361         void _read();
362 
363     public:
364         ~phrase_verse_bridge_t();
365 
366     private:
367         phrase_verse_bridge_id_t m_id;
368         rekordbox_anlz_t* m__root;
369         rekordbox_anlz_t::song_structure_entry_t* m__parent;
370 
371     public:
id()372         phrase_verse_bridge_id_t id() const { return m_id; }
_root()373         rekordbox_anlz_t* _root() const { return m__root; }
_parent()374         rekordbox_anlz_t::song_structure_entry_t* _parent() const { return m__parent; }
375     };
376 
377     /**
378      * Stores the song structure, also known as phrases (intro, verse,
379      * bridge, chorus, up, down, outro).
380      */
381 
382     class song_structure_tag_t : public kaitai::kstruct {
383 
384     public:
385 
386         song_structure_tag_t(kaitai::kstream* p__io, rekordbox_anlz_t::tagged_section_t* p__parent = 0, rekordbox_anlz_t* p__root = 0);
387 
388     private:
389         void _read();
390 
391     public:
392         ~song_structure_tag_t();
393 
394     private:
395         uint32_t m_len_entry_bytes;
396         uint16_t m_len_entries;
397         uint16_t m_style;
398         std::string m__unnamed3;
399         uint16_t m_end_beat;
400         std::string m__unnamed5;
401         std::vector<song_structure_entry_t*>* m_entries;
402         rekordbox_anlz_t* m__root;
403         rekordbox_anlz_t::tagged_section_t* m__parent;
404 
405     public:
406 
407         /**
408          * The size of each entry, in bytes. Seems to always be 24.
409          */
len_entry_bytes()410         uint32_t len_entry_bytes() const { return m_len_entry_bytes; }
411 
412         /**
413          * The number of phrases.
414          */
len_entries()415         uint16_t len_entries() const { return m_len_entries; }
416 
417         /**
418          * The phrase style. 1 is the up-down style
419          * (white label text in rekordbox) where the main phrases consist
420          * of up, down, and chorus. 2 is the bridge-verse style
421          * (black label text in rekordbox) where the main phrases consist
422          * of verse, chorus, and bridge. Style 3 is mostly identical to
423          * bridge-verse style except verses 1-3 are labeled VERSE1 and verses
424          * 4-6 are labeled VERSE2 in rekordbox.
425          */
style()426         uint16_t style() const { return m_style; }
_unnamed3()427         std::string _unnamed3() const { return m__unnamed3; }
428 
429         /**
430          * The beat number at which the last phrase ends. The track may
431          * continue after the last phrase ends. If this is the case, it will
432          * mostly be silence.
433          */
end_beat()434         uint16_t end_beat() const { return m_end_beat; }
_unnamed5()435         std::string _unnamed5() const { return m__unnamed5; }
entries()436         std::vector<song_structure_entry_t*>* entries() const { return m_entries; }
_root()437         rekordbox_anlz_t* _root() const { return m__root; }
_parent()438         rekordbox_anlz_t::tagged_section_t* _parent() const { return m__parent; }
439     };
440 
441     /**
442      * A cue extended list entry. Can either describe a memory cue or a
443      * loop.
444      */
445 
446     class cue_extended_entry_t : public kaitai::kstruct {
447 
448     public:
449 
450         cue_extended_entry_t(kaitai::kstream* p__io, rekordbox_anlz_t::cue_extended_tag_t* p__parent = 0, rekordbox_anlz_t* p__root = 0);
451 
452     private:
453         void _read();
454 
455     public:
456         ~cue_extended_entry_t();
457 
458     private:
459         std::string m__unnamed0;
460         uint32_t m_len_header;
461         uint32_t m_len_entry;
462         uint32_t m_hot_cue;
463         cue_entry_type_t m_type;
464         std::string m__unnamed5;
465         uint32_t m_time;
466         uint32_t m_loop_time;
467         uint8_t m_color_id;
468         std::string m__unnamed9;
469         uint32_t m_len_comment;
470         bool n_len_comment;
471 
472     public:
_is_null_len_comment()473         bool _is_null_len_comment() { len_comment(); return n_len_comment; };
474 
475     private:
476         std::string m_comment;
477         bool n_comment;
478 
479     public:
_is_null_comment()480         bool _is_null_comment() { comment(); return n_comment; };
481 
482     private:
483         uint8_t m_color_code;
484         bool n_color_code;
485 
486     public:
_is_null_color_code()487         bool _is_null_color_code() { color_code(); return n_color_code; };
488 
489     private:
490         uint8_t m_color_red;
491         bool n_color_red;
492 
493     public:
_is_null_color_red()494         bool _is_null_color_red() { color_red(); return n_color_red; };
495 
496     private:
497         uint8_t m_color_green;
498         bool n_color_green;
499 
500     public:
_is_null_color_green()501         bool _is_null_color_green() { color_green(); return n_color_green; };
502 
503     private:
504         uint8_t m_color_blue;
505         bool n_color_blue;
506 
507     public:
_is_null_color_blue()508         bool _is_null_color_blue() { color_blue(); return n_color_blue; };
509 
510     private:
511         std::string m__unnamed16;
512         bool n__unnamed16;
513 
514     public:
_is_null__unnamed16()515         bool _is_null__unnamed16() { _unnamed16(); return n__unnamed16; };
516 
517     private:
518         rekordbox_anlz_t* m__root;
519         rekordbox_anlz_t::cue_extended_tag_t* m__parent;
520 
521     public:
_unnamed0()522         std::string _unnamed0() const { return m__unnamed0; }
len_header()523         uint32_t len_header() const { return m_len_header; }
len_entry()524         uint32_t len_entry() const { return m_len_entry; }
525 
526         /**
527          * If zero, this is an ordinary memory cue, otherwise this a
528          * hot cue with the specified number.
529          */
hot_cue()530         uint32_t hot_cue() const { return m_hot_cue; }
531 
532         /**
533          * Indicates whether this is a memory cue or a loop.
534          */
type()535         cue_entry_type_t type() const { return m_type; }
_unnamed5()536         std::string _unnamed5() const { return m__unnamed5; }
537 
538         /**
539          * The position, in milliseconds, at which the cue point lies
540          * in the track.
541          */
time()542         uint32_t time() const { return m_time; }
543 
544         /**
545          * The position, in milliseconds, at which the player loops
546          * back to the cue time if this is a loop.
547          */
loop_time()548         uint32_t loop_time() const { return m_loop_time; }
549 
550         /**
551          * References a row in the colors table if the memory cue or loop
552          * has been assigned a color
553          */
color_id()554         uint8_t color_id() const { return m_color_id; }
_unnamed9()555         std::string _unnamed9() const { return m__unnamed9; }
len_comment()556         uint32_t len_comment() const { return m_len_comment; }
557 
558         /**
559          * The comment assigned to this cue by the DJ, if any, with a trailing NUL.
560          */
comment()561         std::string comment() const { return m_comment; }
562 
563         /**
564          * A lookup value for a color table? We use this to index to the colors shown in rekordbox.
565          */
color_code()566         uint8_t color_code() const { return m_color_code; }
567 
568         /**
569          * The red component of the color to be displayed.
570          */
color_red()571         uint8_t color_red() const { return m_color_red; }
572 
573         /**
574          * The green component of the color to be displayed.
575          */
color_green()576         uint8_t color_green() const { return m_color_green; }
577 
578         /**
579          * The blue component of the color to be displayed.
580          */
color_blue()581         uint8_t color_blue() const { return m_color_blue; }
_unnamed16()582         std::string _unnamed16() const { return m__unnamed16; }
_root()583         rekordbox_anlz_t* _root() const { return m__root; }
_parent()584         rekordbox_anlz_t::cue_extended_tag_t* _parent() const { return m__parent; }
585     };
586 
587     /**
588      * Stores an index allowing rapid seeking to particular times
589      * within a variable-bitrate audio file.
590      */
591 
592     class vbr_tag_t : public kaitai::kstruct {
593 
594     public:
595 
596         vbr_tag_t(kaitai::kstream* p__io, rekordbox_anlz_t::tagged_section_t* p__parent = 0, rekordbox_anlz_t* p__root = 0);
597 
598     private:
599         void _read();
600 
601     public:
602         ~vbr_tag_t();
603 
604     private:
605         uint32_t m__unnamed0;
606         std::vector<uint32_t>* m_index;
607         rekordbox_anlz_t* m__root;
608         rekordbox_anlz_t::tagged_section_t* m__parent;
609 
610     public:
_unnamed0()611         uint32_t _unnamed0() const { return m__unnamed0; }
index()612         std::vector<uint32_t>* index() const { return m_index; }
_root()613         rekordbox_anlz_t* _root() const { return m__root; }
_parent()614         rekordbox_anlz_t::tagged_section_t* _parent() const { return m__parent; }
615     };
616 
617     /**
618      * A song structure entry, represents a single phrase.
619      */
620 
621     class song_structure_entry_t : public kaitai::kstruct {
622 
623     public:
624 
625         song_structure_entry_t(kaitai::kstream* p__io, rekordbox_anlz_t::song_structure_tag_t* p__parent = 0, rekordbox_anlz_t* p__root = 0);
626 
627     private:
628         void _read();
629 
630     public:
631         ~song_structure_entry_t();
632 
633     private:
634         uint16_t m_phrase_number;
635         uint16_t m_beat_number;
636         kaitai::kstruct* m_phrase_id;
637         std::string m__unnamed3;
638         uint8_t m_fill_in;
639         uint16_t m_fill_in_beat_number;
640         rekordbox_anlz_t* m__root;
641         rekordbox_anlz_t::song_structure_tag_t* m__parent;
642 
643     public:
644 
645         /**
646          * The absolute number of the phrase, starting at one.
647          */
phrase_number()648         uint16_t phrase_number() const { return m_phrase_number; }
649 
650         /**
651          * The beat number at which the phrase starts.
652          */
beat_number()653         uint16_t beat_number() const { return m_beat_number; }
654 
655         /**
656          * Identifier of the phrase label.
657          */
phrase_id()658         kaitai::kstruct* phrase_id() const { return m_phrase_id; }
_unnamed3()659         std::string _unnamed3() const { return m__unnamed3; }
660 
661         /**
662          * If nonzero, fill-in is present.
663          */
fill_in()664         uint8_t fill_in() const { return m_fill_in; }
665 
666         /**
667          * The beat number at which fill-in starts.
668          */
fill_in_beat_number()669         uint16_t fill_in_beat_number() const { return m_fill_in_beat_number; }
_root()670         rekordbox_anlz_t* _root() const { return m__root; }
_parent()671         rekordbox_anlz_t::song_structure_tag_t* _parent() const { return m__parent; }
672     };
673 
674     /**
675      * A cue list entry. Can either represent a memory cue or a loop.
676      */
677 
678     class cue_entry_t : public kaitai::kstruct {
679 
680     public:
681 
682         cue_entry_t(kaitai::kstream* p__io, rekordbox_anlz_t::cue_tag_t* p__parent = 0, rekordbox_anlz_t* p__root = 0);
683 
684     private:
685         void _read();
686 
687     public:
688         ~cue_entry_t();
689 
690     private:
691         std::string m__unnamed0;
692         uint32_t m_len_header;
693         uint32_t m_len_entry;
694         uint32_t m_hot_cue;
695         cue_entry_status_t m_status;
696         uint32_t m__unnamed5;
697         uint16_t m_order_first;
698         uint16_t m_order_last;
699         cue_entry_type_t m_type;
700         std::string m__unnamed9;
701         uint32_t m_time;
702         uint32_t m_loop_time;
703         std::string m__unnamed12;
704         rekordbox_anlz_t* m__root;
705         rekordbox_anlz_t::cue_tag_t* m__parent;
706 
707     public:
_unnamed0()708         std::string _unnamed0() const { return m__unnamed0; }
len_header()709         uint32_t len_header() const { return m_len_header; }
len_entry()710         uint32_t len_entry() const { return m_len_entry; }
711 
712         /**
713          * If zero, this is an ordinary memory cue, otherwise this a
714          * hot cue with the specified number.
715          */
hot_cue()716         uint32_t hot_cue() const { return m_hot_cue; }
717 
718         /**
719          * If zero, this entry should be ignored.
720          */
status()721         cue_entry_status_t status() const { return m_status; }
_unnamed5()722         uint32_t _unnamed5() const { return m__unnamed5; }
723 
724         /**
725          * @flesniak says: "0xffff for first cue, 0,1,3 for next"
726          */
order_first()727         uint16_t order_first() const { return m_order_first; }
728 
729         /**
730          * @flesniak says: "1,2,3 for first, second, third cue, 0xffff for last"
731          */
order_last()732         uint16_t order_last() const { return m_order_last; }
733 
734         /**
735          * Indicates whether this is a memory cue or a loop.
736          */
type()737         cue_entry_type_t type() const { return m_type; }
_unnamed9()738         std::string _unnamed9() const { return m__unnamed9; }
739 
740         /**
741          * The position, in milliseconds, at which the cue point lies
742          * in the track.
743          */
time()744         uint32_t time() const { return m_time; }
745 
746         /**
747          * The position, in milliseconds, at which the player loops
748          * back to the cue time if this is a loop.
749          */
loop_time()750         uint32_t loop_time() const { return m_loop_time; }
_unnamed12()751         std::string _unnamed12() const { return m__unnamed12; }
_root()752         rekordbox_anlz_t* _root() const { return m__root; }
_parent()753         rekordbox_anlz_t::cue_tag_t* _parent() const { return m__parent; }
754     };
755 
756     /**
757      * Describes an individual beat in a beat grid.
758      */
759 
760     class beat_grid_beat_t : public kaitai::kstruct {
761 
762     public:
763 
764         beat_grid_beat_t(kaitai::kstream* p__io, rekordbox_anlz_t::beat_grid_tag_t* p__parent = 0, rekordbox_anlz_t* p__root = 0);
765 
766     private:
767         void _read();
768 
769     public:
770         ~beat_grid_beat_t();
771 
772     private:
773         uint16_t m_beat_number;
774         uint16_t m_tempo;
775         uint32_t m_time;
776         rekordbox_anlz_t* m__root;
777         rekordbox_anlz_t::beat_grid_tag_t* m__parent;
778 
779     public:
780 
781         /**
782          * The position of the beat within its musical bar, where beat 1
783          * is the down beat.
784          */
beat_number()785         uint16_t beat_number() const { return m_beat_number; }
786 
787         /**
788          * The tempo at the time of this beat, in beats per minute,
789          * multiplied by 100.
790          */
tempo()791         uint16_t tempo() const { return m_tempo; }
792 
793         /**
794          * The time, in milliseconds, at which this beat occurs when
795          * the track is played at normal (100%) pitch.
796          */
time()797         uint32_t time() const { return m_time; }
_root()798         rekordbox_anlz_t* _root() const { return m__root; }
_parent()799         rekordbox_anlz_t::beat_grid_tag_t* _parent() const { return m__parent; }
800     };
801 
802     /**
803      * A variation of cue_tag which was introduced with the nxs2 line,
804      * and adds descriptive names. (Still comes in two forms, either
805      * holding memory cues and loop points, or holding hot cues and
806      * loop points.) Also includes hot cues D through H and color assignment.
807      */
808 
809     class cue_extended_tag_t : public kaitai::kstruct {
810 
811     public:
812 
813         cue_extended_tag_t(kaitai::kstream* p__io, rekordbox_anlz_t::tagged_section_t* p__parent = 0, rekordbox_anlz_t* p__root = 0);
814 
815     private:
816         void _read();
817 
818     public:
819         ~cue_extended_tag_t();
820 
821     private:
822         cue_list_type_t m_type;
823         uint16_t m_len_cues;
824         std::string m__unnamed2;
825         std::vector<cue_extended_entry_t*>* m_cues;
826         rekordbox_anlz_t* m__root;
827         rekordbox_anlz_t::tagged_section_t* m__parent;
828 
829     public:
830 
831         /**
832          * Identifies whether this tag stores ordinary or hot cues.
833          */
type()834         cue_list_type_t type() const { return m_type; }
835 
836         /**
837          * The length of the cue comment list.
838          */
len_cues()839         uint16_t len_cues() const { return m_len_cues; }
_unnamed2()840         std::string _unnamed2() const { return m__unnamed2; }
cues()841         std::vector<cue_extended_entry_t*>* cues() const { return m_cues; }
_root()842         rekordbox_anlz_t* _root() const { return m__root; }
_parent()843         rekordbox_anlz_t::tagged_section_t* _parent() const { return m__parent; }
844     };
845 
846     class unknown_tag_t : public kaitai::kstruct {
847 
848     public:
849 
850         unknown_tag_t(kaitai::kstream* p__io, rekordbox_anlz_t::tagged_section_t* p__parent = 0, rekordbox_anlz_t* p__root = 0);
851 
852     private:
853         void _read();
854 
855     public:
856         ~unknown_tag_t();
857 
858     private:
859         rekordbox_anlz_t* m__root;
860         rekordbox_anlz_t::tagged_section_t* m__parent;
861 
862     public:
_root()863         rekordbox_anlz_t* _root() const { return m__root; }
_parent()864         rekordbox_anlz_t::tagged_section_t* _parent() const { return m__parent; }
865     };
866 
867     /**
868      * A type-tagged file section, identified by a four-byte magic
869      * sequence, with a header specifying its length, and whose payload
870      * is determined by the type tag.
871      */
872 
873     class tagged_section_t : public kaitai::kstruct {
874 
875     public:
876 
877         tagged_section_t(kaitai::kstream* p__io, rekordbox_anlz_t* p__parent = 0, rekordbox_anlz_t* p__root = 0);
878 
879     private:
880         void _read();
881 
882     public:
883         ~tagged_section_t();
884 
885     private:
886         int32_t m_fourcc;
887         uint32_t m_len_header;
888         uint32_t m_len_tag;
889         kaitai::kstruct* m_body;
890         rekordbox_anlz_t* m__root;
891         rekordbox_anlz_t* m__parent;
892         std::string m__raw_body;
893         kaitai::kstream* m__io__raw_body;
894 
895     public:
896 
897         /**
898          * A tag value indicating what kind of section this is.
899          */
fourcc()900         int32_t fourcc() const { return m_fourcc; }
901 
902         /**
903          * The size, in bytes, of the header portion of the tag.
904          */
len_header()905         uint32_t len_header() const { return m_len_header; }
906 
907         /**
908          * The size, in bytes, of this entire tag, counting the header.
909          */
len_tag()910         uint32_t len_tag() const { return m_len_tag; }
body()911         kaitai::kstruct* body() const { return m_body; }
_root()912         rekordbox_anlz_t* _root() const { return m__root; }
_parent()913         rekordbox_anlz_t* _parent() const { return m__parent; }
_raw_body()914         std::string _raw_body() const { return m__raw_body; }
_io__raw_body()915         kaitai::kstream* _io__raw_body() const { return m__io__raw_body; }
916     };
917 
918     /**
919      * A larger, colorful waveform image suitable for scrolling along
920      * as a track plays on newer high-resolution hardware. Also
921      * contains a higher-resolution blue/white waveform.
922      */
923 
924     class wave_color_scroll_tag_t : public kaitai::kstruct {
925 
926     public:
927 
928         wave_color_scroll_tag_t(kaitai::kstream* p__io, rekordbox_anlz_t::tagged_section_t* p__parent = 0, rekordbox_anlz_t* p__root = 0);
929 
930     private:
931         void _read();
932 
933     public:
934         ~wave_color_scroll_tag_t();
935 
936     private:
937         uint32_t m_len_entry_bytes;
938         uint32_t m_len_entries;
939         uint32_t m__unnamed2;
940         std::string m_entries;
941         rekordbox_anlz_t* m__root;
942         rekordbox_anlz_t::tagged_section_t* m__parent;
943 
944     public:
945 
946         /**
947          * The size of each entry, in bytes. Seems to always be 2.
948          */
len_entry_bytes()949         uint32_t len_entry_bytes() const { return m_len_entry_bytes; }
950 
951         /**
952          * The number of columns of waveform data (this matches the
953          * non-color waveform length.
954          */
len_entries()955         uint32_t len_entries() const { return m_len_entries; }
_unnamed2()956         uint32_t _unnamed2() const { return m__unnamed2; }
entries()957         std::string entries() const { return m_entries; }
_root()958         rekordbox_anlz_t* _root() const { return m__root; }
_parent()959         rekordbox_anlz_t::tagged_section_t* _parent() const { return m__parent; }
960     };
961 
962     /**
963      * Stores either a list of ordinary memory cues and loop points, or
964      * a list of hot cues and loop points.
965      */
966 
967     class cue_tag_t : public kaitai::kstruct {
968 
969     public:
970 
971         cue_tag_t(kaitai::kstream* p__io, rekordbox_anlz_t::tagged_section_t* p__parent = 0, rekordbox_anlz_t* p__root = 0);
972 
973     private:
974         void _read();
975 
976     public:
977         ~cue_tag_t();
978 
979     private:
980         cue_list_type_t m_type;
981         std::string m__unnamed1;
982         uint16_t m_len_cues;
983         uint32_t m_memory_count;
984         std::vector<cue_entry_t*>* m_cues;
985         rekordbox_anlz_t* m__root;
986         rekordbox_anlz_t::tagged_section_t* m__parent;
987 
988     public:
989 
990         /**
991          * Identifies whether this tag stores ordinary or hot cues.
992          */
type()993         cue_list_type_t type() const { return m_type; }
_unnamed1()994         std::string _unnamed1() const { return m__unnamed1; }
995 
996         /**
997          * The length of the cue list.
998          */
len_cues()999         uint16_t len_cues() const { return m_len_cues; }
1000 
1001         /**
1002          * Unsure what this means.
1003          */
memory_count()1004         uint32_t memory_count() const { return m_memory_count; }
cues()1005         std::vector<cue_entry_t*>* cues() const { return m_cues; }
_root()1006         rekordbox_anlz_t* _root() const { return m__root; }
_parent()1007         rekordbox_anlz_t::tagged_section_t* _parent() const { return m__parent; }
1008     };
1009 
1010 private:
1011     std::string m__unnamed0;
1012     uint32_t m_len_header;
1013     uint32_t m_len_file;
1014     std::string m__unnamed3;
1015     std::vector<tagged_section_t*>* m_sections;
1016     rekordbox_anlz_t* m__root;
1017     kaitai::kstruct* m__parent;
1018 
1019 public:
_unnamed0()1020     std::string _unnamed0() const { return m__unnamed0; }
1021 
1022     /**
1023      * The number of bytes of this header section.
1024      */
len_header()1025     uint32_t len_header() const { return m_len_header; }
1026 
1027     /**
1028      * The number of bytes in the entire file.
1029      */
len_file()1030     uint32_t len_file() const { return m_len_file; }
_unnamed3()1031     std::string _unnamed3() const { return m__unnamed3; }
1032 
1033     /**
1034      * The remainder of the file is a sequence of type-tagged sections,
1035      * identified by a four-byte magic sequence.
1036      */
sections()1037     std::vector<tagged_section_t*>* sections() const { return m_sections; }
_root()1038     rekordbox_anlz_t* _root() const { return m__root; }
_parent()1039     kaitai::kstruct* _parent() const { return m__parent; }
1040 };
1041