Commit f9f27a8

Nick committed on
More work on GUI
commit f9f27a804fb38a09ce9898fff39957b57aa3acb5 parent 4bd68f6
5 changed files +1374−186
ModifiedGBEmu.lpi +24−5
@@ -43,18 +43,27 @@
43 </Mode0> 43 </Mode0>
44 </Modes> 44 </Modes>
45 </RunParams> 45 </RunParams>
46 <RequiredPackages Count="3"> 46 <RequiredPackages Count="6">
47 <Item1> 47 <Item1>
48 <PackageName Value="LazControls"/> 48 <PackageName Value="virtualtreeview_package"/>
49 </Item1> 49 </Item1>
50 <Item2> 50 <Item2>
51 <PackageName Value="BGRABitmapPack"/> 51 <PackageName Value="SynEdit"/>
52 </Item2> 52 </Item2>
53 <Item3> 53 <Item3>
54 <PackageName Value="LCL"/> 54 <PackageName Value="eccontrols"/>
55 </Item3> 55 </Item3>
56 <Item4>
57 <PackageName Value="LazControls"/>
58 </Item4>
59 <Item5>
60 <PackageName Value="BGRABitmapPack"/>
61 </Item5>
62 <Item6>
63 <PackageName Value="LCL"/>
64 </Item6>
56 </RequiredPackages> 65 </RequiredPackages>
57 <Units Count="13"> 66 <Units Count="15">
58 <Unit0> 67 <Unit0>
59 <Filename Value="GBEmu.lpr"/> 68 <Filename Value="GBEmu.lpr"/>
60 <IsPartOfProject Value="True"/> 69 <IsPartOfProject Value="True"/>
@@ -109,6 +118,7 @@
109 <Filename Value="tracker.pas"/> 118 <Filename Value="tracker.pas"/>
110 <IsPartOfProject Value="True"/> 119 <IsPartOfProject Value="True"/>
111 <ComponentName Value="frmTracker"/> 120 <ComponentName Value="frmTracker"/>
121 <HasResources Value="True"/>
112 <ResourceBaseClass Value="Form"/> 122 <ResourceBaseClass Value="Form"/>
113 <UnitName Value="Tracker"/> 123 <UnitName Value="Tracker"/>
114 </Unit11> 124 </Unit11>
@@ -119,6 +129,15 @@
119 <ResourceBaseClass Value="Form"/> 129 <ResourceBaseClass Value="Form"/>
120 <UnitName Value="About"/> 130 <UnitName Value="About"/>
121 </Unit12> 131 </Unit12>
132 <Unit13>
133 <Filename Value="instruments.pas"/>
134 <IsPartOfProject Value="True"/>
135 </Unit13>
136 <Unit14>
137 <Filename Value="song.pas"/>
138 <IsPartOfProject Value="True"/>
139 <UnitName Value="Song"/>
140 </Unit14>
122 </Units> 141 </Units>
123 </ProjectOptions> 142 </ProjectOptions>
124 <CompilerOptions> 143 <CompilerOptions>
Addedinstruments.pas +88−0
@@ -0,0 +1,88 @@
1 unit instruments;
2
3 {$mode objfpc}
4
5 interface
6
7 uses
8 Classes, SysUtils;
9
10 {TInstrument = class
11 Length: Integer;
12 LengthEnabled: Integer;
13
14 EnvInitialVolume: Integer;
15 EnvDirection: TSweepType;
16 EnvAmount: Integer;
17 end;
18
19 TSquareInstrument = class(TInstrument)
20 // NR10
21 SweepTime: Integer;
22 SweepIncDec: TSweepType;
23 SweepShift: Integer;
24
25 // NR11
26 Duty: TDutyType;
27 end;
28
29 TWaveInstrument = class(TInstrument)
30 // NR32
31 OutputLevel: Integer;
32 // Wave
33 Waveform: Integer;
34 end;
35
36 TNoiseInstrument = class(TInstrument)
37 // NR42
38 ShiftClockFreq: Integer;
39 CounterStep: TStepWidth;
40 DividingRatio: Integer;
41 end;}
42
43 type
44 TInstrumentType = (Square, Wave, Noise);
45 TDutyType = 0..3;
46 TSweepType = (Up, Down);
47 TStepWidth = (Fifteen, Seven);
48 TEnvelopeVolume = 0..63;
49 TEnvelopeSweepAmount = 0..7;
50
51 TInstrument = record
52 Name: String;
53 Length: Integer;
54 // Highmask
55 LengthEnabled: Boolean;
56
57 InitialVolume: TEnvelopeVolume;
58 VolSweepDirection: TSweepType;
59 VolSweepAmount: TEnvelopeSweepAmount;
60
61 case Type_: TInstrumentType of
62 Square: (
63 // NR10
64 SweepTime: Integer;
65 SweepIncDec: TSweepType;
66 SweepShift: Integer;
67
68 // NR11
69 Duty: TDutyType;
70 );
71 Wave: (
72 // NR32
73 OutputLevel: Integer;
74 // Wave
75 Waveform: Integer;
76 );
77 Noise: (
78 // NR42
79 ShiftClockFreq: Integer;
80 CounterStep: TStepWidth;
81 DividingRatio: Integer;
82 );
83 end;
84
85 implementation
86
87 end.
88
Addedsong.pas +21−0
@@ -0,0 +1,21 @@
1 unit Song;
2
3 {$mode delphi}
4
5 interface
6
7 uses instruments;
8
9 type
10 TSong = record
11 Name: String;
12 Artist: String;
13 Comment: String;
14
15 Instruments: array[1..15] of TInstrument;
16 end;
17
18 implementation
19
20 end.
21
Modifiedtracker.lfm +958−116
@@ -2,11 +2,12 @@ object frmTracker: TfrmTracker
2 Left = 497 2 Left = 497
3 Height = 930 3 Height = 930
4 Top = 131 4 Top = 131
5 Width = 1178 5 Width = 1306
6 Caption = 'hUGETracker' 6 Caption = 'hUGETracker'
7 ClientHeight = 910 7 ClientHeight = 910
8 ClientWidth = 1178 8 ClientWidth = 1306
9 Menu = MainMenu1 9 Menu = MainMenu1
10 OnCreate = FormCreate
10 LCLVersion = '2.0.2.0' 11 LCLVersion = '2.0.2.0'
11 object TreeView1: TTreeView 12 object TreeView1: TTreeView
12 Left = 0 13 Left = 0
@@ -38,23 +39,65 @@ object frmTracker: TfrmTracker
38 Left = 198 39 Left = 198
39 Height = 685 40 Height = 685
40 Top = 202 41 Top = 202
41 Width = 980 42 Width = 1108
42 Align = alClient 43 Align = alClient
43 BevelOuter = bvNone 44 BevelOuter = bvNone
44 ClientHeight = 685 45 ClientHeight = 685
45 ClientWidth = 980 46 ClientWidth = 1108
46 TabOrder = 2 47 TabOrder = 2
47 object PageControl1: TPageControl 48 object PageControl1: TPageControl
48 Left = 0 49 Left = 0
49 Height = 685 50 Height = 685
50 Top = 0 51 Top = 0
51 Width = 980 52 Width = 1108
52 ActivePage = InstrumentTabSheet 53 ActivePage = CommentsTabSheet
53 Align = alClient 54 Align = alClient
54 TabIndex = 2 55 TabIndex = 3
55 TabOrder = 0 56 TabOrder = 0
56 object GeneralTabSheet: TTabSheet 57 object GeneralTabSheet: TTabSheet
57 Caption = 'General' 58 Caption = 'General'
59 ClientHeight = 657
60 ClientWidth = 1100
61 object SongInformationGroupbox: TGroupBox
62 Left = 8
63 Height = 528
64 Top = 8
65 Width = 729
66 Caption = 'Song information'
67 ClientHeight = 508
68 ClientWidth = 725
69 TabOrder = 0
70 object Label15: TLabel
71 Left = 8
72 Height = 15
73 Top = 16
74 Width = 27
75 Caption = 'Song'
76 ParentColor = False
77 end
78 object Label16: TLabel
79 Left = 7
80 Height = 15
81 Top = 48
82 Width = 28
83 Caption = 'Artist'
84 ParentColor = False
85 end
86 object SongEdit: TEdit
87 Left = 56
88 Height = 23
89 Top = 8
90 Width = 216
91 TabOrder = 0
92 end
93 object ArtistEdit: TEdit
94 Left = 56
95 Height = 23
96 Top = 40
97 Width = 216
98 TabOrder = 1
99 end
100 end
58 end 101 end
59 object PatternTabSheet: TTabSheet 102 object PatternTabSheet: TTabSheet
60 Caption = 'Patterns' 103 Caption = 'Patterns'
@@ -62,12 +105,12 @@ object frmTracker: TfrmTracker
62 object InstrumentTabSheet: TTabSheet 105 object InstrumentTabSheet: TTabSheet
63 Caption = 'Instruments' 106 Caption = 'Instruments'
64 ClientHeight = 657 107 ClientHeight = 657
65 ClientWidth = 972 108 ClientWidth = 1100
66 object PaintBox1: TPaintBox 109 object PaintBox1: TPaintBox
67 Left = 0 110 Left = 0
68 Height = 321 111 Height = 321
69 Top = 336 112 Top = 336
70 Width = 972 113 Width = 1100
71 Align = alClient 114 Align = alClient
72 Color = clBlack 115 Color = clBlack
73 ParentColor = False 116 ParentColor = False
@@ -77,13 +120,13 @@ object frmTracker: TfrmTracker
77 Left = 0 120 Left = 0
78 Height = 336 121 Height = 336
79 Top = 0 122 Top = 0
80 Width = 972 123 Width = 1100
81 Align = alTop 124 Align = alTop
82 Caption = 'Panel3' 125 Caption = 'Panel3'
83 ClientHeight = 336 126 ClientHeight = 336
84 ClientWidth = 972 127 ClientWidth = 1100
85 TabOrder = 0 128 TabOrder = 0
86 object GroupBox1: TGroupBox 129 object InstrumentGroupBox: TGroupBox
87 Left = 8 130 Left = 8
88 Height = 136 131 Height = 136
89 Top = 8 132 Top = 8
@@ -99,6 +142,7 @@ object frmTracker: TfrmTracker
99 Width = 176 142 Width = 176
100 MaxValue = 15 143 MaxValue = 15
101 MinValue = 1 144 MinValue = 1
145 OnChange = InstrumentNumberSpinnerChange
102 TabOrder = 0 146 TabOrder = 0
103 Value = 1 147 Value = 1
104 end 148 end
@@ -123,6 +167,7 @@ object frmTracker: TfrmTracker
123 Height = 23 167 Height = 23
124 Top = 26 168 Top = 26
125 Width = 176 169 Width = 176
170 OnChange = InstrumentNameEditChange
126 TabOrder = 1 171 TabOrder = 1
127 end 172 end
128 object Label3: TLabel 173 object Label3: TLabel
@@ -145,6 +190,7 @@ object frmTracker: TfrmTracker
145 'Wave' 190 'Wave'
146 'Noise' 191 'Noise'
147 ) 192 )
193 OnChange = InstrumentTypeComboboxChange
148 Style = csDropDownList 194 Style = csDropDownList
149 TabOrder = 2 195 TabOrder = 2
150 Text = 'Square' 196 Text = 'Square'
@@ -155,101 +201,222 @@ object frmTracker: TfrmTracker
155 Top = 84 201 Top = 84
156 Width = 57 202 Width = 57
157 Caption = 'Length' 203 Caption = 'Length'
204 OnChange = LengthEnabledCheckboxChange
158 TabOrder = 3 205 TabOrder = 3
159 end 206 end
160 object LengthSpinner: TSpinEdit 207 object LengthSpinner: TECSpinPosition
161 Left = 80 208 Left = 80
162 Height = 23 209 Height = 24
163 Top = 80 210 Top = 80
164 Width = 50 211 Width = 174
165 MaxValue = 63 212 Buttons.BtnBigDec.BtnOrder = 1
166 TabOrder = 4 213 Buttons.BtnBigDec.Visible = False
167 end 214 Buttons.BtnBigInc.BtnOrder = 7
168 object TrackBar1: TTrackBar 215 Buttons.BtnBigInc.Visible = False
169 Left = 136 216 Buttons.BtnDec.BtnOrder = 2
170 Height = 25 217 Buttons.BtnDrag.BtnOrder = 4
171 Top = 80 218 Buttons.BtnInc.BtnOrder = 6
172 Width = 172 219 Buttons.BtnMax.BtnOrder = 8
173 Max = 63 220 Buttons.BtnMax.Visible = False
221 Buttons.BtnMenu.BtnOrder = 5
222 Buttons.BtnMenu.Visible = False
223 Buttons.BtnMiddle.BtnOrder = 3
224 Buttons.BtnMiddle.Visible = False
225 Buttons.BtnMin.BtnOrder = 0
226 Buttons.BtnMin.Visible = False
227 Buttons.DiscreteChange = 1
228 Buttons.Increment = 1
229 Buttons.Middle = 50
230 Buttons.MouseIncrementX = 0.1
231 Buttons.MouseIncrementY = 0.05
232 Buttons.PageSize = 10
233 Buttons.Style = ebsSplittedBlock
234 Enabled = False
174 Position = 0 235 Position = 0
175 TabOrder = 5 236 ProgressFontOptions.FontSize = 0
237 ProgressFontOptions.FontStyles = [fsBold]
238 ProgressMiddlePos = 0
239 ProgressStyle = epsGradient
240 Scale.DateTimeFormat = 'hh:nn:ss'
241 Scale.LogarithmBase = 10
242 Scale.Max = 63
243 Scale.Min = 0
244 Scale.TickLongValue = 10
245 Scale.TickMiddleValue = 5
246 Scale.TickShortValue = 1
247 Scale.TickVisible = etvNone
248 Scale.ValueVisible = evvNone
249 ScaleFontOptions.FontSize = 7
250 ScaleFontOptions.FontStyles = []
251 OnChange = LengthSpinnerChange
176 end 252 end
177 end 253 end
178 object GroupBox2: TGroupBox 254 object EnvelopeGroupBox: TGroupBox
179 Left = 344 255 Left = 344
180 Height = 136 256 Height = 136
181 Top = 8 257 Top = 8
182 Width = 297 258 Width = 696
183 Caption = 'Envelope' 259 Caption = 'Envelope'
184 ClientHeight = 116 260 ClientHeight = 116
185 ClientWidth = 293 261 ClientWidth = 692
186 TabOrder = 1 262 TabOrder = 1
187 object Label4: TLabel 263 object Label4: TLabel
188 Left = 8 264 Left = 8
189 Height = 15 265 Height = 15
190 Top = 6 266 Top = 9
191 Width = 46 267 Width = 46
192 Caption = 'Start vol.' 268 Caption = 'Start vol.'
193 ParentColor = False 269 ParentColor = False
194 end 270 end
195 object EnvelopeStartTrackbar: TTrackBar
196 Left = 96
197 Height = 25
198 Top = -2
199 Width = 194
200 Max = 15
201 Position = 0
202 TabOrder = 0
203 end
204 object Label5: TLabel 271 object Label5: TLabel
205 Left = 8 272 Left = 8
206 Height = 15 273 Height = 15
207 Top = 40 274 Top = 48
208 Width = 48 275 Width = 48
209 Caption = 'Direction' 276 Caption = 'Direction'
210 ParentColor = False 277 ParentColor = False
211 end 278 end
212 object DirectionComboBox: TComboBox 279 object DirectionComboBox: TComboBox
213 Left = 104 280 Left = 82
214 Height = 23 281 Height = 23
215 Top = 34 282 Top = 40
216 Width = 176 283 Width = 198
217 ItemHeight = 15 284 ItemHeight = 15
218 ItemIndex = 1 285 ItemIndex = 1
219 Items.Strings = ( 286 Items.Strings = (
220 'Up' 287 'Up'
221 'Down' 288 'Down'
222 ) 289 )
290 OnChange = DirectionComboBoxChange
223 Style = csDropDownList 291 Style = csDropDownList
224 TabOrder = 1 292 TabOrder = 0
225 Text = 'Down' 293 Text = 'Down'
226 end 294 end
227 object Label6: TLabel 295 object Label6: TLabel
228 Left = 8 296 Left = 8
229 Height = 15 297 Height = 15
230 Top = 64 298 Top = 86
231 Width = 41 299 Width = 41
232 Caption = 'Change' 300 Caption = 'Change'
233 ParentColor = False 301 ParentColor = False
234 end 302 end
235 object EnvelopeSizeTrackbar: TTrackBar 303 object StartVolSpinner: TECSpinPosition
236 Left = 96 304 Left = 82
237 Height = 25 305 Height = 24
238 Top = 64 306 Top = -1
239 Width = 194 307 Width = 198
240 Max = 15 308 Buttons.BtnBigDec.BtnOrder = 1
309 Buttons.BtnBigDec.Visible = False
310 Buttons.BtnBigInc.BtnOrder = 7
311 Buttons.BtnBigInc.Visible = False
312 Buttons.BtnDec.BtnOrder = 2
313 Buttons.BtnDrag.BtnOrder = 4
314 Buttons.BtnInc.BtnOrder = 6
315 Buttons.BtnMax.BtnOrder = 8
316 Buttons.BtnMax.Visible = False
317 Buttons.BtnMenu.BtnOrder = 5
318 Buttons.BtnMenu.Visible = False
319 Buttons.BtnMiddle.BtnOrder = 3
320 Buttons.BtnMiddle.Visible = False
321 Buttons.BtnMin.BtnOrder = 0
322 Buttons.BtnMin.Visible = False
323 Buttons.DiscreteChange = 1
324 Buttons.Increment = 1
325 Buttons.Middle = 50
326 Buttons.MouseIncrementX = 0.1
327 Buttons.MouseIncrementY = 0.05
328 Buttons.PageSize = 10
329 Buttons.Style = ebsSplittedBlock
241 Position = 0 330 Position = 0
242 TabOrder = 2 331 ProgressFontOptions.FontSize = 0
332 ProgressFontOptions.FontStyles = [fsBold]
333 ProgressMiddlePos = 0
334 ProgressStyle = epsGradient
335 Scale.DateTimeFormat = 'hh:nn:ss'
336 Scale.LogarithmBase = 10
337 Scale.Max = 15
338 Scale.Min = 0
339 Scale.TickLongValue = 10
340 Scale.TickMiddleValue = 5
341 Scale.TickShortValue = 1
342 Scale.TickVisible = etvNone
343 Scale.ValueVisible = evvNone
344 ScaleFontOptions.FontSize = 7
345 ScaleFontOptions.FontStyles = []
346 OnChange = StartVolSpinnerChange
347 end
348 object EnvChangeSpinner: TECSpinPosition
349 Left = 82
350 Height = 24
351 Top = 80
352 Width = 198
353 Buttons.BtnBigDec.BtnOrder = 1
354 Buttons.BtnBigDec.Visible = False
355 Buttons.BtnBigInc.BtnOrder = 7
356 Buttons.BtnBigInc.Visible = False
357 Buttons.BtnDec.BtnOrder = 2
358 Buttons.BtnDrag.BtnOrder = 4
359 Buttons.BtnInc.BtnOrder = 6
360 Buttons.BtnMax.BtnOrder = 8
361 Buttons.BtnMax.Visible = False
362 Buttons.BtnMenu.BtnOrder = 5
363 Buttons.BtnMenu.Visible = False
364 Buttons.BtnMiddle.BtnOrder = 3
365 Buttons.BtnMiddle.Visible = False
366 Buttons.BtnMin.BtnOrder = 0
367 Buttons.BtnMin.Visible = False
368 Buttons.DiscreteChange = 1
369 Buttons.Increment = 1
370 Buttons.Middle = 50
371 Buttons.MouseIncrementX = 0.1
372 Buttons.MouseIncrementY = 0.05
373 Buttons.PageSize = 10
374 Buttons.Style = ebsSplittedBlock
375 Position = 0
376 ProgressFontOptions.FontSize = 0
377 ProgressFontOptions.FontStyles = [fsBold]
378 ProgressMiddlePos = 0
379 ProgressStyle = epsGradient
380 Scale.DateTimeFormat = 'hh:nn:ss'
381 Scale.LogarithmBase = 10
382 Scale.Max = 7
383 Scale.Min = 0
384 Scale.TickLongValue = 10
385 Scale.TickMiddleValue = 5
386 Scale.TickShortValue = 1
387 Scale.TickVisible = etvNone
388 Scale.ValueVisible = evvNone
389 ScaleFontOptions.FontSize = 7
390 ScaleFontOptions.FontStyles = []
391 OnChange = EnvChangeSpinnerChange
392 end
393 object Panel5: TPanel
394 Left = 336
395 Height = 105
396 Top = 0
397 Width = 346
398 BevelOuter = bvLowered
399 ClientHeight = 105
400 ClientWidth = 346
401 TabOrder = 3
402 object EnvelopePaintbox: TPaintBox
403 Left = 1
404 Height = 103
405 Top = 1
406 Width = 344
407 Align = alClient
408 OnPaint = EnvelopePaintboxPaint
409 end
243 end 410 end
244 end 411 end
245 object GroupBox3: TGroupBox 412 object SquareGroupBox: TGroupBox
246 Left = 8 413 Left = 8
247 Height = 169 414 Height = 169
248 Top = 152 415 Top = 152
249 Width = 320 416 Width = 360
250 Caption = 'Square' 417 Caption = 'Square'
251 ClientHeight = 149 418 ClientHeight = 149
252 ClientWidth = 316 419 ClientWidth = 356
253 TabOrder = 2 420 TabOrder = 2
254 object Label7: TLabel 421 object Label7: TLabel
255 Left = 8 422 Left = 8
@@ -259,7 +426,7 @@ object frmTracker: TfrmTracker
259 Caption = 'Sweep time' 426 Caption = 'Sweep time'
260 ParentColor = False 427 ParentColor = False
261 end 428 end
262 object ComboBox1: TComboBox 429 object SweepTimeCombobox: TComboBox
263 Left = 104 430 Left = 104
264 Height = 23 431 Height = 23
265 Hint = 'How long to sweep' 432 Hint = 'How long to sweep'
@@ -277,13 +444,14 @@ object frmTracker: TfrmTracker
277 '46.9 ms (6/128Hz)' 444 '46.9 ms (6/128Hz)'
278 '54.7 ms (7/128Hz)' 445 '54.7 ms (7/128Hz)'
279 ) 446 )
447 OnChange = SweepTimeComboboxChange
280 ParentShowHint = False 448 ParentShowHint = False
281 ShowHint = True 449 ShowHint = True
282 Style = csDropDownList 450 Style = csDropDownList
283 TabOrder = 0 451 TabOrder = 0
284 Text = 'Off - no frequency change' 452 Text = 'Off - no frequency change'
285 end 453 end
286 object DirectionComboBox1: TComboBox 454 object SweepDirectionCombobox: TComboBox
287 Left = 104 455 Left = 104
288 Height = 23 456 Height = 23
289 Hint = 'The direction of the sweep' 457 Hint = 'The direction of the sweep'
@@ -295,6 +463,7 @@ object frmTracker: TfrmTracker
295 'Up' 463 'Up'
296 'Down' 464 'Down'
297 ) 465 )
466 OnChange = SweepDirectionComboboxChange
298 ParentShowHint = False 467 ParentShowHint = False
299 ShowHint = True 468 ShowHint = True
300 Style = csDropDownList 469 Style = csDropDownList
@@ -305,29 +474,18 @@ object frmTracker: TfrmTracker
305 Left = 8 474 Left = 8
306 Height = 15 475 Height = 15
307 Top = 48 476 Top = 48
308 Width = 48 477 Width = 84
309 Caption = 'Direction' 478 Caption = 'Sweep direction'
310 ParentColor = False 479 ParentColor = False
311 end 480 end
312 object Label9: TLabel 481 object Label9: TLabel
313 Left = 8 482 Left = 8
314 Height = 15 483 Height = 15
315 Top = 84 484 Top = 84
316 Width = 20 485 Width = 56
317 Caption = 'Size' 486 Caption = 'Sweep size'
318 ParentColor = False 487 ParentColor = False
319 end 488 end
320 object TrackBar2: TTrackBar
321 Left = 104
322 Height = 25
323 Hint = 'How much to change the frequency on each sweep step'
324 Top = 74
325 Width = 200
326 Position = 0
327 ParentShowHint = False
328 ShowHint = True
329 TabOrder = 2
330 end
331 object Label10: TLabel 489 object Label10: TLabel
332 Left = 8 490 Left = 8
333 Height = 15 491 Height = 15
@@ -336,7 +494,7 @@ object frmTracker: TfrmTracker
336 Caption = 'Duty' 494 Caption = 'Duty'
337 ParentColor = False 495 ParentColor = False
338 end 496 end
339 object DirectionComboBox2: TComboBox 497 object DutyCombobox: TComboBox
340 Left = 104 498 Left = 104
341 Height = 23 499 Height = 23
342 Hint = 'Which duty cycle to use (changes timbre of wave)' 500 Hint = 'Which duty cycle to use (changes timbre of wave)'
@@ -350,21 +508,68 @@ object frmTracker: TfrmTracker
350 '50% (square)' 508 '50% (square)'
351 '75%' 509 '75%'
352 ) 510 )
511 OnChange = DutyComboboxChange
353 ParentShowHint = False 512 ParentShowHint = False
354 ShowHint = True 513 ShowHint = True
355 Style = csDropDownList 514 Style = csDropDownList
356 TabOrder = 3 515 TabOrder = 2
357 Text = '50% (square)' 516 Text = '50% (square)'
358 end 517 end
518 object SweepSizeSpinner: TECSpinPosition
519 Left = 104
520 Height = 24
521 Top = 75
522 Width = 198
523 Buttons.BtnBigDec.BtnOrder = 1
524 Buttons.BtnBigDec.Visible = False
525 Buttons.BtnBigInc.BtnOrder = 7
526 Buttons.BtnBigInc.Visible = False
527 Buttons.BtnDec.BtnOrder = 2
528 Buttons.BtnDrag.BtnOrder = 4
529 Buttons.BtnInc.BtnOrder = 6
530 Buttons.BtnMax.BtnOrder = 8
531 Buttons.BtnMax.Visible = False
532 Buttons.BtnMenu.BtnOrder = 5
533 Buttons.BtnMenu.Visible = False
534 Buttons.BtnMiddle.BtnOrder = 3
535 Buttons.BtnMiddle.Visible = False
536 Buttons.BtnMin.BtnOrder = 0
537 Buttons.BtnMin.Visible = False
538 Buttons.DiscreteChange = 1
539 Buttons.Increment = 1
540 Buttons.Middle = 50
541 Buttons.MouseIncrementX = 0.1
542 Buttons.MouseIncrementY = 0.05
543 Buttons.PageSize = 10
544 Buttons.Style = ebsSplittedBlock
545 Position = 0
546 ProgressFontOptions.FontSize = 0
547 ProgressFontOptions.FontStyles = [fsBold]
548 ProgressMiddlePos = 0
549 ProgressStyle = epsGradient
550 Scale.DateTimeFormat = 'hh:nn:ss'
551 Scale.LogarithmBase = 10
552 Scale.Max = 7
553 Scale.Min = 0
554 Scale.TickLongValue = 10
555 Scale.TickMiddleValue = 5
556 Scale.TickShortValue = 1
557 Scale.TickVisible = etvNone
558 Scale.ValueVisible = evvNone
559 ScaleFontOptions.FontSize = 7
560 ScaleFontOptions.FontStyles = []
561 OnChange = SweepSizeSpinnerChange
562 end
359 end 563 end
360 object GroupBox4: TGroupBox 564 object WaveGroupBox: TGroupBox
361 Left = 344 565 Left = 384
362 Height = 169 566 Height = 169
363 Top = 152 567 Top = 152
364 Width = 297 568 Width = 297
365 Caption = 'Wave' 569 Caption = 'Wave'
366 ClientHeight = 149 570 ClientHeight = 149
367 ClientWidth = 293 571 ClientWidth = 293
572 Enabled = False
368 TabOrder = 3 573 TabOrder = 3
369 object Label11: TLabel 574 object Label11: TLabel
370 Left = 8 575 Left = 8
@@ -374,14 +579,6 @@ object frmTracker: TfrmTracker
374 Caption = 'Volume' 579 Caption = 'Volume'
375 ParentColor = False 580 ParentColor = False
376 end 581 end
377 object TrackBar3: TTrackBar
378 Left = 96
379 Height = 25
380 Top = 8
381 Width = 184
382 Position = 0
383 TabOrder = 0
384 end
385 object Label12: TLabel 582 object Label12: TLabel
386 Left = 8 583 Left = 8
387 Height = 15 584 Height = 15
@@ -390,14 +587,14 @@ object frmTracker: TfrmTracker
390 Caption = 'Waveform' 587 Caption = 'Waveform'
391 ParentColor = False 588 ParentColor = False
392 end 589 end
393 object ComboBox2: TComboBox 590 object WaveformCombobox: TComboBox
394 Left = 104 591 Left = 104
395 Height = 23 592 Height = 23
396 Top = 40 593 Top = 40
397 Width = 176 594 Width = 176
398 ItemHeight = 15 595 ItemHeight = 15
399 Style = csDropDownList 596 Style = csDropDownList
400 TabOrder = 1 597 TabOrder = 0
401 end 598 end
402 object Panel4: TPanel 599 object Panel4: TPanel
403 Left = 8 600 Left = 8
@@ -407,8 +604,8 @@ object frmTracker: TfrmTracker
407 BevelOuter = bvLowered 604 BevelOuter = bvLowered
408 ClientHeight = 50 605 ClientHeight = 50
409 ClientWidth = 272 606 ClientWidth = 272
410 TabOrder = 2 607 TabOrder = 1
411 object PaintBox2: TPaintBox 608 object WavePaintbox: TPaintBox
412 Left = 1 609 Left = 1
413 Height = 48 610 Height = 48
414 Top = 1 611 Top = 1
@@ -416,18 +613,37 @@ object frmTracker: TfrmTracker
416 Align = alClient 613 Align = alClient
417 Color = clBlack 614 Color = clBlack
418 ParentColor = False 615 ParentColor = False
419 OnPaint = PaintBox2Paint 616 OnPaint = WavePaintboxPaint
420 end 617 end
421 end 618 end
619 object WaveVolumeCombobox: TComboBox
620 Left = 104
621 Height = 23
622 Top = 8
623 Width = 176
624 ItemHeight = 15
625 ItemIndex = 1
626 Items.Strings = (
627 'Mute (No sound)'
628 '100% Volume'
629 '50% Volume'
630 '25% Volume'
631 )
632 OnChange = WaveVolumeComboboxChange
633 Style = csDropDownList
634 TabOrder = 2
635 Text = '100% Volume'
636 end
422 end 637 end
423 object GroupBox5: TGroupBox 638 object NoiseGroupBox: TGroupBox
424 Left = 656 639 Left = 696
425 Height = 169 640 Height = 169
426 Top = 152 641 Top = 152
427 Width = 297 642 Width = 344
428 Caption = 'Noise' 643 Caption = 'Noise'
429 ClientHeight = 149 644 ClientHeight = 149
430 ClientWidth = 293 645 ClientWidth = 340
646 Enabled = False
431 TabOrder = 4 647 TabOrder = 4
432 object Label13: TLabel 648 object Label13: TLabel
433 Left = 8 649 Left = 8
@@ -437,30 +653,15 @@ object frmTracker: TfrmTracker
437 Caption = 'Frequency' 653 Caption = 'Frequency'
438 ParentColor = False 654 ParentColor = False
439 end 655 end
440 object TrackBar4: TTrackBar 656 object SevenBitCounterCheckbox: TCheckBox
441 Left = 88
442 Height = 25
443 Top = 6
444 Width = 196
445 Position = 0
446 TabOrder = 0
447 end
448 object CheckBox1: TCheckBox
449 Left = 8 657 Left = 8
450 Height = 19 658 Height = 19
451 Top = 80 659 Top = 80
452 Width = 215 660 Width = 215
453 Alignment = taLeftJustify 661 Alignment = taLeftJustify
454 Caption = '7 bit counter (more tone-like output)' 662 Caption = '7 bit counter (more tone-like output)'
455 TabOrder = 1 663 OnChange = SevenBitCounterCheckboxChange
456 end 664 TabOrder = 0
457 object TrackBar5: TTrackBar
458 Left = 88
459 Height = 25
460 Top = 40
461 Width = 196
462 Position = 0
463 TabOrder = 2
464 end 665 end
465 object Label14: TLabel 666 object Label14: TLabel
466 Left = 8 667 Left = 8
@@ -470,22 +671,663 @@ object frmTracker: TfrmTracker
470 Caption = 'Dividing ratio' 671 Caption = 'Dividing ratio'
471 ParentColor = False 672 ParentColor = False
472 end 673 end
473 object Button1: TButton 674 object RandomizeNoiseButton: TButton
474 Left = 8 675 Left = 8
475 Height = 25 676 Height = 25
476 Top = 110 677 Top = 110
477 Width = 276 678 Width = 320
478 Caption = 'Randomize' 679 Caption = 'Randomize'
479 TabOrder = 3 680 OnClick = RandomizeNoiseButtonClick
681 TabOrder = 1
682 end
683 object NoiseFreqSpinner: TECSpinPosition
684 Left = 86
685 Height = 24
686 Top = 7
687 Width = 198
688 Buttons.BtnBigDec.BtnOrder = 1
689 Buttons.BtnBigDec.Visible = False
690 Buttons.BtnBigInc.BtnOrder = 7
691 Buttons.BtnBigInc.Visible = False
692 Buttons.BtnDec.BtnOrder = 2
693 Buttons.BtnDrag.BtnOrder = 4
694 Buttons.BtnInc.BtnOrder = 6
695 Buttons.BtnMax.BtnOrder = 8
696 Buttons.BtnMax.Visible = False
697 Buttons.BtnMenu.BtnOrder = 5
698 Buttons.BtnMenu.Visible = False
699 Buttons.BtnMiddle.BtnOrder = 3
700 Buttons.BtnMiddle.Visible = False
701 Buttons.BtnMin.BtnOrder = 0
702 Buttons.BtnMin.Visible = False
703 Buttons.DiscreteChange = 1
704 Buttons.Increment = 1
705 Buttons.Middle = 50
706 Buttons.MouseIncrementX = 0.1
707 Buttons.MouseIncrementY = 0.05
708 Buttons.PageSize = 10
709 Buttons.Style = ebsSplittedBlock
710 Position = 0
711 ProgressFontOptions.FontSize = 0
712 ProgressFontOptions.FontStyles = [fsBold]
713 ProgressMiddlePos = 0
714 ProgressStyle = epsGradient
715 Scale.DateTimeFormat = 'hh:nn:ss'
716 Scale.LogarithmBase = 10
717 Scale.Max = 15
718 Scale.Min = 0
719 Scale.TickLongValue = 10
720 Scale.TickMiddleValue = 5
721 Scale.TickShortValue = 1
722 Scale.TickVisible = etvNone
723 Scale.ValueVisible = evvNone
724 ScaleFontOptions.FontSize = 7
725 ScaleFontOptions.FontStyles = []
726 OnChange = NoiseFreqSpinnerChange
727 end
728 object DivRatioSpinner: TECSpinPosition
729 Left = 86
730 Height = 24
731 Top = 39
732 Width = 198
733 Buttons.BtnBigDec.BtnOrder = 1
734 Buttons.BtnBigDec.Visible = False
735 Buttons.BtnBigInc.BtnOrder = 7
736 Buttons.BtnBigInc.Visible = False
737 Buttons.BtnDec.BtnOrder = 2
738 Buttons.BtnDrag.BtnOrder = 4
739 Buttons.BtnInc.BtnOrder = 6
740 Buttons.BtnMax.BtnOrder = 8
741 Buttons.BtnMax.Visible = False
742 Buttons.BtnMenu.BtnOrder = 5
743 Buttons.BtnMenu.Visible = False
744 Buttons.BtnMiddle.BtnOrder = 3
745 Buttons.BtnMiddle.Visible = False
746 Buttons.BtnMin.BtnOrder = 0
747 Buttons.BtnMin.Visible = False
748 Buttons.DiscreteChange = 1
749 Buttons.Increment = 1
750 Buttons.Middle = 50
751 Buttons.MouseIncrementX = 0.1
752 Buttons.MouseIncrementY = 0.05
753 Buttons.PageSize = 10
754 Buttons.Style = ebsSplittedBlock
755 Position = 0
756 ProgressFontOptions.FontSize = 0
757 ProgressFontOptions.FontStyles = [fsBold]
758 ProgressMiddlePos = 0
759 ProgressStyle = epsGradient
760 Scale.DateTimeFormat = 'hh:nn:ss'
761 Scale.LogarithmBase = 10
762 Scale.Max = 7
763 Scale.Min = 0
764 Scale.TickLongValue = 10
765 Scale.TickMiddleValue = 5
766 Scale.TickShortValue = 1
767 Scale.TickVisible = etvNone
768 Scale.ValueVisible = evvNone
769 ScaleFontOptions.FontSize = 7
770 ScaleFontOptions.FontStyles = []
771 OnChange = DivRatioSpinnerChange
480 end 772 end
481 end 773 end
482 end 774 end
483 end 775 end
484 object CommentsTabSheet: TTabSheet 776 object CommentsTabSheet: TTabSheet
485 Caption = 'Comments' 777 Caption = 'Comments'
778 ClientHeight = 657
779 ClientWidth = 1100
780 object CommentMemo: TMemo
781 Left = 0
782 Height = 593
783 Top = 64
784 Width = 1100
785 Align = alBottom
786 Anchors = [akTop, akLeft, akRight, akBottom]
787 OnChange = CommentMemoChange
788 TabOrder = 0
789 end
790 object Label17: TLabel
791 Left = 8
792 Height = 15
793 Top = 8
794 Width = 337
795 Caption = 'This is an area to write comments for anyone viewing your tune.'
796 ParentColor = False
797 end
486 end 798 end
487 object RoutinesTabSheet: TTabSheet 799 object RoutinesTabSheet: TTabSheet
488 Caption = 'Routines' 800 Caption = 'Routines'
801 ClientHeight = 657
802 ClientWidth = 1100
803 inline RoutineSynedit: TSynEdit
804 Left = 0
805 Height = 530
806 Top = 127
807 Width = 1100
808 Align = alBottom
809 BorderSpacing.Top = 55
810 Anchors = [akTop, akLeft, akRight, akBottom]
811 Font.Height = -13
812 Font.Name = 'Courier New'
813 Font.Pitch = fpFixed
814 Font.Quality = fqNonAntialiased
815 ParentColor = False
816 ParentFont = False
817 TabOrder = 0
818 Gutter.Width = 57
819 Gutter.MouseActions = <>
820 RightGutter.Width = 0
821 RightGutter.MouseActions = <>
822 Keystrokes = <
823 item
824 Command = ecUp
825 ShortCut = 38
826 end
827 item
828 Command = ecSelUp
829 ShortCut = 8230
830 end
831 item
832 Command = ecScrollUp
833 ShortCut = 16422
834 end
835 item
836 Command = ecDown
837 ShortCut = 40
838 end
839 item
840 Command = ecSelDown
841 ShortCut = 8232
842 end
843 item
844 Command = ecScrollDown
845 ShortCut = 16424
846 end
847 item
848 Command = ecLeft
849 ShortCut = 37
850 end
851 item
852 Command = ecSelLeft
853 ShortCut = 8229
854 end
855 item
856 Command = ecWordLeft
857 ShortCut = 16421
858 end
859 item
860 Command = ecSelWordLeft
861 ShortCut = 24613
862 end
863 item
864 Command = ecRight
865 ShortCut = 39
866 end
867 item
868 Command = ecSelRight
869 ShortCut = 8231
870 end
871 item
872 Command = ecWordRight
873 ShortCut = 16423
874 end
875 item
876 Command = ecSelWordRight
877 ShortCut = 24615
878 end
879 item
880 Command = ecPageDown
881 ShortCut = 34
882 end
883 item
884 Command = ecSelPageDown
885 ShortCut = 8226
886 end
887 item
888 Command = ecPageBottom
889 ShortCut = 16418
890 end
891 item
892 Command = ecSelPageBottom
893 ShortCut = 24610
894 end
895 item
896 Command = ecPageUp
897 ShortCut = 33
898 end
899 item
900 Command = ecSelPageUp
901 ShortCut = 8225
902 end
903 item
904 Command = ecPageTop
905 ShortCut = 16417
906 end
907 item
908 Command = ecSelPageTop
909 ShortCut = 24609
910 end
911 item
912 Command = ecLineStart
913 ShortCut = 36
914 end
915 item
916 Command = ecSelLineStart
917 ShortCut = 8228
918 end
919 item
920 Command = ecEditorTop
921 ShortCut = 16420
922 end
923 item
924 Command = ecSelEditorTop
925 ShortCut = 24612
926 end
927 item
928 Command = ecLineEnd
929 ShortCut = 35
930 end
931 item
932 Command = ecSelLineEnd
933 ShortCut = 8227
934 end
935 item
936 Command = ecEditorBottom
937 ShortCut = 16419
938 end
939 item
940 Command = ecSelEditorBottom
941 ShortCut = 24611
942 end
943 item
944 Command = ecToggleMode
945 ShortCut = 45
946 end
947 item
948 Command = ecCopy
949 ShortCut = 16429
950 end
951 item
952 Command = ecPaste
953 ShortCut = 8237
954 end
955 item
956 Command = ecDeleteChar
957 ShortCut = 46
958 end
959 item
960 Command = ecCut
961 ShortCut = 8238
962 end
963 item
964 Command = ecDeleteLastChar
965 ShortCut = 8
966 end
967 item
968 Command = ecDeleteLastChar
969 ShortCut = 8200
970 end
971 item
972 Command = ecDeleteLastWord
973 ShortCut = 16392
974 end
975 item
976 Command = ecUndo
977 ShortCut = 32776
978 end
979 item
980 Command = ecRedo
981 ShortCut = 40968
982 end
983 item
984 Command = ecLineBreak
985 ShortCut = 13
986 end
987 item
988 Command = ecSelectAll
989 ShortCut = 16449
990 end
991 item
992 Command = ecCopy
993 ShortCut = 16451
994 end
995 item
996 Command = ecBlockIndent
997 ShortCut = 24649
998 end
999 item
1000 Command = ecLineBreak
1001 ShortCut = 16461
1002 end
1003 item
1004 Command = ecInsertLine
1005 ShortCut = 16462
1006 end
1007 item
1008 Command = ecDeleteWord
1009 ShortCut = 16468
1010 end
1011 item
1012 Command = ecBlockUnindent
1013 ShortCut = 24661
1014 end
1015 item
1016 Command = ecPaste
1017 ShortCut = 16470
1018 end
1019 item
1020 Command = ecCut
1021 ShortCut = 16472
1022 end
1023 item
1024 Command = ecDeleteLine
1025 ShortCut = 16473
1026 end
1027 item
1028 Command = ecDeleteEOL
1029 ShortCut = 24665
1030 end
1031 item
1032 Command = ecUndo
1033 ShortCut = 16474
1034 end
1035 item
1036 Command = ecRedo
1037 ShortCut = 24666
1038 end
1039 item
1040 Command = ecGotoMarker0
1041 ShortCut = 16432
1042 end
1043 item
1044 Command = ecGotoMarker1
1045 ShortCut = 16433
1046 end
1047 item
1048 Command = ecGotoMarker2
1049 ShortCut = 16434
1050 end
1051 item
1052 Command = ecGotoMarker3
1053 ShortCut = 16435
1054 end
1055 item
1056 Command = ecGotoMarker4
1057 ShortCut = 16436
1058 end
1059 item
1060 Command = ecGotoMarker5
1061 ShortCut = 16437
1062 end
1063 item
1064 Command = ecGotoMarker6
1065 ShortCut = 16438
1066 end
1067 item
1068 Command = ecGotoMarker7
1069 ShortCut = 16439
1070 end
1071 item
1072 Command = ecGotoMarker8
1073 ShortCut = 16440
1074 end
1075 item
1076 Command = ecGotoMarker9
1077 ShortCut = 16441
1078 end
1079 item
1080 Command = ecSetMarker0
1081 ShortCut = 24624
1082 end
1083 item
1084 Command = ecSetMarker1
1085 ShortCut = 24625
1086 end
1087 item
1088 Command = ecSetMarker2
1089 ShortCut = 24626
1090 end
1091 item
1092 Command = ecSetMarker3
1093 ShortCut = 24627
1094 end
1095 item
1096 Command = ecSetMarker4
1097 ShortCut = 24628
1098 end
1099 item
1100 Command = ecSetMarker5
1101 ShortCut = 24629
1102 end
1103 item
1104 Command = ecSetMarker6
1105 ShortCut = 24630
1106 end
1107 item
1108 Command = ecSetMarker7
1109 ShortCut = 24631
1110 end
1111 item
1112 Command = ecSetMarker8
1113 ShortCut = 24632
1114 end
1115 item
1116 Command = ecSetMarker9
1117 ShortCut = 24633
1118 end
1119 item
1120 Command = EcFoldLevel1
1121 ShortCut = 41009
1122 end
1123 item
1124 Command = EcFoldLevel2
1125 ShortCut = 41010
1126 end
1127 item
1128 Command = EcFoldLevel3
1129 ShortCut = 41011
1130 end
1131 item
1132 Command = EcFoldLevel4
1133 ShortCut = 41012
1134 end
1135 item
1136 Command = EcFoldLevel5
1137 ShortCut = 41013
1138 end
1139 item
1140 Command = EcFoldLevel6
1141 ShortCut = 41014
1142 end
1143 item
1144 Command = EcFoldLevel7
1145 ShortCut = 41015
1146 end
1147 item
1148 Command = EcFoldLevel8
1149 ShortCut = 41016
1150 end
1151 item
1152 Command = EcFoldLevel9
1153 ShortCut = 41017
1154 end
1155 item
1156 Command = EcFoldLevel0
1157 ShortCut = 41008
1158 end
1159 item
1160 Command = EcFoldCurrent
1161 ShortCut = 41005
1162 end
1163 item
1164 Command = EcUnFoldCurrent
1165 ShortCut = 41003
1166 end
1167 item
1168 Command = EcToggleMarkupWord
1169 ShortCut = 32845
1170 end
1171 item
1172 Command = ecNormalSelect
1173 ShortCut = 24654
1174 end
1175 item
1176 Command = ecColumnSelect
1177 ShortCut = 24643
1178 end
1179 item
1180 Command = ecLineSelect
1181 ShortCut = 24652
1182 end
1183 item
1184 Command = ecTab
1185 ShortCut = 9
1186 end
1187 item
1188 Command = ecShiftTab
1189 ShortCut = 8201
1190 end
1191 item
1192 Command = ecMatchBracket
1193 ShortCut = 24642
1194 end
1195 item
1196 Command = ecColSelUp
1197 ShortCut = 40998
1198 end
1199 item
1200 Command = ecColSelDown
1201 ShortCut = 41000
1202 end
1203 item
1204 Command = ecColSelLeft
1205 ShortCut = 40997
1206 end
1207 item
1208 Command = ecColSelRight
1209 ShortCut = 40999
1210 end
1211 item
1212 Command = ecColSelPageDown
1213 ShortCut = 40994
1214 end
1215 item
1216 Command = ecColSelPageBottom
1217 ShortCut = 57378
1218 end
1219 item
1220 Command = ecColSelPageUp
1221 ShortCut = 40993
1222 end
1223 item
1224 Command = ecColSelPageTop
1225 ShortCut = 57377
1226 end
1227 item
1228 Command = ecColSelLineStart
1229 ShortCut = 40996
1230 end
1231 item
1232 Command = ecColSelLineEnd
1233 ShortCut = 40995
1234 end
1235 item
1236 Command = ecColSelEditorTop
1237 ShortCut = 57380
1238 end
1239 item
1240 Command = ecColSelEditorBottom
1241 ShortCut = 57379
1242 end>
1243 MouseActions = <>
1244 MouseTextActions = <>
1245 MouseSelActions = <>
1246 Lines.Strings = (
1247 'RoutineSynedit'
1248 )
1249 VisibleSpecialChars = [vscSpace, vscTabAtLast]
1250 SelectedColor.BackPriority = 50
1251 SelectedColor.ForePriority = 50
1252 SelectedColor.FramePriority = 50
1253 SelectedColor.BoldPriority = 50
1254 SelectedColor.ItalicPriority = 50
1255 SelectedColor.UnderlinePriority = 50
1256 SelectedColor.StrikeOutPriority = 50
1257 BracketHighlightStyle = sbhsBoth
1258 BracketMatchColor.Background = clNone
1259 BracketMatchColor.Foreground = clNone
1260 BracketMatchColor.Style = [fsBold]
1261 FoldedCodeColor.Background = clNone
1262 FoldedCodeColor.Foreground = clGray
1263 FoldedCodeColor.FrameColor = clGray
1264 MouseLinkColor.Background = clNone
1265 MouseLinkColor.Foreground = clBlue
1266 LineHighlightColor.Background = clNone
1267 LineHighlightColor.Foreground = clNone
1268 inline SynLeftGutterPartList1: TSynGutterPartList
1269 object SynGutterMarks1: TSynGutterMarks
1270 Width = 24
1271 MouseActions = <>
1272 end
1273 object SynGutterLineNumber1: TSynGutterLineNumber
1274 Width = 17
1275 MouseActions = <>
1276 MarkupInfo.Background = clBtnFace
1277 MarkupInfo.Foreground = clNone
1278 DigitCount = 2
1279 ShowOnlyLineNumbersMultiplesOf = 1
1280 ZeroStart = False
1281 LeadingZeros = False
1282 end
1283 object SynGutterChanges1: TSynGutterChanges
1284 Width = 4
1285 MouseActions = <>
1286 ModifiedColor = 59900
1287 SavedColor = clGreen
1288 end
1289 object SynGutterSeparator1: TSynGutterSeparator
1290 Width = 2
1291 MouseActions = <>
1292 MarkupInfo.Background = clWhite
1293 MarkupInfo.Foreground = clGray
1294 end
1295 object SynGutterCodeFolding1: TSynGutterCodeFolding
1296 MouseActions = <>
1297 MarkupInfo.Background = clNone
1298 MarkupInfo.Foreground = clGray
1299 MouseActionsExpanded = <>
1300 MouseActionsCollapsed = <>
1301 end
1302 end
1303 end
1304 object Label18: TLabel
1305 Left = 8
1306 Height = 15
1307 Top = 16
1308 Width = 41
1309 Caption = 'Routine'
1310 ParentColor = False
1311 end
1312 object RoutineNumberSpinner: TSpinEdit
1313 Left = 64
1314 Height = 23
1315 Top = 8
1316 Width = 176
1317 MaxValue = 15
1318 MinValue = 1
1319 OnChange = InstrumentNumberSpinnerChange
1320 TabOrder = 1
1321 Value = 1
1322 end
1323 object Label19: TLabel
1324 Left = 8
1325 Height = 75
1326 Top = 40
1327 Width = 506
1328 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!'
1329 ParentColor = False
1330 end
489 end 1331 end
490 end 1332 end
491 end 1333 end
@@ -493,7 +1335,7 @@ object frmTracker: TfrmTracker
493 Left = 0 1335 Left = 0
494 Height = 24 1336 Height = 24
495 Top = 0 1337 Top = 0
496 Width = 1178 1338 Width = 1306
497 Bands = < 1339 Bands = <
498 item 1340 item
499 end> 1341 end>
@@ -502,7 +1344,7 @@ object frmTracker: TfrmTracker
502 Left = 0 1344 Left = 0
503 Height = 178 1345 Height = 178
504 Top = 24 1346 Top = 24
505 Width = 1178 1347 Width = 1306
506 Align = alTop 1348 Align = alTop
507 BevelOuter = bvNone 1349 BevelOuter = bvNone
508 TabOrder = 4 1350 TabOrder = 4
@@ -511,7 +1353,7 @@ object frmTracker: TfrmTracker
511 Left = 0 1353 Left = 0
512 Height = 23 1354 Height = 23
513 Top = 887 1355 Top = 887
514 Width = 1178 1356 Width = 1306
515 Panels = <> 1357 Panels = <>
516 end 1358 end
517 object MainMenu1: TMainMenu 1359 object MainMenu1: TMainMenu
Modifiedtracker.pas +283−65
@@ -1,65 +1,43 @@
1 unit Tracker; 1 unit Tracker;
2 2
3 {$mode delphi} 3 {$mode objfpc}
4 4
5 interface 5 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, ExtendedNotebook; 9 Menus, Spin, StdCtrls, SynEdit, VirtualTrees, ECSlider, ECProgressBar,
10 instruments, song;
10 11
11 type 12 type
12 TInstrumentType = (Square, Wave, Noise);
13 TDutyType = 0..3;
14 TSweepType = (Up, Down);
15 TStepWidth = (Fifteen, Seven);
16
17 TInstrument = record
18 //Type_: TInstrumentType;
19 Length: Integer;
20 // Highmask
21 LengthEnabled: Boolean;
22
23 InitialVolume: Integer;
24 VolSweepDirection: TSweepType;
25 VolSweepAmount: Integer;
26
27 case Type_: TInstrumentType of
28 Square: (
29 // NR10
30 SweepTime: Integer;
31 SweepIncDec: TSweepType;
32 SweepShift: Integer;
33
34 // NR11
35 Duty: TDutyType;
36 );
37 Wave: (
38 // NR32
39 OutputLevel: Integer;
40 // Wave
41 Waveform: Integer;
42 );
43 Noise: (
44 // NR42
45 ShiftClockFreq: Integer;
46 CounterStep: TStepWidth;
47 DividingRatio: Integer;
48 );
49 end;
50
51 { TfrmTracker } 13 { TfrmTracker }
52 14
53 TfrmTracker = class(TForm) 15 TfrmTracker = class(TForm)
54 Button1: TButton; 16 CommentMemo: TMemo;
55 CheckBox1: TCheckBox; 17 Label19: TLabel;
56 ComboBox1: TComboBox; 18 RoutineNumberSpinner: TSpinEdit;
57 ComboBox2: TComboBox; 19 Label17: TLabel;
58 DirectionComboBox1: TComboBox; 20 EnvelopePaintbox: TPaintBox;
59 DirectionComboBox2: TComboBox; 21 Label18: TLabel;
60 GroupBox3: TGroupBox; 22 Panel5: TPanel;
61 GroupBox4: TGroupBox; 23 SongEdit: TEdit;
62 GroupBox5: TGroupBox; 24 ArtistEdit: TEdit;
25 SongInformationGroupbox: TGroupBox;
26 Label15: TLabel;
27 Label16: TLabel;
28 RandomizeNoiseButton: TButton;
29 SevenBitCounterCheckbox: TCheckBox;
30 SweepTimeCombobox: TComboBox;
31 RoutineSynedit: TSynEdit;
32 WaveformCombobox: TComboBox;
33 WaveVolumeCombobox: TComboBox;
34 SweepDirectionCombobox: TComboBox;
35 DutyCombobox: TComboBox;
36 SweepSizeSpinner: TECSpinPosition;
37 LengthSpinner: TECSpinPosition;
38 SquareGroupBox: TGroupBox;
39 WaveGroupBox: TGroupBox;
40 NoiseGroupBox: TGroupBox;
63 Label10: TLabel; 41 Label10: TLabel;
64 Label11: TLabel; 42 Label11: TLabel;
65 Label12: TLabel; 43 Label12: TLabel;
@@ -73,8 +51,8 @@ type
73 DirectionComboBox: TComboBox; 51 DirectionComboBox: TComboBox;
74 CoolBar1: TCoolBar; 52 CoolBar1: TCoolBar;
75 InstrumentNameEdit: TEdit; 53 InstrumentNameEdit: TEdit;
76 GroupBox1: TGroupBox; 54 InstrumentGroupBox: TGroupBox;
77 GroupBox2: TGroupBox; 55 EnvelopeGroupBox: TGroupBox;
78 Label1: TLabel; 56 Label1: TLabel;
79 Label2: TLabel; 57 Label2: TLabel;
80 Label3: TLabel; 58 Label3: TLabel;
@@ -89,11 +67,10 @@ type
89 MenuItem5: TMenuItem; 67 MenuItem5: TMenuItem;
90 PageControl1: TPageControl; 68 PageControl1: TPageControl;
91 PaintBox1: TPaintBox; 69 PaintBox1: TPaintBox;
92 PaintBox2: TPaintBox; 70 WavePaintbox: TPaintBox;
93 Panel1: TPanel; 71 Panel1: TPanel;
94 Panel2: TPanel; 72 Panel2: TPanel;
95 InstrumentNumberSpinner: TSpinEdit; 73 InstrumentNumberSpinner: TSpinEdit;
96 LengthSpinner: TSpinEdit;
97 Panel3: TPanel; 74 Panel3: TPanel;
98 Panel4: TPanel; 75 Panel4: TPanel;
99 Splitter1: TSplitter; 76 Splitter1: TSplitter;
@@ -103,19 +80,41 @@ type
103 CommentsTabSheet: TTabSheet; 80 CommentsTabSheet: TTabSheet;
104 RoutinesTabSheet: TTabSheet; 81 RoutinesTabSheet: TTabSheet;
105 StatusBar1: TStatusBar; 82 StatusBar1: TStatusBar;
106 EnvelopeStartTrackbar: TTrackBar; 83 StartVolSpinner: TECSpinPosition;
107 EnvelopeSizeTrackbar: TTrackBar; 84 EnvChangeSpinner: TECSpinPosition;
108 TrackBar1: TTrackBar; 85 NoiseFreqSpinner: TECSpinPosition;
109 TrackBar2: TTrackBar; 86 DivRatioSpinner: TECSpinPosition;
110 TrackBar3: TTrackBar;
111 TrackBar4: TTrackBar;
112 TrackBar5: TTrackBar;
113 TreeView1: TTreeView; 87 TreeView1: TTreeView;
88 procedure CommentMemoChange(Sender: TObject);
89 procedure DirectionComboBoxChange(Sender: TObject);
90 procedure DivRatioSpinnerChange(Sender: TObject);
91 procedure DutyComboboxChange(Sender: TObject);
92 procedure EnvChangeSpinnerChange(Sender: TObject);
93 procedure EnvelopePaintboxPaint(Sender: TObject);
94 procedure FormCreate(Sender: TObject);
95 procedure InstrumentNameEditChange(Sender: TObject);
96 procedure InstrumentNumberSpinnerChange(Sender: TObject);
97 procedure LengthSpinnerChange(Sender: TObject);
98 procedure NoiseFreqSpinnerChange(Sender: TObject);
99 procedure RandomizeNoiseButtonClick(Sender: TObject);
100 procedure InstrumentTypeComboboxChange(Sender: TObject);
101 procedure LengthEnabledCheckboxChange(Sender: TObject);
114 procedure PaintBox1Paint(Sender: TObject); 102 procedure PaintBox1Paint(Sender: TObject);
115 procedure PaintBox2Paint(Sender: TObject); 103 procedure SevenBitCounterCheckboxChange(Sender: TObject);
104 procedure StartVolSpinnerChange(Sender: TObject);
105 procedure SweepDirectionComboboxChange(Sender: TObject);
106 procedure SweepSizeSpinnerChange(Sender: TObject);
107 procedure SweepTimeComboboxChange(Sender: TObject);
108 procedure WavePaintboxPaint(Sender: TObject);
109 procedure WaveVolumeComboboxChange(Sender: TObject);
116 private 110 private
111 Song: TSong;
112 CurrentInstrument: ^TInstrument;
117 113
118 114 procedure ChangeToSquare;
115 procedure ChangeToWave;
116 procedure ChangeToNoise;
117 procedure LoadInstrument(Instr: Integer);
119 public 118 public
120 119
121 end; 120 end;
@@ -129,14 +128,92 @@ implementation
129 128
130 { TfrmTracker } 129 { TfrmTracker }
131 130
132 procedure TfrmTracker.PaintBox2Paint(Sender: TObject); 131 procedure TfrmTracker.LoadInstrument(Instr: Integer);
132 var
133 CI: ^TInstrument;
134 begin
135 CurrentInstrument := @Song.Instruments[Instr];
136 CI := CurrentInstrument;
137
138 InstrumentNumberSpinner.Value := Instr;
139 InstrumentNameEdit.Text := CI^.Name;
140 LengthEnabledCheckbox.Checked := CI^.LengthEnabled;
141 LengthSpinner.Position := CI^.Length;
142
143 StartVolSpinner.Position := CI^.InitialVolume;
144 case CI^.VolSweepDirection of
145 Up: DirectionComboBox.Text := 'Up';
146 Down: DirectionComboBox.Text := 'Down';
147 end;
148 EnvChangeSpinner.Position := CI^.VolSweepAmount;
149
150 case CI^.Type_ of
151 Square: begin
152 SweepTimeCombobox.ItemIndex := CI^.SweepTime;
153 case CI^.SweepIncDec of
154 Up: SweepDirectionCombobox.Text := 'Up';
155 Down: SweepDirectionCombobox.Text := 'Down';
156 end;
157 SweepSizeSpinner.Position := CI^.SweepShift;
158 DutyCombobox.ItemIndex := CI^.Duty;
159 end;
160
161 Wave: begin
162 WaveVolumeCombobox.ItemIndex := CI^.OutputLevel;
163 WaveformCombobox.ItemIndex := CI^.Waveform;
164 end;
165
166 Noise: begin
167 NoiseFreqSpinner.Position := CI^.ShiftClockFreq;
168 DivRatioSpinner.Position := CI^.DividingRatio;
169 SevenBitCounterCheckbox.Checked := CI^.CounterStep = Seven;
170 end;
171 end;
172 end;
173
174 procedure TfrmTracker.ChangeToSquare;
175 begin
176 EnvelopeGroupBox.Enabled := True;
177 SquareGroupBox.Enabled := True;
178 WaveGroupBox.Enabled := False;
179 NoiseGroupBox.Enabled := False;
180
181 LengthSpinner.Max := 63;
182 end;
183
184 procedure TfrmTracker.ChangeToWave;
185 begin
186 EnvelopeGroupBox.Enabled := False;
187 SquareGroupBox.Enabled := False;
188 WaveGroupBox.Enabled := True;
189 NoiseGroupBox.Enabled := False;
190
191 LengthSpinner.Max := 255;
192 end;
193
194 procedure TfrmTracker.ChangeToNoise;
195 begin
196 EnvelopeGroupBox.Enabled := True;
197 SquareGroupBox.Enabled := False;
198 WaveGroupBox.Enabled := False;
199 NoiseGroupBox.Enabled := True;
200
201 LengthSpinner.Max := 63;
202 end;
203
204 procedure TfrmTracker.WavePaintboxPaint(Sender: TObject);
133 begin 205 begin
134 with PaintBox2.Canvas do begin 206 with WavePaintbox.Canvas do begin
135 Brush.Color := clBlack; 207 Brush.Color := clBlack;
136 Clear; 208 Clear;
137 end; 209 end;
138 end; 210 end;
139 211
212 procedure TfrmTracker.WaveVolumeComboboxChange(Sender: TObject);
213 begin
214 CurrentInstrument^.OutputLevel := WaveVolumeCombobox.ItemIndex;
215 end;
216
140 procedure TfrmTracker.PaintBox1Paint(Sender: TObject); 217 procedure TfrmTracker.PaintBox1Paint(Sender: TObject);
141 begin 218 begin
142 with PaintBox1.Canvas do begin 219 with PaintBox1.Canvas do begin
@@ -145,5 +222,146 @@ begin
145 end; 222 end;
146 end; 223 end;
147 224
225 procedure TfrmTracker.SevenBitCounterCheckboxChange(Sender: TObject);
226 begin
227 if SevenBitCounterCheckbox.Checked then
228 CurrentInstrument^.CounterStep := Seven
229 else
230 CurrentInstrument^.CounterStep := Fifteen;
231 end;
232
233 procedure TfrmTracker.StartVolSpinnerChange(Sender: TObject);
234 begin
235 CurrentInstrument^.InitialVolume := Round(StartVolSpinner.Position);
236 end;
237
238 procedure TfrmTracker.SweepDirectionComboboxChange(Sender: TObject);
239 begin
240 case SweepDirectionComboBox.Text of
241 'Up': CurrentInstrument^.SweepIncDec := Up;
242 'Down': CurrentInstrument^.SweepIncDec := Down;
243 end;
244 end;
245
246 procedure TfrmTracker.SweepSizeSpinnerChange(Sender: TObject);
247 begin
248 CurrentInstrument^.SweepShift := Round(SweepSizeSpinner.Position);
249 end;
250
251 procedure TfrmTracker.SweepTimeComboboxChange(Sender: TObject);
252 begin
253 CurrentInstrument^.SweepTime := SweepTimeCombobox.ItemIndex;
254 end;
255
256 procedure TfrmTracker.InstrumentTypeComboboxChange(Sender: TObject);
257 begin
258 case InstrumentTypeComboBox.Text of
259 'Square': begin
260 CurrentInstrument^.Type_ := Square;
261 ChangeToSquare
262 end;
263 'Wave': begin
264 CurrentInstrument^.Type_ := Wave;
265 ChangeToWave
266 end;
267 'Noise': begin
268 CurrentInstrument^.Type_ := Noise;
269 ChangeToNoise
270 end;
271 end;
272 end;
273
274 procedure TfrmTracker.RandomizeNoiseButtonClick(Sender: TObject);
275 begin
276 NoiseFreqSpinner.Position := Random(Round(NoiseFreqSpinner.Max));
277 DivRatioSpinner.Position := Random(Round(DivRatioSpinner.Max));
278 SevenBitCounterCheckbox.Checked := Random <= 0.5;
279 end;
280
281 procedure TfrmTracker.FormCreate(Sender: TObject);
282 var
283 I: Integer;
284 begin
285 for I := Low(Song.Instruments) to High(Song.Instruments) do
286 with Song.Instruments[I] do begin
287 Type_ := Square;
288 Length := 0;
289 LengthEnabled := False;
290 InitialVolume := 63;
291 VolSweepDirection := Down;
292 VolSweepAmount := 0;
293
294 SweepTime := 0;
295 SweepIncDec := Down;
296 SweepShift := 0;
297
298 Duty := 2;
299 end;
300
301 LoadInstrument(1);
302 end;
303
304 procedure TfrmTracker.DirectionComboBoxChange(Sender: TObject);
305 begin
306 case DirectionComboBox.Text of
307 'Up': CurrentInstrument^.VolSweepDirection := Up;
308 'Down': CurrentInstrument^.VolSweepDirection := Down;
309 end;
310 end;
311
312 procedure TfrmTracker.CommentMemoChange(Sender: TObject);
313 begin
314 Song.Comment := CommentMemo.Text;
315 end;
316
317 procedure TfrmTracker.DivRatioSpinnerChange(Sender: TObject);
318 begin
319 CurrentInstrument^.DividingRatio := Round(DivRatioSpinner.Position);
320 end;
321
322 procedure TfrmTracker.DutyComboboxChange(Sender: TObject);
323 begin
324 CurrentInstrument^.Duty := DutyComboBox.ItemIndex;
325 end;
326
327 procedure TfrmTracker.EnvChangeSpinnerChange(Sender: TObject);
328 begin
329 CurrentInstrument^.VolSweepAmount := Round(EnvChangeSpinner.Position);
330 end;
331
332 procedure TfrmTracker.EnvelopePaintboxPaint(Sender: TObject);
333 begin
334 with EnvelopePaintbox.Canvas do begin
335 Brush.Color := clBlack;
336 Clear;
337 end;
338 end;
339
340 procedure TfrmTracker.InstrumentNameEditChange(Sender: TObject);
341 begin
342 CurrentInstrument^.Name := InstrumentNameEdit.Text;
343 end;
344
345 procedure TfrmTracker.InstrumentNumberSpinnerChange(Sender: TObject);
346 begin
347 LoadInstrument(InstrumentNumberSpinner.Value);
348 end;
349
350 procedure TfrmTracker.LengthSpinnerChange(Sender: TObject);
351 begin
352 CurrentInstrument^.Length := Round(LengthSpinner.Position);
353 end;
354
355 procedure TfrmTracker.NoiseFreqSpinnerChange(Sender: TObject);
356 begin
357 CurrentInstrument^.ShiftClockFreq := Round(NoiseFreqSpinner.Position);
358 end;
359
360 procedure TfrmTracker.LengthEnabledCheckboxChange(Sender: TObject);
361 begin
362 LengthSpinner.Enabled := LengthEnabledCheckbox.Checked;
363 CurrentInstrument^.LengthEnabled := LengthEnabledCheckbox.Checked;
364 end;
365
148 end. 366 end.
149 367