Commit fc50ab5

Nick committed on
Vibrato fix, song cleanup, some other stuff
commit fc50ab54e1288f95bb27c3621ae02b0e7a0ee05d parent e34b8e1
5 changed files +228−160
Modifiedeffecteditor.lfm +150−117
@@ -1,14 +1,13 @@
1 object frmEffectEditor: TfrmEffectEditor 1 object frmEffectEditor: TfrmEffectEditor
2 Left = 1488 2 Left = 1892
3 Height = 416 3 Height = 238
4 Top = 230 4 Top = 120
5 Width = 684 5 Width = 391
6 BorderIcons = [biSystemMenu, biMinimize] 6 BorderIcons = [biSystemMenu, biMinimize]
7 BorderStyle = bsDialog 7 BorderStyle = bsDialog
8 Caption = 'Effect Editor' 8 Caption = 'Effect Editor'
9 ClientHeight = 416 9 ClientHeight = 238
10 ClientWidth = 684 10 ClientWidth = 391
11 DesignTimePPI = 168
12 FormStyle = fsStayOnTop 11 FormStyle = fsStayOnTop
13 OnClose = FormClose 12 OnClose = FormClose
14 OnCloseQuery = FormCloseQuery 13 OnCloseQuery = FormCloseQuery
@@ -17,12 +16,12 @@ object frmEffectEditor: TfrmEffectEditor
17 ShowInTaskBar = stNever 16 ShowInTaskBar = stNever
18 LCLVersion = '2.0.6.0' 17 LCLVersion = '2.0.6.0'
19 object ComboBox1: TComboBox 18 object ComboBox1: TComboBox
20 Left = 136 19 Left = 78
21 Height = 38 20 Height = 23
22 Top = 16 21 Top = 9
23 Width = 530 22 Width = 303
24 DropDownCount = 99 23 DropDownCount = 99
25 ItemHeight = 30 24 ItemHeight = 15
26 ItemIndex = 0 25 ItemIndex = 0
27 Items.Strings = ( 26 Items.Strings = (
28 '0 - Arpeggio' 27 '0 - Arpeggio'
@@ -43,163 +42,186 @@ object frmEffectEditor: TfrmEffectEditor
43 'F - Set Speed' 42 'F - Set Speed'
44 ) 43 )
45 OnChange = ComboBox1Change 44 OnChange = ComboBox1Change
45 ParentFont = False
46 Style = csDropDownList 46 Style = csDropDownList
47 TabOrder = 0 47 TabOrder = 0
48 Text = '0 - Arpeggio' 48 Text = '0 - Arpeggio'
49 end 49 end
50 object Label1: TLabel 50 object Label1: TLabel
51 Left = 24 51 Left = 14
52 Height = 30 52 Height = 15
53 Top = 24 53 Top = 14
54 Width = 99 54 Width = 56
55 Caption = 'Effect type' 55 Caption = 'Effect type'
56 ParentColor = False 56 ParentColor = False
57 ParentFont = False
57 end 58 end
58 object Notebook1: TNotebook 59 object Notebook1: TNotebook
59 Left = 24 60 Left = 14
60 Height = 320 61 Height = 183
61 Top = 80 62 Top = 46
62 Width = 642 63 Width = 367
63 PageIndex = 0 64 PageIndex = 2
64 TabOrder = 1 65 TabOrder = 1
65 object OneParamPage: TPage 66 object OneParamPage: TPage
66 object OneParamTrackBar: TTrackBar 67 object OneParamTrackBar: TTrackBar
67 Left = 32 68 Left = 18
68 Height = 44 69 Height = 25
69 Top = 72 70 Top = 41
70 Width = 584 71 Width = 334
71 Max = 255 72 Max = 255
72 OnChange = OneParamTrackBarChange 73 OnChange = OneParamTrackBarChange
73 Position = 0 74 Position = 0
75 ParentFont = False
74 TabOrder = 0 76 TabOrder = 0
75 end 77 end
76 object Value: TLabel 78 object Value: TLabel
77 Left = 32 79 Left = 18
78 Height = 30 80 Height = 17
79 Top = 16 81 Top = 9
80 Width = 584 82 Width = 334
81 Alignment = taCenter 83 Alignment = taCenter
82 AutoSize = False 84 AutoSize = False
83 Caption = 'Value' 85 Caption = 'Value'
84 ParentColor = False 86 ParentColor = False
87 ParentFont = False
85 end 88 end
86 end 89 end
87 object TwoParamsPage: TPage 90 object TwoParamsPage: TPage
88 object TwoParamsTrackBar1: TTrackBar 91 object TwoParamsTrackBar1: TTrackBar
89 Left = 32 92 Left = 18
90 Height = 44 93 Height = 25
91 Top = 72 94 Top = 41
92 Width = 584 95 Width = 334
93 Max = 15 96 Max = 15
94 OnChange = TwoParamsTrackBar1Change 97 OnChange = TwoParamsTrackBar1Change
95 Position = 0 98 Position = 0
99 ParentFont = False
96 TabOrder = 0 100 TabOrder = 0
97 end 101 end
98 object TwoParamsTrackBar2: TTrackBar 102 object TwoParamsTrackBar2: TTrackBar
99 Left = 32 103 Left = 18
100 Height = 44 104 Height = 25
101 Top = 136 105 Top = 78
102 Width = 584 106 Width = 334
103 Max = 15 107 Max = 15
104 OnChange = TwoParamsTrackBar2Change 108 OnChange = TwoParamsTrackBar2Change
105 Position = 0 109 Position = 0
110 ParentFont = False
106 TabOrder = 1 111 TabOrder = 1
107 end 112 end
108 object Value1: TLabel 113 object Value1: TLabel
109 Left = 32 114 Left = 18
110 Height = 30 115 Height = 17
111 Top = 16 116 Top = 9
112 Width = 584 117 Width = 334
113 Alignment = taCenter 118 Alignment = taCenter
114 AutoSize = False 119 AutoSize = False
115 Caption = 'Value1' 120 Caption = 'Value1'
116 ParentColor = False 121 ParentColor = False
122 ParentFont = False
117 end 123 end
118 end 124 end
119 object VibratoPage: TPage 125 object VibratoPage: TPage
120 object VibratoRateRadioGroup: TRadioGroup
121 Left = 0
122 Height = 320
123 Top = -8
124 Width = 188
125 AutoFill = True
126 Caption = 'Rate'
127 ChildSizing.LeftRightSpacing = 6
128 ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
129 ChildSizing.EnlargeVertical = crsHomogenousChildResize
130 ChildSizing.ShrinkHorizontal = crsScaleChilds
131 ChildSizing.ShrinkVertical = crsScaleChilds
132 ChildSizing.Layout = cclLeftToRightThenTopToBottom
133 ChildSizing.ControlsPerLine = 1
134 ClientHeight = 285
135 ClientWidth = 184
136 Items.Strings = (
137 '1.0'
138 '0.5'
139 '0.25'
140 '0.125'
141 '0.0625'
142 )
143 OnSelectionChanged = VibratoRateRadioGroupSelectionChanged
144 TabOrder = 0
145 end
146 object VibratoDepthTrackBar: TTrackBar 126 object VibratoDepthTrackBar: TTrackBar
147 Left = 200 127 Left = 0
148 Height = 44 128 Height = 25
149 Top = 48 129 Top = 24
150 Width = 448 130 Width = 360
151 Max = 15 131 Max = 15
152 OnChange = VibratoDepthTrackBarChange 132 OnChange = VibratoDepthTrackBarChange
153 Position = 0 133 Position = 0
154 TabOrder = 1 134 ParentFont = False
135 TabOrder = 0
155 end 136 end
156 object Label2: TLabel 137 object Label2: TLabel
157 Left = 392 138 Left = 168
158 Height = 30 139 Height = 15
159 Top = 0 140 Top = 0
160 Width = 57 141 Width = 32
161 Caption = 'Depth' 142 Caption = 'Depth'
162 ParentColor = False 143 ParentColor = False
144 ParentFont = False
145 end
146 object VibratoComboBox: TComboBox
147 Left = 96
148 Height = 23
149 Top = 88
150 Width = 176
151 ItemHeight = 15
152 ItemIndex = 0
153 Items.Strings = (
154 '0: _________________________'
155 '1: _-_-_-_-_-_-_-_-_-_-_-_-_'
156 '2: __--__--__--__--__--__--_'
157 '3: _---_---_---_---_---_---_'
158 '4: ____----____----____----_'
159 '5: _-_-----_-_-----_-_-----_'
160 '6: __------__------__------_'
161 '7: _-------_-------_-------_'
162 '8: ________--------________-'
163 '9: _-_-_-_---------_-_-_-_--'
164 'a: __--__----------__--__---'
165 'b: _---_-----------_---_----'
166 'c: ____------------____-----'
167 'd: _-_-------------_-_------'
168 'e: __--------------__-------'
169 'f: _---------------_--------'
170 )
171 Style = csDropDownList
172 TabOrder = 1
173 Text = '0: _________________________'
174 end
175 object Label3: TLabel
176 Left = 160
177 Height = 15
178 Top = 64
179 Width = 55
180 Caption = 'Waveform'
181 ParentColor = False
163 end 182 end
164 end 183 end
165 object MasterVolumePage: TPage 184 object MasterVolumePage: TPage
166 object Value2: TLabel 185 object Value2: TLabel
167 Left = 32 186 Left = 18
168 Height = 30 187 Height = 17
169 Top = 32 188 Top = 18
170 Width = 584 189 Width = 334
171 Alignment = taCenter 190 Alignment = taCenter
172 AutoSize = False 191 AutoSize = False
173 Caption = 'Value2' 192 Caption = 'Value2'
174 ParentColor = False 193 ParentColor = False
194 ParentFont = False
175 end 195 end
176 object LeftVolumeTrackBar: TTrackBar 196 object LeftVolumeTrackBar: TTrackBar
177 Left = 32 197 Left = 18
178 Height = 44 198 Height = 25
179 Top = 88 199 Top = 50
180 Width = 584 200 Width = 334
181 Max = 7 201 Max = 7
182 OnChange = RightVolumeTrackBarChange 202 OnChange = RightVolumeTrackBarChange
183 Position = 0 203 Position = 0
204 ParentFont = False
184 TabOrder = 0 205 TabOrder = 0
185 end 206 end
186 object RightVolumeTrackBar: TTrackBar 207 object RightVolumeTrackBar: TTrackBar
187 Left = 32 208 Left = 18
188 Height = 44 209 Height = 25
189 Top = 152 210 Top = 87
190 Width = 584 211 Width = 334
191 Max = 7 212 Max = 7
192 OnChange = RightVolumeTrackBarChange 213 OnChange = RightVolumeTrackBarChange
193 Position = 0 214 Position = 0
215 ParentFont = False
194 TabOrder = 1 216 TabOrder = 1
195 end 217 end
196 end 218 end
197 object PanningPage: TPage 219 object PanningPage: TPage
198 object LeftPanCheckGroup: TCheckGroup 220 object LeftPanCheckGroup: TCheckGroup
199 Left = 0 221 Left = 0
200 Height = 320 222 Height = 183
201 Top = 0 223 Top = 0
202 Width = 316 224 Width = 181
203 AutoFill = True 225 AutoFill = True
204 Caption = 'Left' 226 Caption = 'Left'
205 ChildSizing.LeftRightSpacing = 6 227 ChildSizing.LeftRightSpacing = 6
@@ -210,51 +232,56 @@ object frmEffectEditor: TfrmEffectEditor
210 ChildSizing.ShrinkVertical = crsScaleChilds 232 ChildSizing.ShrinkVertical = crsScaleChilds
211 ChildSizing.Layout = cclLeftToRightThenTopToBottom 233 ChildSizing.Layout = cclLeftToRightThenTopToBottom
212 ChildSizing.ControlsPerLine = 1 234 ChildSizing.ControlsPerLine = 1
213 ClientHeight = 285 235 ClientHeight = 148
214 ClientWidth = 312 236 ClientWidth = 177
237 ParentFont = False
215 TabOrder = 0 238 TabOrder = 0
216 object CheckBox1: TCheckBox 239 object CheckBox1: TCheckBox
217 Left = 6 240 Left = 3
218 Height = 69 241 Height = 69
219 Top = 6 242 Top = 3
220 Width = 300 243 Width = 300
221 Caption = 'Duty 1' 244 Caption = 'Duty 1'
222 OnClick = CheckBox1Change 245 OnClick = CheckBox1Change
246 ParentFont = False
223 TabOrder = 0 247 TabOrder = 0
224 end 248 end
225 object CheckBox2: TCheckBox 249 object CheckBox2: TCheckBox
226 Left = 6 250 Left = 3
227 Height = 69 251 Height = 69
228 Top = 75 252 Top = 43
229 Width = 300 253 Width = 300
230 Caption = 'Duty 2' 254 Caption = 'Duty 2'
231 OnClick = CheckBox1Change 255 OnClick = CheckBox1Change
256 ParentFont = False
232 TabOrder = 1 257 TabOrder = 1
233 end 258 end
234 object CheckBox3: TCheckBox 259 object CheckBox3: TCheckBox
235 Left = 6 260 Left = 3
236 Height = 69 261 Height = 69
237 Top = 144 262 Top = 82
238 Width = 300 263 Width = 300
239 Caption = 'Wave' 264 Caption = 'Wave'
240 OnClick = CheckBox1Change 265 OnClick = CheckBox1Change
266 ParentFont = False
241 TabOrder = 2 267 TabOrder = 2
242 end 268 end
243 object CheckBox4: TCheckBox 269 object CheckBox4: TCheckBox
244 Left = 6 270 Left = 3
245 Height = 66 271 Height = 66
246 Top = 213 272 Top = 122
247 Width = 300 273 Width = 300
248 Caption = 'Noise' 274 Caption = 'Noise'
249 OnClick = CheckBox1Change 275 OnClick = CheckBox1Change
276 ParentFont = False
250 TabOrder = 3 277 TabOrder = 3
251 end 278 end
252 end 279 end
253 object RightPanCheckGroup: TCheckGroup 280 object RightPanCheckGroup: TCheckGroup
254 Left = 320 281 Left = 183
255 Height = 320 282 Height = 183
256 Top = 0 283 Top = 0
257 Width = 316 284 Width = 181
258 AutoFill = True 285 AutoFill = True
259 Caption = 'Right' 286 Caption = 'Right'
260 ChildSizing.LeftRightSpacing = 6 287 ChildSizing.LeftRightSpacing = 6
@@ -265,53 +292,58 @@ object frmEffectEditor: TfrmEffectEditor
265 ChildSizing.ShrinkVertical = crsScaleChilds 292 ChildSizing.ShrinkVertical = crsScaleChilds
266 ChildSizing.Layout = cclLeftToRightThenTopToBottom 293 ChildSizing.Layout = cclLeftToRightThenTopToBottom
267 ChildSizing.ControlsPerLine = 1 294 ChildSizing.ControlsPerLine = 1
268 ClientHeight = 285 295 ClientHeight = 148
269 ClientWidth = 312 296 ClientWidth = 177
297 ParentFont = False
270 TabOrder = 1 298 TabOrder = 1
271 object CheckBox5: TCheckBox 299 object CheckBox5: TCheckBox
272 Left = 6 300 Left = 3
273 Height = 69 301 Height = 69
274 Top = 6 302 Top = 3
275 Width = 300 303 Width = 300
276 Caption = 'Duty 1' 304 Caption = 'Duty 1'
277 OnClick = CheckBox1Change 305 OnClick = CheckBox1Change
306 ParentFont = False
278 TabOrder = 0 307 TabOrder = 0
279 end 308 end
280 object CheckBox6: TCheckBox 309 object CheckBox6: TCheckBox
281 Left = 6 310 Left = 3
282 Height = 69 311 Height = 69
283 Top = 75 312 Top = 43
284 Width = 300 313 Width = 300
285 Caption = 'Duty 2' 314 Caption = 'Duty 2'
286 OnClick = CheckBox1Change 315 OnClick = CheckBox1Change
316 ParentFont = False
287 TabOrder = 1 317 TabOrder = 1
288 end 318 end
289 object CheckBox7: TCheckBox 319 object CheckBox7: TCheckBox
290 Left = 6 320 Left = 3
291 Height = 69 321 Height = 69
292 Top = 144 322 Top = 82
293 Width = 300 323 Width = 300
294 Caption = 'Wave' 324 Caption = 'Wave'
295 OnClick = CheckBox1Change 325 OnClick = CheckBox1Change
326 ParentFont = False
296 TabOrder = 2 327 TabOrder = 2
297 end 328 end
298 object CheckBox8: TCheckBox 329 object CheckBox8: TCheckBox
299 Left = 6 330 Left = 3
300 Height = 66 331 Height = 66
301 Top = 213 332 Top = 122
302 Width = 300 333 Width = 300
303 Caption = 'Noise' 334 Caption = 'Noise'
304 OnClick = CheckBox1Change 335 OnClick = CheckBox1Change
336 ParentFont = False
305 TabOrder = 3 337 TabOrder = 3
306 end 338 end
307 end 339 end
308 end 340 end
309 object DutyCyclePage: TPage 341 object DutyCyclePage: TPage
310 object DutyRadioGroup: TRadioGroup 342 object DutyRadioGroup: TRadioGroup
311 Left = 96 343 Left = 55
312 Height = 296 344 Height = 169
313 Top = 0 345 Top = 0
314 Width = 424 346 Width = 242
315 AutoFill = True 347 AutoFill = True
316 Caption = 'Duty Cycle' 348 Caption = 'Duty Cycle'
317 ChildSizing.LeftRightSpacing = 6 349 ChildSizing.LeftRightSpacing = 6
@@ -321,8 +353,8 @@ object frmEffectEditor: TfrmEffectEditor
321 ChildSizing.ShrinkVertical = crsScaleChilds 353 ChildSizing.ShrinkVertical = crsScaleChilds
322 ChildSizing.Layout = cclLeftToRightThenTopToBottom 354 ChildSizing.Layout = cclLeftToRightThenTopToBottom
323 ChildSizing.ControlsPerLine = 1 355 ChildSizing.ControlsPerLine = 1
324 ClientHeight = 261 356 ClientHeight = 134
325 ClientWidth = 420 357 ClientWidth = 238
326 Items.Strings = ( 358 Items.Strings = (
327 '12.5% ( _-------_-------_------- )' 359 '12.5% ( _-------_-------_------- )'
328 '25% ( __------__------__------ )' 360 '25% ( __------__------__------ )'
@@ -330,6 +362,7 @@ object frmEffectEditor: TfrmEffectEditor
330 '75% ( ______--______--______-- )' 362 '75% ( ______--______--______-- )'
331 ) 363 )
332 OnSelectionChanged = DutyRadioGroupSelectionChanged 364 OnSelectionChanged = DutyRadioGroupSelectionChanged
365 ParentFont = False
333 TabOrder = 0 366 TabOrder = 0
334 end 367 end
335 end 368 end
Modifiedeffecteditor.pas +4−15
@@ -28,12 +28,13 @@ type
28 CheckBox6: TCheckBox; 28 CheckBox6: TCheckBox;
29 CheckBox7: TCheckBox; 29 CheckBox7: TCheckBox;
30 CheckBox8: TCheckBox; 30 CheckBox8: TCheckBox;
31 VibratoComboBox: TComboBox;
32 Label3: TLabel;
31 LeftPanCheckGroup: TCheckGroup; 33 LeftPanCheckGroup: TCheckGroup;
32 RightPanCheckGroup: TCheckGroup; 34 RightPanCheckGroup: TCheckGroup;
33 ComboBox1: TComboBox; 35 ComboBox1: TComboBox;
34 Label1: TLabel; 36 Label1: TLabel;
35 Label2: TLabel; 37 Label2: TLabel;
36 VibratoRateRadioGroup: TRadioGroup;
37 DutyRadioGroup: TRadioGroup; 38 DutyRadioGroup: TRadioGroup;
38 TwoParamsTrackBar1: TTrackBar; 39 TwoParamsTrackBar1: TTrackBar;
39 TwoParamsTrackBar2: TTrackBar; 40 TwoParamsTrackBar2: TTrackBar;
@@ -208,13 +209,7 @@ end;
208 procedure TfrmEffectEditor.VibratoRateRadioGroupSelectionChanged(Sender: TObject 209 procedure TfrmEffectEditor.VibratoRateRadioGroupSelectionChanged(Sender: TObject
209 ); 210 );
210 begin 211 begin
211 case VibratoRateRadioGroup.ItemIndex of 212 Cell^.EffectParams.Param1 := VibratoComboBox.ItemIndex;
212 0: Cell^.EffectParams.Param1 := $0;
213 1: Cell^.EffectParams.Param1 := $1;
214 2: Cell^.EffectParams.Param1 := $3;
215 3: Cell^.EffectParams.Param1 := $7;
216 4: Cell^.EffectParams.Param1 := $F;
217 end;
218 end; 213 end;
219 214
220 procedure TfrmEffectEditor.LoadEffect; 215 procedure TfrmEffectEditor.LoadEffect;
@@ -254,13 +249,7 @@ end;
254 249
255 procedure TfrmEffectEditor.LoadVibratoData; 250 procedure TfrmEffectEditor.LoadVibratoData;
256 begin 251 begin
257 case Cell^.EffectParams.Param1 of 252 VibratoComboBox.ItemIndex := Cell^.EffectParams.Param1;
258 $0: VibratoRateRadioGroup.ItemIndex := 0;
259 $1: VibratoRateRadioGroup.ItemIndex := 1;
260 $3: VibratoRateRadioGroup.ItemIndex := 2;
261 $7: VibratoRateRadioGroup.ItemIndex := 3;
262 $F: VibratoRateRadioGroup.ItemIndex := 4;
263 end;
264 VibratoDepthTrackBar.Position := Cell^.EffectParams.Param2; 253 VibratoDepthTrackBar.Position := Cell^.EffectParams.Param2;
265 Label2.Caption := IntToStr(VibratoDepthTrackBar.Position); 254 Label2.Caption := IntToStr(VibratoDepthTrackBar.Position);
266 end; 255 end;
Modifiedsong.pas +15−0
@@ -28,6 +28,7 @@ type
28 procedure WriteSongToStream(S: TStream; const ASong: TSong); 28 procedure WriteSongToStream(S: TStream; const ASong: TSong);
29 procedure ReadSongFromStream(S: TStream; var ASong: TSong); 29 procedure ReadSongFromStream(S: TStream; var ASong: TSong);
30 procedure InitializeSong(var S: TSong); 30 procedure InitializeSong(var S: TSong);
31 procedure DestroySong(var S: TSong);
31 32
32 implementation 33 implementation
33 34
@@ -129,9 +130,23 @@ begin
129 S.Waves[I][J] := random($F); 130 S.Waves[I][J] := random($F);
130 end; 131 end;
131 132
133 for I := Low(TOrderMatrix) to High(TOrderMatrix) do begin
134 SetLength(S.OrderMatrix[I], 2);
135 S.OrderMatrix[I, 0] := I;
136 end;
137
132 S.TicksPerRow := 7; 138 S.TicksPerRow := 7;
133 S.Patterns := TPatternMap.Create; 139 S.Patterns := TPatternMap.Create;
134 end; 140 end;
135 141
142 procedure DestroySong(var S: TSong);
143 var
144 I: Integer;
145 begin
146 S.Patterns.Free;
147 for I := Low(TOrderMatrix) to High(TOrderMatrix) do
148 SetLength(S.OrderMatrix[I], 0);
149 end;
150
136 end. 151 end.
137 152
Modifiedtracker.lfm +32−24
@@ -1,7 +1,7 @@
1 object frmTracker: TfrmTracker 1 object frmTracker: TfrmTracker
2 Left = 1447 2 Left = 620
3 Height = 714 3 Height = 714
4 Top = 238 4 Top = 127
5 Width = 1181 5 Width = 1181
6 Caption = 'hUGETracker' 6 Caption = 'hUGETracker'
7 ClientHeight = 694 7 ClientHeight = 694
@@ -57,14 +57,14 @@ object frmTracker: TfrmTracker
57 Height = 468 57 Height = 468
58 Top = 0 58 Top = 0
59 Width = 983 59 Width = 983
60 ActivePage = PatternTabSheet 60 ActivePage = RoutinesTabSheet
61 Align = alClient 61 Align = alClient
62 ParentFont = False 62 ParentFont = False
63 TabIndex = 1 63 TabIndex = 5
64 TabOrder = 0 64 TabOrder = 0
65 object GeneralTabSheet: TTabSheet 65 object GeneralTabSheet: TTabSheet
66 Caption = 'General' 66 Caption = 'General'
67 ClientHeight = 435 67 ClientHeight = 440
68 ClientWidth = 975 68 ClientWidth = 975
69 ParentFont = False 69 ParentFont = False
70 object SongInformationGroupbox: TGroupBox 70 object SongInformationGroupbox: TGroupBox
@@ -906,14 +906,14 @@ object frmTracker: TfrmTracker
906 end 906 end
907 object WavesTabSheet: TTabSheet 907 object WavesTabSheet: TTabSheet
908 Caption = 'Waves' 908 Caption = 'Waves'
909 ClientHeight = 435 909 ClientHeight = 440
910 ClientWidth = 975 910 ClientWidth = 975
911 ParentFont = False 911 ParentFont = False
912 object WaveEditPaintBox: TPaintBox 912 object WaveEditPaintBox: TPaintBox
913 AnchorSideTop.Control = WaveEditGroupBox 913 AnchorSideTop.Control = WaveEditGroupBox
914 AnchorSideTop.Side = asrBottom 914 AnchorSideTop.Side = asrBottom
915 Left = 0 915 Left = 0
916 Height = 275 916 Height = 280
917 Top = 160 917 Top = 160
918 Width = 975 918 Width = 975
919 Align = alBottom 919 Align = alBottom
@@ -980,20 +980,21 @@ object frmTracker: TfrmTracker
980 end 980 end
981 object CommentsTabSheet: TTabSheet 981 object CommentsTabSheet: TTabSheet
982 Caption = 'Comments' 982 Caption = 'Comments'
983 ClientHeight = 435 983 ClientHeight = 440
984 ClientWidth = 975 984 ClientWidth = 975
985 ParentFont = False 985 ParentFont = False
986 object CommentMemo: TMemo 986 object CommentMemo: TMemo
987 AnchorSideTop.Control = Label17 987 AnchorSideTop.Control = Label17
988 AnchorSideTop.Side = asrBottom 988 AnchorSideTop.Side = asrBottom
989 Left = 0 989 Left = 0
990 Height = 399 990 Height = 404
991 Hint = 'The comments section for your song. Greetings/links/etc' 991 Hint = 'The comments section for your song. Greetings/links/etc'
992 Top = 36 992 Top = 36
993 Width = 975 993 Width = 975
994 Align = alBottom 994 Align = alBottom
995 Anchors = [akTop, akLeft, akRight, akBottom] 995 Anchors = [akTop, akLeft, akRight, akBottom]
996 BorderSpacing.Top = 13 996 BorderSpacing.Top = 13
997 MaxLength = 255
997 OnChange = CommentMemoChange 998 OnChange = CommentMemoChange
998 ParentFont = False 999 ParentFont = False
999 TabOrder = 0 1000 TabOrder = 0
@@ -1010,20 +1011,19 @@ object frmTracker: TfrmTracker
1010 end 1011 end
1011 object RoutinesTabSheet: TTabSheet 1012 object RoutinesTabSheet: TTabSheet
1012 Caption = 'Routines' 1013 Caption = 'Routines'
1013 ClientHeight = 777 1014 ClientHeight = 440
1014 ClientWidth = 1712 1015 ClientWidth = 975
1015 ParentFont = False 1016 ParentFont = False
1016 inline RoutineSynedit: TSynEdit 1017 inline RoutineSynedit: TSynEdit
1017 AnchorSideTop.Control = Label19 1018 AnchorSideTop.Control = Label19
1018 AnchorSideTop.Side = asrBottom 1019 AnchorSideTop.Side = asrBottom
1019 Left = 0 1020 Left = 0
1020 Height = 534 1021 Height = 312
1021 Top = 243 1022 Top = 128
1022 Width = 1712 1023 Width = 975
1023 Align = alBottom 1024 Align = alBottom
1024 BorderSpacing.Top = 13 1025 BorderSpacing.Top = 13
1025 Anchors = [akTop, akLeft, akRight, akBottom] 1026 Anchors = [akTop, akLeft, akRight, akBottom]
1026 Enabled = False
1027 Font.Height = -13 1027 Font.Height = -13
1028 Font.Name = 'Courier New' 1028 Font.Name = 'Courier New'
1029 Font.Pitch = fpFixed 1029 Font.Pitch = fpFixed
@@ -1035,6 +1035,7 @@ object frmTracker: TfrmTracker
1035 Gutter.MouseActions = <> 1035 Gutter.MouseActions = <>
1036 RightGutter.Width = 0 1036 RightGutter.Width = 0
1037 RightGutter.MouseActions = <> 1037 RightGutter.MouseActions = <>
1038 InsertCaret = ctHalfBlock
1038 Keystrokes = < 1039 Keystrokes = <
1039 item 1040 item
1040 Command = ecUp 1041 Command = ecUp
@@ -1462,6 +1463,8 @@ object frmTracker: TfrmTracker
1462 Lines.Strings = ( 1463 Lines.Strings = (
1463 'RoutineSynedit' 1464 'RoutineSynedit'
1464 ) 1465 )
1466 Options = [eoAutoIndent, eoBracketHighlight, eoGroupUndo, eoSmartTabs, eoTabsToSpaces, eoTrimTrailingSpaces, eoDoubleClickSelectsLine]
1467 MouseOptions = [emDoubleClickSelectsLine]
1465 VisibleSpecialChars = [vscSpace, vscTabAtLast] 1468 VisibleSpecialChars = [vscSpace, vscTabAtLast]
1466 SelectedColor.BackPriority = 50 1469 SelectedColor.BackPriority = 50
1467 SelectedColor.ForePriority = 50 1470 SelectedColor.ForePriority = 50
@@ -1519,16 +1522,16 @@ object frmTracker: TfrmTracker
1519 end 1522 end
1520 object Label18: TLabel 1523 object Label18: TLabel
1521 Left = 8 1524 Left = 8
1522 Height = 30 1525 Height = 15
1523 Top = 16 1526 Top = 16
1524 Width = 71 1527 Width = 41
1525 Caption = 'Routine' 1528 Caption = 'Routine'
1526 ParentColor = False 1529 ParentColor = False
1527 ParentFont = False 1530 ParentFont = False
1528 end 1531 end
1529 object RoutineNumberSpinner: TSpinEdit 1532 object RoutineNumberSpinner: TSpinEdit
1530 Left = 64 1533 Left = 64
1531 Height = 38 1534 Height = 23
1532 Top = 8 1535 Top = 8
1533 Width = 176 1536 Width = 176
1534 Enabled = False 1537 Enabled = False
@@ -1540,9 +1543,9 @@ object frmTracker: TfrmTracker
1540 end 1543 end
1541 object Label19: TLabel 1544 object Label19: TLabel
1542 Left = 8 1545 Left = 8
1543 Height = 150 1546 Height = 75
1544 Top = 40 1547 Top = 40
1545 Width = 891 1548 Width = 506
1546 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!' 1549 Caption = 'Routines are an advanced feature of hUGETracker, and you likely won''t need them at all'#13#10'if you are only interested in composing music. If you want to create a custom effect, or interface'#13#10'with game code that you''re writing a soundtrack for, then routines will come in handy.'#13#10#13#10'Refer to the user manual for more information!'
1547 ParentColor = False 1550 ParentColor = False
1548 ParentFont = False 1551 ParentFont = False
@@ -1875,12 +1878,17 @@ object frmTracker: TfrmTracker
1875 top = 37 1878 top = 37
1876 object MenuItem1: TMenuItem 1879 object MenuItem1: TMenuItem
1877 Caption = 'File' 1880 Caption = 'File'
1881 object MenuItem33: TMenuItem
1882 Caption = 'New'
1883 OnClick = MenuItem33Click
1884 end
1878 object MenuItem12: TMenuItem 1885 object MenuItem12: TMenuItem
1879 Action = FileOpen1 1886 Action = FileOpen1
1880 OnClick = MenuItem12Click 1887 OnClick = MenuItem12Click
1881 end 1888 end
1882 object MenuItem13: TMenuItem 1889 object MenuItem13: TMenuItem
1883 Action = FileSaveAs1 1890 Action = FileSaveAs1
1891 OnClick = MenuItem13Click
1884 end 1892 end
1885 object MenuItem14: TMenuItem 1893 object MenuItem14: TMenuItem
1886 Caption = 'E&xit' 1894 Caption = 'E&xit'
@@ -4583,8 +4591,8 @@ object frmTracker: TfrmTracker
4583 end 4591 end
4584 object OpenDialog1: TOpenDialog 4592 object OpenDialog1: TOpenDialog
4585 Filter = 'hUGETracker Instruments|*.ugi' 4593 Filter = 'hUGETracker Instruments|*.ugi'
4586 left = 590 4594 left = 576
4587 top = 91 4595 top = 96
4588 end 4596 end
4589 object InstrumentSaveDialog: TSaveDialog 4597 object InstrumentSaveDialog: TSaveDialog
4590 Filter = 'hUGETracker Instruments|*.ugi' 4598 Filter = 'hUGETracker Instruments|*.ugi'
@@ -4900,8 +4908,8 @@ object frmTracker: TfrmTracker
4900 end 4908 end
4901 object WaveSaveDialog: TSaveDialog 4909 object WaveSaveDialog: TSaveDialog
4902 Filter = 'hUGETracker Waves|*.ugw' 4910 Filter = 'hUGETracker Waves|*.ugw'
4903 left = 544 4911 left = 520
4904 top = 96 4912 top = 112
4905 end 4913 end
4906 object GBSaveDialog: TSaveDialog 4914 object GBSaveDialog: TSaveDialog
4907 Filter = 'Gameboy ROM|*.GB' 4915 Filter = 'Gameboy ROM|*.GB'
Modifiedtracker.pas +27−4
@@ -37,6 +37,7 @@ type
37 MenuItem28: TMenuItem; 37 MenuItem28: TMenuItem;
38 MenuItem31: TMenuItem; 38 MenuItem31: TMenuItem;
39 MenuItem32: TMenuItem; 39 MenuItem32: TMenuItem;
40 MenuItem33: TMenuItem;
40 NoiseVisualizer: TPaintBox; 41 NoiseVisualizer: TPaintBox;
41 Panel6: TPanel; 42 Panel6: TPanel;
42 WavSaveDialog: TSaveDialog; 43 WavSaveDialog: TSaveDialog;
@@ -246,6 +247,7 @@ type
246 procedure MenuItem10Click(Sender: TObject); 247 procedure MenuItem10Click(Sender: TObject);
247 procedure MenuItem11Click(Sender: TObject); 248 procedure MenuItem11Click(Sender: TObject);
248 procedure MenuItem12Click(Sender: TObject); 249 procedure MenuItem12Click(Sender: TObject);
250 procedure MenuItem13Click(Sender: TObject);
249 procedure MenuItem14Click(Sender: TObject); 251 procedure MenuItem14Click(Sender: TObject);
250 procedure MenuItem17Click(Sender: TObject); 252 procedure MenuItem17Click(Sender: TObject);
251 procedure MenuItem18Click(Sender: TObject); 253 procedure MenuItem18Click(Sender: TObject);
@@ -255,6 +257,7 @@ type
255 procedure FontSizeToggleMenuItemClick(Sender: TObject); 257 procedure FontSizeToggleMenuItemClick(Sender: TObject);
256 procedure MenuItem26Click(Sender: TObject); 258 procedure MenuItem26Click(Sender: TObject);
257 procedure MenuItem31Click(Sender: TObject); 259 procedure MenuItem31Click(Sender: TObject);
260 procedure MenuItem33Click(Sender: TObject);
258 procedure MenuItem5Click(Sender: TObject); 261 procedure MenuItem5Click(Sender: TObject);
259 procedure MenuItem8Click(Sender: TObject); 262 procedure MenuItem8Click(Sender: TObject);
260 procedure NoiseVisualizerPaint(Sender: TObject); 263 procedure NoiseVisualizerPaint(Sender: TObject);
@@ -928,7 +931,6 @@ end;
928 931
929 procedure TfrmTracker.FormCreate(Sender: TObject); 932 procedure TfrmTracker.FormCreate(Sender: TObject);
930 var 933 var
931 I: Integer;
932 PUI: PtrUint; 934 PUI: PtrUint;
933 begin 935 begin
934 {if Screen.Fonts.IndexOf('PixeliteTTF') = -1 then 936 {if Screen.Fonts.IndexOf('PixeliteTTF') = -1 then
@@ -983,11 +985,12 @@ begin
983 end; 985 end;
984 986
985 // Initialize order table 987 // Initialize order table
986 for I := 0 to 3 do begin 988 {for I := 0 to 3 do begin
987 OrderEditStringGrid.Cells[I+1, 1] := IntToStr(I); 989 OrderEditStringGrid.Cells[I+1, 1] := IntToStr(I);
988 TrackerGrid.LoadPattern(I, I); 990 TrackerGrid.LoadPattern(I, I);
989 end; 991 end;}
990 CopyOrderGridToOrderMatrix; 992 //CopyOrderGridToOrderMatrix;
993 CopyOrderMatrixToOrderGrid;
991 994
992 // Manually resize the fixed column in the order editor 995 // Manually resize the fixed column in the order editor
993 OrderEditStringGrid.ColWidths[0]:=50; 996 OrderEditStringGrid.ColWidths[0]:=50;
@@ -1140,6 +1143,8 @@ procedure TfrmTracker.FileOpen1Accept(Sender: TObject);
1140 var 1143 var
1141 Stream: TStream; 1144 Stream: TStream;
1142 begin 1145 begin
1146 DestroySong(Song);
1147
1143 stream := TFileStream.Create(FileOpen1.Dialog.FileName, fmOpenRead); 1148 stream := TFileStream.Create(FileOpen1.Dialog.FileName, fmOpenRead);
1144 try 1149 try
1145 ReadSongFromStream(stream, Song); 1150 ReadSongFromStream(stream, Song);
@@ -1344,6 +1349,11 @@ begin
1344 CheckUnsavedChanges; 1349 CheckUnsavedChanges;
1345 end; 1350 end;
1346 1351
1352 procedure TfrmTracker.MenuItem13Click(Sender: TObject);
1353 begin
1354
1355 end;
1356
1347 procedure TfrmTracker.MenuItem14Click(Sender: TObject); 1357 procedure TfrmTracker.MenuItem14Click(Sender: TObject);
1348 begin 1358 begin
1349 if CheckUnsavedChanges then 1359 if CheckUnsavedChanges then
@@ -1441,6 +1451,19 @@ begin
1441 TrackerGrid.InterpolateSelection; 1451 TrackerGrid.InterpolateSelection;
1442 end; 1452 end;
1443 1453
1454 procedure TfrmTracker.MenuItem33Click(Sender: TObject);
1455 begin
1456 if not CheckUnsavedChanges then Exit;
1457
1458 FileSaveAs1.Dialog.FileName := '';
1459 FileOpen1.Dialog.FileName := '';
1460
1461 DestroySong(Song);
1462 InitializeSong(Song);
1463
1464 UpdateUIAfterLoad;
1465 end;
1466
1444 procedure TfrmTracker.MenuItem5Click(Sender: TObject); 1467 procedure TfrmTracker.MenuItem5Click(Sender: TObject);
1445 begin 1468 begin
1446 frmAboutHugetracker.Show; 1469 frmAboutHugetracker.Show;