Commit 07beedf

Nick committed on
WIP on detecting/removing unused patterns
commit 07beedfc83349cb70aacd260e2fb14ca160f045f parent a61ccab
8 changed files +592−512
ModifiedGBEmu.lpi +2−2
@@ -135,13 +135,13 @@
135 </PublishOptions> 135 </PublishOptions>
136 <RunParams> 136 <RunParams>
137 <local> 137 <local>
138 <CommandLineParams Value="C:\Projects\GB-Stuff\uge\driver.gb"/> 138 <CommandLineParams Value="&quot;C:\Projects\GB-Stuff\uge\SampleSongs\WVL - Yyna is a Girl.uge&quot;"/>
139 </local> 139 </local>
140 <FormatVersion Value="2"/> 140 <FormatVersion Value="2"/>
141 <Modes Count="1"> 141 <Modes Count="1">
142 <Mode0 Name="default"> 142 <Mode0 Name="default">
143 <local> 143 <local>
144 <CommandLineParams Value="C:\Projects\GB-Stuff\uge\driver.gb"/> 144 <CommandLineParams Value="&quot;C:\Projects\GB-Stuff\uge\SampleSongs\WVL - Yyna is a Girl.uge&quot;"/>
145 </local> 145 </local>
146 </Mode0> 146 </Mode0>
147 </Modes> 147 </Modes>
Modifiedcodegen.pas +3−1
@@ -259,9 +259,11 @@ begin
259 end; 259 end;
260 260
261 if Mode <> emPreview then begin 261 if Mode <> emPreview then begin
262 if FileExists(FilePath) then DeleteFile(FilePath);
263
262 if not RenameFile(Filename+IfThen(Mode = emGBS, '.gbs', '.gb'), FilePath) then begin 264 if not RenameFile(Filename+IfThen(Mode = emGBS, '.gbs', '.gb'), FilePath) then begin
263 MessageDlg('Error!', 265 MessageDlg('Error!',
264 'Couldn''t move the file to its new location. Make sure your path is correct!', 266 'Couldn''t create file at '+FilePath+'. Make sure your path is correct!',
265 mtError, 267 mtError,
266 [mbOk], 268 [mbOk],
267 0); 269 0);
Modifiedconstants.pas +5−1
@@ -14,7 +14,11 @@ type
14 TNoteToFreqMap = specialize TFPGMap<Integer, Integer>; 14 TNoteToFreqMap = specialize TFPGMap<Integer, Integer>;
15 15
16 const 16 const
17 UGE_FORMAT_VERSION = 1; 17 UGE_FORMAT_VERSION = 2;
18
19 INSTRUMENTS_COUNT = 15;
20 ROUTINES_COUNT = 16;
21 WAVES_COUNT = 16;
18 22
19 LM_FD = LM_USER + 0; 23 LM_FD = LM_USER + 0;
20 LM_UNDO_OCCURED = LM_USER + 1; 24 LM_UNDO_OCCURED = LM_USER + 1;
Deletedpatterns.pas +0−18
@@ -1,18 +0,0 @@
1 unit Patterns;
2
3 {$mode delphi}
4
5 interface
6
7 uses
8 Classes, SysUtils;
9
10 type
11 TPattern = record
12
13 end;
14
15 implementation
16
17 end.
18
Modifiedsong.pas +2−5
@@ -4,10 +4,7 @@ unit Song;
4 4
5 interface 5 interface
6 6
7 uses Classes, HugeDatatypes, instruments; 7 uses Classes, HugeDatatypes, instruments, Constants;
8
9 const
10 CURRENT_VERSION = 2;
11 8
12 type 9 type
13 TSongV1 = packed record 10 TSongV1 = packed record
@@ -195,7 +192,7 @@ var
195 I, J: Integer; 192 I, J: Integer;
196 begin 193 begin
197 with S do begin 194 with S do begin
198 Version := CURRENT_VERSION; 195 Version := UGE_FORMAT_VERSION;
199 Name := ''; 196 Name := '';
200 Artist := ''; 197 Artist := '';
201 Comment := ''; 198 Comment := '';
Modifiedtracker.lfm +452−457
@@ -1,12 +1,11 @@
1 object frmTracker: TfrmTracker 1 object frmTracker: TfrmTracker
2 Left = 769 2 Left = 1936
3 Height = 1200 3 Height = 686
4 Top = 189 4 Top = 123
5 Width = 2040 5 Width = 1166
6 Caption = 'hUGETracker' 6 Caption = 'hUGETracker'
7 ClientHeight = 1166 7 ClientHeight = 666
8 ClientWidth = 2040 8 ClientWidth = 1166
9 DesignTimePPI = 168
10 KeyPreview = True 9 KeyPreview = True
11 Menu = MainMenu1 10 Menu = MainMenu1
12 OnClose = FormClose 11 OnClose = FormClose
@@ -20,9 +19,9 @@ object frmTracker: TfrmTracker
20 LCLVersion = '2.0.6.0' 19 LCLVersion = '2.0.6.0'
21 object TreeView1: TTreeView 20 object TreeView1: TTreeView
22 Left = 0 21 Left = 0
23 Height = 770 22 Height = 440
24 Top = 353 23 Top = 203
25 Width = 338 24 Width = 193
26 Align = alLeft 25 Align = alLeft
27 ParentFont = False 26 ParentFont = False
28 ReadOnly = True 27 ReadOnly = True
@@ -37,100 +36,100 @@ object frmTracker: TfrmTracker
37 } 36 }
38 end 37 end
39 object Splitter1: TSplitter 38 object Splitter1: TSplitter
40 Left = 338 39 Left = 193
41 Height = 770 40 Height = 440
42 Top = 353 41 Top = 203
43 Width = 9 42 Width = 5
44 end 43 end
45 object Panel1: TPanel 44 object Panel1: TPanel
46 Left = 347 45 Left = 198
47 Height = 770 46 Height = 440
48 Top = 353 47 Top = 203
49 Width = 1693 48 Width = 968
50 Align = alClient 49 Align = alClient
51 BevelOuter = bvNone 50 BevelOuter = bvNone
52 ClientHeight = 770 51 ClientHeight = 440
53 ClientWidth = 1693 52 ClientWidth = 968
54 ParentFont = False 53 ParentFont = False
55 TabOrder = 2 54 TabOrder = 2
56 object PageControl1: TPageControl 55 object PageControl1: TPageControl
57 Left = 0 56 Left = 0
58 Height = 770 57 Height = 440
59 Top = 0 58 Top = 0
60 Width = 1693 59 Width = 968
61 ActivePage = GeneralTabSheet 60 ActivePage = InstrumentTabSheet
62 Align = alClient 61 Align = alClient
63 ParentFont = False 62 ParentFont = False
64 TabIndex = 0 63 TabIndex = 2
65 TabOrder = 0 64 TabOrder = 0
66 object GeneralTabSheet: TTabSheet 65 object GeneralTabSheet: TTabSheet
67 Caption = 'General' 66 Caption = 'General'
68 ClientHeight = 727 67 ClientHeight = 412
69 ClientWidth = 1685 68 ClientWidth = 960
70 ParentFont = False 69 ParentFont = False
71 object SongInformationGroupbox: TGroupBox 70 object SongInformationGroupbox: TGroupBox
72 Left = 14 71 Left = 8
73 Height = 238 72 Height = 136
74 Top = 14 73 Top = 8
75 Width = 534 74 Width = 305
76 Caption = 'Song information' 75 Caption = 'Song information'
77 ClientHeight = 203 76 ClientHeight = 116
78 ClientWidth = 530 77 ClientWidth = 301
79 ParentFont = False 78 ParentFont = False
80 TabOrder = 0 79 TabOrder = 0
81 object Label15: TLabel 80 object Label15: TLabel
82 Left = 14 81 Left = 8
83 Height = 30 82 Height = 15
84 Top = 28 83 Top = 16
85 Width = 47 84 Width = 27
86 Caption = 'Song' 85 Caption = 'Song'
87 ParentColor = False 86 ParentColor = False
88 ParentFont = False 87 ParentFont = False
89 end 88 end
90 object Label16: TLabel 89 object Label16: TLabel
91 Left = 12 90 Left = 7
92 Height = 30 91 Height = 15
93 Top = 84 92 Top = 48
94 Width = 49 93 Width = 28
95 Caption = 'Artist' 94 Caption = 'Artist'
96 ParentColor = False 95 ParentColor = False
97 ParentFont = False 96 ParentFont = False
98 end 97 end
99 object SongEdit: TEdit 98 object SongEdit: TEdit
100 Left = 98 99 Left = 56
101 Height = 38 100 Height = 23
102 Hint = 'The name of your composition' 101 Hint = 'The name of your composition'
103 Top = 14 102 Top = 8
104 Width = 378 103 Width = 216
105 OnChange = SongEditChange 104 OnChange = SongEditChange
106 ParentFont = False 105 ParentFont = False
107 TabOrder = 0 106 TabOrder = 0
108 end 107 end
109 object ArtistEdit: TEdit 108 object ArtistEdit: TEdit
110 Left = 98 109 Left = 56
111 Height = 38 110 Height = 23
112 Hint = 'Your name or handle' 111 Hint = 'Your name or handle'
113 Top = 70 112 Top = 40
114 Width = 378 113 Width = 216
115 OnChange = ArtistEditChange 114 OnChange = ArtistEditChange
116 ParentFont = False 115 ParentFont = False
117 TabOrder = 1 116 TabOrder = 1
118 end 117 end
119 object Label21: TLabel 118 object Label21: TLabel
120 Left = 14 119 Left = 8
121 Height = 30 120 Height = 15
122 Top = 136 121 Top = 78
123 Width = 197 122 Width = 114
124 Caption = 'Tempo (ticks per row)' 123 Caption = 'Tempo (ticks per row)'
125 ParentColor = False 124 ParentColor = False
126 ParentFont = False 125 ParentFont = False
127 end 126 end
128 object TicksPerRowSpinEdit: TSpinEdit 127 object TicksPerRowSpinEdit: TSpinEdit
129 Left = 233 128 Left = 133
130 Height = 38 129 Height = 23
131 Hint = 'How many ticks should happen before the row changes. Higher means slower' 130 Hint = 'How many ticks should happen before the row changes. Higher means slower'
132 Top = 128 131 Top = 73
133 Width = 88 132 Width = 50
134 MaxValue = 20 133 MaxValue = 20
135 MinValue = 1 134 MinValue = 1
136 OnChange = TicksPerRowSpinEditChange 135 OnChange = TicksPerRowSpinEditChange
@@ -142,25 +141,25 @@ object frmTracker: TfrmTracker
142 end 141 end
143 object PatternTabSheet: TTabSheet 142 object PatternTabSheet: TTabSheet
144 Caption = 'Patterns' 143 Caption = 'Patterns'
145 ClientHeight = 727 144 ClientHeight = 412
146 ClientWidth = 1685 145 ClientWidth = 960
147 ParentFont = False 146 ParentFont = False
148 object Panel3: TPanel 147 object Panel3: TPanel
149 Left = 392 148 Left = 224
150 Height = 727 149 Height = 412
151 Top = 0 150 Top = 0
152 Width = 1293 151 Width = 736
153 Align = alClient 152 Align = alClient
154 ClientHeight = 727 153 ClientHeight = 412
155 ClientWidth = 1293 154 ClientWidth = 736
156 ParentFont = False 155 ParentFont = False
157 TabOrder = 0 156 TabOrder = 0
158 object HeaderControl1: THeaderControl 157 object HeaderControl1: THeaderControl
159 Left = 1 158 Left = 1
160 Height = 52 159 Height = 30
161 Hint = 'Left click to mute, right click to solo' 160 Hint = 'Left click to mute, right click to solo'
162 Top = 1 161 Top = 1
163 Width = 1291 162 Width = 734
164 DragReorder = False 163 DragReorder = False
165 Images = ImageList2 164 Images = ImageList2
166 Sections = < 165 Sections = <
@@ -168,28 +167,28 @@ object frmTracker: TfrmTracker
168 Alignment = taCenter 167 Alignment = taCenter
169 ImageIndex = 1 168 ImageIndex = 1
170 Text = 'Duty 1' 169 Text = 'Duty 1'
171 Width = 233 170 Width = 133
172 Visible = True 171 Visible = True
173 end 172 end
174 item 173 item
175 Alignment = taCenter 174 Alignment = taCenter
176 ImageIndex = 1 175 ImageIndex = 1
177 Text = 'Duty 2' 176 Text = 'Duty 2'
178 Width = 233 177 Width = 133
179 Visible = True 178 Visible = True
180 end 179 end
181 item 180 item
182 Alignment = taCenter 181 Alignment = taCenter
183 ImageIndex = 1 182 ImageIndex = 1
184 Text = 'Wave' 183 Text = 'Wave'
185 Width = 233 184 Width = 133
186 Visible = True 185 Visible = True
187 end 186 end
188 item 187 item
189 Alignment = taCenter 188 Alignment = taCenter
190 ImageIndex = 1 189 ImageIndex = 1
191 Text = 'Noise' 190 Text = 'Noise'
192 Width = 233 191 Width = 133
193 Visible = True 192 Visible = True
194 end> 193 end>
195 OnSectionClick = HeaderControl1SectionClick 194 OnSectionClick = HeaderControl1SectionClick
@@ -200,9 +199,9 @@ object frmTracker: TfrmTracker
200 end 199 end
201 object ScrollBox1: TScrollBox 200 object ScrollBox1: TScrollBox
202 Left = 1 201 Left = 1
203 Height = 673 202 Height = 380
204 Top = 53 203 Top = 31
205 Width = 1291 204 Width = 734
206 HorzScrollBar.Increment = 1 205 HorzScrollBar.Increment = 1
207 HorzScrollBar.Page = 1 206 HorzScrollBar.Page = 1
208 HorzScrollBar.Smooth = True 207 HorzScrollBar.Smooth = True
@@ -219,43 +218,43 @@ object frmTracker: TfrmTracker
219 end 218 end
220 object OrderEditStringGrid: TStringGrid 219 object OrderEditStringGrid: TStringGrid
221 Left = 0 220 Left = 0
222 Height = 727 221 Height = 412
223 Top = 0 222 Top = 0
224 Width = 392 223 Width = 224
225 Align = alLeft 224 Align = alLeft
226 AutoEdit = False 225 AutoEdit = False
227 AutoFillColumns = True 226 AutoFillColumns = True
228 Columns = < 227 Columns = <
229 item 228 item
230 Alignment = taCenter 229 Alignment = taCenter
231 MinSize = 58 230 MinSize = 33
232 MaxSize = 58 231 MaxSize = 33
233 Title.Caption = 'Dty1' 232 Title.Caption = 'Dty1'
234 Width = 61 233 Width = 34
235 end 234 end
236 item 235 item
237 Alignment = taCenter 236 Alignment = taCenter
238 MinSize = 58 237 MinSize = 33
239 MaxSize = 58 238 MaxSize = 33
240 Title.Caption = 'Dty2' 239 Title.Caption = 'Dty2'
241 Width = 61 240 Width = 34
242 end 241 end
243 item 242 item
244 Alignment = taCenter 243 Alignment = taCenter
245 MinSize = 58 244 MinSize = 33
246 MaxSize = 58 245 MaxSize = 33
247 Title.Caption = 'Wav' 246 Title.Caption = 'Wav'
248 Width = 61 247 Width = 34
249 end 248 end
250 item 249 item
251 Alignment = taCenter 250 Alignment = taCenter
252 MinSize = 58 251 MinSize = 33
253 MaxSize = 58 252 MaxSize = 33
254 Title.Caption = 'Nse' 253 Title.Caption = 'Nse'
255 Width = 63 254 Width = 37
256 end> 255 end>
257 DefaultColWidth = 30 256 DefaultColWidth = 17
258 DefaultRowHeight = 37 257 DefaultRowHeight = 21
259 ExtendedSelect = False 258 ExtendedSelect = False
260 Options = [goFixedVertLine, goFixedHorzLine, goRangeSelect, goRowMoving, goEditing, goAutoAddRows, goTabs, goSmoothScroll, goFixedRowNumbering, goRowHighlight] 259 Options = [goFixedVertLine, goFixedHorzLine, goRangeSelect, goRowMoving, goEditing, goAutoAddRows, goTabs, goSmoothScroll, goFixedRowNumbering, goRowHighlight]
261 ParentFont = False 260 ParentFont = False
@@ -274,28 +273,28 @@ object frmTracker: TfrmTracker
274 OnEditingDone = OrderEditStringGridEditingDone 273 OnEditingDone = OrderEditStringGridEditingDone
275 OnKeyDown = OrderEditStringGridKeyDown 274 OnKeyDown = OrderEditStringGridKeyDown
276 ColWidths = ( 275 ColWidths = (
277 112 276 64
278 61 277 34
279 61 278 34
280 61 279 34
281 63 280 37
282 ) 281 )
283 end 282 end
284 end 283 end
285 object InstrumentTabSheet: TTabSheet 284 object InstrumentTabSheet: TTabSheet
286 Caption = 'Instruments' 285 Caption = 'Instruments'
287 ClientHeight = 727 286 ClientHeight = 412
288 ClientWidth = 1685 287 ClientWidth = 960
289 ParentFont = False 288 ParentFont = False
290 object PaintBox1: TPaintBox 289 object PaintBox1: TPaintBox
291 AnchorSideTop.Control = FlowPanel1 290 AnchorSideTop.Control = FlowPanel1
292 AnchorSideTop.Side = asrBottom 291 AnchorSideTop.Side = asrBottom
293 AnchorSideBottom.Side = asrBottom 292 AnchorSideBottom.Side = asrBottom
294 Left = 0 293 Left = 0
295 Height = 19 294 Height = 7
296 Hint = 'Preview of how the resulting waveform will look with envelope applied' 295 Hint = 'Preview of how the resulting waveform will look with envelope applied'
297 Top = 708 296 Top = 405
298 Width = 1685 297 Width = 960
299 Align = alClient 298 Align = alClient
300 Color = clBlack 299 Color = clBlack
301 ParentColor = False 300 ParentColor = False
@@ -305,9 +304,9 @@ object frmTracker: TfrmTracker
305 end 304 end
306 object FlowPanel1: TFlowPanel 305 object FlowPanel1: TFlowPanel
307 Left = 0 306 Left = 0
308 Height = 708 307 Height = 405
309 Top = 0 308 Top = 0
310 Width = 1685 309 Width = 960
311 Align = alTop 310 Align = alTop
312 AutoSize = True 311 AutoSize = True
313 BevelOuter = bvNone 312 BevelOuter = bvNone
@@ -342,26 +341,26 @@ object frmTracker: TfrmTracker
342 ParentFont = False 341 ParentFont = False
343 TabOrder = 0 342 TabOrder = 0
344 object InstrumentGroupBox: TGroupBox 343 object InstrumentGroupBox: TGroupBox
345 Left = 12 344 Left = 7
346 Height = 364 345 Height = 208
347 Top = 12 346 Top = 7
348 Width = 474 347 Width = 271
349 Anchors = [] 348 Anchors = []
350 BorderSpacing.Left = 12 349 BorderSpacing.Left = 7
351 BorderSpacing.Top = 12 350 BorderSpacing.Top = 7
352 BorderSpacing.Right = 12 351 BorderSpacing.Right = 7
353 BorderSpacing.Bottom = 12 352 BorderSpacing.Bottom = 7
354 Caption = 'Instrument' 353 Caption = 'Instrument'
355 ClientHeight = 329 354 ClientHeight = 188
356 ClientWidth = 470 355 ClientWidth = 267
357 ParentFont = False 356 ParentFont = False
358 TabOrder = 0 357 TabOrder = 0
359 object InstrumentNumberSpinner: TSpinEdit 358 object InstrumentNumberSpinner: TSpinEdit
360 Left = 140 359 Left = 80
361 Height = 38 360 Height = 23
362 Hint = 'What instrument to edit' 361 Hint = 'What instrument to edit'
363 Top = 2 362 Top = 1
364 Width = 308 363 Width = 176
365 MaxValue = 15 364 MaxValue = 15
366 MinValue = 1 365 MinValue = 1
367 OnChange = InstrumentNumberSpinnerChange 366 OnChange = InstrumentNumberSpinnerChange
@@ -370,49 +369,49 @@ object frmTracker: TfrmTracker
370 Value = 1 369 Value = 1
371 end 370 end
372 object Label1: TLabel 371 object Label1: TLabel
373 Left = 14 372 Left = 8
374 Height = 30 373 Height = 15
375 Top = 14 374 Top = 8
376 Width = 101 375 Width = 58
377 Caption = 'Instrument' 376 Caption = 'Instrument'
378 ParentColor = False 377 ParentColor = False
379 ParentFont = False 378 ParentFont = False
380 end 379 end
381 object Label2: TLabel 380 object Label2: TLabel
382 Left = 14 381 Left = 8
383 Height = 30 382 Height = 15
384 Top = 60 383 Top = 34
385 Width = 56 384 Width = 32
386 Caption = 'Name' 385 Caption = 'Name'
387 ParentColor = False 386 ParentColor = False
388 ParentFont = False 387 ParentFont = False
389 end 388 end
390 object InstrumentNameEdit: TEdit 389 object InstrumentNameEdit: TEdit
391 Left = 140 390 Left = 80
392 Height = 38 391 Height = 23
393 Hint = 'The name of the instrument' 392 Hint = 'The name of the instrument'
394 Top = 46 393 Top = 26
395 Width = 308 394 Width = 176
396 OnChange = InstrumentNameEditChange 395 OnChange = InstrumentNameEditChange
397 ParentFont = False 396 ParentFont = False
398 TabOrder = 1 397 TabOrder = 1
399 end 398 end
400 object Label3: TLabel 399 object Label3: TLabel
401 Left = 14 400 Left = 8
402 Height = 30 401 Height = 15
403 Top = 107 402 Top = 61
404 Width = 43 403 Width = 24
405 Caption = 'Type' 404 Caption = 'Type'
406 ParentColor = False 405 ParentColor = False
407 ParentFont = False 406 ParentFont = False
408 end 407 end
409 object InstrumentTypeCombobox: TComboBox 408 object InstrumentTypeCombobox: TComboBox
410 Left = 140 409 Left = 80
411 Height = 38 410 Height = 23
412 Hint = 'What type of channel this instrument will be played on' 411 Hint = 'What type of channel this instrument will be played on'
413 Top = 93 412 Top = 53
414 Width = 308 413 Width = 176
415 ItemHeight = 30 414 ItemHeight = 15
416 ItemIndex = 0 415 ItemIndex = 0
417 Items.Strings = ( 416 Items.Strings = (
418 'Square' 417 'Square'
@@ -426,52 +425,52 @@ object frmTracker: TfrmTracker
426 Text = 'Square' 425 Text = 'Square'
427 end 426 end
428 object LengthEnabledCheckbox: TCheckBox 427 object LengthEnabledCheckbox: TCheckBox
429 Left = 14 428 Left = 8
430 Height = 34 429 Height = 19
431 Hint = 'Cut the sound after a certain length of time' 430 Hint = 'Cut the sound after a certain length of time'
432 Top = 147 431 Top = 84
433 Width = 98 432 Width = 57
434 Caption = 'Length' 433 Caption = 'Length'
435 OnChange = LengthEnabledCheckboxChange 434 OnChange = LengthEnabledCheckboxChange
436 ParentFont = False 435 ParentFont = False
437 TabOrder = 3 436 TabOrder = 3
438 end 437 end
439 object InstrumentImportButton: TButton 438 object InstrumentImportButton: TButton
440 Left = 24 439 Left = 14
441 Height = 44 440 Height = 25
442 Top = 264 441 Top = 151
443 Width = 203 442 Width = 116
444 Caption = 'Import' 443 Caption = 'Import'
445 OnClick = InstrumentImportButtonClick 444 OnClick = InstrumentImportButtonClick
446 ParentFont = False 445 ParentFont = False
447 TabOrder = 4 446 TabOrder = 4
448 end 447 end
449 object InstrumentExportButton: TButton 448 object InstrumentExportButton: TButton
450 Left = 240 449 Left = 137
451 Height = 44 450 Height = 25
452 Top = 264 451 Top = 151
453 Width = 203 452 Width = 116
454 Caption = 'Export' 453 Caption = 'Export'
455 OnClick = InstrumentExportButtonClick 454 OnClick = InstrumentExportButtonClick
456 ParentFont = False 455 ParentFont = False
457 TabOrder = 5 456 TabOrder = 5
458 end 457 end
459 object Button1: TButton 458 object Button1: TButton
460 Left = 24 459 Left = 14
461 Height = 44 460 Height = 25
462 Hint = 'Test out the instrument with a C-5 note' 461 Hint = 'Test out the instrument with a C-5 note'
463 Top = 208 462 Top = 119
464 Width = 424 463 Width = 242
465 Caption = 'Test C-5' 464 Caption = 'Test C-5'
466 OnClick = Button1Click 465 OnClick = Button1Click
467 ParentFont = False 466 ParentFont = False
468 TabOrder = 6 467 TabOrder = 6
469 end 468 end
470 object LengthTrackbar: TTrackBar 469 object LengthTrackbar: TTrackBar
471 Left = 136 470 Left = 78
472 Height = 44 471 Height = 25
473 Top = 144 472 Top = 82
474 Width = 312 473 Width = 178
475 Max = 63 474 Max = 63
476 OnChange = LengthSpinnerChange 475 OnChange = LengthSpinnerChange
477 Position = 0 476 Position = 0
@@ -480,45 +479,45 @@ object frmTracker: TfrmTracker
480 end 479 end
481 end 480 end
482 object EnvelopeGroupBox: TGroupBox 481 object EnvelopeGroupBox: TGroupBox
483 Left = 510 482 Left = 292
484 Height = 238 483 Height = 136
485 Top = 12 484 Top = 7
486 Width = 1153 485 Width = 659
487 Anchors = [] 486 Anchors = []
488 BorderSpacing.Left = 12 487 BorderSpacing.Left = 7
489 BorderSpacing.Top = 12 488 BorderSpacing.Top = 7
490 BorderSpacing.Right = 12 489 BorderSpacing.Right = 7
491 BorderSpacing.Bottom = 12 490 BorderSpacing.Bottom = 7
492 Caption = 'Envelope' 491 Caption = 'Envelope'
493 ClientHeight = 203 492 ClientHeight = 116
494 ClientWidth = 1149 493 ClientWidth = 655
495 ParentFont = False 494 ParentFont = False
496 TabOrder = 1 495 TabOrder = 1
497 object Label4: TLabel 496 object Label4: TLabel
498 Left = 14 497 Left = 8
499 Height = 30 498 Height = 15
500 Top = 16 499 Top = 9
501 Width = 80 500 Width = 46
502 Caption = 'Start vol.' 501 Caption = 'Start vol.'
503 ParentColor = False 502 ParentColor = False
504 ParentFont = False 503 ParentFont = False
505 end 504 end
506 object Label5: TLabel 505 object Label5: TLabel
507 Left = 14 506 Left = 8
508 Height = 30 507 Height = 15
509 Top = 84 508 Top = 48
510 Width = 84 509 Width = 48
511 Caption = 'Direction' 510 Caption = 'Direction'
512 ParentColor = False 511 ParentColor = False
513 ParentFont = False 512 ParentFont = False
514 end 513 end
515 object DirectionComboBox: TComboBox 514 object DirectionComboBox: TComboBox
516 Left = 144 515 Left = 82
517 Height = 38 516 Height = 23
518 Hint = 'Whether to fade the sound in or out' 517 Hint = 'Whether to fade the sound in or out'
519 Top = 80 518 Top = 46
520 Width = 346 519 Width = 198
521 ItemHeight = 30 520 ItemHeight = 15
522 ItemIndex = 1 521 ItemIndex = 1
523 Items.Strings = ( 522 Items.Strings = (
524 'Up' 523 'Up'
@@ -531,40 +530,40 @@ object frmTracker: TfrmTracker
531 Text = 'Down' 530 Text = 'Down'
532 end 531 end
533 object Label6: TLabel 532 object Label6: TLabel
534 Left = 14 533 Left = 8
535 Height = 30 534 Height = 15
536 Top = 150 535 Top = 86
537 Width = 71 536 Width = 41
538 Caption = 'Change' 537 Caption = 'Change'
539 ParentColor = False 538 ParentColor = False
540 ParentFont = False 539 ParentFont = False
541 end 540 end
542 object Panel5: TPanel 541 object Panel5: TPanel
543 Left = 525 542 Left = 300
544 Height = 184 543 Height = 105
545 Top = 0 544 Top = 0
546 Width = 606 545 Width = 346
547 BevelOuter = bvLowered 546 BevelOuter = bvLowered
548 ClientHeight = 184 547 ClientHeight = 105
549 ClientWidth = 606 548 ClientWidth = 346
550 ParentFont = False 549 ParentFont = False
551 TabOrder = 1 550 TabOrder = 1
552 object EnvelopePaintbox: TPaintBox 551 object EnvelopePaintbox: TPaintBox
553 Left = 1 552 Left = 1
554 Height = 182 553 Height = 103
555 Hint = 'Preview of the volume envelope' 554 Hint = 'Preview of the volume envelope'
556 Top = 1 555 Top = 1
557 Width = 604 556 Width = 344
558 Align = alClient 557 Align = alClient
559 ParentFont = False 558 ParentFont = False
560 OnPaint = EnvelopePaintboxPaint 559 OnPaint = EnvelopePaintboxPaint
561 end 560 end
562 end 561 end
563 object StartVolTrackbar: TTrackBar 562 object StartVolTrackbar: TTrackBar
564 Left = 144 563 Left = 82
565 Height = 44 564 Height = 25
566 Top = 14 565 Top = 8
567 Width = 343 566 Width = 196
568 Max = 15 567 Max = 15
569 OnChange = StartVolSpinnerChange 568 OnChange = StartVolSpinnerChange
570 Position = 0 569 Position = 0
@@ -572,10 +571,10 @@ object frmTracker: TfrmTracker
572 TabOrder = 2 571 TabOrder = 2
573 end 572 end
574 object EnvChangeTrackbar: TTrackBar 573 object EnvChangeTrackbar: TTrackBar
575 Left = 144 574 Left = 82
576 Height = 44 575 Height = 25
577 Top = 144 576 Top = 82
578 Width = 343 577 Width = 196
579 Max = 7 578 Max = 7
580 OnChange = EnvChangeSpinnerChange 579 OnChange = EnvChangeSpinnerChange
581 Position = 0 580 Position = 0
@@ -584,36 +583,36 @@ object frmTracker: TfrmTracker
584 end 583 end
585 end 584 end
586 object SquareGroupBox: TGroupBox 585 object SquareGroupBox: TGroupBox
587 Left = 12 586 Left = 7
588 Height = 296 587 Height = 169
589 Top = 400 588 Top = 229
590 Width = 558 589 Width = 319
591 Anchors = [] 590 Anchors = []
592 BorderSpacing.Left = 12 591 BorderSpacing.Left = 7
593 BorderSpacing.Top = 12 592 BorderSpacing.Top = 7
594 BorderSpacing.Right = 12 593 BorderSpacing.Right = 7
595 BorderSpacing.Bottom = 12 594 BorderSpacing.Bottom = 7
596 Caption = 'Square' 595 Caption = 'Square'
597 ClientHeight = 261 596 ClientHeight = 149
598 ClientWidth = 554 597 ClientWidth = 315
599 ParentFont = False 598 ParentFont = False
600 TabOrder = 2 599 TabOrder = 2
601 object Label7: TLabel 600 object Label7: TLabel
602 Left = 14 601 Left = 8
603 Height = 30 602 Height = 15
604 Top = 28 603 Top = 16
605 Width = 107 604 Width = 61
606 Caption = 'Sweep time' 605 Caption = 'Sweep time'
607 ParentColor = False 606 ParentColor = False
608 ParentFont = False 607 ParentFont = False
609 end 608 end
610 object SweepTimeCombobox: TComboBox 609 object SweepTimeCombobox: TComboBox
611 Left = 182 610 Left = 104
612 Height = 38 611 Height = 23
613 Hint = 'How long to sweep' 612 Hint = 'How long to sweep'
614 Top = 14 613 Top = 8
615 Width = 350 614 Width = 200
616 ItemHeight = 30 615 ItemHeight = 15
617 ItemIndex = 0 616 ItemIndex = 0
618 Items.Strings = ( 617 Items.Strings = (
619 'Off - no frequency change' 618 'Off - no frequency change'
@@ -634,12 +633,12 @@ object frmTracker: TfrmTracker
634 Text = 'Off - no frequency change' 633 Text = 'Off - no frequency change'
635 end 634 end
636 object SweepDirectionCombobox: TComboBox 635 object SweepDirectionCombobox: TComboBox
637 Left = 182 636 Left = 104
638 Height = 38 637 Height = 23
639 Hint = 'The direction of the sweep' 638 Hint = 'The direction of the sweep'
640 Top = 70 639 Top = 40
641 Width = 350 640 Width = 200
642 ItemHeight = 30 641 ItemHeight = 15
643 ItemIndex = 1 642 ItemIndex = 1
644 Items.Strings = ( 643 Items.Strings = (
645 'Up' 644 'Up'
@@ -654,39 +653,39 @@ object frmTracker: TfrmTracker
654 Text = 'Down' 653 Text = 'Down'
655 end 654 end
656 object Label8: TLabel 655 object Label8: TLabel
657 Left = 14 656 Left = 8
658 Height = 30 657 Height = 15
659 Top = 84 658 Top = 48
660 Width = 147 659 Width = 84
661 Caption = 'Sweep direction' 660 Caption = 'Sweep direction'
662 ParentColor = False 661 ParentColor = False
663 ParentFont = False 662 ParentFont = False
664 end 663 end
665 object Label9: TLabel 664 object Label9: TLabel
666 Left = 14 665 Left = 8
667 Height = 30 666 Height = 15
668 Top = 147 667 Top = 84
669 Width = 101 668 Width = 56
670 Caption = 'Sweep size' 669 Caption = 'Sweep size'
671 ParentColor = False 670 ParentColor = False
672 ParentFont = False 671 ParentFont = False
673 end 672 end
674 object Label10: TLabel 673 object Label10: TLabel
675 Left = 14 674 Left = 8
676 Height = 30 675 Height = 15
677 Top = 210 676 Top = 120
678 Width = 44 677 Width = 25
679 Caption = 'Duty' 678 Caption = 'Duty'
680 ParentColor = False 679 ParentColor = False
681 ParentFont = False 680 ParentFont = False
682 end 681 end
683 object DutyCombobox: TComboBox 682 object DutyCombobox: TComboBox
684 Left = 182 683 Left = 104
685 Height = 38 684 Height = 23
686 Hint = 'Which duty cycle to use (changes timbre of wave)' 685 Hint = 'Which duty cycle to use (changes timbre of wave)'
687 Top = 196 686 Top = 112
688 Width = 350 687 Width = 200
689 ItemHeight = 30 688 ItemHeight = 15
690 ItemIndex = 2 689 ItemIndex = 2
691 Items.Strings = ( 690 Items.Strings = (
692 '12.5%' 691 '12.5%'
@@ -703,10 +702,10 @@ object frmTracker: TfrmTracker
703 Text = '50% (square)' 702 Text = '50% (square)'
704 end 703 end
705 object SweepSizeTrackbar: TTrackBar 704 object SweepSizeTrackbar: TTrackBar
706 Left = 184 705 Left = 105
707 Height = 44 706 Height = 25
708 Top = 140 707 Top = 80
709 Width = 343 708 Width = 196
710 Max = 7 709 Max = 7
711 OnChange = SweepSizeSpinnerChange 710 OnChange = SweepSizeSpinnerChange
712 Position = 0 711 Position = 0
@@ -715,46 +714,45 @@ object frmTracker: TfrmTracker
715 end 714 end
716 end 715 end
717 object WaveGroupBox: TGroupBox 716 object WaveGroupBox: TGroupBox
718 Left = 594 717 Left = 340
719 Height = 296 718 Height = 169
720 Top = 400 719 Top = 229
721 Width = 520 720 Width = 297
722 Anchors = [] 721 Anchors = []
723 BorderSpacing.Left = 12 722 BorderSpacing.Left = 7
724 BorderSpacing.Top = 12 723 BorderSpacing.Top = 7
725 BorderSpacing.Right = 12 724 BorderSpacing.Right = 7
726 BorderSpacing.Bottom = 12 725 BorderSpacing.Bottom = 7
727 Caption = 'Wave' 726 Caption = 'Wave'
728 ClientHeight = 261 727 ClientHeight = 149
729 ClientWidth = 516 728 ClientWidth = 293
730 Enabled = False
731 ParentFont = False 729 ParentFont = False
732 TabOrder = 3 730 TabOrder = 3
733 object Label11: TLabel 731 object Label11: TLabel
734 Left = 14 732 Left = 8
735 Height = 30 733 Height = 15
736 Top = 28 734 Top = 16
737 Width = 70 735 Width = 40
738 Caption = 'Volume' 736 Caption = 'Volume'
739 ParentColor = False 737 ParentColor = False
740 ParentFont = False 738 ParentFont = False
741 end 739 end
742 object Label12: TLabel 740 object Label12: TLabel
743 Left = 14 741 Left = 8
744 Height = 30 742 Height = 15
745 Top = 84 743 Top = 48
746 Width = 95 744 Width = 55
747 Caption = 'Waveform' 745 Caption = 'Waveform'
748 ParentColor = False 746 ParentColor = False
749 ParentFont = False 747 ParentFont = False
750 end 748 end
751 object WaveformCombobox: TComboBox 749 object WaveformCombobox: TComboBox
752 Left = 182 750 Left = 104
753 Height = 38 751 Height = 23
754 Hint = 'Which waveform is associated with this instrument' 752 Hint = 'Which waveform is associated with this instrument'
755 Top = 70 753 Top = 40
756 Width = 308 754 Width = 176
757 ItemHeight = 30 755 ItemHeight = 15
758 ItemIndex = 0 756 ItemIndex = 0
759 Items.Strings = ( 757 Items.Strings = (
760 'Wave #0' 758 'Wave #0'
@@ -781,21 +779,21 @@ object frmTracker: TfrmTracker
781 Text = 'Wave #0' 779 Text = 'Wave #0'
782 end 780 end
783 object Panel4: TPanel 781 object Panel4: TPanel
784 Left = 14 782 Left = 8
785 Height = 103 783 Height = 59
786 Top = 140 784 Top = 80
787 Width = 476 785 Width = 272
788 BevelOuter = bvLowered 786 BevelOuter = bvLowered
789 ClientHeight = 103 787 ClientHeight = 59
790 ClientWidth = 476 788 ClientWidth = 272
791 ParentFont = False 789 ParentFont = False
792 TabOrder = 1 790 TabOrder = 1
793 object WavePaintbox: TPaintBox 791 object WavePaintbox: TPaintBox
794 Left = 1 792 Left = 1
795 Height = 101 793 Height = 57
796 Hint = 'Preview of the waveform associated with this instrument' 794 Hint = 'Preview of the waveform associated with this instrument'
797 Top = 1 795 Top = 1
798 Width = 474 796 Width = 270
799 Align = alClient 797 Align = alClient
800 Color = clBlack 798 Color = clBlack
801 ParentColor = False 799 ParentColor = False
@@ -804,12 +802,12 @@ object frmTracker: TfrmTracker
804 end 802 end
805 end 803 end
806 object WaveVolumeCombobox: TComboBox 804 object WaveVolumeCombobox: TComboBox
807 Left = 182 805 Left = 104
808 Height = 38 806 Height = 23
809 Hint = 'The initial volume of the wave' 807 Hint = 'The initial volume of the wave'
810 Top = 14 808 Top = 8
811 Width = 308 809 Width = 176
812 ItemHeight = 30 810 ItemHeight = 15
813 ItemIndex = 1 811 ItemIndex = 1
814 Items.Strings = ( 812 Items.Strings = (
815 'Mute (No sound)' 813 'Mute (No sound)'
@@ -825,27 +823,26 @@ object frmTracker: TfrmTracker
825 end 823 end
826 end 824 end
827 object NoiseGroupBox: TGroupBox 825 object NoiseGroupBox: TGroupBox
828 Left = 1138 826 Left = 651
829 Height = 296 827 Height = 169
830 Top = 400 828 Top = 229
831 Width = 462 829 Width = 264
832 Anchors = [] 830 Anchors = []
833 BorderSpacing.Left = 12 831 BorderSpacing.Left = 7
834 BorderSpacing.Top = 12 832 BorderSpacing.Top = 7
835 BorderSpacing.Right = 12 833 BorderSpacing.Right = 7
836 BorderSpacing.Bottom = 12 834 BorderSpacing.Bottom = 7
837 Caption = 'Noise' 835 Caption = 'Noise'
838 ClientHeight = 261 836 ClientHeight = 149
839 ClientWidth = 458 837 ClientWidth = 260
840 Enabled = False
841 ParentFont = False 838 ParentFont = False
842 TabOrder = 4 839 TabOrder = 4
843 object SevenBitCounterCheckbox: TCheckBox 840 object SevenBitCounterCheckbox: TCheckBox
844 Left = 14 841 Left = 8
845 Height = 34 842 Height = 19
846 Hint = 'Select LFSR width. When checked, output will sound like a tone rather than noise' 843 Hint = 'Select LFSR width. When checked, output will sound like a tone rather than noise'
847 Top = 140 844 Top = 80
848 Width = 373 845 Width = 215
849 Alignment = taLeftJustify 846 Alignment = taLeftJustify
850 Caption = '7 bit counter (more tone-like output)' 847 Caption = '7 bit counter (more tone-like output)'
851 OnChange = SevenBitCounterCheckboxChange 848 OnChange = SevenBitCounterCheckboxChange
@@ -853,39 +850,39 @@ object frmTracker: TfrmTracker
853 TabOrder = 0 850 TabOrder = 0
854 end 851 end
855 object Label14: TLabel 852 object Label14: TLabel
856 Left = 16 853 Left = 9
857 Height = 30 854 Height = 15
858 Top = 89 855 Top = 51
859 Width = 124 856 Width = 71
860 Caption = 'Dividing ratio' 857 Caption = 'Dividing ratio'
861 ParentColor = False 858 ParentColor = False
862 ParentFont = False 859 ParentFont = False
863 end 860 end
864 object RandomizeNoiseButton: TButton 861 object RandomizeNoiseButton: TButton
865 Left = 16 862 Left = 9
866 Height = 44 863 Height = 25
867 Hint = 'Randomize the noise instrument parameters to get a random drum-like sound' 864 Hint = 'Randomize the noise instrument parameters to get a random drum-like sound'
868 Top = 196 865 Top = 112
869 Width = 424 866 Width = 242
870 Caption = 'Randomize' 867 Caption = 'Randomize'
871 OnClick = RandomizeNoiseButtonClick 868 OnClick = RandomizeNoiseButtonClick
872 ParentFont = False 869 ParentFont = False
873 TabOrder = 1 870 TabOrder = 1
874 end 871 end
875 object Label25: TLabel 872 object Label25: TLabel
876 Left = 16 873 Left = 9
877 Height = 30 874 Height = 15
878 Top = 28 875 Top = 16
879 Width = 149 876 Width = 86
880 Caption = 'Shift clock mask' 877 Caption = 'Shift clock mask'
881 ParentColor = False 878 ParentColor = False
882 ParentFont = False 879 ParentFont = False
883 end 880 end
884 object ShiftClockTrackbar: TTrackBar 881 object ShiftClockTrackbar: TTrackBar
885 Left = 192 882 Left = 110
886 Height = 44 883 Height = 25
887 Top = 28 884 Top = 16
888 Width = 256 885 Width = 146
889 Max = 15 886 Max = 15
890 OnChange = ShiftClockSpinnerChange 887 OnChange = ShiftClockSpinnerChange
891 Position = 0 888 Position = 0
@@ -893,10 +890,10 @@ object frmTracker: TfrmTracker
893 TabOrder = 2 890 TabOrder = 2
894 end 891 end
895 object DivRatioTrackbar: TTrackBar 892 object DivRatioTrackbar: TTrackBar
896 Left = 192 893 Left = 110
897 Height = 44 894 Height = 25
898 Top = 89 895 Top = 51
899 Width = 256 896 Width = 146
900 Max = 7 897 Max = 7
901 OnChange = DivRatioSpinnerChange 898 OnChange = DivRatioSpinnerChange
902 Position = 0 899 Position = 0
@@ -920,7 +917,7 @@ object frmTracker: TfrmTracker
920 Width = 1685 917 Width = 1685
921 Align = alBottom 918 Align = alBottom
922 Anchors = [akTop, akLeft, akRight, akBottom] 919 Anchors = [akTop, akLeft, akRight, akBottom]
923 BorderSpacing.Top = 23 920 BorderSpacing.Top = 13
924 ParentFont = False 921 ParentFont = False
925 OnMouseDown = WaveEditPaintBoxMouseDown 922 OnMouseDown = WaveEditPaintBoxMouseDown
926 OnMouseMove = WaveEditPaintBoxMouseMove 923 OnMouseMove = WaveEditPaintBoxMouseMove
@@ -928,51 +925,51 @@ object frmTracker: TfrmTracker
928 OnPaint = WaveEditPaintBoxPaint 925 OnPaint = WaveEditPaintBoxPaint
929 end 926 end
930 object WaveEditGroupBox: TGroupBox 927 object WaveEditGroupBox: TGroupBox
931 Left = 14 928 Left = 8
932 Height = 243 929 Height = 139
933 Top = 14 930 Top = 8
934 Width = 303 931 Width = 173
935 Caption = 'Wave Editor' 932 Caption = 'Wave Editor'
936 ClientHeight = 208 933 ClientHeight = 119
937 ClientWidth = 299 934 ClientWidth = 169
938 ParentFont = False 935 ParentFont = False
939 TabOrder = 0 936 TabOrder = 0
940 object Label20: TLabel 937 object Label20: TLabel
941 Left = 28 938 Left = 16
942 Height = 30 939 Height = 30
943 Top = 28 940 Top = 16
944 Width = 51 941 Width = 51
945 Caption = 'Wave' 942 Caption = 'Wave'
946 ParentColor = False 943 ParentColor = False
947 ParentFont = False 944 ParentFont = False
948 end 945 end
949 object WaveEditNumberSpinner: TSpinEdit 946 object WaveEditNumberSpinner: TSpinEdit
950 Left = 112 947 Left = 64
951 Height = 38 948 Height = 38
952 Top = 14 949 Top = 8
953 Width = 140 950 Width = 80
954 MaxValue = 15 951 MaxValue = 15
955 OnChange = WaveEditNumberSpinnerChange 952 OnChange = WaveEditNumberSpinnerChange
956 ParentFont = False 953 ParentFont = False
957 TabOrder = 0 954 TabOrder = 0
958 end 955 end
959 object ImportWaveButton: TButton 956 object ImportWaveButton: TButton
960 Left = 28 957 Left = 16
961 Height = 44 958 Height = 25
962 Hint = 'Import a wave' 959 Hint = 'Import a wave'
963 Top = 84 960 Top = 48
964 Width = 257 961 Width = 147
965 Caption = 'Import' 962 Caption = 'Import'
966 OnClick = ImportWaveButtonClick 963 OnClick = ImportWaveButtonClick
967 ParentFont = False 964 ParentFont = False
968 TabOrder = 1 965 TabOrder = 1
969 end 966 end
970 object ExportWaveButton: TButton 967 object ExportWaveButton: TButton
971 Left = 28 968 Left = 16
972 Height = 44 969 Height = 25
973 Hint = 'Export a wave' 970 Hint = 'Export a wave'
974 Top = 140 971 Top = 80
975 Width = 257 972 Width = 147
976 Caption = 'Export' 973 Caption = 'Export'
977 OnClick = ExportWaveButtonClick 974 OnClick = ExportWaveButtonClick
978 ParentFont = False 975 ParentFont = False
@@ -995,16 +992,16 @@ object frmTracker: TfrmTracker
995 Width = 1685 992 Width = 1685
996 Align = alBottom 993 Align = alBottom
997 Anchors = [akTop, akLeft, akRight, akBottom] 994 Anchors = [akTop, akLeft, akRight, akBottom]
998 BorderSpacing.Top = 23 995 BorderSpacing.Top = 13
999 MaxLength = 255 996 MaxLength = 255
1000 OnChange = CommentMemoChange 997 OnChange = CommentMemoChange
1001 ParentFont = False 998 ParentFont = False
1002 TabOrder = 0 999 TabOrder = 0
1003 end 1000 end
1004 object Label17: TLabel 1001 object Label17: TLabel
1005 Left = 14 1002 Left = 8
1006 Height = 30 1003 Height = 30
1007 Top = 14 1004 Top = 8
1008 Width = 587 1005 Width = 587
1009 Caption = 'This is an area to write comments for anyone editing your tune.' 1006 Caption = 'This is an area to write comments for anyone editing your tune.'
1010 ParentColor = False 1007 ParentColor = False
@@ -1024,16 +1021,16 @@ object frmTracker: TfrmTracker
1024 Top = 243 1021 Top = 243
1025 Width = 1685 1022 Width = 1685
1026 Align = alBottom 1023 Align = alBottom
1027 BorderSpacing.Top = 23 1024 BorderSpacing.Top = 13
1028 Anchors = [akTop, akLeft, akRight, akBottom] 1025 Anchors = [akTop, akLeft, akRight, akBottom]
1029 Font.Height = -23 1026 Font.Height = -13
1030 Font.Name = 'Courier New' 1027 Font.Name = 'Courier New'
1031 Font.Pitch = fpFixed 1028 Font.Pitch = fpFixed
1032 Font.Quality = fqNonAntialiased 1029 Font.Quality = fqNonAntialiased
1033 ParentColor = False 1030 ParentColor = False
1034 ParentFont = False 1031 ParentFont = False
1035 TabOrder = 0 1032 TabOrder = 0
1036 Gutter.Width = 100 1033 Gutter.Width = 57
1037 Gutter.MouseActions = <> 1034 Gutter.MouseActions = <>
1038 RightGutter.Width = 0 1035 RightGutter.Width = 0
1039 RightGutter.MouseActions = <> 1036 RightGutter.MouseActions = <>
@@ -1487,11 +1484,11 @@ object frmTracker: TfrmTracker
1487 OnChange = RoutineSyneditChange 1484 OnChange = RoutineSyneditChange
1488 inline SynLeftGutterPartList1: TSynGutterPartList 1485 inline SynLeftGutterPartList1: TSynGutterPartList
1489 object SynGutterMarks1: TSynGutterMarks 1486 object SynGutterMarks1: TSynGutterMarks
1490 Width = 42 1487 Width = 24
1491 MouseActions = <> 1488 MouseActions = <>
1492 end 1489 end
1493 object SynGutterLineNumber1: TSynGutterLineNumber 1490 object SynGutterLineNumber1: TSynGutterLineNumber
1494 Width = 29 1491 Width = 17
1495 MouseActions = <> 1492 MouseActions = <>
1496 MarkupInfo.Background = clBtnFace 1493 MarkupInfo.Background = clBtnFace
1497 MarkupInfo.Foreground = clNone 1494 MarkupInfo.Foreground = clNone
@@ -1501,19 +1498,18 @@ object frmTracker: TfrmTracker
1501 LeadingZeros = False 1498 LeadingZeros = False
1502 end 1499 end
1503 object SynGutterChanges1: TSynGutterChanges 1500 object SynGutterChanges1: TSynGutterChanges
1504 Width = 7 1501 Width = 4
1505 MouseActions = <> 1502 MouseActions = <>
1506 ModifiedColor = 59900 1503 ModifiedColor = 59900
1507 SavedColor = clGreen 1504 SavedColor = clGreen
1508 end 1505 end
1509 object SynGutterSeparator1: TSynGutterSeparator 1506 object SynGutterSeparator1: TSynGutterSeparator
1510 Width = 4 1507 Width = 2
1511 MouseActions = <> 1508 MouseActions = <>
1512 MarkupInfo.Background = clWhite 1509 MarkupInfo.Background = clWhite
1513 MarkupInfo.Foreground = clGray 1510 MarkupInfo.Foreground = clGray
1514 end 1511 end
1515 object SynGutterCodeFolding1: TSynGutterCodeFolding 1512 object SynGutterCodeFolding1: TSynGutterCodeFolding
1516 Width = 18
1517 MouseActions = <> 1513 MouseActions = <>
1518 MarkupInfo.Background = clNone 1514 MarkupInfo.Background = clNone
1519 MarkupInfo.Foreground = clGray 1515 MarkupInfo.Foreground = clGray
@@ -1523,19 +1519,19 @@ object frmTracker: TfrmTracker
1523 end 1519 end
1524 end 1520 end
1525 object Label18: TLabel 1521 object Label18: TLabel
1526 Left = 14 1522 Left = 8
1527 Height = 30 1523 Height = 30
1528 Top = 28 1524 Top = 16
1529 Width = 71 1525 Width = 71
1530 Caption = 'Routine' 1526 Caption = 'Routine'
1531 ParentColor = False 1527 ParentColor = False
1532 ParentFont = False 1528 ParentFont = False
1533 end 1529 end
1534 object RoutineNumberSpinner: TSpinEdit 1530 object RoutineNumberSpinner: TSpinEdit
1535 Left = 112 1531 Left = 64
1536 Height = 38 1532 Height = 38
1537 Top = 14 1533 Top = 8
1538 Width = 308 1534 Width = 176
1539 MaxValue = 15 1535 MaxValue = 15
1540 MinValue = 1 1536 MinValue = 1
1541 OnChange = RoutineNumberSpinnerChange 1537 OnChange = RoutineNumberSpinnerChange
@@ -1544,9 +1540,9 @@ object frmTracker: TfrmTracker
1544 Value = 1 1540 Value = 1
1545 end 1541 end
1546 object Label19: TLabel 1542 object Label19: TLabel
1547 Left = 14 1543 Left = 8
1548 Height = 150 1544 Height = 150
1549 Top = 70 1545 Top = 40
1550 Width = 891 1546 Width = 891
1551 Caption = 'Routines are an advanced feature of hUGETracker, and you likely won''t need them at all'#13#10'if you are only interested in composing music. If you want to create a custom effect, or interface'#13#10'with game code that you''re writing a soundtrack for, then routines will come in handy.'#13#10#13#10'Refer to the user manual for more information!' 1547 Caption = 'Routines are an advanced feature of hUGETracker, and you likely won''t need them at all'#13#10'if you are only interested in composing music. If you want to create a custom effect, or interface'#13#10'with game code that you''re writing a soundtrack for, then routines will come in handy.'#13#10#13#10'Refer to the user manual for more information!'
1552 ParentColor = False 1548 ParentColor = False
@@ -1557,22 +1553,22 @@ object frmTracker: TfrmTracker
1557 end 1553 end
1558 object Panel2: TPanel 1554 object Panel2: TPanel
1559 Left = 0 1555 Left = 0
1560 Height = 312 1556 Height = 178
1561 Top = 41 1557 Top = 25
1562 Width = 2040 1558 Width = 1166
1563 Align = alTop 1559 Align = alTop
1564 BevelOuter = bvNone 1560 BevelOuter = bvNone
1565 ChildSizing.HorizontalSpacing = 10 1561 ChildSizing.HorizontalSpacing = 10
1566 ClientHeight = 312 1562 ClientHeight = 178
1567 ClientWidth = 2040 1563 ClientWidth = 1166
1568 ParentFont = False 1564 ParentFont = False
1569 TabOrder = 3 1565 TabOrder = 3
1570 object LEDMeter1: TLEDMeter 1566 object LEDMeter1: TLEDMeter
1571 AnchorSideRight.Side = asrBottom 1567 AnchorSideRight.Side = asrBottom
1572 Left = 1261 1568 Left = 721
1573 Height = 312 1569 Height = 178
1574 Top = 0 1570 Top = 0
1575 Width = 88 1571 Width = 50
1576 Anchors = [akTop, akRight] 1572 Anchors = [akTop, akRight]
1577 BevelStyle = bvLowered 1573 BevelStyle = bvLowered
1578 Colors.Border = clBlack 1574 Colors.Border = clBlack
@@ -1593,10 +1589,10 @@ object frmTracker: TfrmTracker
1593 end 1589 end
1594 object LEDMeter2: TLEDMeter 1590 object LEDMeter2: TLEDMeter
1595 AnchorSideRight.Side = asrBottom 1591 AnchorSideRight.Side = asrBottom
1596 Left = 1173 1592 Left = 671
1597 Height = 312 1593 Height = 178
1598 Top = 0 1594 Top = 0
1599 Width = 88 1595 Width = 50
1600 Anchors = [akTop, akRight] 1596 Anchors = [akTop, akRight]
1601 BevelStyle = bvLowered 1597 BevelStyle = bvLowered
1602 Colors.Border = clBlack 1598 Colors.Border = clBlack
@@ -1616,49 +1612,49 @@ object frmTracker: TfrmTracker
1616 Section3Value = 80 1612 Section3Value = 80
1617 end 1613 end
1618 object Panel6: TPanel 1614 object Panel6: TPanel
1619 Left = 1350 1615 Left = 772
1620 Height = 312 1616 Height = 178
1621 Top = 0 1617 Top = 0
1622 Width = 690 1618 Width = 394
1623 Align = alRight 1619 Align = alRight
1624 AutoSize = True 1620 AutoSize = True
1625 BevelOuter = bvNone 1621 BevelOuter = bvNone
1626 ClientHeight = 312 1622 ClientHeight = 178
1627 ClientWidth = 690 1623 ClientWidth = 394
1628 ParentFont = False 1624 ParentFont = False
1629 TabOrder = 0 1625 TabOrder = 0
1630 object Duty1Visualizer: TPaintBox 1626 object Duty1Visualizer: TPaintBox
1631 Left = 0 1627 Left = 0
1632 Height = 156 1628 Height = 89
1633 Top = 0 1629 Top = 0
1634 Width = 345 1630 Width = 197
1635 ParentFont = False 1631 ParentFont = False
1636 OnClick = Duty1VisualizerClick 1632 OnClick = Duty1VisualizerClick
1637 OnPaint = Duty1VisualizerPaint 1633 OnPaint = Duty1VisualizerPaint
1638 end 1634 end
1639 object Duty2Visualizer: TPaintBox 1635 object Duty2Visualizer: TPaintBox
1640 Left = 345 1636 Left = 197
1641 Height = 156 1637 Height = 89
1642 Top = 0 1638 Top = 0
1643 Width = 345 1639 Width = 197
1644 ParentFont = False 1640 ParentFont = False
1645 OnClick = Duty1VisualizerClick 1641 OnClick = Duty1VisualizerClick
1646 OnPaint = Duty2VisualizerPaint 1642 OnPaint = Duty2VisualizerPaint
1647 end 1643 end
1648 object WaveVisualizer: TPaintBox 1644 object WaveVisualizer: TPaintBox
1649 Left = 0 1645 Left = 0
1650 Height = 156 1646 Height = 89
1651 Top = 152 1647 Top = 87
1652 Width = 345 1648 Width = 197
1653 ParentFont = False 1649 ParentFont = False
1654 OnClick = Duty1VisualizerClick 1650 OnClick = Duty1VisualizerClick
1655 OnPaint = WaveVisualizerPaint 1651 OnPaint = WaveVisualizerPaint
1656 end 1652 end
1657 object NoiseVisualizer: TPaintBox 1653 object NoiseVisualizer: TPaintBox
1658 Left = 345 1654 Left = 197
1659 Height = 156 1655 Height = 89
1660 Top = 152 1656 Top = 87
1661 Width = 345 1657 Width = 197
1662 ParentFont = False 1658 ParentFont = False
1663 OnClick = Duty1VisualizerClick 1659 OnClick = Duty1VisualizerClick
1664 OnPaint = NoiseVisualizerPaint 1660 OnPaint = NoiseVisualizerPaint
@@ -1667,19 +1663,19 @@ object frmTracker: TfrmTracker
1667 end 1663 end
1668 object StatusBar1: TStatusBar 1664 object StatusBar1: TStatusBar
1669 Left = 0 1665 Left = 0
1670 Height = 43 1666 Height = 23
1671 Top = 1123 1667 Top = 643
1672 Width = 2040 1668 Width = 1166
1673 AutoHint = True 1669 AutoHint = True
1674 Panels = < 1670 Panels = <
1675 item 1671 item
1676 Width = 817 1672 Width = 467
1677 end 1673 end
1678 item 1674 item
1679 Width = 350 1675 Width = 200
1680 end 1676 end
1681 item 1677 item
1682 Width = 350 1678 Width = 200
1683 end> 1679 end>
1684 ParentFont = False 1680 ParentFont = False
1685 ParentShowHint = False 1681 ParentShowHint = False
@@ -1688,9 +1684,9 @@ object frmTracker: TfrmTracker
1688 end 1684 end
1689 object ToolBar1: TToolBar 1685 object ToolBar1: TToolBar
1690 Left = 0 1686 Left = 0
1691 Height = 41 1687 Height = 25
1692 Top = 0 1688 Top = 0
1693 Width = 2040 1689 Width = 1166
1694 AutoSize = True 1690 AutoSize = True
1695 Caption = 'ToolBar1' 1691 Caption = 'ToolBar1'
1696 EdgeBorders = [ebBottom] 1692 EdgeBorders = [ebBottom]
@@ -1707,7 +1703,7 @@ object frmTracker: TfrmTracker
1707 ParentShowHint = False 1703 ParentShowHint = False
1708 end 1704 end
1709 object PanicToolButton: TToolButton 1705 object PanicToolButton: TToolButton
1710 Left = 839 1706 Left = 551
1711 Hint = 'Stops all sound output' 1707 Hint = 'Stops all sound output'
1712 Top = 0 1708 Top = 0
1713 AutoSize = True 1709 AutoSize = True
@@ -1718,7 +1714,7 @@ object frmTracker: TfrmTracker
1718 ShowHint = True 1714 ShowHint = True
1719 end 1715 end
1720 object ToolButton2: TToolButton 1716 object ToolButton2: TToolButton
1721 Left = 217 1717 Left = 145
1722 Hint = 'Begin playback from the cursor' 1718 Hint = 'Begin playback from the cursor'
1723 Top = 0 1719 Top = 0
1724 Caption = '▶️ Cursor' 1720 Caption = '▶️ Cursor'
@@ -1726,7 +1722,7 @@ object frmTracker: TfrmTracker
1726 OnClick = ToolButton2Click 1722 OnClick = ToolButton2Click
1727 end 1723 end
1728 object ToolButton4: TToolButton 1724 object ToolButton4: TToolButton
1729 Left = 327 1725 Left = 219
1730 Hint = 'Stop playback' 1726 Hint = 'Stop playback'
1731 Top = 0 1727 Top = 0
1732 Caption = '⏹ Stop' 1728 Caption = '⏹ Stop'
@@ -1734,7 +1730,7 @@ object frmTracker: TfrmTracker
1734 OnClick = ToolButton4Click 1730 OnClick = ToolButton4Click
1735 end 1731 end
1736 object ExportGBButton: TToolButton 1732 object ExportGBButton: TToolButton
1737 Left = 434 1733 Left = 287
1738 Hint = 'Export the song as a standalone ROM' 1734 Hint = 'Export the song as a standalone ROM'
1739 Top = 0 1735 Top = 0
1740 AutoSize = True 1736 AutoSize = True
@@ -1743,69 +1739,69 @@ object frmTracker: TfrmTracker
1743 OnClick = ExportGBButtonClick 1739 OnClick = ExportGBButtonClick
1744 end 1740 end
1745 object ToolButton8: TToolButton 1741 object ToolButton8: TToolButton
1746 Left = 120 1742 Left = 79
1747 Height = 39 1743 Height = 22
1748 Top = 0 1744 Top = 0
1749 Caption = 'ToolButton8' 1745 Caption = 'ToolButton8'
1750 Style = tbsDivider 1746 Style = tbsDivider
1751 end 1747 end
1752 object ToolButton6: TToolButton 1748 object ToolButton6: TToolButton
1753 Left = 429 1749 Left = 284
1754 Height = 39 1750 Height = 22
1755 Top = 0 1751 Top = 0
1756 Caption = 'ToolButton6' 1752 Caption = 'ToolButton6'
1757 Style = tbsDivider 1753 Style = tbsDivider
1758 end 1754 end
1759 object ToolButton7: TToolButton 1755 object ToolButton7: TToolButton
1760 Left = 1809 1756 Left = 1113
1761 Height = 39 1757 Height = 22
1762 Top = 0 1758 Top = 0
1763 Caption = 'ToolButton7' 1759 Caption = 'ToolButton7'
1764 Style = tbsSeparator 1760 Style = tbsSeparator
1765 end 1761 end
1766 object OctaveSpinEdit: TSpinEdit 1762 object OctaveSpinEdit: TSpinEdit
1767 Left = 1000 1763 Left = 654
1768 Height = 38 1764 Height = 23
1769 Hint = 'The octave offset for entering new notes' 1765 Hint = 'The octave offset for entering new notes'
1770 Top = 0 1766 Top = 0
1771 Width = 158 1767 Width = 90
1772 MaxValue = 5 1768 MaxValue = 5
1773 OnChange = OctaveSpinEditChange 1769 OnChange = OctaveSpinEditChange
1774 ParentFont = False 1770 ParentFont = False
1775 TabOrder = 0 1771 TabOrder = 0
1776 end 1772 end
1777 object ToolButton9: TToolButton 1773 object ToolButton9: TToolButton
1778 Left = 915 1774 Left = 606
1779 Height = 39 1775 Height = 22
1780 Top = 0 1776 Top = 0
1781 Caption = 'ToolButton9' 1777 Caption = 'ToolButton9'
1782 Style = tbsSeparator 1778 Style = tbsSeparator
1783 end 1779 end
1784 object Label22: TLabel 1780 object Label22: TLabel
1785 Left = 923 1781 Left = 611
1786 Height = 30 1782 Height = 15
1787 Top = 0 1783 Top = 0
1788 Width = 77 1784 Width = 43
1789 Caption = 'Octave ' 1785 Caption = 'Octave '
1790 ParentColor = False 1786 ParentColor = False
1791 ParentFont = False 1787 ParentFont = False
1792 end 1788 end
1793 object Label23: TLabel 1789 object Label23: TLabel
1794 Left = 1158 1790 Left = 744
1795 Height = 30 1791 Height = 15
1796 Top = 0 1792 Top = 0
1797 Width = 125 1793 Width = 70
1798 Caption = ' Instrument ' 1794 Caption = ' Instrument '
1799 ParentColor = False 1795 ParentColor = False
1800 ParentFont = False 1796 ParentFont = False
1801 end 1797 end
1802 object InstrumentComboBox: TComboBox 1798 object InstrumentComboBox: TComboBox
1803 Left = 1283 1799 Left = 814
1804 Height = 38 1800 Height = 23
1805 Hint = 'The selected instrument for new notes' 1801 Hint = 'The selected instrument for new notes'
1806 Top = 0 1802 Top = 0
1807 Width = 374 1803 Width = 214
1808 ItemHeight = 30 1804 ItemHeight = 15
1809 ItemIndex = 0 1805 ItemIndex = 0
1810 Items.Strings = ( 1806 Items.Strings = (
1811 '(no instrument)' 1807 '(no instrument)'
@@ -1832,27 +1828,27 @@ object frmTracker: TfrmTracker
1832 Text = '(no instrument)' 1828 Text = '(no instrument)'
1833 end 1829 end
1834 object Label24: TLabel 1830 object Label24: TLabel
1835 Left = 1657 1831 Left = 1028
1836 Height = 30 1832 Height = 15
1837 Top = 0 1833 Top = 0
1838 Width = 64 1834 Width = 35
1839 Caption = ' Step ' 1835 Caption = ' Step '
1840 ParentColor = False 1836 ParentColor = False
1841 ParentFont = False 1837 ParentFont = False
1842 end 1838 end
1843 object StepSpinEdit: TSpinEdit 1839 object StepSpinEdit: TSpinEdit
1844 Left = 1721 1840 Left = 1063
1845 Height = 38 1841 Height = 23
1846 Hint = 'How many rows to step down after entering a new note' 1842 Hint = 'How many rows to step down after entering a new note'
1847 Top = 0 1843 Top = 0
1848 Width = 88 1844 Width = 50
1849 MaxValue = 63 1845 MaxValue = 63
1850 OnChange = StepSpinEditChange 1846 OnChange = StepSpinEditChange
1851 ParentFont = False 1847 ParentFont = False
1852 TabOrder = 2 1848 TabOrder = 2
1853 end 1849 end
1854 object ToolButton3: TToolButton 1850 object ToolButton3: TToolButton
1855 Left = 125 1851 Left = 82
1856 Hint = 'Begin playback from the cursor' 1852 Hint = 'Begin playback from the cursor'
1857 Top = 0 1853 Top = 0
1858 Caption = '▶️ Start' 1854 Caption = '▶️ Start'
@@ -1860,7 +1856,7 @@ object frmTracker: TfrmTracker
1860 OnClick = ToolButton3Click 1856 OnClick = ToolButton3Click
1861 end 1857 end
1862 object ExportGBSButton: TToolButton 1858 object ExportGBSButton: TToolButton
1863 Left = 556 1859 Left = 368
1864 Hint = 'Export the song as a GBS soundtrack' 1860 Hint = 'Export the song as a GBS soundtrack'
1865 Top = 0 1861 Top = 0
1866 Caption = 'Export .GBS' 1862 Caption = 'Export .GBS'
@@ -1868,14 +1864,14 @@ object frmTracker: TfrmTracker
1868 OnClick = ExportGBSButtonClick 1864 OnClick = ExportGBSButtonClick
1869 end 1865 end
1870 object ToolButton5: TToolButton 1866 object ToolButton5: TToolButton
1871 Left = 834 1867 Left = 548
1872 Height = 39 1868 Height = 22
1873 Top = 0 1869 Top = 0
1874 Caption = 'ToolButton5' 1870 Caption = 'ToolButton5'
1875 Style = tbsDivider 1871 Style = tbsDivider
1876 end 1872 end
1877 object ToolButton10: TToolButton 1873 object ToolButton10: TToolButton
1878 Left = 689 1874 Left = 455
1879 Hint = 'Export the song as WAV or MP3' 1875 Hint = 'Export the song as WAV or MP3'
1880 Top = 0 1876 Top = 0
1881 Caption = 'Render Song' 1877 Caption = 'Render Song'
@@ -1885,8 +1881,8 @@ object frmTracker: TfrmTracker
1885 end 1881 end
1886 object MainMenu1: TMainMenu 1882 object MainMenu1: TMainMenu
1887 Images = ImageList1 1883 Images = ImageList1
1888 left = 952 1884 left = 144
1889 top = 65 1885 top = 48
1890 object MenuItem1: TMenuItem 1886 object MenuItem1: TMenuItem
1891 Caption = 'File' 1887 Caption = 'File'
1892 object MenuItem33: TMenuItem 1888 object MenuItem33: TMenuItem
@@ -1975,12 +1971,11 @@ object frmTracker: TfrmTracker
1975 object MenuItem16: TMenuItem 1971 object MenuItem16: TMenuItem
1976 Caption = 'Tools' 1972 Caption = 'Tools'
1977 object MenuItem24: TMenuItem 1973 object MenuItem24: TMenuItem
1978 Caption = 'Remove unused patterns' 1974 Caption = 'Find unused elements of song'
1979 Enabled = False 1975 OnClick = MenuItem24Click
1980 end 1976 end
1981 object MenuItem23: TMenuItem 1977 object MenuItem23: TMenuItem
1982 Caption = 'Find problems in song' 1978 Caption = 'Find problems in song'
1983 Enabled = False
1984 end 1979 end
1985 end 1980 end
1986 object DebugPlayNoteButton: TMenuItem 1981 object DebugPlayNoteButton: TMenuItem
@@ -1996,8 +1991,8 @@ object frmTracker: TfrmTracker
1996 end 1991 end
1997 object ActionList1: TActionList 1992 object ActionList1: TActionList
1998 Images = ImageList1 1993 Images = ImageList1
1999 left = 1120 1994 left = 640
2000 top = 65 1995 top = 37
2001 object FileOpen1: TFileOpen 1996 object FileOpen1: TFileOpen
2002 Category = 'File' 1997 Category = 'File'
2003 Caption = '&Open ...' 1998 Caption = '&Open ...'
@@ -2101,8 +2096,8 @@ object frmTracker: TfrmTracker
2101 end 2096 end
2102 end 2097 end
2103 object ImageList1: TImageList 2098 object ImageList1: TImageList
2104 left = 536 2099 left = 306
2105 top = 72 2100 top = 41
2106 Bitmap = { 2101 Bitmap = {
2107 4C694E0000001000000010000000000000000000000000000000000000000000 2102 4C694E0000001000000010000000000000000000000000000000000000000000
2108 0000000000000000000000000000000000000000000000000000000000000000 2103 0000000000000000000000000000000000000000000000000000000000000000
@@ -4605,17 +4600,17 @@ object frmTracker: TfrmTracker
4605 end 4600 end
4606 object OpenDialog1: TOpenDialog 4601 object OpenDialog1: TOpenDialog
4607 Filter = 'hUGETracker Instruments|*.ugi' 4602 Filter = 'hUGETracker Instruments|*.ugi'
4608 left = 1008 4603 left = 576
4609 top = 168 4604 top = 96
4610 end 4605 end
4611 object InstrumentSaveDialog: TSaveDialog 4606 object InstrumentSaveDialog: TSaveDialog
4612 Filter = 'hUGETracker Instruments|*.ugi' 4607 Filter = 'hUGETracker Instruments|*.ugi'
4613 left = 865 4608 left = 494
4614 top = 72 4609 top = 41
4615 end 4610 end
4616 object OrderEditPopup: TPopupMenu 4611 object OrderEditPopup: TPopupMenu
4617 left = 641 4612 left = 366
4618 top = 81 4613 top = 46
4619 object MenuItem17: TMenuItem 4614 object MenuItem17: TMenuItem
4620 Caption = 'Insert new row' 4615 Caption = 'Insert new row'
4621 Hint = 'Insert a new row filled with brand new patterns' 4616 Hint = 'Insert a new row filled with brand new patterns'
@@ -4646,8 +4641,8 @@ object frmTracker: TfrmTracker
4646 object ImageList2: TImageList 4641 object ImageList2: TImageList
4647 Height = 32 4642 Height = 32
4648 Width = 32 4643 Width = 32
4649 left = 529 4644 left = 302
4650 top = 200 4645 top = 114
4651 Bitmap = { 4646 Bitmap = {
4652 4C69020000002000000020000000000000000000000000000000000000000000 4647 4C69020000002000000020000000000000000000000000000000000000000000
4653 0000000000000000000000000000000000000000000000000000000000000000 4648 0000000000000000000000000000000000000000000000000000000000000000
@@ -4912,33 +4907,33 @@ object frmTracker: TfrmTracker
4912 Enabled = False 4907 Enabled = False
4913 Interval = 200 4908 Interval = 200
4914 OnTimer = OscilloscopeUpdateTimerTimer 4909 OnTimer = OscilloscopeUpdateTimerTimer
4915 left = 760 4910 left = 434
4916 top = 72 4911 top = 41
4917 end 4912 end
4918 object GBSSaveDialog: TSaveDialog 4913 object GBSSaveDialog: TSaveDialog
4919 Filter = 'Gameboy Soundtrack|*.gbs' 4914 Filter = 'Gameboy Soundtrack|*.gbs'
4920 left = 1033 4915 left = 590
4921 top = 65 4916 top = 37
4922 end 4917 end
4923 object WaveSaveDialog: TSaveDialog 4918 object WaveSaveDialog: TSaveDialog
4924 Filter = 'hUGETracker Waves|*.ugw' 4919 Filter = 'hUGETracker Waves|*.ugw'
4925 left = 910 4920 left = 520
4926 top = 196 4921 top = 112
4927 end 4922 end
4928 object GBSaveDialog: TSaveDialog 4923 object GBSaveDialog: TSaveDialog
4929 Filter = 'Gameboy ROM|*.GB' 4924 Filter = 'Gameboy ROM|*.GB'
4930 left = 760 4925 left = 434
4931 top = 177 4926 top = 101
4932 end 4927 end
4933 object NoteHaltTimer: TTimer 4928 object NoteHaltTimer: TTimer
4934 Enabled = False 4929 Enabled = False
4935 OnTimer = NoteHaltTimerTimer 4930 OnTimer = NoteHaltTimerTimer
4936 left = 641 4931 left = 366
4937 top = 200 4932 top = 114
4938 end 4933 end
4939 object TrackerGridPopup: TPopupMenu 4934 object TrackerGridPopup: TPopupMenu
4940 left = 1120 4935 left = 640
4941 top = 159 4936 top = 91
4942 object TrackerPopupEditEffect: TMenuItem 4937 object TrackerPopupEditEffect: TMenuItem
4943 Caption = 'Edit effect ...' 4938 Caption = 'Edit effect ...'
4944 OnClick = TrackerPopupEditEffectClick 4939 OnClick = TrackerPopupEditEffectClick
@@ -5031,8 +5026,8 @@ object frmTracker: TfrmTracker
5031 object WavSaveDialog: TSaveDialog 5026 object WavSaveDialog: TSaveDialog
5032 DefaultExt = '.wav' 5027 DefaultExt = '.wav'
5033 Filter = 'Wave files|*.wav' 5028 Filter = 'Wave files|*.wav'
5034 left = 406 5029 left = 232
5035 top = 81 5030 top = 46
5036 end 5031 end
5037 object SynAnySyn1: TSynAnySyn 5032 object SynAnySyn1: TSynAnySyn
5038 Enabled = False 5033 Enabled = False
@@ -5156,7 +5151,7 @@ object frmTracker: TfrmTracker
5156 Entity = False 5151 Entity = False
5157 DollarVariables = False 5152 DollarVariables = False
5158 ActiveDot = False 5153 ActiveDot = False
5159 left = 400 5154 left = 229
5160 top = 200 5155 top = 114
5161 end 5156 end
5162 end 5157 end
Modifiedtracker.pas +63−27
@@ -1,7 +1,6 @@
1 unit Tracker; 1 unit Tracker;
2 2
3 {$mode objfpc}{$H+} 3 {$mode objfpc}{$H+}
4 {$WARN 4055 off : Conversion between ordinals and pointers is not portable}
5 interface 4 interface
6 5
7 uses 6 uses
@@ -256,6 +255,7 @@ type
256 procedure MenuItem21Click(Sender: TObject); 255 procedure MenuItem21Click(Sender: TObject);
257 procedure MenuItem22Click(Sender: TObject); 256 procedure MenuItem22Click(Sender: TObject);
258 procedure FontSizeToggleMenuItemClick(Sender: TObject); 257 procedure FontSizeToggleMenuItemClick(Sender: TObject);
258 procedure MenuItem24Click(Sender: TObject);
259 procedure MenuItem26Click(Sender: TObject); 259 procedure MenuItem26Click(Sender: TObject);
260 procedure MenuItem31Click(Sender: TObject); 260 procedure MenuItem31Click(Sender: TObject);
261 procedure MenuItem33Click(Sender: TObject); 261 procedure MenuItem33Click(Sender: TObject);
@@ -353,6 +353,7 @@ type
353 procedure ChangeToNoise; 353 procedure ChangeToNoise;
354 procedure LoadInstrument(Instr: Integer); 354 procedure LoadInstrument(Instr: Integer);
355 procedure LoadWave(Wave: Integer); 355 procedure LoadWave(Wave: Integer);
356 procedure LoadSong(Filename: String);
356 procedure ReloadPatterns; 357 procedure ReloadPatterns;
357 procedure CopyOrderGridToOrderMatrix; 358 procedure CopyOrderGridToOrderMatrix;
358 procedure CopyOrderMatrixToOrderGrid; 359 procedure CopyOrderMatrixToOrderGrid;
@@ -601,6 +602,23 @@ begin
601 WaveEditPaintBox.Invalidate; 602 WaveEditPaintBox.Invalidate;
602 end; 603 end;
603 604
605 procedure TfrmTracker.LoadSong(Filename: String);
606 var
607 Stream: TStream;
608 begin
609 DestroySong(Song);
610
611 stream := TFileStream.Create(FileName, fmOpenRead);
612 try
613 ReadSongFromStream(stream, Song);
614 finally
615 stream.Free;
616 end;
617 FileSaveAs1.Dialog.FileName := FileName;
618
619 UpdateUIAfterLoad;
620 end;
621
604 procedure TfrmTracker.ReloadPatterns; 622 procedure TfrmTracker.ReloadPatterns;
605 var 623 var
606 I: Integer; 624 I: Integer;
@@ -804,30 +822,30 @@ end;
804 822
805 procedure TfrmTracker.ChangeToSquare; 823 procedure TfrmTracker.ChangeToSquare;
806 begin 824 begin
807 EnvelopeGroupBox.Enabled := True; 825 EnvelopeGroupBox.Visible := True;
808 SquareGroupBox.Enabled := True; 826 SquareGroupBox.Visible := True;
809 WaveGroupBox.Enabled := False; 827 WaveGroupBox.Visible := False;
810 NoiseGroupBox.Enabled := False; 828 NoiseGroupBox.Visible := False;
811 829
812 LengthTrackbar.Max := 63; 830 LengthTrackbar.Max := 63;
813 end; 831 end;
814 832
815 procedure TfrmTracker.ChangeToWave; 833 procedure TfrmTracker.ChangeToWave;
816 begin 834 begin
817 EnvelopeGroupBox.Enabled := False; 835 EnvelopeGroupBox.Visible := False;
818 SquareGroupBox.Enabled := False; 836 SquareGroupBox.Visible := False;
819 WaveGroupBox.Enabled := True; 837 WaveGroupBox.Visible := True;
820 NoiseGroupBox.Enabled := False; 838 NoiseGroupBox.Visible := False;
821 839
822 LengthTrackbar.Max := 255; 840 LengthTrackbar.Max := 255;
823 end; 841 end;
824 842
825 procedure TfrmTracker.ChangeToNoise; 843 procedure TfrmTracker.ChangeToNoise;
826 begin 844 begin
827 EnvelopeGroupBox.Enabled := True; 845 EnvelopeGroupBox.Visible := True;
828 SquareGroupBox.Enabled := False; 846 SquareGroupBox.Visible := False;
829 WaveGroupBox.Enabled := False; 847 WaveGroupBox.Visible := False;
830 NoiseGroupBox.Enabled := True; 848 NoiseGroupBox.Visible := True;
831 849
832 LengthTrackbar.Max := 63; 850 LengthTrackbar.Max := 63;
833 end; 851 end;
@@ -1016,6 +1034,10 @@ begin
1016 DebugShiteButton.Visible := True; 1034 DebugShiteButton.Visible := True;
1017 DebugPlayNoteButton.Visible := True; 1035 DebugPlayNoteButton.Visible := True;
1018 {$endif} 1036 {$endif}
1037
1038 // If a command line param was passed, try to open it
1039 if FileExists(ParamStr(1)) and (ExtractFileExt(ParamStr(1)) = '.uge') then
1040 LoadSong(ParamStr(1));
1019 end; 1041 end;
1020 1042
1021 procedure TfrmTracker.FormKeyDown(Sender: TObject; var Key: Word; 1043 procedure TfrmTracker.FormKeyDown(Sender: TObject; var Key: Word;
@@ -1146,20 +1168,8 @@ begin
1146 end; 1168 end;
1147 1169
1148 procedure TfrmTracker.FileOpen1Accept(Sender: TObject); 1170 procedure TfrmTracker.FileOpen1Accept(Sender: TObject);
1149 var
1150 Stream: TStream;
1151 begin 1171 begin
1152 DestroySong(Song); 1172 LoadSong(FileOpen1.Dialog.FileName);
1153
1154 stream := TFileStream.Create(FileOpen1.Dialog.FileName, fmOpenRead);
1155 try
1156 ReadSongFromStream(stream, Song);
1157 finally
1158 stream.Free;
1159 end;
1160 FileSaveAs1.Dialog.FileName := FileOpen1.Dialog.FileName;
1161
1162 UpdateUIAfterLoad;
1163 end; 1173 end;
1164 1174
1165 procedure TfrmTracker.HeaderControl1MouseDown(Sender: TObject; 1175 procedure TfrmTracker.HeaderControl1MouseDown(Sender: TObject;
@@ -1347,7 +1357,9 @@ end;
1347 1357
1348 procedure TfrmTracker.DebugShiteButtonClick(Sender: TObject); 1358 procedure TfrmTracker.DebugShiteButtonClick(Sender: TObject);
1349 begin 1359 begin
1350 RenderSongToFile(Song, 'song'); 1360 // If a command line param was passed, try to open it
1361 if FileExists(ParamStr(0)) then
1362 LoadSong(ParamStr(0));
1351 end; 1363 end;
1352 1364
1353 procedure TfrmTracker.MenuItem10Click(Sender: TObject); 1365 procedure TfrmTracker.MenuItem10Click(Sender: TObject);
@@ -1454,6 +1466,30 @@ begin
1454 1466
1455 end; 1467 end;
1456 1468
1469 procedure TfrmTracker.MenuItem24Click(Sender: TObject);
1470 var
1471 Report: TSongUsageReport;
1472 begin
1473 Report := GetUsageReport(Song);
1474
1475 case MessageDlg('Usage report',
1476 Format('%d unused instruments'+LineEnding+
1477 '%d unused routines'+LineEnding+
1478 '%d unused patterns'+LineEnding+LineEnding+
1479 'Do you want to remove the unused patterns?',
1480 [INSTRUMENTS_COUNT - Report.UsedInstruments.Size,
1481 ROUTINES_COUNT - Report.UsedRoutines.size,
1482 Song.Patterns.Count - Report.UsedPatterns.Size]),
1483 mtInformation, [mbYes, mbNo], 0) of
1484 mrYes: begin
1485 // do shit
1486 end;
1487 mrNo: ;
1488 end;
1489
1490 FreeUsageReport(Report);
1491 end;
1492
1457 procedure TfrmTracker.MenuItem26Click(Sender: TObject); 1493 procedure TfrmTracker.MenuItem26Click(Sender: TObject);
1458 begin 1494 begin
1459 frmOptions.FontSizeSpinner.Value := TrackerGrid.FontSize; 1495 frmOptions.FontSizeSpinner.Value := TrackerGrid.FontSize;
Modifiedutils.pas +65−1
@@ -5,9 +5,18 @@ unit Utils;
5 interface 5 interface
6 6
7 uses 7 uses
8 Classes, SysUtils, Waves, HugeDatatypes, Constants; 8 Classes, SysUtils, Song, Waves, HugeDatatypes, Constants, gHashSet;
9 9
10 type 10 type
11
12 { TIntegerHash }
13
14 TIntegerHash = class
15 class function hash(I: Integer; N: Integer): Integer;
16 end;
17
18 TUsedMap = specialize THashSet<Integer, TIntegerHash>;
19
11 { TOrderMapHelper } 20 { TOrderMapHelper }
12 21
13 TOrderMapHelper = class helper for TPatternMap 22 TOrderMapHelper = class helper for TPatternMap
@@ -16,6 +25,14 @@ type
16 function MaxKey: Integer; 25 function MaxKey: Integer;
17 end; 26 end;
18 27
28 { TSongUsageReport }
29
30 TSongUsageReport = record
31 UsedInstruments: TUsedMap;
32 UsedRoutines: TUsedMap;
33 UsedPatterns: TUsedMap;
34 end;
35
19 function Lerp(v0, v1, t: Double): Double; 36 function Lerp(v0, v1, t: Double): Double;
20 function ConvertWaveform(Waveform: TWave): T4bitWave; 37 function ConvertWaveform(Waveform: TWave): T4bitWave;
21 procedure BlankPattern(Pat: PPattern); 38 procedure BlankPattern(Pat: PPattern);
@@ -23,8 +40,18 @@ procedure BlankCell(var Cell: TCell);
23 function EffectCodeToStr(Code: Integer; Params: TEffectParams): String; 40 function EffectCodeToStr(Code: Integer; Params: TEffectParams): String;
24 function EffectToExplanation(Code: Integer; Params: TEffectParams): String; 41 function EffectToExplanation(Code: Integer; Params: TEffectParams): String;
25 42
43 function GetUsageReport(Song: TSong): TSongUsageReport;
44 procedure FreeUsageReport(Report: TSongUsageReport);
45
26 implementation 46 implementation
27 47
48 { TIntegerHash }
49
50 class function TIntegerHash.hash(I: Integer; N: Integer): Integer;
51 begin
52 Result := I;
53 end;
54
28 { TOrderMapHelper } 55 { TOrderMapHelper }
29 56
30 function TOrderMapHelper.GetOrCreateNew(Key: Integer): PPattern; 57 function TOrderMapHelper.GetOrCreateNew(Key: Integer): PPattern;
@@ -117,5 +144,42 @@ begin
117 end; 144 end;
118 end; 145 end;
119 146
147 function GetUsageReport(Song: TSong): TSongUsageReport;
148 var
149 I, J, X, Y: Integer;
150 Pat: PPattern;
151 begin
152 Result.UsedPatterns := TUsedMap.Create;
153 Result.UsedInstruments := TUsedMap.Create;
154 Result.UsedRoutines := TUsedMap.Create;
155
156 for X := Low(Song.OrderMatrix) to High(Song.OrderMatrix) do
157 for Y := Low(Song.OrderMatrix[X]) to High(Song.OrderMatrix[X]) do begin
158 Writeln(X, ' ', Y, ' ', Song.OrderMatrix[X, Y]);
159 Result.UsedPatterns.insert(Song.OrderMatrix[X, Y]);
160 end;
161
162 for I := 0 to Song.Patterns.Count-1 do begin
163 if not Result.UsedPatterns.contains(Song.Patterns.Keys[I])
164 then Continue;
165
166 Pat := Song.Patterns[Song.Patterns.Keys[I]];
167
168 for J := Low(Pat^) to High(Pat^) do
169 with Pat^[J] do begin
170 Result.UsedInstruments.insert(Instrument);
171 if EffectCode = $6 then // Call routine
172 Result.UsedRoutines.insert(EffectParams.Value);
173 end;
174 end;
175 end;
176
177 procedure FreeUsageReport(Report: TSongUsageReport);
178 begin
179 Report.UsedPatterns.Free;
180 Report.UsedInstruments.Free;
181 Report.UsedRoutines.Free;
182 end;
183
120 end. 184 end.
121 185