Commit dee8026

Nick committed on
WIP preview instruments while bumping up and down
commit dee8026e0053b8d451d8963590d7d2eb464e5f64 parent d7de33d
5 changed files +175−115
Modifiedhugesettings.pas +20−0
@@ -13,18 +13,24 @@ type
13 13
14 TTrackerSettings = class 14 TTrackerSettings = class
15 private 15 private
16 FPreviewWhenBumping: Boolean;
17 FPreviewWhenPlacing: Boolean;
16 SettingsFile: TINIFile; 18 SettingsFile: TINIFile;
17 19
18 FPatternEditorFontSize: Integer; 20 FPatternEditorFontSize: Integer;
19 FUseScopes, FUseCustomKeymap: Boolean; 21 FUseScopes, FUseCustomKeymap: Boolean;
20 22
21 procedure SetPatternEditorFontSize(AValue: Integer); 23 procedure SetPatternEditorFontSize(AValue: Integer);
24 procedure SetPreviewWhenBumping(AValue: Boolean);
25 procedure SetPreviewWhenPlacing(AValue: Boolean);
22 procedure SetUseCustomKeymap(AValue: Boolean); 26 procedure SetUseCustomKeymap(AValue: Boolean);
23 procedure SetUseScopes(AValue: Boolean); 27 procedure SetUseScopes(AValue: Boolean);
24 public 28 public
25 property PatternEditorFontSize: Integer read FPatternEditorFontSize write SetPatternEditorFontSize; 29 property PatternEditorFontSize: Integer read FPatternEditorFontSize write SetPatternEditorFontSize;
26 property UseScopes: Boolean read FUseScopes write SetUseScopes; 30 property UseScopes: Boolean read FUseScopes write SetUseScopes;
27 property UseCustomKeymap: Boolean read FUseCustomKeymap write SetUseCustomKeymap; 31 property UseCustomKeymap: Boolean read FUseCustomKeymap write SetUseCustomKeymap;
32 property PreviewWhenPlacing: Boolean read FPreviewWhenPlacing write SetPreviewWhenPlacing;
33 property PreviewWhenBumping: Boolean read FPreviewWhenBumping write SetPreviewWhenBumping;
28 34
29 constructor Create; 35 constructor Create;
30 end; 36 end;
@@ -42,6 +48,18 @@ begin
42 SettingsFile.WriteInteger('hUGETracker', 'fontsize', AValue); 48 SettingsFile.WriteInteger('hUGETracker', 'fontsize', AValue);
43 end; 49 end;
44 50
51 procedure TTrackerSettings.SetPreviewWhenBumping(AValue: Boolean);
52 begin
53 FPreviewWhenBumping:=AValue;
54 SettingsFile.WriteBool('hUGETracker', 'PreviewWhenBumping', AValue);
55 end;
56
57 procedure TTrackerSettings.SetPreviewWhenPlacing(AValue: Boolean);
58 begin
59 FPreviewWhenPlacing:=AValue;
60 SettingsFile.WriteBool('hUGETracker', 'PreviewWhenPlacing', AValue);
61 end;
62
45 procedure TTrackerSettings.SetUseCustomKeymap(AValue: Boolean); 63 procedure TTrackerSettings.SetUseCustomKeymap(AValue: Boolean);
46 begin 64 begin
47 FUseCustomKeymap := AValue; 65 FUseCustomKeymap := AValue;
@@ -61,6 +79,8 @@ begin
61 FPatternEditorFontSize := SettingsFile.ReadInteger('hUGETracker', 'fontsize', 12); 79 FPatternEditorFontSize := SettingsFile.ReadInteger('hUGETracker', 'fontsize', 12);
62 FUseScopes := SettingsFile.ReadBool('hUGETracker', 'ScopesOn', True); 80 FUseScopes := SettingsFile.ReadBool('hUGETracker', 'ScopesOn', True);
63 FUseCustomKeymap := SettingsFile.ReadBool('hUGETracker', 'CustomKeymap', False); 81 FUseCustomKeymap := SettingsFile.ReadBool('hUGETracker', 'CustomKeymap', False);
82 FPreviewWhenPlacing := SettingsFile.ReadBool('hUGETracker', 'PreviewWhenPlacing', True);
83 FPreviewWhenBumping := SettingsFile.ReadBool('hUGETracker', 'PreviewWhenBumping', False);
64 end; 84 end;
65 85
66 initialization 86 initialization
Modifiedoptions.lfm +90−59
@@ -1,21 +1,22 @@
1 object frmOptions: TfrmOptions 1 object frmOptions: TfrmOptions
2 Left = 1736 2 Left = 2176
3 Height = 615 3 Height = 1076
4 Top = 145 4 Top = 189
5 Width = 315 5 Width = 533
6 BorderStyle = bsDialog 6 BorderStyle = bsDialog
7 Caption = 'Options' 7 Caption = 'Options'
8 ClientHeight = 615 8 ClientHeight = 1076
9 ClientWidth = 315 9 ClientWidth = 533
10 DesignTimePPI = 168
10 OnClose = FormClose 11 OnClose = FormClose
11 OnCreate = FormCreate 12 OnCreate = FormCreate
12 Position = poMainFormCenter 13 Position = poMainFormCenter
13 LCLVersion = '2.0.9.0' 14 LCLVersion = '2.0.9.0'
14 object Label1: TLabel 15 object Label1: TLabel
15 Left = 14 16 Left = 24
16 Height = 15 17 Height = 30
17 Top = 14 18 Top = 24
18 Width = 119 19 Width = 211
19 Caption = 'Pattern editor font size' 20 Caption = 'Pattern editor font size'
20 ParentColor = False 21 ParentColor = False
21 ParentFont = False 22 ParentFont = False
@@ -23,10 +24,10 @@ object frmOptions: TfrmOptions
23 object Button1: TButton 24 object Button1: TButton
24 AnchorSideRight.Side = asrBottom 25 AnchorSideRight.Side = asrBottom
25 AnchorSideBottom.Side = asrBottom 26 AnchorSideBottom.Side = asrBottom
26 Left = 178 27 Left = 295
27 Height = 25 28 Height = 44
28 Top = 576 29 Top = 1008
29 Width = 123 30 Width = 215
30 Anchors = [akRight, akBottom] 31 Anchors = [akRight, akBottom]
31 Caption = 'OK' 32 Caption = 'OK'
32 OnClick = Button1Click 33 OnClick = Button1Click
@@ -34,112 +35,142 @@ object frmOptions: TfrmOptions
34 TabOrder = 0 35 TabOrder = 0
35 end 36 end
36 object FontSizeSpinner: TSpinEdit 37 object FontSizeSpinner: TSpinEdit
37 Left = 155 38 Left = 271
38 Height = 23 39 Height = 38
39 Top = 9 40 Top = 16
40 Width = 123 41 Width = 215
41 ParentFont = False 42 ParentFont = False
42 TabOrder = 1 43 TabOrder = 1
43 Value = 12 44 Value = 12
44 end 45 end
45 object ScopesCheck: TCheckBox 46 object ScopesCheck: TCheckBox
46 Left = 14 47 Left = 24
47 Height = 19 48 Height = 34
48 Top = 40 49 Top = 70
49 Width = 149 50 Width = 260
50 Alignment = taLeftJustify 51 Alignment = taLeftJustify
51 Caption = 'Scopes (Uses More CPU)' 52 Caption = 'Scopes (Uses More CPU)'
52 Checked = True 53 Checked = True
54 ParentFont = False
53 State = cbChecked 55 State = cbChecked
54 TabOrder = 2 56 TabOrder = 2
55 end 57 end
56 object KeymapGroupBox: TGroupBox 58 object KeymapGroupBox: TGroupBox
57 Left = 16 59 Left = 24
58 Height = 418 60 Height = 732
59 Top = 96 61 Top = 264
60 Width = 279 62 Width = 488
61 Caption = 'Key map' 63 Caption = 'Key map'
62 ClientHeight = 398 64 ClientHeight = 697
63 ClientWidth = 275 65 ClientWidth = 484
64 Enabled = False 66 Enabled = False
67 ParentFont = False
65 TabOrder = 3 68 TabOrder = 3
66 object KeyMapStringGrid: TStringGrid 69 object KeyMapStringGrid: TStringGrid
67 Left = 5 70 Left = 9
68 Height = 328 71 Height = 574
69 Top = 5 72 Top = 9
70 Width = 265 73 Width = 466
71 Align = alClient 74 Align = alClient
72 BorderSpacing.Bottom = 60 75 BorderSpacing.Bottom = 105
73 BorderSpacing.Around = 5 76 BorderSpacing.Around = 9
74 ColCount = 2 77 ColCount = 2
75 Columns = < 78 Columns = <
76 item 79 item
80 MinSize = 18
81 MaxSize = 350
77 Title.Caption = 'Key' 82 Title.Caption = 'Key'
78 end 83 end
79 item 84 item
85 MinSize = 18
86 MaxSize = 350
80 Title.Caption = 'Note' 87 Title.Caption = 'Note'
81 end> 88 end>
82 DefaultColWidth = 120 89 DefaultColWidth = 210
83 FixedCols = 0 90 FixedCols = 0
84 MouseWheelOption = mwGrid 91 MouseWheelOption = mwGrid
85 Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goEditing, goAutoAddRows, goTabs, goSmoothScroll] 92 Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goEditing, goAutoAddRows, goTabs, goSmoothScroll]
93 ParentFont = False
86 TabOrder = 0 94 TabOrder = 0
87 OnValidateEntry = KeyMapStringGridValidateEntry 95 OnValidateEntry = KeyMapStringGridValidateEntry
88 end 96 end
89 object Button2: TButton 97 object Button2: TButton
90 Left = 8 98 Left = 14
91 Height = 25 99 Height = 44
92 Top = 362 100 Top = 634
93 Width = 131 101 Width = 229
94 Caption = 'Load' 102 Caption = 'Load'
95 OnClick = Button2Click 103 OnClick = Button2Click
104 ParentFont = False
96 TabOrder = 1 105 TabOrder = 1
97 end 106 end
98 object Button3: TButton 107 object Button3: TButton
99 Left = 144 108 Left = 252
100 Height = 25 109 Height = 44
101 Top = 362 110 Top = 634
102 Width = 126 111 Width = 220
103 Caption = 'Save' 112 Caption = 'Save'
104 OnClick = Button3Click 113 OnClick = Button3Click
114 ParentFont = False
105 TabOrder = 2 115 TabOrder = 2
106 end 116 end
107 object Button4: TButton 117 object Button4: TButton
108 Left = 240 118 Left = 420
109 Height = 25 119 Height = 44
110 Top = 336 120 Top = 588
111 Width = 30 121 Width = 52
112 Caption = '-' 122 Caption = '-'
113 OnClick = Button4Click 123 OnClick = Button4Click
124 ParentFont = False
114 TabOrder = 3 125 TabOrder = 3
115 end 126 end
116 object Button5: TButton 127 object Button5: TButton
117 Left = 208 128 Left = 364
118 Height = 25 129 Height = 44
119 Top = 336 130 Top = 588
120 Width = 30 131 Width = 52
121 Caption = '+' 132 Caption = '+'
122 OnClick = Button5Click 133 OnClick = Button5Click
134 ParentFont = False
123 TabOrder = 4 135 TabOrder = 4
124 end 136 end
125 end 137 end
126 object KeymapCheckbox: TCheckBox 138 object KeymapCheckbox: TCheckBox
127 Left = 14 139 Left = 24
128 Height = 19 140 Height = 34
129 Top = 64 141 Top = 112
130 Width = 127 142 Width = 220
131 Alignment = taLeftJustify 143 Alignment = taLeftJustify
132 Caption = 'Use custom keymap' 144 Caption = 'Use custom keymap'
133 OnChange = KeymapCheckboxChange 145 OnChange = KeymapCheckboxChange
146 ParentFont = False
134 ParentBidiMode = False 147 ParentBidiMode = False
135 TabOrder = 4 148 TabOrder = 4
136 end 149 end
150 object PreviewWhenPlacingCheck: TCheckBox
151 Left = 24
152 Height = 34
153 Top = 160
154 Width = 335
155 Alignment = taLeftJustify
156 Caption = 'Play preview when placing notes'
157 TabOrder = 5
158 end
159 object PreviewWhenBumpingCheck: TCheckBox
160 Left = 24
161 Height = 34
162 Top = 208
163 Width = 440
164 Alignment = taLeftJustify
165 Caption = 'Play preview when bumping notes up/down'
166 TabOrder = 6
167 end
137 object SaveDialog1: TSaveDialog 168 object SaveDialog1: TSaveDialog
138 Left = 240 169 Left = 420
139 Top = 48 170 Top = 84
140 end 171 end
141 object OpenDialog1: TOpenDialog 172 object OpenDialog1: TOpenDialog
142 Left = 184 173 Left = 322
143 Top = 48 174 Top = 84
144 end 175 end
145 end 176 end
Modifiedoptions.pas +6−0
@@ -18,6 +18,8 @@ type
18 Button3: TButton; 18 Button3: TButton;
19 Button4: TButton; 19 Button4: TButton;
20 Button5: TButton; 20 Button5: TButton;
21 PreviewWhenPlacingCheck: TCheckBox;
22 PreviewWhenBumpingCheck: TCheckBox;
21 KeymapCheckbox: TCheckBox; 23 KeymapCheckbox: TCheckBox;
22 KeymapGroupBox: TGroupBox; 24 KeymapGroupBox: TGroupBox;
23 OpenDialog1: TOpenDialog; 25 OpenDialog1: TOpenDialog;
@@ -85,6 +87,8 @@ begin
85 TrackerSettings.PatternEditorFontSize := FontSizeSpinner.Value; 87 TrackerSettings.PatternEditorFontSize := FontSizeSpinner.Value;
86 TrackerSettings.UseScopes := ScopesCheck.Checked; 88 TrackerSettings.UseScopes := ScopesCheck.Checked;
87 TrackerSettings.UseCustomKeymap := KeymapCheckbox.Checked; 89 TrackerSettings.UseCustomKeymap := KeymapCheckbox.Checked;
90 TrackerSettings.PreviewWhenBumping := PreviewWhenBumpingCheck.Checked;
91 TrackerSettings.PreviewWhenPlacing := PreviewWhenPlacingCheck.Checked;
88 end; 92 end;
89 93
90 procedure TfrmOptions.FormCreate(Sender: TObject); 94 procedure TfrmOptions.FormCreate(Sender: TObject);
@@ -95,6 +99,8 @@ begin
95 FontSizeSpinner.Value := TrackerSettings.PatternEditorFontSize; 99 FontSizeSpinner.Value := TrackerSettings.PatternEditorFontSize;
96 ScopesCheck.Checked := TrackerSettings.UseScopes; 100 ScopesCheck.Checked := TrackerSettings.UseScopes;
97 KeymapCheckbox.Checked := TrackerSettings.UseCustomKeymap; 101 KeymapCheckbox.Checked := TrackerSettings.UseCustomKeymap;
102 PreviewWhenBumpingCheck.Checked := TrackerSettings.PreviewWhenBumping;
103 PreviewWhenPlacingCheck.Checked := TrackerSettings.PreviewWhenPlacing;
98 end; 104 end;
99 105
100 procedure TfrmOptions.KeymapCheckboxChange(Sender: TObject); 106 procedure TfrmOptions.KeymapCheckboxChange(Sender: TObject);
Modifiedtracker.lfm +54−54
@@ -62,10 +62,10 @@ object frmTracker: TfrmTracker
62 Height = 912 62 Height = 912
63 Top = 0 63 Top = 0
64 Width = 1809 64 Width = 1809
65 ActivePage = PatternTabSheet 65 ActivePage = InstrumentTabSheet
66 Align = alClient 66 Align = alClient
67 ParentFont = False 67 ParentFont = False
68 TabIndex = 1 68 TabIndex = 2
69 TabOrder = 0 69 TabOrder = 0
70 object GeneralTabSheet: TTabSheet 70 object GeneralTabSheet: TTabSheet
71 Caption = 'General' 71 Caption = 'General'
@@ -312,8 +312,8 @@ object frmTracker: TfrmTracker
312 end 312 end
313 object InstrumentTabSheet: TTabSheet 313 object InstrumentTabSheet: TTabSheet
314 Caption = 'Instruments' 314 Caption = 'Instruments'
315 ClientHeight = 483 315 ClientHeight = 869
316 ClientWidth = 1063 316 ClientWidth = 1801
317 ParentFont = False 317 ParentFont = False
318 object PaintBox1: TPaintBox 318 object PaintBox1: TPaintBox
319 AnchorSideTop.Control = FlowPanel1 319 AnchorSideTop.Control = FlowPanel1
@@ -322,8 +322,8 @@ object frmTracker: TfrmTracker
322 Left = 0 322 Left = 0
323 Height = 0 323 Height = 0
324 Hint = 'Preview of how the resulting waveform will look with envelope applied' 324 Hint = 'Preview of how the resulting waveform will look with envelope applied'
325 Top = 483 325 Top = 869
326 Width = 1063 326 Width = 1801
327 Align = alClient 327 Align = alClient
328 Color = clBlack 328 Color = clBlack
329 ParentColor = False 329 ParentColor = False
@@ -333,9 +333,9 @@ object frmTracker: TfrmTracker
333 end 333 end
334 object FlowPanel1: TFlowPanel 334 object FlowPanel1: TFlowPanel
335 Left = 0 335 Left = 0
336 Height = 492 336 Height = 1180
337 Top = 0 337 Top = 0
338 Width = 1063 338 Width = 1801
339 Align = alTop 339 Align = alTop
340 AutoSize = True 340 AutoSize = True
341 BevelOuter = bvNone 341 BevelOuter = bvNone
@@ -370,9 +370,9 @@ object frmTracker: TfrmTracker
370 ParentFont = False 370 ParentFont = False
371 TabOrder = 0 371 TabOrder = 0
372 object InstrumentGroupBox: TGroupBox 372 object InstrumentGroupBox: TGroupBox
373 Left = 7 373 Left = 12
374 Height = 422 374 Height = 422
375 Top = 7 375 Top = 12
376 Width = 474 376 Width = 474
377 Anchors = [] 377 Anchors = []
378 BorderSpacing.Left = 12 378 BorderSpacing.Left = 12
@@ -386,7 +386,7 @@ object frmTracker: TfrmTracker
386 TabOrder = 0 386 TabOrder = 0
387 object InstrumentNumberSpinner: TSpinEdit 387 object InstrumentNumberSpinner: TSpinEdit
388 Left = 140 388 Left = 140
389 Height = 23 389 Height = 38
390 Hint = 'What instrument to edit' 390 Hint = 'What instrument to edit'
391 Top = 66 391 Top = 66
392 Width = 308 392 Width = 308
@@ -399,25 +399,25 @@ object frmTracker: TfrmTracker
399 end 399 end
400 object Label1: TLabel 400 object Label1: TLabel
401 Left = 14 401 Left = 14
402 Height = 15 402 Height = 30
403 Top = 80 403 Top = 80
404 Width = 58 404 Width = 101
405 Caption = 'Instrument' 405 Caption = 'Instrument'
406 ParentColor = False 406 ParentColor = False
407 ParentFont = False 407 ParentFont = False
408 end 408 end
409 object Label2: TLabel 409 object Label2: TLabel
410 Left = 14 410 Left = 14
411 Height = 15 411 Height = 30
412 Top = 136 412 Top = 136
413 Width = 32 413 Width = 56
414 Caption = 'Name' 414 Caption = 'Name'
415 ParentColor = False 415 ParentColor = False
416 ParentFont = False 416 ParentFont = False
417 end 417 end
418 object InstrumentNameEdit: TEdit 418 object InstrumentNameEdit: TEdit
419 Left = 140 419 Left = 140
420 Height = 23 420 Height = 38
421 Hint = 'The name of the instrument' 421 Hint = 'The name of the instrument'
422 Top = 122 422 Top = 122
423 Width = 308 423 Width = 308
@@ -427,9 +427,9 @@ object frmTracker: TfrmTracker
427 end 427 end
428 object Label3: TLabel 428 object Label3: TLabel
429 Left = 14 429 Left = 14
430 Height = 15 430 Height = 30
431 Top = 28 431 Top = 28
432 Width = 44 432 Width = 80
433 Caption = 'Channel' 433 Caption = 'Channel'
434 Font.Style = [fsBold] 434 Font.Style = [fsBold]
435 ParentColor = False 435 ParentColor = False
@@ -456,10 +456,10 @@ object frmTracker: TfrmTracker
456 end 456 end
457 object LengthEnabledCheckbox: TCheckBox 457 object LengthEnabledCheckbox: TCheckBox
458 Left = 21 458 Left = 21
459 Height = 19 459 Height = 34
460 Hint = 'Cut the sound after a certain length of time' 460 Hint = 'Cut the sound after a certain length of time'
461 Top = 206 461 Top = 206
462 Width = 57 462 Width = 98
463 Caption = 'Length' 463 Caption = 'Length'
464 OnChange = LengthEnabledCheckboxChange 464 OnChange = LengthEnabledCheckboxChange
465 ParentFont = False 465 ParentFont = False
@@ -510,9 +510,9 @@ object frmTracker: TfrmTracker
510 end 510 end
511 end 511 end
512 object EnvelopeGroupBox: TGroupBox 512 object EnvelopeGroupBox: TGroupBox
513 Left = 292 513 Left = 510
514 Height = 238 514 Height = 238
515 Top = 7 515 Top = 12
516 Width = 1018 516 Width = 1018
517 Anchors = [] 517 Anchors = []
518 BorderSpacing.Left = 12 518 BorderSpacing.Left = 12
@@ -526,18 +526,18 @@ object frmTracker: TfrmTracker
526 TabOrder = 1 526 TabOrder = 1
527 object Label4: TLabel 527 object Label4: TLabel
528 Left = 14 528 Left = 14
529 Height = 15 529 Height = 30
530 Top = 16 530 Top = 16
531 Width = 46 531 Width = 80
532 Caption = 'Start vol.' 532 Caption = 'Start vol.'
533 ParentColor = False 533 ParentColor = False
534 ParentFont = False 534 ParentFont = False
535 end 535 end
536 object Label5: TLabel 536 object Label5: TLabel
537 Left = 14 537 Left = 14
538 Height = 15 538 Height = 30
539 Top = 84 539 Top = 84
540 Width = 48 540 Width = 84
541 Caption = 'Direction' 541 Caption = 'Direction'
542 ParentColor = False 542 ParentColor = False
543 ParentFont = False 543 ParentFont = False
@@ -562,9 +562,9 @@ object frmTracker: TfrmTracker
562 end 562 end
563 object Label6: TLabel 563 object Label6: TLabel
564 Left = 14 564 Left = 14
565 Height = 15 565 Height = 30
566 Top = 150 566 Top = 150
567 Width = 41 567 Width = 71
568 Caption = 'Change' 568 Caption = 'Change'
569 ParentColor = False 569 ParentColor = False
570 ParentFont = False 570 ParentFont = False
@@ -581,10 +581,10 @@ object frmTracker: TfrmTracker
581 TabOrder = 1 581 TabOrder = 1
582 object EnvelopePaintbox: TPaintBox 582 object EnvelopePaintbox: TPaintBox
583 Left = 1 583 Left = 1
584 Height = 102 584 Height = 180
585 Hint = 'Preview of the volume envelope' 585 Hint = 'Preview of the volume envelope'
586 Top = 1 586 Top = 1
587 Width = 268 587 Width = 470
588 Align = alClient 588 Align = alClient
589 ParentFont = False 589 ParentFont = False
590 OnPaint = EnvelopePaintboxPaint 590 OnPaint = EnvelopePaintboxPaint
@@ -614,9 +614,9 @@ object frmTracker: TfrmTracker
614 end 614 end
615 end 615 end
616 object SquareGroupBox: TGroupBox 616 object SquareGroupBox: TGroupBox
617 Left = 7 617 Left = 12
618 Height = 296 618 Height = 296
619 Top = 262 619 Top = 458
620 Width = 558 620 Width = 558
621 Anchors = [] 621 Anchors = []
622 BorderSpacing.Left = 12 622 BorderSpacing.Left = 12
@@ -630,9 +630,9 @@ object frmTracker: TfrmTracker
630 TabOrder = 2 630 TabOrder = 2
631 object Label7: TLabel 631 object Label7: TLabel
632 Left = 14 632 Left = 14
633 Height = 15 633 Height = 30
634 Top = 28 634 Top = 28
635 Width = 61 635 Width = 107
636 Caption = 'Sweep time' 636 Caption = 'Sweep time'
637 ParentColor = False 637 ParentColor = False
638 ParentFont = False 638 ParentFont = False
@@ -685,27 +685,27 @@ object frmTracker: TfrmTracker
685 end 685 end
686 object Label8: TLabel 686 object Label8: TLabel
687 Left = 14 687 Left = 14
688 Height = 15 688 Height = 30
689 Top = 84 689 Top = 84
690 Width = 84 690 Width = 147
691 Caption = 'Sweep direction' 691 Caption = 'Sweep direction'
692 ParentColor = False 692 ParentColor = False
693 ParentFont = False 693 ParentFont = False
694 end 694 end
695 object Label9: TLabel 695 object Label9: TLabel
696 Left = 14 696 Left = 14
697 Height = 15 697 Height = 30
698 Top = 147 698 Top = 147
699 Width = 56 699 Width = 101
700 Caption = 'Sweep size' 700 Caption = 'Sweep size'
701 ParentColor = False 701 ParentColor = False
702 ParentFont = False 702 ParentFont = False
703 end 703 end
704 object Label10: TLabel 704 object Label10: TLabel
705 Left = 14 705 Left = 14
706 Height = 15 706 Height = 30
707 Top = 210 707 Top = 210
708 Width = 25 708 Width = 44
709 Caption = 'Duty' 709 Caption = 'Duty'
710 ParentColor = False 710 ParentColor = False
711 ParentFont = False 711 ParentFont = False
@@ -745,9 +745,9 @@ object frmTracker: TfrmTracker
745 end 745 end
746 end 746 end
747 object WaveGroupBox: TGroupBox 747 object WaveGroupBox: TGroupBox
748 Left = 340 748 Left = 594
749 Height = 296 749 Height = 296
750 Top = 262 750 Top = 458
751 Width = 520 751 Width = 520
752 Anchors = [] 752 Anchors = []
753 BorderSpacing.Left = 12 753 BorderSpacing.Left = 12
@@ -761,18 +761,18 @@ object frmTracker: TfrmTracker
761 TabOrder = 3 761 TabOrder = 3
762 object Label11: TLabel 762 object Label11: TLabel
763 Left = 14 763 Left = 14
764 Height = 15 764 Height = 30
765 Top = 28 765 Top = 28
766 Width = 40 766 Width = 70
767 Caption = 'Volume' 767 Caption = 'Volume'
768 ParentColor = False 768 ParentColor = False
769 ParentFont = False 769 ParentFont = False
770 end 770 end
771 object Label12: TLabel 771 object Label12: TLabel
772 Left = 14 772 Left = 14
773 Height = 15 773 Height = 30
774 Top = 84 774 Top = 84
775 Width = 55 775 Width = 95
776 Caption = 'Waveform' 776 Caption = 'Waveform'
777 ParentColor = False 777 ParentColor = False
778 ParentFont = False 778 ParentFont = False
@@ -821,10 +821,10 @@ object frmTracker: TfrmTracker
821 TabOrder = 1 821 TabOrder = 1
822 object WavePaintbox: TPaintBox 822 object WavePaintbox: TPaintBox
823 Left = 1 823 Left = 1
824 Height = 57 824 Height = 101
825 Hint = 'Preview of the waveform associated with this instrument' 825 Hint = 'Preview of the waveform associated with this instrument'
826 Top = 1 826 Top = 1
827 Width = 270 827 Width = 474
828 Align = alClient 828 Align = alClient
829 Color = clBlack 829 Color = clBlack
830 ParentColor = False 830 ParentColor = False
@@ -854,9 +854,9 @@ object frmTracker: TfrmTracker
854 end 854 end
855 end 855 end
856 object NoiseGroupBox: TGroupBox 856 object NoiseGroupBox: TGroupBox
857 Left = 651 857 Left = 12
858 Height = 390 858 Height = 390
859 Top = 262 859 Top = 778
860 Width = 695 860 Width = 695
861 Anchors = [] 861 Anchors = []
862 BorderSpacing.Left = 12 862 BorderSpacing.Left = 12
@@ -870,10 +870,10 @@ object frmTracker: TfrmTracker
870 TabOrder = 4 870 TabOrder = 4
871 object SevenBitCounterCheckbox: TCheckBox 871 object SevenBitCounterCheckbox: TCheckBox
872 Left = 14 872 Left = 14
873 Height = 19 873 Height = 34
874 Hint = 'Select LFSR width. When checked, output will sound like a tone rather than noise' 874 Hint = 'Select LFSR width. When checked, output will sound like a tone rather than noise'
875 Top = 14 875 Top = 14
876 Width = 215 876 Width = 373
877 Alignment = taLeftJustify 877 Alignment = taLeftJustify
878 Caption = '7 bit counter (more tone-like output)' 878 Caption = '7 bit counter (more tone-like output)'
879 OnChange = SevenBitCounterCheckboxChange 879 OnChange = SevenBitCounterCheckboxChange
@@ -892,9 +892,9 @@ object frmTracker: TfrmTracker
892 TabOrder = 1 892 TabOrder = 1
893 object NoiseMacroPaintbox: TPaintBox 893 object NoiseMacroPaintbox: TPaintBox
894 Left = 1 894 Left = 1
895 Height = 150 895 Height = 264
896 Top = 1 896 Top = 1
897 Width = 374 897 Width = 656
898 Align = alClient 898 Align = alClient
899 ParentFont = False 899 ParentFont = False
900 OnMouseDown = NoiseMacroPaintboxMouseDown 900 OnMouseDown = NoiseMacroPaintboxMouseDown
Modifiedtracker.pas +5−2
@@ -1343,6 +1343,7 @@ begin
1343 if TrackerGrid.Cursor.SelectedPart <> cpNote then Exit; 1343 if TrackerGrid.Cursor.SelectedPart <> cpNote then Exit;
1344 if Shift <> [] then Exit; 1344 if Shift <> [] then Exit;
1345 if not Keybindings.TryGetData(Key, Note) then Exit; 1345 if not Keybindings.TryGetData(Key, Note) then Exit;
1346 if not TrackerSettings.PreviewWhenPlacing then Exit;
1346 1347
1347 Inc(Note, OctaveSpinEdit.Value*12); 1348 Inc(Note, OctaveSpinEdit.Value*12);
1348 EnsureRange(Note, LOWEST_NOTE, HIGHEST_NOTE); 1349 EnsureRange(Note, LOWEST_NOTE, HIGHEST_NOTE);
@@ -2383,12 +2384,14 @@ end;
2383 2384
2384 procedure TfrmTracker.TrackerPopupTransposeOctaveDownClick(Sender: TObject); 2385 procedure TfrmTracker.TrackerPopupTransposeOctaveDownClick(Sender: TObject);
2385 begin 2386 begin
2386 TrackerGrid.TransposeSelection(-12) 2387 TrackerGrid.TransposeSelection(-12)
2388 if TrackerSettings.PreviewWhenBumping then
2389 ; // TODO: preview the note
2387 end; 2390 end;
2388 2391
2389 procedure TfrmTracker.TrackerPopupTransposeOctaveUpClick(Sender: TObject); 2392 procedure TfrmTracker.TrackerPopupTransposeOctaveUpClick(Sender: TObject);
2390 begin 2393 begin
2391 TrackerGrid.TransposeSelection(12) 2394 TrackerGrid.TransposeSelection(12)
2392 end; 2395 end;
2393 2396
2394 procedure TfrmTracker.TrackerPopupTransposeSemiDownClick(Sender: TObject); 2397 procedure TfrmTracker.TrackerPopupTransposeSemiDownClick(Sender: TObject);