Commit 23cd4ff

Nick committed on
WIP tracker stuff
commit 23cd4ff71949086c24dc70b5ef283ab32d06f0e7 parent 8f059fa
4 changed files +637−402
Modifiedsong.pas +2−0
@@ -14,6 +14,8 @@ type
14 14
15 Instruments: array[1..15] of TInstrument; 15 Instruments: array[1..15] of TInstrument;
16 Waves: array[0..15] of TWave; 16 Waves: array[0..15] of TWave;
17
18 TicksPerRow: Integer;
17 end; 19 end;
18 20
19 implementation 21 implementation
Modifiedtracker.lfm +404−304
@@ -1,11 +1,12 @@
1 object frmTracker: TfrmTracker 1 object frmTracker: TfrmTracker
2 Left = 497 2 Left = 1462
3 Height = 874 3 Height = 1371
4 Top = 131 4 Top = 192
5 Width = 1286 5 Width = 2250
6 Caption = 'hUGETracker' 6 Caption = 'hUGETracker'
7 ClientHeight = 854 7 ClientHeight = 1337
8 ClientWidth = 1286 8 ClientWidth = 2250
9 DesignTimePPI = 168
9 Menu = MainMenu1 10 Menu = MainMenu1
10 OnCreate = FormCreate 11 OnCreate = FormCreate
11 OnKeyDown = FormKeyDown 12 OnKeyDown = FormKeyDown
@@ -13,10 +14,11 @@ object frmTracker: TfrmTracker
13 LCLVersion = '2.0.2.0' 14 LCLVersion = '2.0.2.0'
14 object TreeView1: TTreeView 15 object TreeView1: TTreeView
15 Left = 0 16 Left = 0
16 Height = 629 17 Height = 940
17 Top = 202 18 Top = 354
18 Width = 193 19 Width = 338
19 Align = alLeft 20 Align = alLeft
21 ParentFont = False
20 ReadOnly = True 22 ReadOnly = True
21 TabOrder = 0 23 TabOrder = 0
22 Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips, tvoThemedDraw] 24 Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips, tvoThemedDraw]
@@ -32,161 +34,198 @@ object frmTracker: TfrmTracker
32 } 34 }
33 end 35 end
34 object Splitter1: TSplitter 36 object Splitter1: TSplitter
35 Left = 193 37 Left = 338
36 Height = 629 38 Height = 940
37 Top = 202 39 Top = 354
38 Width = 5 40 Width = 9
39 end 41 end
40 object Panel1: TPanel 42 object Panel1: TPanel
41 Left = 198 43 Left = 347
42 Height = 629 44 Height = 940
43 Top = 202 45 Top = 354
44 Width = 1088 46 Width = 1903
45 Align = alClient 47 Align = alClient
46 BevelOuter = bvNone 48 BevelOuter = bvNone
47 ClientHeight = 629 49 ClientHeight = 940
48 ClientWidth = 1088 50 ClientWidth = 1903
51 ParentFont = False
49 TabOrder = 2 52 TabOrder = 2
50 object PageControl1: TPageControl 53 object PageControl1: TPageControl
51 Left = 0 54 Left = 0
52 Height = 629 55 Height = 940
53 Top = 0 56 Top = 0
54 Width = 1088 57 Width = 1903
55 ActivePage = InstrumentTabSheet 58 ActivePage = WavesTabSheet
56 Align = alClient 59 Align = alClient
57 TabIndex = 2 60 ParentFont = False
61 TabIndex = 3
58 TabOrder = 0 62 TabOrder = 0
59 object GeneralTabSheet: TTabSheet 63 object GeneralTabSheet: TTabSheet
60 Caption = 'General' 64 Caption = 'General'
61 ClientHeight = 657 65 ClientHeight = 862
62 ClientWidth = 1100 66 ClientWidth = 1684
67 ParentFont = False
63 object SongInformationGroupbox: TGroupBox 68 object SongInformationGroupbox: TGroupBox
64 Left = 8 69 Left = 14
65 Height = 528 70 Height = 404
66 Top = 8 71 Top = 14
67 Width = 729 72 Width = 1276
68 Caption = 'Song information' 73 Caption = 'Song information'
69 ClientHeight = 508 74 ClientHeight = 369
70 ClientWidth = 725 75 ClientWidth = 1272
76 ParentFont = False
71 TabOrder = 0 77 TabOrder = 0
72 object Label15: TLabel 78 object Label15: TLabel
73 Left = 8 79 Left = 14
74 Height = 15 80 Height = 30
75 Top = 16 81 Top = 28
76 Width = 27 82 Width = 47
77 Caption = 'Song' 83 Caption = 'Song'
78 ParentColor = False 84 ParentColor = False
85 ParentFont = False
79 end 86 end
80 object Label16: TLabel 87 object Label16: TLabel
81 Left = 7 88 Left = 12
82 Height = 15 89 Height = 30
83 Top = 48 90 Top = 84
84 Width = 28 91 Width = 49
85 Caption = 'Artist' 92 Caption = 'Artist'
86 ParentColor = False 93 ParentColor = False
94 ParentFont = False
87 end 95 end
88 object SongEdit: TEdit 96 object SongEdit: TEdit
89 Left = 56 97 Left = 98
90 Height = 23 98 Height = 38
91 Top = 8 99 Top = 14
92 Width = 216 100 Width = 378
93 OnChange = SongEditChange 101 OnChange = SongEditChange
102 ParentFont = False
94 TabOrder = 0 103 TabOrder = 0
95 end 104 end
96 object ArtistEdit: TEdit 105 object ArtistEdit: TEdit
97 Left = 56 106 Left = 98
98 Height = 23 107 Height = 38
99 Top = 40 108 Top = 70
100 Width = 216 109 Width = 378
101 OnChange = ArtistEditChange 110 OnChange = ArtistEditChange
111 ParentFont = False
102 TabOrder = 1 112 TabOrder = 1
103 end 113 end
114 object Label21: TLabel
115 Left = 14
116 Height = 30
117 Top = 136
118 Width = 197
119 Caption = 'Tempo (ticks per row)'
120 ParentColor = False
121 end
122 object SpinEdit1: TSpinEdit
123 Left = 232
124 Height = 38
125 Top = 128
126 Width = 88
127 MaxValue = 20
128 MinValue = 1
129 OnChange = SpinEdit1Change
130 TabOrder = 2
131 Value = 1
132 end
104 end 133 end
105 end 134 end
106 object PatternTabSheet: TTabSheet 135 object PatternTabSheet: TTabSheet
107 Caption = 'Patterns' 136 Caption = 'Patterns'
137 ParentFont = False
108 end 138 end
109 object InstrumentTabSheet: TTabSheet 139 object InstrumentTabSheet: TTabSheet
110 Caption = 'Instruments' 140 Caption = 'Instruments'
111 ClientHeight = 601 141 ClientHeight = 897
112 ClientWidth = 1080 142 ClientWidth = 1895
143 ParentFont = False
113 object PaintBox1: TPaintBox 144 object PaintBox1: TPaintBox
114 Left = 0 145 Left = 0
115 Height = 265 146 Height = 309
116 Top = 336 147 Top = 588
117 Width = 1080 148 Width = 1895
118 Align = alClient 149 Align = alClient
119 Color = clBlack 150 Color = clBlack
120 ParentColor = False 151 ParentColor = False
152 ParentFont = False
121 OnPaint = PaintBox1Paint 153 OnPaint = PaintBox1Paint
122 end 154 end
123 object Panel3: TPanel 155 object Panel3: TPanel
124 Left = 0 156 Left = 0
125 Height = 336 157 Height = 588
126 Top = 0 158 Top = 0
127 Width = 1080 159 Width = 1895
128 Align = alTop 160 Align = alTop
129 ClientHeight = 336 161 ClientHeight = 588
130 ClientWidth = 1080 162 ClientWidth = 1895
163 ParentFont = False
131 TabOrder = 0 164 TabOrder = 0
132 object InstrumentGroupBox: TGroupBox 165 object InstrumentGroupBox: TGroupBox
133 Left = 8 166 Left = 14
134 Height = 136 167 Height = 238
135 Top = 8 168 Top = 14
136 Width = 320 169 Width = 560
137 Caption = 'Instrument' 170 Caption = 'Instrument'
138 ClientHeight = 116 171 ClientHeight = 203
139 ClientWidth = 316 172 ClientWidth = 556
173 ParentFont = False
140 TabOrder = 0 174 TabOrder = 0
141 object InstrumentNumberSpinner: TSpinEdit 175 object InstrumentNumberSpinner: TSpinEdit
142 Left = 80 176 Left = 140
143 Height = 23 177 Height = 38
144 Top = 1 178 Top = 2
145 Width = 176 179 Width = 308
146 MaxValue = 15 180 MaxValue = 15
147 MinValue = 1 181 MinValue = 1
148 OnChange = InstrumentNumberSpinnerChange 182 OnChange = InstrumentNumberSpinnerChange
183 ParentFont = False
149 TabOrder = 0 184 TabOrder = 0
150 Value = 1 185 Value = 1
151 end 186 end
152 object Label1: TLabel 187 object Label1: TLabel
153 Left = 8 188 Left = 14
154 Height = 15 189 Height = 30
155 Top = 8 190 Top = 14
156 Width = 58 191 Width = 101
157 Caption = 'Instrument' 192 Caption = 'Instrument'
158 ParentColor = False 193 ParentColor = False
194 ParentFont = False
159 end 195 end
160 object Label2: TLabel 196 object Label2: TLabel
161 Left = 8 197 Left = 14
162 Height = 15 198 Height = 30
163 Top = 34 199 Top = 60
164 Width = 32 200 Width = 56
165 Caption = 'Name' 201 Caption = 'Name'
166 ParentColor = False 202 ParentColor = False
203 ParentFont = False
167 end 204 end
168 object InstrumentNameEdit: TEdit 205 object InstrumentNameEdit: TEdit
169 Left = 80 206 Left = 140
170 Height = 23 207 Height = 38
171 Top = 26 208 Top = 46
172 Width = 176 209 Width = 308
173 OnChange = InstrumentNameEditChange 210 OnChange = InstrumentNameEditChange
211 ParentFont = False
174 TabOrder = 1 212 TabOrder = 1
175 end 213 end
176 object Label3: TLabel 214 object Label3: TLabel
177 Left = 8 215 Left = 14
178 Height = 15 216 Height = 30
179 Top = 61 217 Top = 107
180 Width = 24 218 Width = 43
181 Caption = 'Type' 219 Caption = 'Type'
182 ParentColor = False 220 ParentColor = False
221 ParentFont = False
183 end 222 end
184 object InstrumentTypeCombobox: TComboBox 223 object InstrumentTypeCombobox: TComboBox
185 Left = 80 224 Left = 140
186 Height = 23 225 Height = 38
187 Top = 53 226 Top = 93
188 Width = 176 227 Width = 308
189 ItemHeight = 15 228 ItemHeight = 30
190 ItemIndex = 0 229 ItemIndex = 0
191 Items.Strings = ( 230 Items.Strings = (
192 'Square' 231 'Square'
@@ -194,23 +233,25 @@ object frmTracker: TfrmTracker
194 'Noise' 233 'Noise'
195 ) 234 )
196 OnChange = InstrumentTypeComboboxChange 235 OnChange = InstrumentTypeComboboxChange
236 ParentFont = False
197 Style = csDropDownList 237 Style = csDropDownList
198 TabOrder = 2 238 TabOrder = 2
199 Text = 'Square' 239 Text = 'Square'
200 end 240 end
201 object LengthEnabledCheckbox: TCheckBox 241 object LengthEnabledCheckbox: TCheckBox
202 Left = 8 242 Left = 14
203 Height = 19 243 Height = 34
204 Top = 84 244 Top = 147
205 Width = 57 245 Width = 98
206 Caption = 'Length' 246 Caption = 'Length'
207 OnChange = LengthEnabledCheckboxChange 247 OnChange = LengthEnabledCheckboxChange
248 ParentFont = False
208 TabOrder = 3 249 TabOrder = 3
209 end 250 end
210 object LengthSpinner: TECSpinPosition 251 object LengthSpinner: TECSpinPosition
211 Left = 80 252 Left = 140
212 Height = 24 253 Height = 24
213 Top = 80 254 Top = 140
214 Width = 174 255 Width = 174
215 Buttons.BtnBigDec.BtnOrder = 1 256 Buttons.BtnBigDec.BtnOrder = 1
216 Buttons.BtnBigDec.Visible = False 257 Buttons.BtnBigDec.Visible = False
@@ -233,8 +274,10 @@ object frmTracker: TfrmTracker
233 Buttons.MouseIncrementX = 0.1 274 Buttons.MouseIncrementX = 0.1
234 Buttons.MouseIncrementY = 0.05 275 Buttons.MouseIncrementY = 0.05
235 Buttons.PageSize = 10 276 Buttons.PageSize = 10
277 Buttons.ParentFont = False
236 Buttons.Style = ebsSplittedBlock 278 Buttons.Style = ebsSplittedBlock
237 Enabled = False 279 Enabled = False
280 ParentFont = False
238 Position = 0 281 Position = 0
239 ProgressFontOptions.FontSize = 0 282 ProgressFontOptions.FontSize = 0
240 ProgressFontOptions.FontStyles = [fsBold] 283 ProgressFontOptions.FontStyles = [fsBold]
@@ -255,58 +298,63 @@ object frmTracker: TfrmTracker
255 end 298 end
256 end 299 end
257 object EnvelopeGroupBox: TGroupBox 300 object EnvelopeGroupBox: TGroupBox
258 Left = 344 301 Left = 602
259 Height = 136 302 Height = 238
260 Top = 8 303 Top = 14
261 Width = 696 304 Width = 1218
262 Caption = 'Envelope' 305 Caption = 'Envelope'
263 ClientHeight = 116 306 ClientHeight = 203
264 ClientWidth = 692 307 ClientWidth = 1214
308 ParentFont = False
265 TabOrder = 1 309 TabOrder = 1
266 object Label4: TLabel 310 object Label4: TLabel
267 Left = 8 311 Left = 14
268 Height = 15 312 Height = 30
269 Top = 9 313 Top = 16
270 Width = 46 314 Width = 80
271 Caption = 'Start vol.' 315 Caption = 'Start vol.'
272 ParentColor = False 316 ParentColor = False
317 ParentFont = False
273 end 318 end
274 object Label5: TLabel 319 object Label5: TLabel
275 Left = 8 320 Left = 14
276 Height = 15 321 Height = 30
277 Top = 48 322 Top = 84
278 Width = 48 323 Width = 84
279 Caption = 'Direction' 324 Caption = 'Direction'
280 ParentColor = False 325 ParentColor = False
326 ParentFont = False
281 end 327 end
282 object DirectionComboBox: TComboBox 328 object DirectionComboBox: TComboBox
283 Left = 82 329 Left = 144
284 Height = 23 330 Height = 38
285 Top = 40 331 Top = 70
286 Width = 198 332 Width = 346
287 ItemHeight = 15 333 ItemHeight = 30
288 ItemIndex = 1 334 ItemIndex = 1
289 Items.Strings = ( 335 Items.Strings = (
290 'Up' 336 'Up'
291 'Down' 337 'Down'
292 ) 338 )
293 OnChange = DirectionComboBoxChange 339 OnChange = DirectionComboBoxChange
340 ParentFont = False
294 Style = csDropDownList 341 Style = csDropDownList
295 TabOrder = 0 342 TabOrder = 0
296 Text = 'Down' 343 Text = 'Down'
297 end 344 end
298 object Label6: TLabel 345 object Label6: TLabel
299 Left = 8 346 Left = 14
300 Height = 15 347 Height = 30
301 Top = 86 348 Top = 150
302 Width = 41 349 Width = 71
303 Caption = 'Change' 350 Caption = 'Change'
304 ParentColor = False 351 ParentColor = False
352 ParentFont = False
305 end 353 end
306 object StartVolSpinner: TECSpinPosition 354 object StartVolSpinner: TECSpinPosition
307 Left = 82 355 Left = 144
308 Height = 24 356 Height = 24
309 Top = -1 357 Top = -2
310 Width = 198 358 Width = 198
311 Buttons.BtnBigDec.BtnOrder = 1 359 Buttons.BtnBigDec.BtnOrder = 1
312 Buttons.BtnBigDec.Visible = False 360 Buttons.BtnBigDec.Visible = False
@@ -329,7 +377,9 @@ object frmTracker: TfrmTracker
329 Buttons.MouseIncrementX = 0.1 377 Buttons.MouseIncrementX = 0.1
330 Buttons.MouseIncrementY = 0.05 378 Buttons.MouseIncrementY = 0.05
331 Buttons.PageSize = 10 379 Buttons.PageSize = 10
380 Buttons.ParentFont = False
332 Buttons.Style = ebsSplittedBlock 381 Buttons.Style = ebsSplittedBlock
382 ParentFont = False
333 Position = 0 383 Position = 0
334 ProgressFontOptions.FontSize = 0 384 ProgressFontOptions.FontSize = 0
335 ProgressFontOptions.FontStyles = [fsBold] 385 ProgressFontOptions.FontStyles = [fsBold]
@@ -349,9 +399,9 @@ object frmTracker: TfrmTracker
349 OnChange = StartVolSpinnerChange 399 OnChange = StartVolSpinnerChange
350 end 400 end
351 object EnvChangeSpinner: TECSpinPosition 401 object EnvChangeSpinner: TECSpinPosition
352 Left = 82 402 Left = 144
353 Height = 24 403 Height = 24
354 Top = 80 404 Top = 140
355 Width = 198 405 Width = 198
356 Buttons.BtnBigDec.BtnOrder = 1 406 Buttons.BtnBigDec.BtnOrder = 1
357 Buttons.BtnBigDec.Visible = False 407 Buttons.BtnBigDec.Visible = False
@@ -374,7 +424,9 @@ object frmTracker: TfrmTracker
374 Buttons.MouseIncrementX = 0.1 424 Buttons.MouseIncrementX = 0.1
375 Buttons.MouseIncrementY = 0.05 425 Buttons.MouseIncrementY = 0.05
376 Buttons.PageSize = 10 426 Buttons.PageSize = 10
427 Buttons.ParentFont = False
377 Buttons.Style = ebsSplittedBlock 428 Buttons.Style = ebsSplittedBlock
429 ParentFont = False
378 Position = 0 430 Position = 0
379 ProgressFontOptions.FontSize = 0 431 ProgressFontOptions.FontSize = 0
380 ProgressFontOptions.FontStyles = [fsBold] 432 ProgressFontOptions.FontStyles = [fsBold]
@@ -394,48 +446,52 @@ object frmTracker: TfrmTracker
394 OnChange = EnvChangeSpinnerChange 446 OnChange = EnvChangeSpinnerChange
395 end 447 end
396 object Panel5: TPanel 448 object Panel5: TPanel
397 Left = 336 449 Left = 588
398 Height = 105 450 Height = 184
399 Top = 0 451 Top = 0
400 Width = 346 452 Width = 606
401 BevelOuter = bvLowered 453 BevelOuter = bvLowered
402 ClientHeight = 105 454 ClientHeight = 184
403 ClientWidth = 346 455 ClientWidth = 606
456 ParentFont = False
404 TabOrder = 3 457 TabOrder = 3
405 object EnvelopePaintbox: TPaintBox 458 object EnvelopePaintbox: TPaintBox
406 Left = 1 459 Left = 1
407 Height = 103 460 Height = 182
408 Top = 1 461 Top = 1
409 Width = 344 462 Width = 604
410 Align = alClient 463 Align = alClient
464 ParentFont = False
411 OnPaint = EnvelopePaintboxPaint 465 OnPaint = EnvelopePaintboxPaint
412 end 466 end
413 end 467 end
414 end 468 end
415 object SquareGroupBox: TGroupBox 469 object SquareGroupBox: TGroupBox
416 Left = 8 470 Left = 14
417 Height = 169 471 Height = 296
418 Top = 152 472 Top = 266
419 Width = 360 473 Width = 630
420 Caption = 'Square' 474 Caption = 'Square'
421 ClientHeight = 149 475 ClientHeight = 261
422 ClientWidth = 356 476 ClientWidth = 626
477 ParentFont = False
423 TabOrder = 2 478 TabOrder = 2
424 object Label7: TLabel 479 object Label7: TLabel
425 Left = 8 480 Left = 14
426 Height = 15 481 Height = 30
427 Top = 16 482 Top = 28
428 Width = 61 483 Width = 107
429 Caption = 'Sweep time' 484 Caption = 'Sweep time'
430 ParentColor = False 485 ParentColor = False
486 ParentFont = False
431 end 487 end
432 object SweepTimeCombobox: TComboBox 488 object SweepTimeCombobox: TComboBox
433 Left = 104 489 Left = 182
434 Height = 23 490 Height = 38
435 Hint = 'How long to sweep' 491 Hint = 'How long to sweep'
436 Top = 8 492 Top = 14
437 Width = 200 493 Width = 350
438 ItemHeight = 15 494 ItemHeight = 30
439 ItemIndex = 0 495 ItemIndex = 0
440 Items.Strings = ( 496 Items.Strings = (
441 'Off - no frequency change' 497 'Off - no frequency change'
@@ -448,6 +504,7 @@ object frmTracker: TfrmTracker
448 '54.7 ms (7/128Hz)' 504 '54.7 ms (7/128Hz)'
449 ) 505 )
450 OnChange = SweepTimeComboboxChange 506 OnChange = SweepTimeComboboxChange
507 ParentFont = False
451 ParentShowHint = False 508 ParentShowHint = False
452 ShowHint = True 509 ShowHint = True
453 Style = csDropDownList 510 Style = csDropDownList
@@ -455,18 +512,19 @@ object frmTracker: TfrmTracker
455 Text = 'Off - no frequency change' 512 Text = 'Off - no frequency change'
456 end 513 end
457 object SweepDirectionCombobox: TComboBox 514 object SweepDirectionCombobox: TComboBox
458 Left = 104 515 Left = 182
459 Height = 23 516 Height = 38
460 Hint = 'The direction of the sweep' 517 Hint = 'The direction of the sweep'
461 Top = 40 518 Top = 70
462 Width = 200 519 Width = 350
463 ItemHeight = 15 520 ItemHeight = 30
464 ItemIndex = 1 521 ItemIndex = 1
465 Items.Strings = ( 522 Items.Strings = (
466 'Up' 523 'Up'
467 'Down' 524 'Down'
468 ) 525 )
469 OnChange = SweepDirectionComboboxChange 526 OnChange = SweepDirectionComboboxChange
527 ParentFont = False
470 ParentShowHint = False 528 ParentShowHint = False
471 ShowHint = True 529 ShowHint = True
472 Style = csDropDownList 530 Style = csDropDownList
@@ -474,36 +532,39 @@ object frmTracker: TfrmTracker
474 Text = 'Down' 532 Text = 'Down'
475 end 533 end
476 object Label8: TLabel 534 object Label8: TLabel
477 Left = 8 535 Left = 14
478 Height = 15 536 Height = 30
479 Top = 48 537 Top = 84
480 Width = 84 538 Width = 147
481 Caption = 'Sweep direction' 539 Caption = 'Sweep direction'
482 ParentColor = False 540 ParentColor = False
541 ParentFont = False
483 end 542 end
484 object Label9: TLabel 543 object Label9: TLabel
485 Left = 8 544 Left = 14
486 Height = 15 545 Height = 30
487 Top = 84 546 Top = 147
488 Width = 56 547 Width = 101
489 Caption = 'Sweep size' 548 Caption = 'Sweep size'
490 ParentColor = False 549 ParentColor = False
550 ParentFont = False
491 end 551 end
492 object Label10: TLabel 552 object Label10: TLabel
493 Left = 8 553 Left = 14
494 Height = 15 554 Height = 30
495 Top = 120 555 Top = 210
496 Width = 25 556 Width = 44
497 Caption = 'Duty' 557 Caption = 'Duty'
498 ParentColor = False 558 ParentColor = False
559 ParentFont = False
499 end 560 end
500 object DutyCombobox: TComboBox 561 object DutyCombobox: TComboBox
501 Left = 104 562 Left = 182
502 Height = 23 563 Height = 38
503 Hint = 'Which duty cycle to use (changes timbre of wave)' 564 Hint = 'Which duty cycle to use (changes timbre of wave)'
504 Top = 112 565 Top = 196
505 Width = 200 566 Width = 350
506 ItemHeight = 15 567 ItemHeight = 30
507 ItemIndex = 2 568 ItemIndex = 2
508 Items.Strings = ( 569 Items.Strings = (
509 '12.5%' 570 '12.5%'
@@ -512,6 +573,7 @@ object frmTracker: TfrmTracker
512 '75%' 573 '75%'
513 ) 574 )
514 OnChange = DutyComboboxChange 575 OnChange = DutyComboboxChange
576 ParentFont = False
515 ParentShowHint = False 577 ParentShowHint = False
516 ShowHint = True 578 ShowHint = True
517 Style = csDropDownList 579 Style = csDropDownList
@@ -519,9 +581,9 @@ object frmTracker: TfrmTracker
519 Text = '50% (square)' 581 Text = '50% (square)'
520 end 582 end
521 object SweepSizeSpinner: TECSpinPosition 583 object SweepSizeSpinner: TECSpinPosition
522 Left = 104 584 Left = 182
523 Height = 24 585 Height = 24
524 Top = 75 586 Top = 131
525 Width = 198 587 Width = 198
526 Buttons.BtnBigDec.BtnOrder = 1 588 Buttons.BtnBigDec.BtnOrder = 1
527 Buttons.BtnBigDec.Visible = False 589 Buttons.BtnBigDec.Visible = False
@@ -544,7 +606,9 @@ object frmTracker: TfrmTracker
544 Buttons.MouseIncrementX = 0.1 606 Buttons.MouseIncrementX = 0.1
545 Buttons.MouseIncrementY = 0.05 607 Buttons.MouseIncrementY = 0.05
546 Buttons.PageSize = 10 608 Buttons.PageSize = 10
609 Buttons.ParentFont = False
547 Buttons.Style = ebsSplittedBlock 610 Buttons.Style = ebsSplittedBlock
611 ParentFont = False
548 Position = 0 612 Position = 0
549 ProgressFontOptions.FontSize = 0 613 ProgressFontOptions.FontSize = 0
550 ProgressFontOptions.FontStyles = [fsBold] 614 ProgressFontOptions.FontStyles = [fsBold]
@@ -565,67 +629,73 @@ object frmTracker: TfrmTracker
565 end 629 end
566 end 630 end
567 object WaveGroupBox: TGroupBox 631 object WaveGroupBox: TGroupBox
568 Left = 384 632 Left = 672
569 Height = 169 633 Height = 296
570 Top = 152 634 Top = 266
571 Width = 297 635 Width = 520
572 Caption = 'Wave' 636 Caption = 'Wave'
573 ClientHeight = 149 637 ClientHeight = 261
574 ClientWidth = 293 638 ClientWidth = 516
575 Enabled = False 639 Enabled = False
640 ParentFont = False
576 TabOrder = 3 641 TabOrder = 3
577 object Label11: TLabel 642 object Label11: TLabel
578 Left = 8 643 Left = 14
579 Height = 15 644 Height = 30
580 Top = 16 645 Top = 28
581 Width = 40 646 Width = 70
582 Caption = 'Volume' 647 Caption = 'Volume'
583 ParentColor = False 648 ParentColor = False
649 ParentFont = False
584 end 650 end
585 object Label12: TLabel 651 object Label12: TLabel
586 Left = 8 652 Left = 14
587 Height = 15 653 Height = 30
588 Top = 48 654 Top = 84
589 Width = 55 655 Width = 95
590 Caption = 'Waveform' 656 Caption = 'Waveform'
591 ParentColor = False 657 ParentColor = False
658 ParentFont = False
592 end 659 end
593 object WaveformCombobox: TComboBox 660 object WaveformCombobox: TComboBox
594 Left = 104 661 Left = 182
595 Height = 23 662 Height = 38
596 Top = 40 663 Top = 70
597 Width = 176 664 Width = 308
598 ItemHeight = 15 665 ItemHeight = 30
599 OnChange = WaveformComboboxChange 666 OnChange = WaveformComboboxChange
667 ParentFont = False
600 Style = csDropDownList 668 Style = csDropDownList
601 TabOrder = 0 669 TabOrder = 0
602 end 670 end
603 object Panel4: TPanel 671 object Panel4: TPanel
604 Left = 8 672 Left = 14
605 Height = 59 673 Height = 103
606 Top = 80 674 Top = 140
607 Width = 272 675 Width = 476
608 BevelOuter = bvLowered 676 BevelOuter = bvLowered
609 ClientHeight = 59 677 ClientHeight = 103
610 ClientWidth = 272 678 ClientWidth = 476
679 ParentFont = False
611 TabOrder = 1 680 TabOrder = 1
612 object WavePaintbox: TPaintBox 681 object WavePaintbox: TPaintBox
613 Left = 1 682 Left = 1
614 Height = 57 683 Height = 101
615 Top = 1 684 Top = 1
616 Width = 270 685 Width = 474
617 Align = alClient 686 Align = alClient
618 Color = clBlack 687 Color = clBlack
619 ParentColor = False 688 ParentColor = False
689 ParentFont = False
620 OnPaint = WavePaintboxPaint 690 OnPaint = WavePaintboxPaint
621 end 691 end
622 end 692 end
623 object WaveVolumeCombobox: TComboBox 693 object WaveVolumeCombobox: TComboBox
624 Left = 104 694 Left = 182
625 Height = 23 695 Height = 38
626 Top = 8 696 Top = 14
627 Width = 176 697 Width = 308
628 ItemHeight = 15 698 ItemHeight = 30
629 ItemIndex = 1 699 ItemIndex = 1
630 Items.Strings = ( 700 Items.Strings = (
631 'Mute (No sound)' 701 'Mute (No sound)'
@@ -634,60 +704,66 @@ object frmTracker: TfrmTracker
634 '25% Volume' 704 '25% Volume'
635 ) 705 )
636 OnChange = WaveVolumeComboboxChange 706 OnChange = WaveVolumeComboboxChange
707 ParentFont = False
637 Style = csDropDownList 708 Style = csDropDownList
638 TabOrder = 2 709 TabOrder = 2
639 Text = '100% Volume' 710 Text = '100% Volume'
640 end 711 end
641 end 712 end
642 object NoiseGroupBox: TGroupBox 713 object NoiseGroupBox: TGroupBox
643 Left = 696 714 Left = 1218
644 Height = 169 715 Height = 296
645 Top = 152 716 Top = 266
646 Width = 344 717 Width = 602
647 Caption = 'Noise' 718 Caption = 'Noise'
648 ClientHeight = 149 719 ClientHeight = 261
649 ClientWidth = 340 720 ClientWidth = 598
650 Enabled = False 721 Enabled = False
722 ParentFont = False
651 TabOrder = 4 723 TabOrder = 4
652 object Label13: TLabel 724 object Label13: TLabel
653 Left = 8 725 Left = 14
654 Height = 15 726 Height = 30
655 Top = 16 727 Top = 28
656 Width = 55 728 Width = 95
657 Caption = 'Frequency' 729 Caption = 'Frequency'
658 ParentColor = False 730 ParentColor = False
731 ParentFont = False
659 end 732 end
660 object SevenBitCounterCheckbox: TCheckBox 733 object SevenBitCounterCheckbox: TCheckBox
661 Left = 8 734 Left = 14
662 Height = 19 735 Height = 34
663 Top = 80 736 Top = 140
664 Width = 215 737 Width = 373
665 Alignment = taLeftJustify 738 Alignment = taLeftJustify
666 Caption = '7 bit counter (more tone-like output)' 739 Caption = '7 bit counter (more tone-like output)'
667 OnChange = SevenBitCounterCheckboxChange 740 OnChange = SevenBitCounterCheckboxChange
741 ParentFont = False
668 TabOrder = 0 742 TabOrder = 0
669 end 743 end
670 object Label14: TLabel 744 object Label14: TLabel
671 Left = 8 745 Left = 14
672 Height = 15 746 Height = 30
673 Top = 48 747 Top = 84
674 Width = 71 748 Width = 124
675 Caption = 'Dividing ratio' 749 Caption = 'Dividing ratio'
676 ParentColor = False 750 ParentColor = False
751 ParentFont = False
677 end 752 end
678 object RandomizeNoiseButton: TButton 753 object RandomizeNoiseButton: TButton
679 Left = 8 754 Left = 14
680 Height = 25 755 Height = 44
681 Top = 110 756 Top = 192
682 Width = 320 757 Width = 560
683 Caption = 'Randomize' 758 Caption = 'Randomize'
684 OnClick = RandomizeNoiseButtonClick 759 OnClick = RandomizeNoiseButtonClick
760 ParentFont = False
685 TabOrder = 1 761 TabOrder = 1
686 end 762 end
687 object NoiseFreqSpinner: TECSpinPosition 763 object NoiseFreqSpinner: TECSpinPosition
688 Left = 86 764 Left = 150
689 Height = 24 765 Height = 24
690 Top = 7 766 Top = 12
691 Width = 198 767 Width = 198
692 Buttons.BtnBigDec.BtnOrder = 1 768 Buttons.BtnBigDec.BtnOrder = 1
693 Buttons.BtnBigDec.Visible = False 769 Buttons.BtnBigDec.Visible = False
@@ -710,7 +786,9 @@ object frmTracker: TfrmTracker
710 Buttons.MouseIncrementX = 0.1 786 Buttons.MouseIncrementX = 0.1
711 Buttons.MouseIncrementY = 0.05 787 Buttons.MouseIncrementY = 0.05
712 Buttons.PageSize = 10 788 Buttons.PageSize = 10
789 Buttons.ParentFont = False
713 Buttons.Style = ebsSplittedBlock 790 Buttons.Style = ebsSplittedBlock
791 ParentFont = False
714 Position = 0 792 Position = 0
715 ProgressFontOptions.FontSize = 0 793 ProgressFontOptions.FontSize = 0
716 ProgressFontOptions.FontStyles = [fsBold] 794 ProgressFontOptions.FontStyles = [fsBold]
@@ -730,9 +808,9 @@ object frmTracker: TfrmTracker
730 OnChange = NoiseFreqSpinnerChange 808 OnChange = NoiseFreqSpinnerChange
731 end 809 end
732 object DivRatioSpinner: TECSpinPosition 810 object DivRatioSpinner: TECSpinPosition
733 Left = 86 811 Left = 150
734 Height = 24 812 Height = 24
735 Top = 39 813 Top = 68
736 Width = 198 814 Width = 198
737 Buttons.BtnBigDec.BtnOrder = 1 815 Buttons.BtnBigDec.BtnOrder = 1
738 Buttons.BtnBigDec.Visible = False 816 Buttons.BtnBigDec.Visible = False
@@ -755,7 +833,9 @@ object frmTracker: TfrmTracker
755 Buttons.MouseIncrementX = 0.1 833 Buttons.MouseIncrementX = 0.1
756 Buttons.MouseIncrementY = 0.05 834 Buttons.MouseIncrementY = 0.05
757 Buttons.PageSize = 10 835 Buttons.PageSize = 10
836 Buttons.ParentFont = False
758 Buttons.Style = ebsSplittedBlock 837 Buttons.Style = ebsSplittedBlock
838 ParentFont = False
759 Position = 0 839 Position = 0
760 ProgressFontOptions.FontSize = 0 840 ProgressFontOptions.FontSize = 0
761 ProgressFontOptions.FontStyles = [fsBold] 841 ProgressFontOptions.FontStyles = [fsBold]
@@ -779,107 +859,120 @@ object frmTracker: TfrmTracker
779 end 859 end
780 object WavesTabSheet: TTabSheet 860 object WavesTabSheet: TTabSheet
781 Caption = 'Waves' 861 Caption = 'Waves'
782 ClientHeight = 601 862 ClientHeight = 897
783 ClientWidth = 1080 863 ClientWidth = 1895
864 ParentFont = False
784 object WaveEditPaintBox: TPaintBox 865 object WaveEditPaintBox: TPaintBox
785 Left = 0 866 Left = 0
786 Height = 385 867 Height = 513
787 Top = 216 868 Top = 384
788 Width = 1080 869 Width = 1895
789 Align = alBottom 870 Align = alBottom
790 Anchors = [akTop, akLeft, akRight, akBottom] 871 Anchors = [akTop, akLeft, akRight, akBottom]
872 ParentFont = False
873 OnMouseDown = WaveEditPaintBoxMouseDown
874 OnMouseMove = WaveEditPaintBoxMouseMove
875 OnMouseUp = WaveEditPaintBoxMouseUp
791 OnPaint = WaveEditPaintBoxPaint 876 OnPaint = WaveEditPaintBoxPaint
792 end 877 end
793 object WaveEditGroupBox: TGroupBox 878 object WaveEditGroupBox: TGroupBox
794 Left = 8 879 Left = 14
795 Height = 192 880 Height = 336
796 Top = 8 881 Top = 14
797 Width = 345 882 Width = 604
798 Caption = 'Wave Editor' 883 Caption = 'Wave Editor'
799 ClientHeight = 172 884 ClientHeight = 301
800 ClientWidth = 341 885 ClientWidth = 600
886 ParentFont = False
801 TabOrder = 0 887 TabOrder = 0
802 object Label20: TLabel 888 object Label20: TLabel
803 Left = 16 889 Left = 28
804 Height = 15 890 Height = 30
805 Top = 16 891 Top = 28
806 Width = 29 892 Width = 51
807 Caption = 'Wave' 893 Caption = 'Wave'
808 ParentColor = False 894 ParentColor = False
895 ParentFont = False
809 end 896 end
810 object WaveEditNumberSpinner: TSpinEdit 897 object WaveEditNumberSpinner: TSpinEdit
811 Left = 64 898 Left = 112
812 Height = 23 899 Height = 38
813 Top = 8 900 Top = 14
814 Width = 80 901 Width = 140
815 MaxValue = 15 902 MaxValue = 15
816 MinValue = 1
817 OnChange = WaveEditNumberSpinnerChange 903 OnChange = WaveEditNumberSpinnerChange
904 ParentFont = False
818 TabOrder = 0 905 TabOrder = 0
819 Value = 1
820 end 906 end
821 object ImportWaveButton: TButton 907 object ImportWaveButton: TButton
822 Left = 16 908 Left = 28
823 Height = 25 909 Height = 44
824 Top = 48 910 Top = 84
825 Width = 147 911 Width = 257
826 Caption = 'Import' 912 Caption = 'Import'
827 OnClick = ImportWaveButtonClick 913 OnClick = ImportWaveButtonClick
914 ParentFont = False
828 TabOrder = 1 915 TabOrder = 1
829 end 916 end
830 object ExportButton: TButton 917 object ExportButton: TButton
831 Left = 16 918 Left = 28
832 Height = 25 919 Height = 44
833 Top = 80 920 Top = 140
834 Width = 147 921 Width = 257
835 Caption = 'Export' 922 Caption = 'Export'
923 OnClick = ExportButtonClick
924 ParentFont = False
836 TabOrder = 2 925 TabOrder = 2
837 end 926 end
838 end 927 end
839 end 928 end
840 object CommentsTabSheet: TTabSheet 929 object CommentsTabSheet: TTabSheet
841 Caption = 'Comments' 930 Caption = 'Comments'
842 ClientHeight = 601 931 ClientHeight = 897
843 ClientWidth = 1080 932 ClientWidth = 1895
933 ParentFont = False
844 object CommentMemo: TMemo 934 object CommentMemo: TMemo
845 Left = 0 935 Left = 0
846 Height = 537 936 Height = 833
847 Top = 64 937 Top = 64
848 Width = 1080 938 Width = 1895
849 Align = alBottom 939 Align = alBottom
850 Anchors = [akTop, akLeft, akRight, akBottom] 940 Anchors = [akTop, akLeft, akRight, akBottom]
851 OnChange = CommentMemoChange 941 OnChange = CommentMemoChange
942 ParentFont = False
852 TabOrder = 0 943 TabOrder = 0
853 end 944 end
854 object Label17: TLabel 945 object Label17: TLabel
855 Left = 8 946 Left = 14
856 Height = 15 947 Height = 30
857 Top = 8 948 Top = 14
858 Width = 337 949 Width = 593
859 Caption = 'This is an area to write comments for anyone viewing your tune.' 950 Caption = 'This is an area to write comments for anyone viewing your tune.'
860 ParentColor = False 951 ParentColor = False
952 ParentFont = False
861 end 953 end
862 end 954 end
863 object RoutinesTabSheet: TTabSheet 955 object RoutinesTabSheet: TTabSheet
864 Caption = 'Routines' 956 Caption = 'Routines'
865 ClientHeight = 657 957 ClientHeight = 897
866 ClientWidth = 1100 958 ClientWidth = 1895
959 ParentFont = False
867 inline RoutineSynedit: TSynEdit 960 inline RoutineSynedit: TSynEdit
868 Left = 0 961 Left = 0
869 Height = 530 962 Height = 665
870 Top = 127 963 Top = 232
871 Width = 1100 964 Width = 1895
872 Align = alBottom 965 Align = alBottom
873 BorderSpacing.Top = 55 966 BorderSpacing.Top = 96
874 Anchors = [akTop, akLeft, akRight, akBottom] 967 Anchors = [akTop, akLeft, akRight, akBottom]
875 Font.Height = -13 968 Font.Height = -23
876 Font.Name = 'Courier New' 969 Font.Name = 'Courier New'
877 Font.Pitch = fpFixed 970 Font.Pitch = fpFixed
878 Font.Quality = fqNonAntialiased 971 Font.Quality = fqNonAntialiased
879 ParentColor = False 972 ParentColor = False
880 ParentFont = False 973 ParentFont = False
881 TabOrder = 0 974 TabOrder = 0
882 Gutter.Width = 57 975 Gutter.Width = 100
883 Gutter.MouseActions = <> 976 Gutter.MouseActions = <>
884 RightGutter.Width = 0 977 RightGutter.Width = 0
885 RightGutter.MouseActions = <> 978 RightGutter.MouseActions = <>
@@ -1331,11 +1424,11 @@ object frmTracker: TfrmTracker
1331 LineHighlightColor.Foreground = clNone 1424 LineHighlightColor.Foreground = clNone
1332 inline SynLeftGutterPartList1: TSynGutterPartList 1425 inline SynLeftGutterPartList1: TSynGutterPartList
1333 object SynGutterMarks1: TSynGutterMarks 1426 object SynGutterMarks1: TSynGutterMarks
1334 Width = 24 1427 Width = 42
1335 MouseActions = <> 1428 MouseActions = <>
1336 end 1429 end
1337 object SynGutterLineNumber1: TSynGutterLineNumber 1430 object SynGutterLineNumber1: TSynGutterLineNumber
1338 Width = 17 1431 Width = 29
1339 MouseActions = <> 1432 MouseActions = <>
1340 MarkupInfo.Background = clBtnFace 1433 MarkupInfo.Background = clBtnFace
1341 MarkupInfo.Foreground = clNone 1434 MarkupInfo.Foreground = clNone
@@ -1345,18 +1438,19 @@ object frmTracker: TfrmTracker
1345 LeadingZeros = False 1438 LeadingZeros = False
1346 end 1439 end
1347 object SynGutterChanges1: TSynGutterChanges 1440 object SynGutterChanges1: TSynGutterChanges
1348 Width = 4 1441 Width = 7
1349 MouseActions = <> 1442 MouseActions = <>
1350 ModifiedColor = 59900 1443 ModifiedColor = 59900
1351 SavedColor = clGreen 1444 SavedColor = clGreen
1352 end 1445 end
1353 object SynGutterSeparator1: TSynGutterSeparator 1446 object SynGutterSeparator1: TSynGutterSeparator
1354 Width = 2 1447 Width = 4
1355 MouseActions = <> 1448 MouseActions = <>
1356 MarkupInfo.Background = clWhite 1449 MarkupInfo.Background = clWhite
1357 MarkupInfo.Foreground = clGray 1450 MarkupInfo.Foreground = clGray
1358 end 1451 end
1359 object SynGutterCodeFolding1: TSynGutterCodeFolding 1452 object SynGutterCodeFolding1: TSynGutterCodeFolding
1453 Width = 18
1360 MouseActions = <> 1454 MouseActions = <>
1361 MarkupInfo.Background = clNone 1455 MarkupInfo.Background = clNone
1362 MarkupInfo.Foreground = clGray 1456 MarkupInfo.Foreground = clGray
@@ -1366,73 +1460,79 @@ object frmTracker: TfrmTracker
1366 end 1460 end
1367 end 1461 end
1368 object Label18: TLabel 1462 object Label18: TLabel
1369 Left = 8 1463 Left = 14
1370 Height = 15 1464 Height = 30
1371 Top = 16 1465 Top = 28
1372 Width = 41 1466 Width = 71
1373 Caption = 'Routine' 1467 Caption = 'Routine'
1374 ParentColor = False 1468 ParentColor = False
1469 ParentFont = False
1375 end 1470 end
1376 object RoutineNumberSpinner: TSpinEdit 1471 object RoutineNumberSpinner: TSpinEdit
1377 Left = 64 1472 Left = 112
1378 Height = 23 1473 Height = 38
1379 Top = 8 1474 Top = 14
1380 Width = 176 1475 Width = 308
1381 MaxValue = 15 1476 MaxValue = 15
1382 MinValue = 1 1477 MinValue = 1
1383 OnChange = InstrumentNumberSpinnerChange 1478 OnChange = InstrumentNumberSpinnerChange
1479 ParentFont = False
1384 TabOrder = 1 1480 TabOrder = 1
1385 Value = 1 1481 Value = 1
1386 end 1482 end
1387 object Label19: TLabel 1483 object Label19: TLabel
1388 Left = 8 1484 Left = 14
1389 Height = 75 1485 Height = 150
1390 Top = 40 1486 Top = 70
1391 Width = 506 1487 Width = 891
1392 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!' 1488 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!'
1393 ParentColor = False 1489 ParentColor = False
1490 ParentFont = False
1394 end 1491 end
1395 end 1492 end
1396 end 1493 end
1397 end 1494 end
1398 object CoolBar1: TCoolBar 1495 object CoolBar1: TCoolBar
1399 Left = 0 1496 Left = 0
1400 Height = 24 1497 Height = 42
1401 Top = 0 1498 Top = 0
1402 Width = 1286 1499 Width = 2250
1403 Bands = < 1500 Bands = <
1404 item 1501 item
1405 end> 1502 end>
1503 ParentFont = False
1406 end 1504 end
1407 object Panel2: TPanel 1505 object Panel2: TPanel
1408 Left = 0 1506 Left = 0
1409 Height = 178 1507 Height = 312
1410 Top = 24 1508 Top = 42
1411 Width = 1286 1509 Width = 2250
1412 Align = alTop 1510 Align = alTop
1413 BevelOuter = bvNone 1511 BevelOuter = bvNone
1512 ParentFont = False
1414 TabOrder = 4 1513 TabOrder = 4
1415 end 1514 end
1416 object StatusBar1: TStatusBar 1515 object StatusBar1: TStatusBar
1417 Left = 0 1516 Left = 0
1418 Height = 23 1517 Height = 43
1419 Top = 831 1518 Top = 1294
1420 Width = 1286 1519 Width = 2250
1421 Panels = < 1520 Panels = <
1422 item 1521 item
1423 Width = 200 1522 Width = 350
1424 end 1523 end
1425 item 1524 item
1426 Width = 200 1525 Width = 350
1427 end 1526 end
1428 item 1527 item
1429 Width = 200 1528 Width = 350
1430 end> 1529 end>
1530 ParentFont = False
1431 SimplePanel = False 1531 SimplePanel = False
1432 end 1532 end
1433 object MainMenu1: TMainMenu 1533 object MainMenu1: TMainMenu
1434 left = 928 1534 left = 1624
1435 top = 32 1535 top = 56
1436 object MenuItem1: TMenuItem 1536 object MenuItem1: TMenuItem
1437 Caption = 'File' 1537 Caption = 'File'
1438 end 1538 end
@@ -1448,17 +1548,17 @@ object frmTracker: TfrmTracker
1448 Caption = 'About hUGETracker' 1548 Caption = 'About hUGETracker'
1449 end 1549 end
1450 end 1550 end
1451 object MenuItem6: TMenuItem 1551 object DebugButton: TMenuItem
1452 Caption = 'Debug shite' 1552 Caption = 'Debug shite'
1453 OnClick = MenuItem6Click 1553 OnClick = DebugButtonClick
1454 end 1554 end
1455 end 1555 end
1456 object OpenDialog1: TOpenDialog 1556 object OpenDialog1: TOpenDialog
1457 left = 768 1557 left = 1344
1458 top = 32 1558 top = 56
1459 end 1559 end
1460 object SaveDialog1: TSaveDialog 1560 object SaveDialog1: TSaveDialog
1461 left = 688 1561 left = 1204
1462 top = 32 1562 top = 56
1463 end 1563 end
1464 end 1564 end
Modifiedtracker.pas +77−14
@@ -6,9 +6,9 @@ interface
6 6
7 uses 7 uses
8 Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls, ComCtrls, 8 Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls, ComCtrls,
9 Menus, Spin, StdCtrls, SynEdit, VirtualTrees, ECSlider, ECProgressBar, 9 Menus, Spin, StdCtrls, Grids, ValEdit, SynEdit, VirtualTrees, ECSlider,
10 Instruments, Waves, Song, EmulationThread, Utils, Constants, 10 ECProgressBar, math, Instruments, Waves, Song, EmulationThread, Utils,
11 mainloop, sound, vars, machine; 11 Constants, StrUtils, mainloop, sound, vars, machine;
12 12
13 type 13 type
14 { TfrmTracker } 14 { TfrmTracker }
@@ -18,12 +18,14 @@ type
18 ImportWaveButton: TButton; 18 ImportWaveButton: TButton;
19 CommentMemo: TMemo; 19 CommentMemo: TMemo;
20 Label20: TLabel; 20 Label20: TLabel;
21 Label21: TLabel;
21 OpenDialog1: TOpenDialog; 22 OpenDialog1: TOpenDialog;
22 SaveDialog1: TSaveDialog; 23 SaveDialog1: TSaveDialog;
24 SpinEdit1: TSpinEdit;
23 WaveEditNumberSpinner: TSpinEdit; 25 WaveEditNumberSpinner: TSpinEdit;
24 WaveEditGroupBox: TGroupBox; 26 WaveEditGroupBox: TGroupBox;
25 Label19: TLabel; 27 Label19: TLabel;
26 MenuItem6: TMenuItem; 28 DebugButton: TMenuItem;
27 WaveEditPaintBox: TPaintBox; 29 WaveEditPaintBox: TPaintBox;
28 RoutineNumberSpinner: TSpinEdit; 30 RoutineNumberSpinner: TSpinEdit;
29 Label17: TLabel; 31 Label17: TLabel;
@@ -103,6 +105,7 @@ type
103 procedure DutyComboboxChange(Sender: TObject); 105 procedure DutyComboboxChange(Sender: TObject);
104 procedure EnvChangeSpinnerChange(Sender: TObject); 106 procedure EnvChangeSpinnerChange(Sender: TObject);
105 procedure EnvelopePaintboxPaint(Sender: TObject); 107 procedure EnvelopePaintboxPaint(Sender: TObject);
108 procedure ExportButtonClick(Sender: TObject);
106 procedure FormCreate(Sender: TObject); 109 procedure FormCreate(Sender: TObject);
107 procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); 110 procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
108 procedure FormKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState); 111 procedure FormKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
@@ -110,9 +113,16 @@ type
110 procedure InstrumentNameEditChange(Sender: TObject); 113 procedure InstrumentNameEditChange(Sender: TObject);
111 procedure InstrumentNumberSpinnerChange(Sender: TObject); 114 procedure InstrumentNumberSpinnerChange(Sender: TObject);
112 procedure LengthSpinnerChange(Sender: TObject); 115 procedure LengthSpinnerChange(Sender: TObject);
113 procedure MenuItem6Click(Sender: TObject); 116 procedure DebugButtonClick(Sender: TObject);
114 procedure NoiseFreqSpinnerChange(Sender: TObject); 117 procedure NoiseFreqSpinnerChange(Sender: TObject);
118 procedure SpinEdit1Change(Sender: TObject);
115 procedure WaveEditNumberSpinnerChange(Sender: TObject); 119 procedure WaveEditNumberSpinnerChange(Sender: TObject);
120 procedure WaveEditPaintBoxMouseDown(Sender: TObject; Button: TMouseButton;
121 Shift: TShiftState; X, Y: Integer);
122 procedure WaveEditPaintBoxMouseMove(Sender: TObject; Shift: TShiftState; X,
123 Y: Integer);
124 procedure WaveEditPaintBoxMouseUp(Sender: TObject; Button: TMouseButton;
125 Shift: TShiftState; X, Y: Integer);
116 procedure WaveEditPaintBoxPaint(Sender: TObject); 126 procedure WaveEditPaintBoxPaint(Sender: TObject);
117 procedure RandomizeNoiseButtonClick(Sender: TObject); 127 procedure RandomizeNoiseButtonClick(Sender: TObject);
118 procedure InstrumentTypeComboboxChange(Sender: TObject); 128 procedure InstrumentTypeComboboxChange(Sender: TObject);
@@ -135,6 +145,7 @@ type
135 EmulationThread: TThread; 145 EmulationThread: TThread;
136 146
137 PreviewingInstrument: Boolean; 147 PreviewingInstrument: Boolean;
148 DrawingWave: Boolean;
138 149
139 procedure ChangeToSquare; 150 procedure ChangeToSquare;
140 procedure ChangeToWave; 151 procedure ChangeToWave;
@@ -160,7 +171,7 @@ implementation
160 171
161 procedure TfrmTracker.DrawWaveform(PB: TPaintBox; Wave: TWave); 172 procedure TfrmTracker.DrawWaveform(PB: TPaintBox; Wave: TWave);
162 var 173 var
163 Interval: Integer; 174 Interval, HInterval: Integer;
164 I: Integer; 175 I: Integer;
165 W, H : Integer; 176 W, H : Integer;
166 begin 177 begin
@@ -168,12 +179,22 @@ begin
168 H := PB.Height; 179 H := PB.Height;
169 180
170 Interval := W div 32; 181 Interval := W div 32;
182 HInterval := H div $10;
171 With PB.Canvas do begin 183 With PB.Canvas do begin
172 Brush.Color := clBlack; 184 Brush.Color := clBlack;
173 Clear; 185 Clear;
174 186
187 {Pen.Width := 1;
188 Pen.Color := StringToColor('$103800');
189 for I := 0 to 32 do
190 Line(I*Interval, 0, I*Interval, H);
191
192 for I := 0 to $10 do
193 Line(0, I*HInterval, W, I*HInterval);}
194
175 Brush.Color := clTeal; 195 Brush.Color := clTeal;
176 Pen.Color := clTeal; 196 Pen.Color := clTeal;
197 Pen.Width := 2;
177 MoveTo(0, H); 198 MoveTo(0, H);
178 for I := 0 to 32 do 199 for I := 0 to 32 do
179 LineTo(I*Interval, Round((Wave[I]/$F)*H)); 200 LineTo(I*Interval, Round((Wave[I]/$F)*H));
@@ -421,7 +442,7 @@ begin
421 end; 442 end;
422 443
423 LoadInstrument(1); 444 LoadInstrument(1);
424 LoadWave(1); 445 LoadWave(0);
425 446
426 // Get the emulator ready to make sound... 447 // Get the emulator ready to make sound...
427 EmulationThread := TEmulationThread.Create; 448 EmulationThread := TEmulationThread.Create;
@@ -458,7 +479,11 @@ var
458 begin 479 begin
459 OpenDialog1.DefaultExt := '*.pcm'; 480 OpenDialog1.DefaultExt := '*.pcm';
460 if OpenDialog1.Execute then begin 481 if OpenDialog1.Execute then begin
461 482 assignfile(F, OpenDialog1.FileName);
483 reset(F);
484 BlockRead(F, Song.Waves[WaveEditNumberSpinner.Value], 32);
485 CloseFile(F);
486 WaveEditPaintBox.Invalidate;
462 end; 487 end;
463 end; 488 end;
464 489
@@ -503,6 +528,17 @@ begin
503 end; 528 end;
504 end; 529 end;
505 530
531 procedure TfrmTracker.ExportButtonClick(Sender: TObject);
532 var F: file of Byte;
533 begin
534 if SaveDialog1.Execute then begin
535 AssignFile(F, OpenDialog1.FileName);
536 Rewrite(F);
537 BlockWrite(F, CurrentWave^, 32);
538 CloseFile(F);
539 end;
540 end;
541
506 procedure TfrmTracker.InstrumentNameEditChange(Sender: TObject); 542 procedure TfrmTracker.InstrumentNameEditChange(Sender: TObject);
507 begin 543 begin
508 CurrentInstrument^.Name := InstrumentNameEdit.Text; 544 CurrentInstrument^.Name := InstrumentNameEdit.Text;
@@ -518,14 +554,9 @@ begin
518 CurrentInstrument^.Length := Round(LengthSpinner.Position); 554 CurrentInstrument^.Length := Round(LengthSpinner.Position);
519 end; 555 end;
520 556
521 procedure TfrmTracker.MenuItem6Click(Sender: TObject); 557 procedure TfrmTracker.DebugButtonClick(Sender: TObject);
522 begin 558 begin
523 PreviewInstrument(C_5, InstrumentNumberSpinner.Value); 559 PreviewInstrument(C_5, InstrumentNumberSpinner.Value);
524 {Spokeb($FF10, 0);
525 Spokeb($FF11, %11111111);
526 Spokeb($FF12, %11110000);
527 Spokeb($FF13, 10);
528 Spokeb($FF14, %10000000 or 6);}
529 end; 560 end;
530 561
531 procedure TfrmTracker.NoiseFreqSpinnerChange(Sender: TObject); 562 procedure TfrmTracker.NoiseFreqSpinnerChange(Sender: TObject);
@@ -533,11 +564,43 @@ begin
533 CurrentInstrument^.ShiftClockFreq := Round(NoiseFreqSpinner.Position); 564 CurrentInstrument^.ShiftClockFreq := Round(NoiseFreqSpinner.Position);
534 end; 565 end;
535 566
567 procedure TfrmTracker.SpinEdit1Change(Sender: TObject);
568 begin
569 Song.TicksPerRow := SpinEdit1.Value;
570 end;
571
536 procedure TfrmTracker.WaveEditNumberSpinnerChange(Sender: TObject); 572 procedure TfrmTracker.WaveEditNumberSpinnerChange(Sender: TObject);
537 begin 573 begin
538 LoadWave(WaveEditNumberSpinner.Value); 574 LoadWave(WaveEditNumberSpinner.Value);
539 end; 575 end;
540 576
577 procedure TfrmTracker.WaveEditPaintBoxMouseDown(Sender: TObject;
578 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
579 begin
580 DrawingWave := True;
581 end;
582
583 procedure TfrmTracker.WaveEditPaintBoxMouseMove(Sender: TObject;
584 Shift: TShiftState; X, Y: Integer);
585 var
586 Idx: Integer;
587 begin
588 if DrawingWave then begin
589 Idx := Round((X / WaveEditPaintBox.Width)*32);
590 CurrentWave^[Idx] :=
591 Min($F,
592 Max(0,
593 Round((Y / WaveEditPaintBox.Height)*$F)));
594 WaveEditPaintBox.Invalidate;
595 end;
596 end;
597
598 procedure TfrmTracker.WaveEditPaintBoxMouseUp(Sender: TObject;
599 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
600 begin
601 DrawingWave := False;
602 end;
603
541 procedure TfrmTracker.WaveEditPaintBoxPaint(Sender: TObject); 604 procedure TfrmTracker.WaveEditPaintBoxPaint(Sender: TObject);
542 begin 605 begin
543 DrawWaveform(WaveEditPaintBox, CurrentWave^); 606 DrawWaveform(WaveEditPaintBox, CurrentWave^);
Modifiedutils.pas +154−84
@@ -15,19 +15,100 @@ type
15 Noise: (NR41, NR42, NR43, NR44: Byte); 15 Noise: (NR41, NR42, NR43, NR44: Byte);
16 end; 16 end;
17 17
18 function BuildEnvelope( 18 Bit = Boolean;
19 InitialVol: TEnvelopeVolume; 19 TwoBits = 0..3;
20 Direction: TSweepType; 20 ThreeBits = 0..7;
21 Amount: TEnvelopeSweepAmount): Byte; 21 FourBits = 0..17;
22 FiveBits = 0..31;
23 SixBits = 0..63;
24 SevenBits = 0..127;
25 EightBits = Byte;
26
27 TSweepRegister = bitpacked record
28 case Boolean of
29 True: (
30 Shift: ThreeBits;
31 IncDec: Bit;
32 SweepTime: ThreeBits;
33 _: Bit;
34 );
35 False: (ByteValue: Byte);
36 end;
22 37
23 function BuildHighByte( 38 TSquareLengthRegister = bitpacked record
24 Initial: Boolean; 39 case Boolean of
25 LengthEnabled: Boolean; 40 True: (
26 Frequency: Integer): Byte; overload; 41 Length: SixBits;
42 Duty: TwoBits;
43 );
44 False: (ByteValue: Byte);
45 end;
27 46
28 function BuildHighByte( 47 TEnvelopeRegister = bitpacked record
29 Initial: Boolean; 48 case Boolean of
30 LengthEnabled: Boolean): Byte; overload; 49 True: (
50 SweepNumber: ThreeBits;
51 Direction: Bit;
52 InitialVolume: FourBits;
53 );
54 False: (ByteValue: Byte);
55 end;
56
57 TLowByteRegister = Byte;
58
59 THighByteRegister = bitpacked record
60 case Boolean of
61 True: (
62 FrequencyBits: ThreeBits;
63 _Padding: ThreeBits;
64 UseLength: Bit;
65 Initial: Bit;
66 );
67 False: (ByteValue: Byte);
68 end;
69
70 TCh3SoundOnOffRegister = bitpacked record
71 case Boolean of
72 True: (
73 _Padding: SevenBits;
74 Playback: Bit;
75 );
76 False: (ByteValue: Byte);
77 end;
78
79 TCh3SoundLengthRegister = Byte;
80
81 TCh3OutputLevelRegister = bitpacked record
82 case Boolean of
83 True: (
84 _Padding: FiveBits;
85 OutputLevel: TwoBits;
86 _Padding2: Bit;
87 );
88 False: (ByteValue: Byte);
89 end;
90
91 TCh4SoundLengthRegister = 0..63;
92
93 TPolynomialCounterRegister = bitpacked record
94 case Boolean of
95 True: (
96 DividingRatio: ThreeBits;
97 SevenBitCounter: Bit;
98 ShiftClockFrequency: FourBits;
99 );
100 False: (ByteValue: Byte);
101 end;
102
103 TCh4HighByteRegister = bitpacked record
104 case Boolean of
105 True: (
106 _Padding: SixBits;
107 UseLength: Bit;
108 Initial: Bit;
109 );
110 False: (ByteValue: Byte);
111 end;
31 112
32 function NoiseInstrumentToRegisters( 113 function NoiseInstrumentToRegisters(
33 Initial: Boolean; 114 Initial: Boolean;
@@ -40,91 +121,80 @@ function SquareInstrumentToRegisters(
40 121
41 implementation 122 implementation
42 123
43 function BuildEnvelope(
44 InitialVol: TEnvelopeVolume;
45 Direction: TSweepType;
46 Amount: TEnvelopeSweepAmount): Byte;
47 begin
48 Result := (InitialVol shl 4);
49 if Direction = Up then
50 Result := Result or %00001000;
51 Result := Result or Amount;
52 end;
53
54 function BuildHighByte(
55 Initial: Boolean;
56 LengthEnabled: Boolean;
57 Frequency: Integer): Byte;
58 begin
59 Result := 0;
60 if Initial then Result := %10000000;
61 if LengthEnabled then Result := Result or %01000000;
62 Result := Result or ((Frequency and %0000011100000000) shr 8);
63 end;
64
65 function BuildHighByte(
66 Initial: Boolean;
67 LengthEnabled: Boolean): Byte;
68 begin
69 Result := BuildHighByte(Initial, LengthEnabled, 0);
70 end;
71
72 function NoiseInstrumentToRegisters( 124 function NoiseInstrumentToRegisters(
73 Initial: Boolean; 125 Initial: Boolean;
74 Instr: TInstrument): TRegisters; 126 Instr: TInstrument): TRegisters;
75 function BuildPolynomialCounter( 127 var
76 ShiftClockFreq: Integer; 128 NR41: TCh4SoundLengthRegister;
77 CounterStep: TStepWidth; 129 NR42: TEnvelopeRegister;
78 DividingRatio: Integer): Byte; 130 NR43: TPolynomialCounterRegister;
131 NR44: TCh4HighByteRegister;
79 begin 132 begin
80 Result := (ShiftClockFreq shl 4); 133 NR41 := Default(TCh4SoundLengthRegister);
81 if CounterStep = Seven then 134 NR42 := Default(TEnvelopeRegister);
82 Result := Result or %00001000; 135 NR43 := Default(TPolynomialCounterRegister);
83 Result := Result or DividingRatio; 136 NR44 := Default(TCh4HighByteRegister);
84 end; 137
138 NR41 := Instr.Length;
139
140 NR42.InitialVolume := Instr.InitialVolume;
141 NR42.SweepNumber := Instr.VolSweepAmount;
142 NR42.Direction := Instr.VolSweepDirection = Up;
143
144 NR43.DividingRatio:= Instr.DividingRatio;
145 NR43.SevenBitCounter:=Instr.CounterStep = Seven;
146 NR43.ShiftClockFrequency:= Instr.ShiftClockFreq;
147
148 NR44.Initial:= True;
149 NR44.UseLength:=Instr.LengthEnabled;
150
151 Result.NR41 := NR41;
152 Result.NR42 := NR42.ByteValue;
153 Result.NR43 := NR43.ByteValue;
154 Result.NR44 := NR44.ByteValue;
85 155
86 begin
87 with Instr do
88 begin
89 Result.NR41 := Length;
90 Result.NR42 := BuildEnvelope(InitialVolume, VolSweepDirection, VolSweepAmount);
91 Result.NR43 := BuildPolynomialCounter(ShiftClockFreq, CounterStep, DividingRatio);
92 Result.NR44 := BuildHighByte(Initial, LengthEnabled);
93 end;
94 end; 156 end;
95 157
96 function SquareInstrumentToRegisters( 158 function SquareInstrumentToRegisters(
97 Frequency: Word; 159 Frequency: Word;
98 Initial: Boolean; 160 Initial: Boolean;
99 Instr: TInstrument): TRegisters; 161 Instr: TInstrument): TRegisters;
100 162 var
101 function BuildSweep( 163 NR10: TSweepRegister;
102 SweepTime: Integer; 164 NR11: TSquareLengthRegister;
103 SweepIncDec: TSweepType; 165 NR12: TEnvelopeRegister;
104 SweepShift: Integer): Byte; 166 NR13: TLowByteRegister;
167 NR14: THighByteRegister;
105 begin 168 begin
106 Result := (SweepTime shl 4); 169 NR10 := Default(TSweepRegister);
107 if SweepIncDec = Down then 170 NR11 := Default(TSquareLengthRegister);
108 Result := Result or %00001000; 171 NR12 := Default(TEnvelopeRegister);
109 Result := Result or SweepShift; 172 NR13 := Default(TLowByteRegister);
110 end; 173 NR14 := Default(THighByteRegister);
111 174
112 function BuildLengthDuty( 175 NR10.SweepTime := Instr.SweepTime;
113 Duty: TDutyType; 176 NR10.Shift := Instr.SweepShift;
114 Length: Integer): Byte; 177 NR10.IncDec := Instr.SweepIncDec = Down;
115 begin 178
116 Result := Duty shl 6; 179 NR11.Duty := Instr.Duty;
117 Result := Result or Length; 180 NR11.Length := Instr.Length;
118 end; 181
119 182 NR12.Direction := Instr.VolSweepDirection = Up;
120 begin 183 NR12.InitialVolume := Instr.InitialVolume;
121 with Instr do begin 184 NR12.SweepNumber := Instr.VolSweepAmount;
122 Result.NR10 := BuildSweep(SweepTime, SweepIncDec, SweepShift); 185
123 Result.NR11 := BuildLengthDuty(Duty, Length); 186 NR13 := Frequency and %11111111;
124 Result.NR12 := BuildEnvelope(InitialVolume, VolSweepDirection, VolSweepAmount); 187
125 Result.NR13 := (Frequency and %0000000011111111); 188 NR14.FrequencyBits := (Frequency and %0000011100000000) shr 8;
126 Result.NR14 := BuildHighByte(Initial, LengthEnabled, Frequency); 189 NR14.Initial := True;
127 end; 190 NR14.UseLength := Instr.LengthEnabled;
191
192 Result.Type_ := Square;
193 Result.NR10:=NR10.ByteValue;
194 Result.NR11:=NR11.ByteValue;
195 Result.NR12:=NR12.ByteValue;
196 Result.NR13:=NR13;
197 Result.NR14:=NR14.ByteValue;
128 end; 198 end;
129 199
130 end. 200 end.