Commit ed717d1

Nick committed on
Refactor codegen to use exceptions
commit ed717d127148110a4116938cc3422f518962fbbc parent b6befbe
3 changed files +503−443
Modifiedcodegen.pas +22−12
@@ -9,13 +9,20 @@ uses
9 HugeDatatypes, Constants, Dialogs, strutils, FileUtil, LazFileUtils, process; 9 HugeDatatypes, Constants, Dialogs, strutils, FileUtil, LazFileUtils, process;
10 10
11 type 11 type
12 EAssemblyException = class(Exception); 12
13 ECodegenRenameError = class(Exception); 13 { EAssemblyException }
14
15 EAssemblyException = class(Exception)
16 public
17 ProgramName: String;
18 constructor Create(Prog, Msg: String);
19 end;
20
21 ECodegenRenameException = class(Exception);
14 22
15 TExportMode = (emNormal, emPreview, emGBS); 23 TExportMode = (emNormal, emPreview, emGBS);
16 24
17 procedure RenderPreviewRom(Song: TSong); 25 procedure AssembleSong(Song: TSong; Filename: string; Mode: TExportMode = emNormal);
18 procedure RenderSongToFile(Song: TSong; Filename: string; Mode: TExportMode = emNormal);
19 procedure RenderSongToGBDKC(Song: TSong; DescriptorName: String; Filename: string); 26 procedure RenderSongToGBDKC(Song: TSong; DescriptorName: String; Filename: string);
20 procedure RenderSongToRGBDSAsm(Song: TSong; DescriptorName: String; Filename: string); 27 procedure RenderSongToRGBDSAsm(Song: TSong; DescriptorName: String; Filename: string);
21 28
@@ -427,12 +434,7 @@ begin
427 Stream.Free; 434 Stream.Free;
428 end; 435 end;
429 436
430 procedure RenderPreviewROM(Song: TSong); 437 procedure AssembleSong(Song: TSong; Filename: String; Mode: TExportMode = emNormal);
431 begin
432 RenderSongToFile(Song, 'preview.gb', emPreview);
433 end;
434
435 procedure RenderSongToFile(Song: TSong; Filename: String; Mode: TExportMode = emNormal);
436 var 438 var
437 OutFile: Text; 439 OutFile: Text;
438 I: integer; 440 I: integer;
@@ -447,7 +449,7 @@ var
447 OutSL := TStringList.Create; 449 OutSL := TStringList.Create;
448 try 450 try
449 OutSL.LoadFromStream(Proc.Output); 451 OutSL.LoadFromStream(Proc.Output);
450 raise EAssemblyException.Create(OutSL.Text); 452 raise EAssemblyException.Create(Proc.Executable, OutSL.Text);
451 finally 453 finally
452 OutSL.Free; 454 OutSL.Free;
453 end; 455 end;
@@ -611,7 +613,7 @@ begin
611 end; 613 end;
612 614
613 if not RenameSucceeded then 615 if not RenameSucceeded then
614 raise ECodegenRenameError.Create(FilePath); 616 raise ECodegenRenameException.Create(FilePath);
615 617
616 {$ifdef DEVELOPMENT} 618 {$ifdef DEVELOPMENT}
617 RenameFile(Filename + '.sym', FilePath + '.sym'); 619 RenameFile(Filename + '.sym', FilePath + '.sym');
@@ -662,4 +664,12 @@ begin
662 end;} 664 end;}
663 end; 665 end;
664 666
667 { EAssemblyException }
668
669 constructor EAssemblyException.Create(Prog, Msg: String);
670 begin
671 inherited Create(Msg);
672 Self.ProgramName := Prog;
673 end;
674
665 end. 675 end.
Modifiedtracker.lfm +428−426
@@ -1,12 +1,13 @@
1 object frmTracker: TfrmTracker 1 object frmTracker: TfrmTracker
2 Left = 1559 2 Left = 1038
3 Height = 653 3 Height = 1143
4 Top = 196 4 Top = 285
5 Width = 1232 5 Width = 2156
6 AllowDropFiles = True 6 AllowDropFiles = True
7 Caption = 'hUGETracker' 7 Caption = 'hUGETracker'
8 ClientHeight = 633 8 ClientHeight = 1109
9 ClientWidth = 1232 9 ClientWidth = 2156
10 DesignTimePPI = 168
10 KeyPreview = True 11 KeyPreview = True
11 Menu = MainMenu1 12 Menu = MainMenu1
12 OnCloseQuery = FormCloseQuery 13 OnCloseQuery = FormCloseQuery
@@ -20,9 +21,9 @@ object frmTracker: TfrmTracker
20 LCLVersion = '2.0.9.0' 21 LCLVersion = '2.0.9.0'
21 object TreeView1: TTreeView 22 object TreeView1: TTreeView
22 Left = 0 23 Left = 0
23 Height = 521 24 Height = 913
24 Top = 89 25 Top = 153
25 Width = 193 26 Width = 338
26 Align = alLeft 27 Align = alLeft
27 ParentFont = False 28 ParentFont = False
28 ReadOnly = True 29 ReadOnly = True
@@ -40,27 +41,27 @@ object frmTracker: TfrmTracker
40 } 41 }
41 end 42 end
42 object Splitter1: TSplitter 43 object Splitter1: TSplitter
43 Left = 193 44 Left = 338
44 Height = 521 45 Height = 913
45 Top = 89 46 Top = 153
46 Width = 5 47 Width = 9
47 end 48 end
48 object Panel1: TPanel 49 object Panel1: TPanel
49 Left = 198 50 Left = 347
50 Height = 521 51 Height = 913
51 Top = 89 52 Top = 153
52 Width = 1034 53 Width = 1809
53 Align = alClient 54 Align = alClient
54 BevelOuter = bvNone 55 BevelOuter = bvNone
55 ClientHeight = 521 56 ClientHeight = 913
56 ClientWidth = 1034 57 ClientWidth = 1809
57 ParentFont = False 58 ParentFont = False
58 TabOrder = 2 59 TabOrder = 2
59 object PageControl1: TPageControl 60 object PageControl1: TPageControl
60 Left = 0 61 Left = 0
61 Height = 521 62 Height = 913
62 Top = 0 63 Top = 0
63 Width = 1034 64 Width = 1809
64 ActivePage = InstrumentTabSheet 65 ActivePage = InstrumentTabSheet
65 Align = alClient 66 Align = alClient
66 ParentFont = False 67 ParentFont = False
@@ -72,68 +73,68 @@ object frmTracker: TfrmTracker
72 ClientWidth = 1063 73 ClientWidth = 1063
73 ParentFont = False 74 ParentFont = False
74 object SongInformationGroupbox: TGroupBox 75 object SongInformationGroupbox: TGroupBox
75 Left = 8 76 Left = 14
76 Height = 136 77 Height = 238
77 Top = 8 78 Top = 14
78 Width = 305 79 Width = 534
79 Caption = 'Song information' 80 Caption = 'Song information'
80 ClientHeight = 116 81 ClientHeight = 203
81 ClientWidth = 301 82 ClientWidth = 530
82 ParentFont = False 83 ParentFont = False
83 TabOrder = 0 84 TabOrder = 0
84 object Label15: TLabel 85 object Label15: TLabel
85 Left = 8 86 Left = 14
86 Height = 15 87 Height = 15
87 Top = 16 88 Top = 28
88 Width = 27 89 Width = 27
89 Caption = 'Song' 90 Caption = 'Song'
90 ParentColor = False 91 ParentColor = False
91 ParentFont = False 92 ParentFont = False
92 end 93 end
93 object Label16: TLabel 94 object Label16: TLabel
94 Left = 7 95 Left = 12
95 Height = 15 96 Height = 15
96 Top = 48 97 Top = 84
97 Width = 28 98 Width = 28
98 Caption = 'Artist' 99 Caption = 'Artist'
99 ParentColor = False 100 ParentColor = False
100 ParentFont = False 101 ParentFont = False
101 end 102 end
102 object SongEdit: TEdit 103 object SongEdit: TEdit
103 Left = 56 104 Left = 98
104 Height = 23 105 Height = 23
105 Hint = 'The name of your composition' 106 Hint = 'The name of your composition'
106 Top = 8 107 Top = 14
107 Width = 216 108 Width = 378
108 OnChange = SongEditChange 109 OnChange = SongEditChange
109 ParentFont = False 110 ParentFont = False
110 TabOrder = 0 111 TabOrder = 0
111 end 112 end
112 object ArtistEdit: TEdit 113 object ArtistEdit: TEdit
113 Left = 56 114 Left = 98
114 Height = 23 115 Height = 23
115 Hint = 'Your name or handle' 116 Hint = 'Your name or handle'
116 Top = 40 117 Top = 70
117 Width = 216 118 Width = 378
118 OnChange = ArtistEditChange 119 OnChange = ArtistEditChange
119 ParentFont = False 120 ParentFont = False
120 TabOrder = 1 121 TabOrder = 1
121 end 122 end
122 object Label21: TLabel 123 object Label21: TLabel
123 Left = 8 124 Left = 14
124 Height = 15 125 Height = 15
125 Top = 78 126 Top = 136
126 Width = 114 127 Width = 114
127 Caption = 'Tempo (ticks per row)' 128 Caption = 'Tempo (ticks per row)'
128 ParentColor = False 129 ParentColor = False
129 ParentFont = False 130 ParentFont = False
130 end 131 end
131 object TicksPerRowSpinEdit: TSpinEdit 132 object TicksPerRowSpinEdit: TSpinEdit
132 Left = 133 133 Left = 233
133 Height = 23 134 Height = 23
134 Hint = 'How many ticks should happen before the row changes. Higher means slower' 135 Hint = 'How many ticks should happen before the row changes. Higher means slower'
135 Top = 73 136 Top = 128
136 Width = 50 137 Width = 88
137 MaxValue = 20 138 MaxValue = 20
138 MinValue = 1 139 MinValue = 1
139 OnChange = TicksPerRowSpinEditChange 140 OnChange = TicksPerRowSpinEditChange
@@ -160,7 +161,7 @@ object frmTracker: TfrmTracker
160 TabOrder = 0 161 TabOrder = 0
161 object HeaderControl1: THeaderControl 162 object HeaderControl1: THeaderControl
162 Left = 1 163 Left = 1
163 Height = 30 164 Height = 52
164 Hint = 'Left click to mute, right click to solo' 165 Hint = 'Left click to mute, right click to solo'
165 Top = 1 166 Top = 1
166 Width = 1407 167 Width = 1407
@@ -169,35 +170,35 @@ object frmTracker: TfrmTracker
169 Sections = < 170 Sections = <
170 item 171 item
171 Alignment = taLeftJustify 172 Alignment = taLeftJustify
172 Width = 32 173 Width = 56
173 Visible = True 174 Visible = True
174 end 175 end
175 item 176 item
176 Alignment = taCenter 177 Alignment = taCenter
177 ImageIndex = 1 178 ImageIndex = 1
178 Text = 'Duty 1' 179 Text = 'Duty 1'
179 Width = 133 180 Width = 233
180 Visible = True 181 Visible = True
181 end 182 end
182 item 183 item
183 Alignment = taCenter 184 Alignment = taCenter
184 ImageIndex = 1 185 ImageIndex = 1
185 Text = 'Duty 2' 186 Text = 'Duty 2'
186 Width = 133 187 Width = 233
187 Visible = True 188 Visible = True
188 end 189 end
189 item 190 item
190 Alignment = taCenter 191 Alignment = taCenter
191 ImageIndex = 1 192 ImageIndex = 1
192 Text = 'Wave' 193 Text = 'Wave'
193 Width = 133 194 Width = 233
194 Visible = True 195 Visible = True
195 end 196 end
196 item 197 item
197 Alignment = taCenter 198 Alignment = taCenter
198 ImageIndex = 1 199 ImageIndex = 1
199 Text = 'Noise' 200 Text = 'Noise'
200 Width = 133 201 Width = 233
201 Visible = True 202 Visible = True
202 end> 203 end>
203 OnSectionClick = HeaderControl1SectionClick 204 OnSectionClick = HeaderControl1SectionClick
@@ -231,11 +232,11 @@ object frmTracker: TfrmTracker
231 Left = 0 232 Left = 0
232 Height = 815 233 Height = 815
233 Top = 0 234 Top = 0
234 Width = 32 235 Width = 56
235 Align = alLeft 236 Align = alLeft
236 BorderStyle = bsNone 237 BorderStyle = bsNone
237 ColCount = 1 238 ColCount = 1
238 DefaultColWidth = 32 239 DefaultColWidth = 56
239 Enabled = False 240 Enabled = False
240 ParentFont = False 241 ParentFont = False
241 RowCount = 64 242 RowCount = 64
@@ -248,41 +249,41 @@ object frmTracker: TfrmTracker
248 Left = 0 249 Left = 0
249 Height = 869 250 Height = 869
250 Top = 0 251 Top = 0
251 Width = 224 252 Width = 392
252 Align = alLeft 253 Align = alLeft
253 AutoEdit = False 254 AutoEdit = False
254 AutoFillColumns = True 255 AutoFillColumns = True
255 Columns = < 256 Columns = <
256 item 257 item
257 Alignment = taCenter 258 Alignment = taCenter
258 MinSize = 33 259 MinSize = 58
259 MaxSize = 33 260 MaxSize = 58
260 Title.Caption = 'Dty1' 261 Title.Caption = 'Dty1'
261 Width = 34 262 Width = 61
262 end 263 end
263 item 264 item
264 Alignment = taCenter 265 Alignment = taCenter
265 MinSize = 33 266 MinSize = 58
266 MaxSize = 33 267 MaxSize = 58
267 Title.Caption = 'Dty2' 268 Title.Caption = 'Dty2'
268 Width = 34 269 Width = 61
269 end 270 end
270 item 271 item
271 Alignment = taCenter 272 Alignment = taCenter
272 MinSize = 33 273 MinSize = 58
273 MaxSize = 33 274 MaxSize = 58
274 Title.Caption = 'Wav' 275 Title.Caption = 'Wav'
275 Width = 34 276 Width = 61
276 end 277 end
277 item 278 item
278 Alignment = taCenter 279 Alignment = taCenter
279 MinSize = 33 280 MinSize = 58
280 MaxSize = 33 281 MaxSize = 58
281 Title.Caption = 'Nse' 282 Title.Caption = 'Nse'
282 Width = 37 283 Width = 63
283 end> 284 end>
284 DefaultColWidth = 17 285 DefaultColWidth = 30
285 DefaultRowHeight = 21 286 DefaultRowHeight = 37
286 ExtendedSelect = False 287 ExtendedSelect = False
287 Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goRangeSelect, goRowMoving, goEditing, goTabs, goSmoothScroll, goFixedRowNumbering, goRowHighlight] 288 Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goRangeSelect, goRowMoving, goEditing, goTabs, goSmoothScroll, goFixedRowNumbering, goRowHighlight]
288 ParentFont = False 289 ParentFont = False
@@ -302,18 +303,18 @@ object frmTracker: TfrmTracker
302 OnKeyDown = OrderEditStringGridKeyDown 303 OnKeyDown = OrderEditStringGridKeyDown
303 OnValidateEntry = OrderEditStringGridValidateEntry 304 OnValidateEntry = OrderEditStringGridValidateEntry
304 ColWidths = ( 305 ColWidths = (
305 64 306 112
306 34 307 61
307 34 308 61
308 34 309 61
309 37 310 63
310 ) 311 )
311 end 312 end
312 end 313 end
313 object InstrumentTabSheet: TTabSheet 314 object InstrumentTabSheet: TTabSheet
314 Caption = 'Instruments' 315 Caption = 'Instruments'
315 ClientHeight = 493 316 ClientHeight = 870
316 ClientWidth = 1026 317 ClientWidth = 1801
317 ParentFont = False 318 ParentFont = False
318 object PaintBox1: TPaintBox 319 object PaintBox1: TPaintBox
319 AnchorSideTop.Control = FlowPanel1 320 AnchorSideTop.Control = FlowPanel1
@@ -322,8 +323,8 @@ object frmTracker: TfrmTracker
322 Left = 0 323 Left = 0
323 Height = 0 324 Height = 0
324 Hint = 'Preview of how the resulting waveform will look with envelope applied' 325 Hint = 'Preview of how the resulting waveform will look with envelope applied'
325 Top = 493 326 Top = 870
326 Width = 1026 327 Width = 1801
327 Align = alClient 328 Align = alClient
328 Color = clBlack 329 Color = clBlack
329 ParentColor = False 330 ParentColor = False
@@ -333,9 +334,9 @@ object frmTracker: TfrmTracker
333 end 334 end
334 object FlowPanel1: TFlowPanel 335 object FlowPanel1: TFlowPanel
335 Left = 0 336 Left = 0
336 Height = 675 337 Height = 1180
337 Top = 0 338 Top = 0
338 Width = 1026 339 Width = 1801
339 Align = alTop 340 Align = alTop
340 AutoSize = True 341 AutoSize = True
341 BevelOuter = bvNone 342 BevelOuter = bvNone
@@ -370,26 +371,26 @@ object frmTracker: TfrmTracker
370 ParentFont = False 371 ParentFont = False
371 TabOrder = 0 372 TabOrder = 0
372 object InstrumentGroupBox: TGroupBox 373 object InstrumentGroupBox: TGroupBox
373 Left = 7 374 Left = 12
374 Height = 241 375 Height = 422
375 Top = 7 376 Top = 12
376 Width = 271 377 Width = 474
377 Anchors = [] 378 Anchors = []
378 BorderSpacing.Left = 7 379 BorderSpacing.Left = 12
379 BorderSpacing.Top = 7 380 BorderSpacing.Top = 12
380 BorderSpacing.Right = 7 381 BorderSpacing.Right = 12
381 BorderSpacing.Bottom = 7 382 BorderSpacing.Bottom = 12
382 Caption = 'Instrument' 383 Caption = 'Instrument'
383 ClientHeight = 221 384 ClientHeight = 387
384 ClientWidth = 267 385 ClientWidth = 470
385 ParentFont = False 386 ParentFont = False
386 TabOrder = 0 387 TabOrder = 0
387 object InstrumentNumberSpinner: TSpinEdit 388 object InstrumentNumberSpinner: TSpinEdit
388 Left = 80 389 Left = 140
389 Height = 23 390 Height = 38
390 Hint = 'What instrument to edit' 391 Hint = 'What instrument to edit'
391 Top = 38 392 Top = 66
392 Width = 176 393 Width = 308
393 MaxValue = 15 394 MaxValue = 15
394 MinValue = 1 395 MinValue = 1
395 OnChange = InstrumentNumberSpinnerChange 396 OnChange = InstrumentNumberSpinnerChange
@@ -398,50 +399,50 @@ object frmTracker: TfrmTracker
398 Value = 1 399 Value = 1
399 end 400 end
400 object Label1: TLabel 401 object Label1: TLabel
401 Left = 8 402 Left = 14
402 Height = 15 403 Height = 30
403 Top = 46 404 Top = 80
404 Width = 58 405 Width = 101
405 Caption = 'Instrument' 406 Caption = 'Instrument'
406 ParentColor = False 407 ParentColor = False
407 ParentFont = False 408 ParentFont = False
408 end 409 end
409 object Label2: TLabel 410 object Label2: TLabel
410 Left = 8 411 Left = 14
411 Height = 15 412 Height = 30
412 Top = 78 413 Top = 136
413 Width = 32 414 Width = 56
414 Caption = 'Name' 415 Caption = 'Name'
415 ParentColor = False 416 ParentColor = False
416 ParentFont = False 417 ParentFont = False
417 end 418 end
418 object InstrumentNameEdit: TEdit 419 object InstrumentNameEdit: TEdit
419 Left = 80 420 Left = 140
420 Height = 23 421 Height = 38
421 Hint = 'The name of the instrument' 422 Hint = 'The name of the instrument'
422 Top = 70 423 Top = 122
423 Width = 176 424 Width = 308
424 OnChange = InstrumentNameEditChange 425 OnChange = InstrumentNameEditChange
425 ParentFont = False 426 ParentFont = False
426 TabOrder = 1 427 TabOrder = 1
427 end 428 end
428 object Label3: TLabel 429 object Label3: TLabel
429 Left = 8 430 Left = 14
430 Height = 15 431 Height = 30
431 Top = 16 432 Top = 28
432 Width = 44 433 Width = 80
433 Caption = 'Channel' 434 Caption = 'Channel'
434 Font.Style = [fsBold] 435 Font.Style = [fsBold]
435 ParentColor = False 436 ParentColor = False
436 ParentFont = False 437 ParentFont = False
437 end 438 end
438 object InstrumentTypeCombobox: TComboBox 439 object InstrumentTypeCombobox: TComboBox
439 Left = 78 440 Left = 136
440 Height = 23 441 Height = 38
441 Hint = 'What type of channel this instrument will be played on' 442 Hint = 'What type of channel this instrument will be played on'
442 Top = 8 443 Top = 14
443 Width = 178 444 Width = 312
444 ItemHeight = 15 445 ItemHeight = 30
445 ItemIndex = 0 446 ItemIndex = 0
446 Items.Strings = ( 447 Items.Strings = (
447 'Square' 448 'Square'
@@ -455,52 +456,52 @@ object frmTracker: TfrmTracker
455 Text = 'Square' 456 Text = 'Square'
456 end 457 end
457 object LengthEnabledCheckbox: TCheckBox 458 object LengthEnabledCheckbox: TCheckBox
458 Left = 12 459 Left = 21
459 Height = 19 460 Height = 34
460 Hint = 'Cut the sound after a certain length of time' 461 Hint = 'Cut the sound after a certain length of time'
461 Top = 118 462 Top = 206
462 Width = 57 463 Width = 98
463 Caption = 'Length' 464 Caption = 'Length'
464 OnChange = LengthEnabledCheckboxChange 465 OnChange = LengthEnabledCheckboxChange
465 ParentFont = False 466 ParentFont = False
466 TabOrder = 3 467 TabOrder = 3
467 end 468 end
468 object InstrumentImportButton: TButton 469 object InstrumentImportButton: TButton
469 Left = 12 470 Left = 21
470 Height = 25 471 Height = 44
471 Top = 184 472 Top = 322
472 Width = 116 473 Width = 203
473 Caption = 'Import' 474 Caption = 'Import'
474 OnClick = InstrumentImportButtonClick 475 OnClick = InstrumentImportButtonClick
475 ParentFont = False 476 ParentFont = False
476 TabOrder = 4 477 TabOrder = 4
477 end 478 end
478 object InstrumentExportButton: TButton 479 object InstrumentExportButton: TButton
479 Left = 138 480 Left = 242
480 Height = 25 481 Height = 44
481 Top = 184 482 Top = 322
482 Width = 116 483 Width = 203
483 Caption = 'Export' 484 Caption = 'Export'
484 OnClick = InstrumentExportButtonClick 485 OnClick = InstrumentExportButtonClick
485 ParentFont = False 486 ParentFont = False
486 TabOrder = 5 487 TabOrder = 5
487 end 488 end
488 object Button1: TButton 489 object Button1: TButton
489 Left = 12 490 Left = 21
490 Height = 25 491 Height = 44
491 Hint = 'Test out the instrument with a C-5 note' 492 Hint = 'Test out the instrument with a C-5 note'
492 Top = 152 493 Top = 266
493 Width = 242 494 Width = 424
494 Caption = 'Test C-5' 495 Caption = 'Test C-5'
495 OnClick = Button1Click 496 OnClick = Button1Click
496 ParentFont = False 497 ParentFont = False
497 TabOrder = 6 498 TabOrder = 6
498 end 499 end
499 object LengthTrackbar: TTrackBar 500 object LengthTrackbar: TTrackBar
500 Left = 76 501 Left = 133
501 Height = 25 502 Height = 44
502 Top = 112 503 Top = 196
503 Width = 178 504 Width = 312
504 Max = 63 505 Max = 63
505 OnChange = LengthSpinnerChange 506 OnChange = LengthSpinnerChange
506 Position = 0 507 Position = 0
@@ -510,45 +511,45 @@ object frmTracker: TfrmTracker
510 end 511 end
511 end 512 end
512 object EnvelopeGroupBox: TGroupBox 513 object EnvelopeGroupBox: TGroupBox
513 Left = 292 514 Left = 510
514 Height = 136 515 Height = 238
515 Top = 7 516 Top = 12
516 Width = 582 517 Width = 1018
517 Anchors = [] 518 Anchors = []
518 BorderSpacing.Left = 7 519 BorderSpacing.Left = 12
519 BorderSpacing.Top = 7 520 BorderSpacing.Top = 12
520 BorderSpacing.Right = 7 521 BorderSpacing.Right = 12
521 BorderSpacing.Bottom = 7 522 BorderSpacing.Bottom = 12
522 Caption = 'Envelope' 523 Caption = 'Envelope'
523 ClientHeight = 116 524 ClientHeight = 203
524 ClientWidth = 578 525 ClientWidth = 1014
525 ParentFont = False 526 ParentFont = False
526 TabOrder = 1 527 TabOrder = 1
527 object Label4: TLabel 528 object Label4: TLabel
528 Left = 8 529 Left = 14
529 Height = 15 530 Height = 30
530 Top = 9 531 Top = 16
531 Width = 46 532 Width = 80
532 Caption = 'Start vol.' 533 Caption = 'Start vol.'
533 ParentColor = False 534 ParentColor = False
534 ParentFont = False 535 ParentFont = False
535 end 536 end
536 object Label5: TLabel 537 object Label5: TLabel
537 Left = 8 538 Left = 14
538 Height = 15 539 Height = 30
539 Top = 48 540 Top = 84
540 Width = 48 541 Width = 84
541 Caption = 'Direction' 542 Caption = 'Direction'
542 ParentColor = False 543 ParentColor = False
543 ParentFont = False 544 ParentFont = False
544 end 545 end
545 object DirectionComboBox: TComboBox 546 object DirectionComboBox: TComboBox
546 Left = 82 547 Left = 144
547 Height = 23 548 Height = 38
548 Hint = 'Whether to fade the sound in or out' 549 Hint = 'Whether to fade the sound in or out'
549 Top = 46 550 Top = 80
550 Width = 198 551 Width = 346
551 ItemHeight = 15 552 ItemHeight = 30
552 ItemIndex = 1 553 ItemIndex = 1
553 Items.Strings = ( 554 Items.Strings = (
554 'Up' 555 'Up'
@@ -561,40 +562,40 @@ object frmTracker: TfrmTracker
561 Text = 'Down' 562 Text = 'Down'
562 end 563 end
563 object Label6: TLabel 564 object Label6: TLabel
564 Left = 8 565 Left = 14
565 Height = 15 566 Height = 30
566 Top = 86 567 Top = 150
567 Width = 41 568 Width = 71
568 Caption = 'Change' 569 Caption = 'Change'
569 ParentColor = False 570 ParentColor = False
570 ParentFont = False 571 ParentFont = False
571 end 572 end
572 object Panel5: TPanel 573 object Panel5: TPanel
573 Left = 300 574 Left = 525
574 Height = 104 575 Height = 182
575 Top = 0 576 Top = 0
576 Width = 270 577 Width = 472
577 BevelOuter = bvLowered 578 BevelOuter = bvLowered
578 ClientHeight = 104 579 ClientHeight = 182
579 ClientWidth = 270 580 ClientWidth = 472
580 ParentFont = False 581 ParentFont = False
581 TabOrder = 1 582 TabOrder = 1
582 object EnvelopePaintbox: TPaintBox 583 object EnvelopePaintbox: TPaintBox
583 Left = 1 584 Left = 1
584 Height = 102 585 Height = 180
585 Hint = 'Preview of the volume envelope' 586 Hint = 'Preview of the volume envelope'
586 Top = 1 587 Top = 1
587 Width = 268 588 Width = 470
588 Align = alClient 589 Align = alClient
589 ParentFont = False 590 ParentFont = False
590 OnPaint = EnvelopePaintboxPaint 591 OnPaint = EnvelopePaintboxPaint
591 end 592 end
592 end 593 end
593 object StartVolTrackbar: TTrackBar 594 object StartVolTrackbar: TTrackBar
594 Left = 82 595 Left = 144
595 Height = 25 596 Height = 44
596 Top = 8 597 Top = 14
597 Width = 196 598 Width = 343
598 Max = 15 599 Max = 15
599 OnChange = StartVolSpinnerChange 600 OnChange = StartVolSpinnerChange
600 Position = 0 601 Position = 0
@@ -602,10 +603,10 @@ object frmTracker: TfrmTracker
602 TabOrder = 2 603 TabOrder = 2
603 end 604 end
604 object EnvChangeTrackbar: TTrackBar 605 object EnvChangeTrackbar: TTrackBar
605 Left = 82 606 Left = 144
606 Height = 25 607 Height = 44
607 Top = 82 608 Top = 144
608 Width = 196 609 Width = 343
609 Max = 7 610 Max = 7
610 OnChange = EnvChangeSpinnerChange 611 OnChange = EnvChangeSpinnerChange
611 Position = 0 612 Position = 0
@@ -614,36 +615,36 @@ object frmTracker: TfrmTracker
614 end 615 end
615 end 616 end
616 object SquareGroupBox: TGroupBox 617 object SquareGroupBox: TGroupBox
617 Left = 7 618 Left = 12
618 Height = 169 619 Height = 296
619 Top = 262 620 Top = 458
620 Width = 319 621 Width = 558
621 Anchors = [] 622 Anchors = []
622 BorderSpacing.Left = 7 623 BorderSpacing.Left = 12
623 BorderSpacing.Top = 7 624 BorderSpacing.Top = 12
624 BorderSpacing.Right = 7 625 BorderSpacing.Right = 12
625 BorderSpacing.Bottom = 7 626 BorderSpacing.Bottom = 12
626 Caption = 'Square' 627 Caption = 'Square'
627 ClientHeight = 149 628 ClientHeight = 261
628 ClientWidth = 315 629 ClientWidth = 554
629 ParentFont = False 630 ParentFont = False
630 TabOrder = 2 631 TabOrder = 2
631 object Label7: TLabel 632 object Label7: TLabel
632 Left = 8 633 Left = 14
633 Height = 15 634 Height = 30
634 Top = 16 635 Top = 28
635 Width = 61 636 Width = 107
636 Caption = 'Sweep time' 637 Caption = 'Sweep time'
637 ParentColor = False 638 ParentColor = False
638 ParentFont = False 639 ParentFont = False
639 end 640 end
640 object SweepTimeCombobox: TComboBox 641 object SweepTimeCombobox: TComboBox
641 Left = 104 642 Left = 182
642 Height = 23 643 Height = 38
643 Hint = 'How long to sweep' 644 Hint = 'How long to sweep'
644 Top = 8 645 Top = 14
645 Width = 200 646 Width = 350
646 ItemHeight = 15 647 ItemHeight = 30
647 ItemIndex = 0 648 ItemIndex = 0
648 Items.Strings = ( 649 Items.Strings = (
649 'Off - no frequency change' 650 'Off - no frequency change'
@@ -664,12 +665,12 @@ object frmTracker: TfrmTracker
664 Text = 'Off - no frequency change' 665 Text = 'Off - no frequency change'
665 end 666 end
666 object SweepDirectionCombobox: TComboBox 667 object SweepDirectionCombobox: TComboBox
667 Left = 104 668 Left = 182
668 Height = 23 669 Height = 38
669 Hint = 'The direction of the sweep' 670 Hint = 'The direction of the sweep'
670 Top = 40 671 Top = 70
671 Width = 200 672 Width = 350
672 ItemHeight = 15 673 ItemHeight = 30
673 ItemIndex = 1 674 ItemIndex = 1
674 Items.Strings = ( 675 Items.Strings = (
675 'Up' 676 'Up'
@@ -684,39 +685,39 @@ object frmTracker: TfrmTracker
684 Text = 'Down' 685 Text = 'Down'
685 end 686 end
686 object Label8: TLabel 687 object Label8: TLabel
687 Left = 8 688 Left = 14
688 Height = 15 689 Height = 30
689 Top = 48 690 Top = 84
690 Width = 84 691 Width = 147
691 Caption = 'Sweep direction' 692 Caption = 'Sweep direction'
692 ParentColor = False 693 ParentColor = False
693 ParentFont = False 694 ParentFont = False
694 end 695 end
695 object Label9: TLabel 696 object Label9: TLabel
696 Left = 8 697 Left = 14
697 Height = 15 698 Height = 30
698 Top = 84 699 Top = 147
699 Width = 56 700 Width = 101
700 Caption = 'Sweep size' 701 Caption = 'Sweep size'
701 ParentColor = False 702 ParentColor = False
702 ParentFont = False 703 ParentFont = False
703 end 704 end
704 object Label10: TLabel 705 object Label10: TLabel
705 Left = 8 706 Left = 14
706 Height = 15 707 Height = 30
707 Top = 120 708 Top = 210
708 Width = 25 709 Width = 44
709 Caption = 'Duty' 710 Caption = 'Duty'
710 ParentColor = False 711 ParentColor = False
711 ParentFont = False 712 ParentFont = False
712 end 713 end
713 object DutyCombobox: TComboBox 714 object DutyCombobox: TComboBox
714 Left = 104 715 Left = 182
715 Height = 23 716 Height = 38
716 Hint = 'Which duty cycle to use (changes timbre of wave)' 717 Hint = 'Which duty cycle to use (changes timbre of wave)'
717 Top = 112 718 Top = 196
718 Width = 200 719 Width = 350
719 ItemHeight = 15 720 ItemHeight = 30
720 ItemIndex = 2 721 ItemIndex = 2
721 Items.Strings = ( 722 Items.Strings = (
722 '12.5%' 723 '12.5%'
@@ -733,10 +734,10 @@ object frmTracker: TfrmTracker
733 Text = '50% (square)' 734 Text = '50% (square)'
734 end 735 end
735 object SweepSizeTrackbar: TTrackBar 736 object SweepSizeTrackbar: TTrackBar
736 Left = 105 737 Left = 184
737 Height = 25 738 Height = 44
738 Top = 80 739 Top = 140
739 Width = 196 740 Width = 343
740 Max = 7 741 Max = 7
741 OnChange = SweepSizeSpinnerChange 742 OnChange = SweepSizeSpinnerChange
742 Position = 0 743 Position = 0
@@ -745,45 +746,45 @@ object frmTracker: TfrmTracker
745 end 746 end
746 end 747 end
747 object WaveGroupBox: TGroupBox 748 object WaveGroupBox: TGroupBox
748 Left = 340 749 Left = 594
749 Height = 169 750 Height = 296
750 Top = 262 751 Top = 458
751 Width = 297 752 Width = 520
752 Anchors = [] 753 Anchors = []
753 BorderSpacing.Left = 7 754 BorderSpacing.Left = 12
754 BorderSpacing.Top = 7 755 BorderSpacing.Top = 12
755 BorderSpacing.Right = 7 756 BorderSpacing.Right = 12
756 BorderSpacing.Bottom = 7 757 BorderSpacing.Bottom = 12
757 Caption = 'Wave' 758 Caption = 'Wave'
758 ClientHeight = 149 759 ClientHeight = 261
759 ClientWidth = 293 760 ClientWidth = 516
760 ParentFont = False 761 ParentFont = False
761 TabOrder = 3 762 TabOrder = 3
762 object Label11: TLabel 763 object Label11: TLabel
763 Left = 8 764 Left = 14
764 Height = 15 765 Height = 30
765 Top = 16 766 Top = 28
766 Width = 40 767 Width = 70
767 Caption = 'Volume' 768 Caption = 'Volume'
768 ParentColor = False 769 ParentColor = False
769 ParentFont = False 770 ParentFont = False
770 end 771 end
771 object Label12: TLabel 772 object Label12: TLabel
772 Left = 8 773 Left = 14
773 Height = 15 774 Height = 30
774 Top = 48 775 Top = 84
775 Width = 55 776 Width = 95
776 Caption = 'Waveform' 777 Caption = 'Waveform'
777 ParentColor = False 778 ParentColor = False
778 ParentFont = False 779 ParentFont = False
779 end 780 end
780 object WaveformCombobox: TComboBox 781 object WaveformCombobox: TComboBox
781 Left = 104 782 Left = 182
782 Height = 23 783 Height = 38
783 Hint = 'Which waveform is associated with this instrument' 784 Hint = 'Which waveform is associated with this instrument'
784 Top = 40 785 Top = 70
785 Width = 176 786 Width = 308
786 ItemHeight = 15 787 ItemHeight = 30
787 ItemIndex = 0 788 ItemIndex = 0
788 Items.Strings = ( 789 Items.Strings = (
789 'Wave #0' 790 'Wave #0'
@@ -810,21 +811,21 @@ object frmTracker: TfrmTracker
810 Text = 'Wave #0' 811 Text = 'Wave #0'
811 end 812 end
812 object Panel4: TPanel 813 object Panel4: TPanel
813 Left = 8 814 Left = 14
814 Height = 59 815 Height = 103
815 Top = 80 816 Top = 140
816 Width = 272 817 Width = 476
817 BevelOuter = bvLowered 818 BevelOuter = bvLowered
818 ClientHeight = 59 819 ClientHeight = 103
819 ClientWidth = 272 820 ClientWidth = 476
820 ParentFont = False 821 ParentFont = False
821 TabOrder = 1 822 TabOrder = 1
822 object WavePaintbox: TPaintBox 823 object WavePaintbox: TPaintBox
823 Left = 1 824 Left = 1
824 Height = 57 825 Height = 101
825 Hint = 'Preview of the waveform associated with this instrument' 826 Hint = 'Preview of the waveform associated with this instrument'
826 Top = 1 827 Top = 1
827 Width = 270 828 Width = 474
828 Align = alClient 829 Align = alClient
829 Color = clBlack 830 Color = clBlack
830 ParentColor = False 831 ParentColor = False
@@ -833,12 +834,12 @@ object frmTracker: TfrmTracker
833 end 834 end
834 end 835 end
835 object WaveVolumeCombobox: TComboBox 836 object WaveVolumeCombobox: TComboBox
836 Left = 104 837 Left = 182
837 Height = 23 838 Height = 38
838 Hint = 'The initial volume of the wave' 839 Hint = 'The initial volume of the wave'
839 Top = 8 840 Top = 14
840 Width = 176 841 Width = 308
841 ItemHeight = 15 842 ItemHeight = 30
842 ItemIndex = 1 843 ItemIndex = 1
843 Items.Strings = ( 844 Items.Strings = (
844 'Mute (No sound)' 845 'Mute (No sound)'
@@ -854,26 +855,26 @@ object frmTracker: TfrmTracker
854 end 855 end
855 end 856 end
856 object NoiseGroupBox: TGroupBox 857 object NoiseGroupBox: TGroupBox
857 Left = 7 858 Left = 12
858 Height = 223 859 Height = 390
859 Top = 445 860 Top = 778
860 Width = 397 861 Width = 695
861 Anchors = [] 862 Anchors = []
862 BorderSpacing.Left = 7 863 BorderSpacing.Left = 12
863 BorderSpacing.Top = 7 864 BorderSpacing.Top = 12
864 BorderSpacing.Right = 7 865 BorderSpacing.Right = 12
865 BorderSpacing.Bottom = 7 866 BorderSpacing.Bottom = 12
866 Caption = 'Noise' 867 Caption = 'Noise'
867 ClientHeight = 203 868 ClientHeight = 355
868 ClientWidth = 393 869 ClientWidth = 691
869 ParentFont = False 870 ParentFont = False
870 TabOrder = 4 871 TabOrder = 4
871 object SevenBitCounterCheckbox: TCheckBox 872 object SevenBitCounterCheckbox: TCheckBox
872 Left = 8 873 Left = 14
873 Height = 19 874 Height = 34
874 Hint = 'Select LFSR width. When checked, output will sound like a tone rather than noise' 875 Hint = 'Select LFSR width. When checked, output will sound like a tone rather than noise'
875 Top = 8 876 Top = 14
876 Width = 215 877 Width = 373
877 Alignment = taLeftJustify 878 Alignment = taLeftJustify
878 Caption = '7 bit counter (more tone-like output)' 879 Caption = '7 bit counter (more tone-like output)'
879 OnChange = SevenBitCounterCheckboxChange 880 OnChange = SevenBitCounterCheckboxChange
@@ -881,20 +882,20 @@ object frmTracker: TfrmTracker
881 TabOrder = 0 882 TabOrder = 0
882 end 883 end
883 object Panel6: TPanel 884 object Panel6: TPanel
884 Left = 8 885 Left = 14
885 Height = 152 886 Height = 266
886 Top = 40 887 Top = 70
887 Width = 376 888 Width = 658
888 BevelOuter = bvLowered 889 BevelOuter = bvLowered
889 ClientHeight = 152 890 ClientHeight = 266
890 ClientWidth = 376 891 ClientWidth = 658
891 ParentFont = False 892 ParentFont = False
892 TabOrder = 1 893 TabOrder = 1
893 object NoiseMacroPaintbox: TPaintBox 894 object NoiseMacroPaintbox: TPaintBox
894 Left = 1 895 Left = 1
895 Height = 150 896 Height = 264
896 Top = 1 897 Top = 1
897 Width = 374 898 Width = 656
898 Align = alClient 899 Align = alClient
899 ParentFont = False 900 ParentFont = False
900 OnMouseDown = NoiseMacroPaintboxMouseDown 901 OnMouseDown = NoiseMacroPaintboxMouseDown
@@ -920,7 +921,7 @@ object frmTracker: TfrmTracker
920 Width = 1064 921 Width = 1064
921 Align = alBottom 922 Align = alBottom
922 Anchors = [akTop, akLeft, akRight, akBottom] 923 Anchors = [akTop, akLeft, akRight, akBottom]
923 BorderSpacing.Top = 13 924 BorderSpacing.Top = 23
924 ParentFont = False 925 ParentFont = False
925 PopupMenu = WaveEditPopup 926 PopupMenu = WaveEditPopup
926 OnMouseDown = WaveEditPaintBoxMouseDown 927 OnMouseDown = WaveEditPaintBoxMouseDown
@@ -929,61 +930,61 @@ object frmTracker: TfrmTracker
929 OnPaint = WaveEditPaintBoxPaint 930 OnPaint = WaveEditPaintBoxPaint
930 end 931 end
931 object WaveEditGroupBox: TGroupBox 932 object WaveEditGroupBox: TGroupBox
932 Left = 8 933 Left = 14
933 Height = 139 934 Height = 243
934 Top = 8 935 Top = 14
935 Width = 568 936 Width = 994
936 Caption = 'Wave Editor' 937 Caption = 'Wave Editor'
937 ClientHeight = 119 938 ClientHeight = 208
938 ClientWidth = 564 939 ClientWidth = 990
939 ParentFont = False 940 ParentFont = False
940 TabOrder = 0 941 TabOrder = 0
941 object Label20: TLabel 942 object Label20: TLabel
942 Left = 16 943 Left = 28
943 Height = 15 944 Height = 15
944 Top = 16 945 Top = 28
945 Width = 29 946 Width = 29
946 Caption = 'Wave' 947 Caption = 'Wave'
947 ParentColor = False 948 ParentColor = False
948 ParentFont = False 949 ParentFont = False
949 end 950 end
950 object WaveEditNumberSpinner: TSpinEdit 951 object WaveEditNumberSpinner: TSpinEdit
951 Left = 64 952 Left = 112
952 Height = 23 953 Height = 23
953 Top = 8 954 Top = 14
954 Width = 80 955 Width = 140
955 MaxValue = 15 956 MaxValue = 15
956 OnChange = WaveEditNumberSpinnerChange 957 OnChange = WaveEditNumberSpinnerChange
957 ParentFont = False 958 ParentFont = False
958 TabOrder = 0 959 TabOrder = 0
959 end 960 end
960 object ImportWaveButton: TButton 961 object ImportWaveButton: TButton
961 Left = 16 962 Left = 28
962 Height = 25 963 Height = 44
963 Hint = 'Import a wave' 964 Hint = 'Import a wave'
964 Top = 48 965 Top = 84
965 Width = 147 966 Width = 257
966 Caption = 'Import' 967 Caption = 'Import'
967 OnClick = ImportWaveButtonClick 968 OnClick = ImportWaveButtonClick
968 ParentFont = False 969 ParentFont = False
969 TabOrder = 1 970 TabOrder = 1
970 end 971 end
971 object ExportWaveButton: TButton 972 object ExportWaveButton: TButton
972 Left = 16 973 Left = 28
973 Height = 25 974 Height = 44
974 Hint = 'Export a wave' 975 Hint = 'Export a wave'
975 Top = 80 976 Top = 140
976 Width = 147 977 Width = 257
977 Caption = 'Export' 978 Caption = 'Export'
978 OnClick = ExportWaveButtonClick 979 OnClick = ExportWaveButtonClick
979 ParentFont = False 980 ParentFont = False
980 TabOrder = 2 981 TabOrder = 2
981 end 982 end
982 object HexWaveEdit: TEdit 983 object HexWaveEdit: TEdit
983 Left = 288 984 Left = 504
984 Height = 23 985 Height = 23
985 Top = 8 986 Top = 14
986 Width = 264 987 Width = 462
987 MaxLength = 32 988 MaxLength = 32
988 OnChange = HexWaveEditEditingDone 989 OnChange = HexWaveEditEditingDone
989 OnEditingDone = HexWaveEditEditingDone 990 OnEditingDone = HexWaveEditEditingDone
@@ -991,18 +992,18 @@ object frmTracker: TfrmTracker
991 TabOrder = 3 992 TabOrder = 3
992 end 993 end
993 object Label13: TLabel 994 object Label13: TLabel
994 Left = 176 995 Left = 308
995 Height = 15 996 Height = 15
996 Top = 16 997 Top = 28
997 Width = 100 998 Width = 100
998 Caption = 'Hex representation' 999 Caption = 'Hex representation'
999 ParentColor = False 1000 ParentColor = False
1000 ParentFont = False 1001 ParentFont = False
1001 end 1002 end
1002 object PlayWaveWhileDrawingCheckbox: TCheckBox 1003 object PlayWaveWhileDrawingCheckbox: TCheckBox
1003 Left = 176 1004 Left = 308
1004 Height = 19 1005 Height = 19
1005 Top = 40 1006 Top = 70
1006 Width = 149 1007 Width = 149
1007 Caption = 'Play wave while drawing' 1008 Caption = 'Play wave while drawing'
1008 ParentFont = False 1009 ParentFont = False
@@ -1025,16 +1026,16 @@ object frmTracker: TfrmTracker
1025 Width = 939 1026 Width = 939
1026 Align = alBottom 1027 Align = alBottom
1027 Anchors = [akTop, akLeft, akRight, akBottom] 1028 Anchors = [akTop, akLeft, akRight, akBottom]
1028 BorderSpacing.Top = 13 1029 BorderSpacing.Top = 23
1029 MaxLength = 255 1030 MaxLength = 255
1030 OnChange = CommentMemoChange 1031 OnChange = CommentMemoChange
1031 ParentFont = False 1032 ParentFont = False
1032 TabOrder = 0 1033 TabOrder = 0
1033 end 1034 end
1034 object Label17: TLabel 1035 object Label17: TLabel
1035 Left = 8 1036 Left = 14
1036 Height = 15 1037 Height = 15
1037 Top = 8 1038 Top = 14
1038 Width = 333 1039 Width = 333
1039 Caption = 'This is an area to write comments for anyone editing your tune.' 1040 Caption = 'This is an area to write comments for anyone editing your tune.'
1040 ParentColor = False 1041 ParentColor = False
@@ -1054,16 +1055,16 @@ object frmTracker: TfrmTracker
1054 Top = 128 1055 Top = 128
1055 Width = 1063 1056 Width = 1063
1056 Align = alBottom 1057 Align = alBottom
1057 BorderSpacing.Top = 13 1058 BorderSpacing.Top = 23
1058 Anchors = [akTop, akLeft, akRight, akBottom] 1059 Anchors = [akTop, akLeft, akRight, akBottom]
1059 Font.Height = -13 1060 Font.Height = -23
1060 Font.Name = 'Courier New' 1061 Font.Name = 'Courier New'
1061 Font.Pitch = fpFixed 1062 Font.Pitch = fpFixed
1062 Font.Quality = fqNonAntialiased 1063 Font.Quality = fqNonAntialiased
1063 ParentColor = False 1064 ParentColor = False
1064 ParentFont = False 1065 ParentFont = False
1065 TabOrder = 0 1066 TabOrder = 0
1066 Gutter.Width = 57 1067 Gutter.Width = 100
1067 Gutter.MouseActions = <> 1068 Gutter.MouseActions = <>
1068 RightGutter.Width = 0 1069 RightGutter.Width = 0
1069 RightGutter.MouseActions = <> 1070 RightGutter.MouseActions = <>
@@ -1517,11 +1518,11 @@ object frmTracker: TfrmTracker
1517 OnChange = RoutineSyneditChange 1518 OnChange = RoutineSyneditChange
1518 inline SynLeftGutterPartList1: TSynGutterPartList 1519 inline SynLeftGutterPartList1: TSynGutterPartList
1519 object SynGutterMarks1: TSynGutterMarks 1520 object SynGutterMarks1: TSynGutterMarks
1520 Width = 24 1521 Width = 42
1521 MouseActions = <> 1522 MouseActions = <>
1522 end 1523 end
1523 object SynGutterLineNumber1: TSynGutterLineNumber 1524 object SynGutterLineNumber1: TSynGutterLineNumber
1524 Width = 17 1525 Width = 29
1525 MouseActions = <> 1526 MouseActions = <>
1526 MarkupInfo.Background = clBtnFace 1527 MarkupInfo.Background = clBtnFace
1527 MarkupInfo.Foreground = clNone 1528 MarkupInfo.Foreground = clNone
@@ -1531,18 +1532,19 @@ object frmTracker: TfrmTracker
1531 LeadingZeros = False 1532 LeadingZeros = False
1532 end 1533 end
1533 object SynGutterChanges1: TSynGutterChanges 1534 object SynGutterChanges1: TSynGutterChanges
1534 Width = 4 1535 Width = 7
1535 MouseActions = <> 1536 MouseActions = <>
1536 ModifiedColor = 59900 1537 ModifiedColor = 59900
1537 SavedColor = clGreen 1538 SavedColor = clGreen
1538 end 1539 end
1539 object SynGutterSeparator1: TSynGutterSeparator 1540 object SynGutterSeparator1: TSynGutterSeparator
1540 Width = 2 1541 Width = 4
1541 MouseActions = <> 1542 MouseActions = <>
1542 MarkupInfo.Background = clWhite 1543 MarkupInfo.Background = clWhite
1543 MarkupInfo.Foreground = clGray 1544 MarkupInfo.Foreground = clGray
1544 end 1545 end
1545 object SynGutterCodeFolding1: TSynGutterCodeFolding 1546 object SynGutterCodeFolding1: TSynGutterCodeFolding
1547 Width = 18
1546 MouseActions = <> 1548 MouseActions = <>
1547 MarkupInfo.Background = clNone 1549 MarkupInfo.Background = clNone
1548 MarkupInfo.Foreground = clGray 1550 MarkupInfo.Foreground = clGray
@@ -1552,19 +1554,19 @@ object frmTracker: TfrmTracker
1552 end 1554 end
1553 end 1555 end
1554 object Label18: TLabel 1556 object Label18: TLabel
1555 Left = 8 1557 Left = 14
1556 Height = 15 1558 Height = 15
1557 Top = 16 1559 Top = 28
1558 Width = 41 1560 Width = 41
1559 Caption = 'Routine' 1561 Caption = 'Routine'
1560 ParentColor = False 1562 ParentColor = False
1561 ParentFont = False 1563 ParentFont = False
1562 end 1564 end
1563 object RoutineNumberSpinner: TSpinEdit 1565 object RoutineNumberSpinner: TSpinEdit
1564 Left = 64 1566 Left = 112
1565 Height = 23 1567 Height = 23
1566 Top = 8 1568 Top = 14
1567 Width = 176 1569 Width = 308
1568 MaxValue = 15 1570 MaxValue = 15
1569 OnChange = RoutineNumberSpinnerChange 1571 OnChange = RoutineNumberSpinnerChange
1570 ParentFont = False 1572 ParentFont = False
@@ -1572,9 +1574,9 @@ object frmTracker: TfrmTracker
1572 Value = 1 1574 Value = 1
1573 end 1575 end
1574 object Label19: TLabel 1576 object Label19: TLabel
1575 Left = 8 1577 Left = 14
1576 Height = 75 1578 Height = 75
1577 Top = 40 1579 Top = 70
1578 Width = 506 1580 Width = 506
1579 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!' 1581 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!'
1580 ParentColor = False 1582 ParentColor = False
@@ -1585,21 +1587,21 @@ object frmTracker: TfrmTracker
1585 end 1587 end
1586 object Panel2: TPanel 1588 object Panel2: TPanel
1587 Left = 0 1589 Left = 0
1588 Height = 64 1590 Height = 112
1589 Top = 25 1591 Top = 41
1590 Width = 1232 1592 Width = 2156
1591 Align = alTop 1593 Align = alTop
1592 BevelOuter = bvNone 1594 BevelOuter = bvNone
1593 ClientHeight = 64 1595 ClientHeight = 112
1594 ClientWidth = 1232 1596 ClientWidth = 2156
1595 ParentFont = False 1597 ParentFont = False
1596 TabOrder = 3 1598 TabOrder = 3
1597 object LEDMeter1: TLEDMeter 1599 object LEDMeter1: TLEDMeter
1598 AnchorSideRight.Control = Duty1Visualizer 1600 AnchorSideRight.Control = Duty1Visualizer
1599 Left = 0 1601 Left = 0
1600 Height = 32 1602 Height = 56
1601 Top = 32 1603 Top = 56
1602 Width = 444 1604 Width = 776
1603 Anchors = [akTop, akLeft, akRight] 1605 Anchors = [akTop, akLeft, akRight]
1604 BevelStyle = bvLowered 1606 BevelStyle = bvLowered
1605 Colors.Border = 2168839 1607 Colors.Border = 2168839
@@ -1620,9 +1622,9 @@ object frmTracker: TfrmTracker
1620 object LEDMeter2: TLEDMeter 1622 object LEDMeter2: TLEDMeter
1621 AnchorSideRight.Control = Duty1Visualizer 1623 AnchorSideRight.Control = Duty1Visualizer
1622 Left = 0 1624 Left = 0
1623 Height = 32 1625 Height = 56
1624 Top = 0 1626 Top = 0
1625 Width = 444 1627 Width = 776
1626 Anchors = [akTop, akLeft, akRight] 1628 Anchors = [akTop, akLeft, akRight]
1627 BevelStyle = bvLowered 1629 BevelStyle = bvLowered
1628 Colors.Border = 2168839 1630 Colors.Border = 2168839
@@ -1641,40 +1643,40 @@ object frmTracker: TfrmTracker
1641 Section3Value = 48 1643 Section3Value = 48
1642 end 1644 end
1643 object Duty1Visualizer: TPaintBox 1645 object Duty1Visualizer: TPaintBox
1644 Left = 444 1646 Left = 776
1645 Height = 64 1647 Height = 112
1646 Top = 0 1648 Top = 0
1647 Width = 197 1649 Width = 345
1648 Align = alRight 1650 Align = alRight
1649 ParentFont = False 1651 ParentFont = False
1650 OnClick = Duty1VisualizerClick 1652 OnClick = Duty1VisualizerClick
1651 OnPaint = Duty1VisualizerPaint 1653 OnPaint = Duty1VisualizerPaint
1652 end 1654 end
1653 object Duty2Visualizer: TPaintBox 1655 object Duty2Visualizer: TPaintBox
1654 Left = 641 1656 Left = 1121
1655 Height = 64 1657 Height = 112
1656 Top = 0 1658 Top = 0
1657 Width = 197 1659 Width = 345
1658 Align = alRight 1660 Align = alRight
1659 ParentFont = False 1661 ParentFont = False
1660 OnClick = Duty1VisualizerClick 1662 OnClick = Duty1VisualizerClick
1661 OnPaint = Duty2VisualizerPaint 1663 OnPaint = Duty2VisualizerPaint
1662 end 1664 end
1663 object WaveVisualizer: TPaintBox 1665 object WaveVisualizer: TPaintBox
1664 Left = 838 1666 Left = 1466
1665 Height = 64 1667 Height = 112
1666 Top = 0 1668 Top = 0
1667 Width = 197 1669 Width = 345
1668 Align = alRight 1670 Align = alRight
1669 ParentFont = False 1671 ParentFont = False
1670 OnClick = Duty1VisualizerClick 1672 OnClick = Duty1VisualizerClick
1671 OnPaint = WaveVisualizerPaint 1673 OnPaint = WaveVisualizerPaint
1672 end 1674 end
1673 object NoiseVisualizer: TPaintBox 1675 object NoiseVisualizer: TPaintBox
1674 Left = 1035 1676 Left = 1811
1675 Height = 64 1677 Height = 112
1676 Top = 0 1678 Top = 0
1677 Width = 197 1679 Width = 345
1678 Align = alRight 1680 Align = alRight
1679 ParentFont = False 1681 ParentFont = False
1680 OnClick = Duty1VisualizerClick 1682 OnClick = Duty1VisualizerClick
@@ -1683,19 +1685,19 @@ object frmTracker: TfrmTracker
1683 end 1685 end
1684 object StatusBar1: TStatusBar 1686 object StatusBar1: TStatusBar
1685 Left = 0 1687 Left = 0
1686 Height = 23 1688 Height = 43
1687 Top = 610 1689 Top = 1066
1688 Width = 1232 1690 Width = 2156
1689 AutoHint = True 1691 AutoHint = True
1690 Panels = < 1692 Panels = <
1691 item 1693 item
1692 Width = 467 1694 Width = 817
1693 end 1695 end
1694 item 1696 item
1695 Width = 200 1697 Width = 350
1696 end 1698 end
1697 item 1699 item
1698 Width = 200 1700 Width = 350
1699 end> 1701 end>
1700 ParentFont = False 1702 ParentFont = False
1701 ParentShowHint = False 1703 ParentShowHint = False
@@ -1704,9 +1706,9 @@ object frmTracker: TfrmTracker
1704 end 1706 end
1705 object ToolBar1: TToolBar 1707 object ToolBar1: TToolBar
1706 Left = 0 1708 Left = 0
1707 Height = 25 1709 Height = 41
1708 Top = 0 1710 Top = 0
1709 Width = 1232 1711 Width = 2156
1710 AutoSize = True 1712 AutoSize = True
1711 Caption = 'ToolBar1' 1713 Caption = 'ToolBar1'
1712 EdgeBorders = [ebBottom] 1714 EdgeBorders = [ebBottom]
@@ -1723,7 +1725,7 @@ object frmTracker: TfrmTracker
1723 ParentShowHint = False 1725 ParentShowHint = False
1724 end 1726 end
1725 object PanicToolButton: TToolButton 1727 object PanicToolButton: TToolButton
1726 Left = 557 1728 Left = 851
1727 Hint = 'Stops all sound output' 1729 Hint = 'Stops all sound output'
1728 Top = 0 1730 Top = 0
1729 AutoSize = True 1731 AutoSize = True
@@ -1734,17 +1736,17 @@ object frmTracker: TfrmTracker
1734 ShowHint = True 1736 ShowHint = True
1735 end 1737 end
1736 object ToolButton2: TToolButton 1738 object ToolButton2: TToolButton
1737 Left = 147 1739 Left = 221
1738 Top = 0 1740 Top = 0
1739 Action = PlayCursorAction 1741 Action = PlayCursorAction
1740 end 1742 end
1741 object ToolButton4: TToolButton 1743 object ToolButton4: TToolButton
1742 Left = 221 1744 Left = 331
1743 Top = 0 1745 Top = 0
1744 Action = StopAction 1746 Action = StopAction
1745 end 1747 end
1746 object ExportGBButton: TToolButton 1748 object ExportGBButton: TToolButton
1747 Left = 291 1749 Left = 442
1748 Hint = 'Export the song as a standalone ROM' 1750 Hint = 'Export the song as a standalone ROM'
1749 Top = 0 1751 Top = 0
1750 AutoSize = True 1752 AutoSize = True
@@ -1753,49 +1755,49 @@ object frmTracker: TfrmTracker
1753 OnClick = ExportGBButtonClick 1755 OnClick = ExportGBButtonClick
1754 end 1756 end
1755 object ToolButton8: TToolButton 1757 object ToolButton8: TToolButton
1756 Left = 79 1758 Left = 120
1757 Height = 22 1759 Height = 39
1758 Top = 0 1760 Top = 0
1759 Caption = 'ToolButton8' 1761 Caption = 'ToolButton8'
1760 Style = tbsDivider 1762 Style = tbsDivider
1761 end 1763 end
1762 object ToolButton6: TToolButton 1764 object ToolButton6: TToolButton
1763 Left = 286 1765 Left = 433
1764 Height = 22 1766 Height = 39
1765 Top = 0 1767 Top = 0
1766 Caption = 'ToolButton6' 1768 Caption = 'ToolButton6'
1767 Style = tbsDivider 1769 Style = tbsDivider
1768 end 1770 end
1769 object ToolButton7: TToolButton 1771 object ToolButton7: TToolButton
1770 Left = 1097 1772 Left = 1775
1771 Height = 22 1773 Height = 39
1772 Top = 0 1774 Top = 0
1773 Caption = 'ToolButton7' 1775 Caption = 'ToolButton7'
1774 Style = tbsSeparator 1776 Style = tbsSeparator
1775 end 1777 end
1776 object OctaveSpinEdit: TSpinEdit 1778 object OctaveSpinEdit: TSpinEdit
1777 Left = 663 1779 Left = 1016
1778 Height = 23 1780 Height = 38
1779 Hint = 'The octave offset for entering new notes' 1781 Hint = 'The octave offset for entering new notes'
1780 Top = 0 1782 Top = 0
1781 Width = 65 1783 Width = 114
1782 MaxValue = 5 1784 MaxValue = 5
1783 OnChange = OctaveSpinEditChange 1785 OnChange = OctaveSpinEditChange
1784 ParentFont = False 1786 ParentFont = False
1785 TabOrder = 0 1787 TabOrder = 0
1786 end 1788 end
1787 object ToolButton9: TToolButton 1789 object ToolButton9: TToolButton
1788 Left = 612 1790 Left = 927
1789 Height = 22 1791 Height = 39
1790 Top = 0 1792 Top = 0
1791 Caption = 'ToolButton9' 1793 Caption = 'ToolButton9'
1792 Style = tbsSeparator 1794 Style = tbsSeparator
1793 end 1795 end
1794 object Label22: TLabel 1796 object Label22: TLabel
1795 Left = 620 1797 Left = 941
1796 Height = 22 1798 Height = 39
1797 Top = 0 1799 Top = 0
1798 Width = 43 1800 Width = 75
1799 AutoSize = False 1801 AutoSize = False
1800 Caption = 'Octave ' 1802 Caption = 'Octave '
1801 Layout = tlCenter 1803 Layout = tlCenter
@@ -1803,10 +1805,10 @@ object frmTracker: TfrmTracker
1803 ParentFont = False 1805 ParentFont = False
1804 end 1806 end
1805 object Label23: TLabel 1807 object Label23: TLabel
1806 Left = 728 1808 Left = 1130
1807 Height = 22 1809 Height = 39
1808 Top = 0 1810 Top = 0
1809 Width = 70 1811 Width = 122
1810 AutoSize = False 1812 AutoSize = False
1811 Caption = ' Instrument ' 1813 Caption = ' Instrument '
1812 Layout = tlCenter 1814 Layout = tlCenter
@@ -1814,13 +1816,13 @@ object frmTracker: TfrmTracker
1814 ParentFont = False 1816 ParentFont = False
1815 end 1817 end
1816 object InstrumentComboBox: TComboBox 1818 object InstrumentComboBox: TComboBox
1817 Left = 798 1819 Left = 1252
1818 Height = 23 1820 Height = 38
1819 Hint = 'The selected instrument for new notes' 1821 Hint = 'The selected instrument for new notes'
1820 Top = 0 1822 Top = 0
1821 Width = 214 1823 Width = 374
1822 DropDownCount = 999 1824 DropDownCount = 999
1823 ItemHeight = 15 1825 ItemHeight = 30
1824 ItemIndex = 0 1826 ItemIndex = 0
1825 Items.Strings = ( 1827 Items.Strings = (
1826 '(no instrument)' 1828 '(no instrument)'
@@ -1832,10 +1834,10 @@ object frmTracker: TfrmTracker
1832 Text = '(no instrument)' 1834 Text = '(no instrument)'
1833 end 1835 end
1834 object Label24: TLabel 1836 object Label24: TLabel
1835 Left = 1012 1837 Left = 1626
1836 Height = 22 1838 Height = 39
1837 Top = 0 1839 Top = 0
1838 Width = 35 1840 Width = 61
1839 AutoSize = False 1841 AutoSize = False
1840 Caption = ' Step ' 1842 Caption = ' Step '
1841 Layout = tlCenter 1843 Layout = tlCenter
@@ -1843,23 +1845,23 @@ object frmTracker: TfrmTracker
1843 ParentFont = False 1845 ParentFont = False
1844 end 1846 end
1845 object StepSpinEdit: TSpinEdit 1847 object StepSpinEdit: TSpinEdit
1846 Left = 1047 1848 Left = 1687
1847 Height = 23 1849 Height = 38
1848 Hint = 'How many rows to step down after entering a new note' 1850 Hint = 'How many rows to step down after entering a new note'
1849 Top = 0 1851 Top = 0
1850 Width = 50 1852 Width = 88
1851 MaxValue = 63 1853 MaxValue = 63
1852 OnChange = StepSpinEditChange 1854 OnChange = StepSpinEditChange
1853 ParentFont = False 1855 ParentFont = False
1854 TabOrder = 2 1856 TabOrder = 2
1855 end 1857 end
1856 object ToolButton3: TToolButton 1858 object ToolButton3: TToolButton
1857 Left = 84 1859 Left = 129
1858 Top = 0 1860 Top = 0
1859 Action = PlayStartAction 1861 Action = PlayStartAction
1860 end 1862 end
1861 object ExportGBSButton: TToolButton 1863 object ExportGBSButton: TToolButton
1862 Left = 372 1864 Left = 564
1863 Hint = 'Export the song as a GBS soundtrack' 1865 Hint = 'Export the song as a GBS soundtrack'
1864 Top = 0 1866 Top = 0
1865 Caption = 'Export .GBS' 1867 Caption = 'Export .GBS'
@@ -1867,14 +1869,14 @@ object frmTracker: TfrmTracker
1867 OnClick = ExportGBSButtonClick 1869 OnClick = ExportGBSButtonClick
1868 end 1870 end
1869 object ToolButton5: TToolButton 1871 object ToolButton5: TToolButton
1870 Left = 552 1872 Left = 842
1871 Height = 22 1873 Height = 39
1872 Top = 0 1874 Top = 0
1873 Caption = 'ToolButton5' 1875 Caption = 'ToolButton5'
1874 Style = tbsDivider 1876 Style = tbsDivider
1875 end 1877 end
1876 object ToolButton10: TToolButton 1878 object ToolButton10: TToolButton
1877 Left = 459 1879 Left = 697
1878 Hint = 'Export the song as WAV or MP3' 1880 Hint = 'Export the song as WAV or MP3'
1879 Top = 0 1881 Top = 0
1880 Caption = 'Render Song' 1882 Caption = 'Render Song'
@@ -1884,8 +1886,8 @@ object frmTracker: TfrmTracker
1884 end 1886 end
1885 object MainMenu1: TMainMenu 1887 object MainMenu1: TMainMenu
1886 Images = ImageList1 1888 Images = ImageList1
1887 Left = 40 1889 Left = 70
1888 Top = 32 1890 Top = 56
1889 object MenuItem1: TMenuItem 1891 object MenuItem1: TMenuItem
1890 Caption = 'File' 1892 Caption = 'File'
1891 object MenuItem33: TMenuItem 1893 object MenuItem33: TMenuItem
@@ -2025,8 +2027,8 @@ object frmTracker: TfrmTracker
2025 end 2027 end
2026 object MenuBarActionList: TActionList 2028 object MenuBarActionList: TActionList
2027 Images = ImageList1 2029 Images = ImageList1
2028 Left = 104 2030 Left = 182
2029 Top = 72 2031 Top = 126
2030 object FileOpen1: TFileOpen 2032 object FileOpen1: TFileOpen
2031 Category = 'File' 2033 Category = 'File'
2032 Caption = '&Open ...' 2034 Caption = '&Open ...'
@@ -2129,8 +2131,8 @@ object frmTracker: TfrmTracker
2129 end 2131 end
2130 end 2132 end
2131 object ImageList1: TImageList 2133 object ImageList1: TImageList
2132 Left = 152 2134 Left = 266
2133 Top = 32 2135 Top = 56
2134 Bitmap = { 2136 Bitmap = {
2135 4C694E0000001000000010000000000000000000000000000000000000000000 2137 4C694E0000001000000010000000000000000000000000000000000000000000
2136 0000000000000000000000000000000000000000000000000000000000000000 2138 0000000000000000000000000000000000000000000000000000000000000000
@@ -4633,17 +4635,17 @@ object frmTracker: TfrmTracker
4633 end 4635 end
4634 object OpenDialog1: TOpenDialog 4636 object OpenDialog1: TOpenDialog
4635 Filter = 'hUGETracker Instruments|*.ugi' 4637 Filter = 'hUGETracker Instruments|*.ugi'
4636 Left = 80 4638 Left = 140
4637 Top = 56 4639 Top = 98
4638 end 4640 end
4639 object InstrumentSaveDialog: TSaveDialog 4641 object InstrumentSaveDialog: TSaveDialog
4640 Filter = 'hUGETracker Instruments|*.ugi' 4642 Filter = 'hUGETracker Instruments|*.ugi'
4641 Left = 80 4643 Left = 140
4642 Top = 56 4644 Top = 98
4643 end 4645 end
4644 object OrderEditPopup: TPopupMenu 4646 object OrderEditPopup: TPopupMenu
4645 Left = 128 4647 Left = 224
4646 Top = 40 4648 Top = 70
4647 object MenuItem17: TMenuItem 4649 object MenuItem17: TMenuItem
4648 Caption = 'Insert new row' 4650 Caption = 'Insert new row'
4649 Hint = 'Insert a new row filled with brand new patterns' 4651 Hint = 'Insert a new row filled with brand new patterns'
@@ -4674,8 +4676,8 @@ object frmTracker: TfrmTracker
4674 object ImageList2: TImageList 4676 object ImageList2: TImageList
4675 Height = 32 4677 Height = 32
4676 Width = 32 4678 Width = 32
4677 Left = 48 4679 Left = 84
4678 Top = 86 4680 Top = 151
4679 Bitmap = { 4681 Bitmap = {
4680 4C69020000002000000020000000000000000000000000000000000000000000 4682 4C69020000002000000020000000000000000000000000000000000000000000
4681 0000000000000000000000000000000000000000000000000000000000000000 4683 0000000000000000000000000000000000000000000000000000000000000000
@@ -4940,33 +4942,33 @@ object frmTracker: TfrmTracker
4940 Enabled = False 4942 Enabled = False
4941 Interval = 200 4943 Interval = 200
4942 OnTimer = OscilloscopeUpdateTimerTimer 4944 OnTimer = OscilloscopeUpdateTimerTimer
4943 Left = 88 4945 Left = 154
4944 Top = 48 4946 Top = 84
4945 end 4947 end
4946 object GBSSaveDialog: TSaveDialog 4948 object GBSSaveDialog: TSaveDialog
4947 Filter = 'Gameboy Soundtrack|*.gbs' 4949 Filter = 'Gameboy Soundtrack|*.gbs'
4948 Left = 288 4950 Left = 504
4949 Top = 24 4951 Top = 42
4950 end 4952 end
4951 object WaveSaveDialog: TSaveDialog 4953 object WaveSaveDialog: TSaveDialog
4952 Filter = 'hUGETracker Waves|*.ugw' 4954 Filter = 'hUGETracker Waves|*.ugw'
4953 Left = 368 4955 Left = 644
4954 Top = 24 4956 Top = 42
4955 end 4957 end
4956 object GBSaveDialog: TSaveDialog 4958 object GBSaveDialog: TSaveDialog
4957 Filter = 'Gameboy ROM|*.GB' 4959 Filter = 'Gameboy ROM|*.GB'
4958 Left = 328 4960 Left = 574
4959 Top = 24 4961 Top = 42
4960 end 4962 end
4961 object NoteHaltTimer: TTimer 4963 object NoteHaltTimer: TTimer
4962 Enabled = False 4964 Enabled = False
4963 OnTimer = NoteHaltTimerTimer 4965 OnTimer = NoteHaltTimerTimer
4964 Left = 80 4966 Left = 140
4965 Top = 86 4967 Top = 151
4966 end 4968 end
4967 object TrackerGridPopup: TPopupMenu 4969 object TrackerGridPopup: TPopupMenu
4968 Left = 96 4970 Left = 168
4969 Top = 24 4971 Top = 42
4970 object TrackerPopupEditEffect: TMenuItem 4972 object TrackerPopupEditEffect: TMenuItem
4971 Caption = 'Edit effect ...' 4973 Caption = 'Edit effect ...'
4972 OnClick = TrackerPopupEditEffectClick 4974 OnClick = TrackerPopupEditEffectClick
@@ -5113,8 +5115,8 @@ object frmTracker: TfrmTracker
5113 object WavSaveDialog: TSaveDialog 5115 object WavSaveDialog: TSaveDialog
5114 DefaultExt = '.wav' 5116 DefaultExt = '.wav'
5115 Filter = 'Wave files|*.wav' 5117 Filter = 'Wave files|*.wav'
5116 Left = 408 5118 Left = 714
5117 Top = 24 5119 Top = 42
5118 end 5120 end
5119 object SynAnySyn1: TSynAnySyn 5121 object SynAnySyn1: TSynAnySyn
5120 Enabled = False 5122 Enabled = False
@@ -5238,18 +5240,18 @@ object frmTracker: TfrmTracker
5238 Entity = False 5240 Entity = False
5239 DollarVariables = False 5241 DollarVariables = False
5240 ActiveDot = False 5242 ActiveDot = False
5241 Left = 8 5243 Left = 14
5242 Top = 86 5244 Top = 151
5243 end 5245 end
5244 object MODOpenDialog: TOpenDialog 5246 object MODOpenDialog: TOpenDialog
5245 DefaultExt = '.mod' 5247 DefaultExt = '.mod'
5246 Filter = 'GBT Player MOD files|*.mod' 5248 Filter = 'GBT Player MOD files|*.mod'
5247 Left = 448 5249 Left = 784
5248 Top = 32 5250 Top = 56
5249 end 5251 end
5250 object WaveEditPopup: TPopupMenu 5252 object WaveEditPopup: TPopupMenu
5251 Left = 8 5253 Left = 14
5252 Top = 32 5254 Top = 56
5253 object MenuItem37: TMenuItem 5255 object MenuItem37: TMenuItem
5254 Caption = 'Copy' 5256 Caption = 'Copy'
5255 OnClick = MenuItem37Click 5257 OnClick = MenuItem37Click
@@ -5261,8 +5263,8 @@ object frmTracker: TfrmTracker
5261 end 5263 end
5262 object ShortcutsActionList: TActionList 5264 object ShortcutsActionList: TActionList
5263 Images = ImageList1 5265 Images = ImageList1
5264 Left = 208 5266 Left = 364
5265 Top = 32 5267 Top = 56
5266 object PlayStartAction: TAction 5268 object PlayStartAction: TAction
5267 Caption = '▶️ Start' 5269 Caption = '▶️ Start'
5268 DisableIfNoHandler = False 5270 DisableIfNoHandler = False
@@ -5377,12 +5379,12 @@ object frmTracker: TfrmTracker
5377 end 5379 end
5378 object GBDKCSaveDialog: TSaveDialog 5380 object GBDKCSaveDialog: TSaveDialog
5379 Filter = 'GBDK C File|*.c' 5381 Filter = 'GBDK C File|*.c'
5380 Left = 248 5382 Left = 434
5381 Top = 24 5383 Top = 42
5382 end 5384 end
5383 object RGBDSAsmSaveDialog: TSaveDialog 5385 object RGBDSAsmSaveDialog: TSaveDialog
5384 Filter = 'RGBDS Assembly|*.asm' 5386 Filter = 'RGBDS Assembly|*.asm'
5385 Left = 248 5387 Left = 434
5386 Top = 64 5388 Top = 112
5387 end 5389 end
5388 end 5390 end
Modifiedtracker.pas +53−5
@@ -12,6 +12,13 @@ uses
12 SymParser, options, bgrabitmap, effecteditor, RenderToWave, 12 SymParser, options, bgrabitmap, effecteditor, RenderToWave,
13 modimport, mainloop, strutils, Types, Keymap, hUGESettings; 13 modimport, mainloop, strutils, Types, Keymap, hUGESettings;
14 14
15 // TODO: Move to config file?
16 const
17 clGameboyBlack = TColor($211807);
18 clGameboyMidGreen = TColor($6CC086);
19 // TODO: Move somewhere else...
20 LM_FD = LM_USER + 0;
21
15 type 22 type
16 { TfrmTracker } 23 { TfrmTracker }
17 24
@@ -442,6 +449,9 @@ type
442 procedure CopyWaveIntoWaveRam(Wave: Integer); 449 procedure CopyWaveIntoWaveRam(Wave: Integer);
443 function ConvertWaveToHexString(Wave: Integer): String; 450 function ConvertWaveToHexString(Wave: Integer): String;
444 451
452 function RenderPreviewROM: Boolean;
453 function RenderSongToFile(Filename: String; Mode: TExportMode = emNormal): Boolean;
454
445 function GetPreviewReady: Boolean; 455 function GetPreviewReady: Boolean;
446 procedure GetROMReady(ROM: String); 456 procedure GetROMReady(ROM: String);
447 procedure HaltPlayback; 457 procedure HaltPlayback;
@@ -933,16 +943,54 @@ begin
933 Result += hexStr(CurrentWave^[I], 1); 943 Result += hexStr(CurrentWave^[I], 1);
934 end; 944 end;
935 945
946 function TfrmTracker.RenderPreviewROM: Boolean;
947 begin
948 RenderSongToFile('preview.gb', emPreview);
949 end;
950
951 function TfrmTracker.RenderSongToFile(Filename: String; Mode: TExportMode = emNormal): Boolean;
952 begin
953 try
954 AssembleSong(Song, Filename, Mode);
955 except
956 on E: ECodegenRenameException do begin
957 MessageDlg('Error!',
958 'Couldn''t create file at ' + Filename +
959 '. Make sure your path is correct!',
960 mtError,
961 [mbOK],
962 0);
963 end;
964 on E: EAssemblyException do begin
965 MessageDlg(
966 'Error!',
967 'There was an error assembling the song for playback.' + LineEnding +
968 LineEnding + E.ProgramName + ' output:' + LineEnding + E.Message +
969 LineEnding + LineEnding +
970 'Please report this issue on the hUGETracker GitHub issues page, and ' +
971 'post your song file!',
972 mtError,
973 [mbOK],
974 0);
975
976 {$ifdef PRODUCTION}
977 OpenURL('https://github.com/SuperDisk/hUGETracker/issues');
978 {$endif}
979 end;
980 end;
981 end;
982
936 function TfrmTracker.GetPreviewReady: Boolean; 983 function TfrmTracker.GetPreviewReady: Boolean;
937 var 984 var
938 I: Integer; 985 I: Integer;
939 begin 986 begin
940 if RenderPreviewROM(Song) then begin 987 if RenderPreviewROM then begin
988 LockPlayback;
989
941 // Load the new symbol table 990 // Load the new symbol table
942 ParseSymFile('render/preview.sym'); 991 ParseSymFile('render/preview.sym');
943 992
944 // Start emulation on the rendered preview binary 993 // Start emulation on the rendered preview binary
945 LockPlayback;
946 GetROMReady('render/preview.gb'); 994 GetROMReady('render/preview.gb');
947 995
948 for I := 1 to 4 do 996 for I := 1 to 4 do
@@ -2260,12 +2308,12 @@ end;
2260 procedure TfrmTracker.ExportGBSButtonClick(Sender: TObject); 2308 procedure TfrmTracker.ExportGBSButtonClick(Sender: TObject);
2261 begin 2309 begin
2262 if GBSSaveDialog.Execute then 2310 if GBSSaveDialog.Execute then
2263 RenderSongToFile(Song, GBSSaveDialog.FileName, emGBS); 2311 RenderSongToFile(GBSSaveDialog.FileName, emGBS);
2264 end; 2312 end;
2265 2313
2266 procedure TfrmTracker.ToolButton10Click(Sender: TObject); 2314 procedure TfrmTracker.ToolButton10Click(Sender: TObject);
2267 begin 2315 begin
2268 if RenderPreviewROM(Song) then begin 2316 if RenderPreviewROM then begin
2269 StopPlayback; 2317 StopPlayback;
2270 ParseSymFile('hUGEDriver/preview.sym'); 2318 ParseSymFile('hUGEDriver/preview.sym');
2271 frmRenderToWave.ShowModal; 2319 frmRenderToWave.ShowModal;
@@ -2277,7 +2325,7 @@ end;
2277 procedure TfrmTracker.ExportGBButtonClick(Sender: TObject); 2325 procedure TfrmTracker.ExportGBButtonClick(Sender: TObject);
2278 begin 2326 begin
2279 if GBSaveDialog.Execute then begin 2327 if GBSaveDialog.Execute then begin
2280 RenderSongToFile(Song, GBSaveDialog.FileName); 2328 RenderSongToFile(GBSaveDialog.FileName);
2281 end; 2329 end;
2282 end; 2330 end;
2283 2331