1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
|
// Generated by tracker_compiler. Do not edit.
#include "audio/tracker.h"
#include "generated/assets.h"
const NoteParams g_tracker_samples[] = {
{0}, // ASSET_KICK_1 (ASSET)
{0}, // ASSET_KICK_2 (ASSET)
{0}, // ASSET_KICK_3 (ASSET)
{0}, // ASSET_SNARE_1 (ASSET)
{0}, // ASSET_SNARE_2 (ASSET)
{0}, // ASSET_SNARE_3 (ASSET)
{0}, // ASSET_SNARE_4 (ASSET)
{0}, // ASSET_HIHAT_1 (ASSET)
{0}, // ASSET_HIHAT_2 (ASSET)
{0}, // ASSET_HIHAT_3 (ASSET)
{0}, // ASSET_HIHAT_4 (ASSET)
{0}, // ASSET_CRASH_1 (ASSET)
{0}, // ASSET_RIDE_1 (ASSET)
{0}, // ASSET_SPLASH_1 (ASSET)
{0}, // ASSET_BASS_1 (ASSET)
{82.4f, 0.50f, 1.0f, 0.01f, 0.0f, 0.0f, 0.0f, 3, 0.6f, 0.0f,
0.0f}, // NOTE_E2
{98.0f, 0.50f, 1.0f, 0.01f, 0.0f, 0.0f, 0.0f, 3, 0.6f, 0.0f,
0.0f}, // NOTE_G2
{73.4f, 0.50f, 1.0f, 0.01f, 0.0f, 0.0f, 0.0f, 3, 0.6f, 0.0f,
0.0f}, // NOTE_D2
{65.4f, 0.50f, 1.0f, 0.01f, 0.0f, 0.0f, 0.0f, 3, 0.6f, 0.0f,
0.0f}, // NOTE_C2
};
const uint32_t g_tracker_samples_count = 19;
const AssetId g_tracker_sample_assets[] = {
AssetId::ASSET_KICK_1, AssetId::ASSET_KICK_2, AssetId::ASSET_KICK_3,
AssetId::ASSET_SNARE_1, AssetId::ASSET_SNARE_2, AssetId::ASSET_SNARE_3,
AssetId::ASSET_SNARE_4, AssetId::ASSET_HIHAT_1, AssetId::ASSET_HIHAT_2,
AssetId::ASSET_HIHAT_3, AssetId::ASSET_HIHAT_4, AssetId::ASSET_CRASH_1,
AssetId::ASSET_RIDE_1, AssetId::ASSET_SPLASH_1, AssetId::ASSET_BASS_1,
AssetId::ASSET_LAST_ID, AssetId::ASSET_LAST_ID, AssetId::ASSET_LAST_ID,
AssetId::ASSET_LAST_ID,
};
static const TrackerEvent PATTERN_EVENTS_kick_basic[] = {
{0.0f, 0, 1.0f, 0.0f},
{2.0f, 0, 1.0f, 0.0f},
{2.5f, 1, 0.7f, -0.2f},
};
static const TrackerEvent PATTERN_EVENTS_kick_varied[] = {
{0.0f, 1, 1.0f, 0.0f},
{2.0f, 2, 0.9f, 0.0f},
{2.5f, 0, 0.7f, 0.2f},
};
static const TrackerEvent PATTERN_EVENTS_kick_dense[] = {
{0.0f, 0, 1.0f, 0.0f}, {0.5f, 1, 0.6f, -0.2f}, {1.0f, 2, 0.9f, 0.0f},
{1.5f, 1, 0.6f, 0.2f}, {2.0f, 0, 1.0f, 0.0f}, {2.5f, 1, 0.6f, -0.2f},
{3.0f, 2, 0.9f, 0.0f}, {3.5f, 1, 0.6f, 0.2f},
};
static const TrackerEvent PATTERN_EVENTS_snare_basic[] = {
{1.0f, 3, 1.1f, 0.1f},
{3.0f, 3, 1.1f, 0.1f},
};
static const TrackerEvent PATTERN_EVENTS_snare_varied[] = {
{1.0f, 4, 1.0f, -0.1f},
{3.0f, 6, 1.1f, 0.1f},
};
static const TrackerEvent PATTERN_EVENTS_snare_dense[] = {
{0.5f, 5, 0.9f, 0.0f}, {1.0f, 3, 1.1f, 0.1f}, {1.5f, 6, 0.9f, 0.0f},
{2.5f, 5, 0.9f, 0.0f}, {3.0f, 4, 1.0f, 0.1f}, {3.5f, 6, 0.9f, 0.0f},
};
static const TrackerEvent PATTERN_EVENTS_hihat_basic[] = {
{0.0f, 8, 0.7f, -0.3f}, {0.5f, 7, 0.3f, 0.3f}, {1.0f, 8, 0.7f, -0.3f},
{1.5f, 7, 0.3f, 0.3f}, {2.0f, 8, 0.7f, -0.3f}, {2.5f, 7, 0.3f, 0.3f},
{3.0f, 8, 0.7f, -0.3f}, {3.5f, 7, 0.3f, 0.3f},
};
static const TrackerEvent PATTERN_EVENTS_hihat_varied[] = {
{0.0f, 9, 0.7f, -0.3f}, {0.5f, 7, 0.3f, 0.3f}, {1.0f, 10, 0.6f, -0.2f},
{1.5f, 7, 0.3f, 0.3f}, {2.0f, 9, 0.7f, -0.3f}, {2.5f, 7, 0.3f, 0.3f},
{3.0f, 10, 0.6f, -0.2f}, {3.5f, 7, 0.3f, 0.3f},
};
static const TrackerEvent PATTERN_EVENTS_crash[] = {
{0.0f, 11, 0.9f, 0.0f},
};
static const TrackerEvent PATTERN_EVENTS_ride[] = {
{0.0f, 12, 0.8f, 0.2f},
};
static const TrackerEvent PATTERN_EVENTS_ride_fast[] = {
{0.0f, 12, 0.8f, 0.2f}, {0.5f, 12, 0.6f, 0.2f}, {1.0f, 12, 0.8f, 0.2f},
{1.5f, 12, 0.6f, 0.2f}, {2.0f, 12, 0.8f, 0.2f}, {2.5f, 12, 0.6f, 0.2f},
{3.0f, 12, 0.8f, 0.2f}, {3.5f, 12, 0.6f, 0.2f},
};
static const TrackerEvent PATTERN_EVENTS_splash[] = {
{0.0f, 13, 0.7f, -0.2f},
};
static const TrackerEvent PATTERN_EVENTS_bass_e_soft[] = {
{0.0f, 15, 0.4f, 0.0f},
{2.0f, 15, 0.3f, 0.0f},
};
static const TrackerEvent PATTERN_EVENTS_bass_e[] = {
{0.0f, 15, 0.5f, 0.0f}, {1.0f, 15, 0.4f, 0.0f}, {2.0f, 15, 0.5f, 0.0f},
{2.5f, 15, 0.3f, 0.0f}, {3.0f, 15, 0.4f, 0.0f},
};
static const TrackerEvent PATTERN_EVENTS_bass_eg[] = {
{0.0f, 15, 0.5f, 0.0f},
{1.0f, 15, 0.4f, 0.0f},
{2.0f, 16, 0.5f, 0.0f},
{3.0f, 16, 0.4f, 0.0f},
};
static const TrackerEvent PATTERN_EVENTS_bass_progression[] = {
{0.0f, 15, 0.5f, 0.0f},
{1.0f, 17, 0.4f, 0.0f},
{2.0f, 18, 0.5f, 0.0f},
{3.0f, 16, 0.4f, 0.0f},
};
static const TrackerEvent PATTERN_EVENTS_bass_synco_1[] = {
{0.0f, 15, 0.6f, 0.0f}, {0.2f, 15, 0.5f, 0.1f}, {0.8f, 15, 0.6f, -0.1f},
{1.5f, 15, 0.5f, 0.0f}, {2.0f, 15, 0.6f, 0.0f}, {2.8f, 16, 0.6f, 0.1f},
{3.2f, 15, 0.5f, 0.0f},
};
static const TrackerEvent PATTERN_EVENTS_bass_synco_2[] = {
{0.0f, 15, 0.6f, 0.0f}, {0.5f, 17, 0.6f, -0.1f}, {1.2f, 15, 0.5f, 0.1f},
{1.8f, 17, 0.5f, 0.0f}, {2.0f, 18, 0.6f, 0.0f}, {2.5f, 15, 0.5f, 0.1f},
{3.0f, 16, 0.6f, 0.0f}, {3.5f, 15, 0.5f, -0.1f},
};
static const TrackerEvent PATTERN_EVENTS_bass_synco_3[] = {
{0.0f, 15, 0.6f, 0.0f}, {0.2f, 15, 0.5f, 0.0f}, {0.5f, 15, 0.6f, 0.1f},
{1.0f, 16, 0.6f, 0.0f}, {1.5f, 15, 0.5f, -0.1f}, {2.2f, 17, 0.6f, 0.0f},
{2.8f, 15, 0.5f, 0.1f}, {3.5f, 15, 0.6f, 0.0f},
};
const TrackerPattern g_tracker_patterns[] = {
{PATTERN_EVENTS_kick_basic, 3, 4.0f}, // kick_basic
{PATTERN_EVENTS_kick_varied, 3, 4.0f}, // kick_varied
{PATTERN_EVENTS_kick_dense, 8, 4.0f}, // kick_dense
{PATTERN_EVENTS_snare_basic, 2, 4.0f}, // snare_basic
{PATTERN_EVENTS_snare_varied, 2, 4.0f}, // snare_varied
{PATTERN_EVENTS_snare_dense, 6, 4.0f}, // snare_dense
{PATTERN_EVENTS_hihat_basic, 8, 4.0f}, // hihat_basic
{PATTERN_EVENTS_hihat_varied, 8, 4.0f}, // hihat_varied
{PATTERN_EVENTS_crash, 1, 4.0f}, // crash
{PATTERN_EVENTS_ride, 1, 4.0f}, // ride
{PATTERN_EVENTS_ride_fast, 8, 4.0f}, // ride_fast
{PATTERN_EVENTS_splash, 1, 4.0f}, // splash
{PATTERN_EVENTS_bass_e_soft, 2, 4.0f}, // bass_e_soft
{PATTERN_EVENTS_bass_e, 5, 4.0f}, // bass_e
{PATTERN_EVENTS_bass_eg, 4, 4.0f}, // bass_eg
{PATTERN_EVENTS_bass_progression, 4, 4.0f}, // bass_progression
{PATTERN_EVENTS_bass_synco_1, 7, 4.0f}, // bass_synco_1
{PATTERN_EVENTS_bass_synco_2, 8, 4.0f}, // bass_synco_2
{PATTERN_EVENTS_bass_synco_3, 8, 4.0f}, // bass_synco_3
};
const uint32_t g_tracker_patterns_count = 19;
static const TrackerPatternTrigger SCORE_TRIGGERS[] = {
{0.0f, 8}, {0.0f, 0}, {0.0f, 6}, {2.0f, 0}, {2.0f, 3},
{2.0f, 6}, {4.0f, 9}, {4.0f, 1}, {4.0f, 3}, {4.0f, 7},
{6.0f, 1}, {6.0f, 4}, {6.0f, 7}, {8.0f, 11}, {8.0f, 0},
{8.0f, 3}, {8.0f, 6}, {8.0f, 12}, {10.0f, 1}, {10.0f, 4},
{10.0f, 7}, {10.0f, 12}, {12.0f, 9}, {12.0f, 0}, {12.0f, 3},
{12.0f, 6}, {12.0f, 13}, {14.0f, 1}, {14.0f, 4}, {14.0f, 7},
{14.0f, 14}, {16.0f, 8}, {16.0f, 2}, {16.0f, 5}, {16.0f, 7},
{16.0f, 13}, {18.0f, 2}, {18.0f, 5}, {18.0f, 6}, {18.0f, 15},
{20.0f, 9}, {20.0f, 2}, {20.0f, 5}, {20.0f, 7}, {20.0f, 13},
{22.0f, 2}, {22.0f, 5}, {22.0f, 6}, {22.0f, 14}, {24.0f, 11},
{24.0f, 2}, {24.0f, 5}, {24.0f, 7}, {24.0f, 15}, {26.0f, 2},
{26.0f, 5}, {26.0f, 6}, {26.0f, 13}, {28.0f, 10}, {28.0f, 0},
{28.0f, 4}, {28.0f, 7}, {28.0f, 14}, {30.0f, 1}, {30.0f, 3},
{30.0f, 6}, {30.0f, 15}, {31.0f, 6}, {32.0f, 8}, {32.0f, 10},
{32.0f, 2}, {32.0f, 5}, {32.0f, 7}, {32.0f, 16}, {34.0f, 10},
{34.0f, 2}, {34.0f, 5}, {34.0f, 6}, {34.0f, 17}, {36.0f, 10},
{36.0f, 2}, {36.0f, 5}, {36.0f, 7}, {36.0f, 18}, {38.0f, 8},
};
const TrackerScore g_tracker_score = {SCORE_TRIGGERS, 85, 120.0f};
// ============================================================
// RESOURCE USAGE ANALYSIS (for synth.h configuration)
// ============================================================
// Total samples: 19 (15 assets + 4 generated notes)
// Max simultaneous pattern triggers: 6
// Estimated max polyphony: 24 voices
//
// REQUIRED (minimum to avoid pool exhaustion):
// MAX_VOICES: 24
// MAX_SPECTROGRAMS: 111 (no caching)
//
// RECOMMENDED (with 50% safety margin):
// MAX_VOICES: 48
// MAX_SPECTROGRAMS: 166 (no caching)
//
// NOTE: With spectrogram caching by note parameters,
// MAX_SPECTROGRAMS could be reduced to ~19
// ============================================================
|