Commit 300fc9e

Nick committed on
WIP C export
commit 300fc9eff3edf0b36d396a35a8e58acd7a40533d parent 00acecf
3 changed files +687−452
Modifiedcodegen.pas +206−23
@@ -7,18 +7,192 @@ interface
7 uses 7 uses
8 Classes, SysUtils, Math, Instruments, Song, Utils, 8 Classes, SysUtils, Math, Instruments, Song, Utils,
9 HugeDatatypes, Constants, Dialogs, strutils, FileUtil, LazFileUtils, 9 HugeDatatypes, Constants, Dialogs, strutils, FileUtil, LazFileUtils,
10 lclintf; 10 lclintf, process;
11 11
12 type 12 type
13 TExportMode = (emNormal, emPreview, emGBS); 13 TExportMode = (emNormal, emPreview, emGBS, emRGBDSObj, emGBDKObj, emGBDKC);
14 14
15 function RenderPreviewRom(Song: TSong): boolean; 15 function RenderPreviewRom(Song: TSong): boolean;
16 function RenderSongToFile(Song: TSong; Filename: string; 16 function RenderSongToFile(Song: TSong; Filename: string;
17 Mode: TExportMode = emNormal): boolean; 17 Mode: TExportMode = emNormal): boolean;
18 procedure RenderSongToGBDKC(Song: TSong; Filename: string);
18 19
19 implementation 20 implementation
20 21
21 uses process; 22 procedure RenderSongToGBDKC(Song: TSong; Filename: string);
23 var
24 OrderMatrix: TOrderMatrix;
25 OutSL: TStringList;
26 OrderCnt: integer;
27 I: integer;
28 F: Text;
29
30 function RenderGBDKCell(Cell: TCell): string;
31 var
32 SL: TStringList;
33 begin
34 SL := TStringList.Create;
35 SL.Delimiter := ',';
36
37 if Cell.Note = NO_NOTE then
38 SL.Add('90')
39 //SL.Add('___')
40 else SL.Add(IntToStr(Cell.Note));
41 //SL.Add(NoteToDriverMap.KeyData[Cell.Note]);
42
43 if InRange(Cell.Instrument, 0, 15) then
44 SL.Add(IntToStr(Cell.Instrument))
45 else
46 SL.Add('0');
47
48 SL.Add('0x' + EffectCodeToStr(Cell.EffectCode, Cell.EffectParams));
49
50 Result := SL.DelimitedText;
51 SL.Free;
52 end;
53
54 function RenderGBDKPattern(Name: string; Pat: TPattern): string;
55 var
56 Cell: TCell;
57 begin
58
59 Result := 'static const unsigned char ' + Name + '[] = {' + LineEnding;
60 for Cell in Pat do
61 Result += ' DN(' + RenderGBDKCell(Cell) + '),' + LineEnding;
62 Result += '};';
63 end;
64
65 function RenderGBDKOrder(Number: integer; Order: array of integer): string;
66 var
67 SL: TStringList;
68 I: integer;
69 begin
70 SL := TStringList.Create;
71 SL.StrictDelimiter := True;
72 SL.Delimiter := ',';
73
74 for I := Low(Order) to High(Order) do
75 SL.Add('P' + IntToStr(Order[I]));
76
77 Result := 'static const unsigned char* const order' + IntToStr(Number) + '[] = {';
78 Result += SL.DelimitedText;
79 Result += '};';
80 SL.Free;
81 end;
82
83 function RenderGBDKInstrument(Instrument: TInstrument): string;
84 var
85 SL: TStringList;
86 AsmInstrument: TAsmInstrument;
87 J: integer;
88 HighMask: byte;
89 begin
90 AsmInstrument := InstrumentToBytes(Instrument);
91 SL := TStringList.Create;
92 SL.StrictDelimiter := True;
93 SL.Delimiter := ',';
94
95 if Instrument.Type_ = itNoise then
96 begin
97 SL.Add(IntToStr(AsmInstrument[1]));
98
99 HighMask := %00000000;
100 if Instrument.LengthEnabled then
101 HighMask := HighMask or %01000000;
102 if Instrument.CounterStep = swSeven then
103 HighMask := HighMask or %10000000;
104 SL.Add(IntToStr(HighMask));
105
106 for J := Low(TNoiseMacro) to High(TNoiseMacro) do
107 SL.Add(IntToStr(Instrument.NoiseMacro[J]));
108 end
109 else
110 for J := Low(AsmInstrument) to High(AsmInstrument) do
111 SL.Add(IntToStr(AsmInstrument[J]));
112
113 Result := SL.DelimitedText;
114 end;
115
116 function RenderGBDKInstrumentBank(Name: string; Bank: TInstrumentBank): string;
117 var
118 I: integer;
119 begin
120 Result := 'static const unsigned char ' + Name + '[] = {';
121 for I := Low(Bank) to High(Bank) do
122 Result += RenderGBDKInstrument(Bank[I]) + ',';
123 Result += '};';
124 end;
125
126 function RenderGBDKWaves(Waves: TWaveBank): string;
127 var
128 I, J: integer;
129 begin
130 Result := 'static const unsigned char waves[] = {';
131 for I := Low(Waves) to High(Waves) do
132 begin
133 J := Low(Waves[I]);
134 while J < High(Waves[I]) do
135 begin
136 Result += IntToStr((Waves[I, J] shl 4) or Waves[I, J + 1])+',';
137 Inc(J, 2);
138 end;
139 Result += LineEnding;
140 end;
141 Result += '};';
142 end;
143
144 begin
145 OutSL := TStringList.Create;
146 OutSL.Add('#include "hUGEDriver.h"');
147 OutSL.Add('#include <stddef.h>');
148 OutSL.Add('');
149 OutSL.Add('#ifndef SONG_VAR_NAME');
150 OutSL.Add('#define SONG_VAR_NAME song');
151 OutSL.Add('#endif');
152 OutSL.Add('');
153 OutSL.Add('#define DN(A, B, C) (A),((B << 4) | (C >> 8)),(C & 0xF)');
154 OutSL.Add('');
155
156 OrderMatrix := Song.OrderMatrix;
157 OrderCnt := MaxIntValue([High(OrderMatrix[0]), High(OrderMatrix[1]),
158 High(OrderMatrix[2]), High(OrderMatrix[3])]);
159
160 OutSL.Add(Format('static const unsigned char order_cnt = %d;', [OrderCnt * 2]));
161 OutSL.Add('');
162
163 // TODO: Are keys and data defined to be aligned? Seems like they are but
164 // should probably find out if that's just an implementation detail...
165 for I := 0 to Song.Patterns.Count - 1 do
166 OutSL.Add(RenderGBDKPattern('P' + IntToStr(Song.Patterns.Keys[I]),
167 Song.Patterns.Data[I]^));
168 OutSL.Add('');
169
170 OutSL.Add(RenderGBDKOrder(1, Song.OrderMatrix[0]));
171 OutSL.Add(RenderGBDKOrder(2, Song.OrderMatrix[1]));
172 OutSL.Add(RenderGBDKOrder(3, Song.OrderMatrix[2]));
173 OutSL.Add(RenderGBDKOrder(4, Song.OrderMatrix[3]));
174 OutSL.Add('');
175
176 OutSL.Add(RenderGBDKInstrumentBank('duty_instruments', Song.Instruments.Duty));
177 OutSL.Add(RenderGBDKInstrumentBank('wave_instruments', Song.Instruments.Wave));
178 OutSL.Add(RenderGBDKInstrumentBank('noise_instruments', Song.Instruments.Noise));
179 OutSL.Add('');
180
181 OutSL.Add(RenderGBDKWaves(Song.Waves));
182 OutSL.Add('');
183
184 OutSL.Add(Format(
185 'const hUGESong_t SONG_VAR_NAME = {%d, &order_cnt, order1, order2, order3,'+
186 'order4, duty_instruments, wave_instruments, noise_instruments, NULL, waves};',
187 [Song.TicksPerRow]));
188
189 AssignFile(F, Filename);
190 Rewrite(F);
191 Write(F, OutSL.Text);
192 CloseFile(F);
193
194 OutSL.Free;
195 end;
22 196
23 function RenderOrderTable(OrderMatrix: TOrderMatrix): string; 197 function RenderOrderTable(OrderMatrix: TOrderMatrix): string;
24 198
@@ -202,13 +376,13 @@ begin
202 end; 376 end;
203 end; 377 end;
204 378
205 procedure RectifyGBSFile(GBSFile: String); 379 procedure RectifyGBSFile(GBSFile: string);
206 { This procedure removes the useless $400 bytes located after the GBS header. 380 { This procedure removes the useless $400 bytes located after the GBS header.
207 Since RGBDS has no feature to simply offset a section of code, we have to 381 Since RGBDS has no feature to simply offset a section of code, we have to
208 manually introduce padding and then remove it with this silly routine. } 382 manually introduce padding and then remove it with this silly routine. }
209 var 383 var
210 Stream: TFileStream; 384 Stream: TFileStream;
211 Buffer: array of Byte; 385 Buffer: array of byte;
212 begin 386 begin
213 Stream := TFileStream.Create(GBSFile, fmOpenRead); 387 Stream := TFileStream.Create(GBSFile, fmOpenRead);
214 SetLength(Buffer, Stream.Size - $400); 388 SetLength(Buffer, Stream.Size - $400);
@@ -236,7 +410,7 @@ var
236 OutSL: TStringList; 410 OutSL: TStringList;
237 FilePath: string; 411 FilePath: string;
238 412
239 procedure WriteHTT(F: String; S: String); 413 procedure WriteHTT(F: string; S: string);
240 begin 414 begin
241 AssignFile(OutFile, F); 415 AssignFile(OutFile, F);
242 Rewrite(OutFile); 416 Rewrite(OutFile);
@@ -301,7 +475,8 @@ begin
301 WriteHTT('./hUGEDriver/order.htt', RenderOrderTable(Song.OrderMatrix)); 475 WriteHTT('./hUGEDriver/order.htt', RenderOrderTable(Song.OrderMatrix));
302 WriteHTT('./hUGEDriver/duty_instrument.htt', RenderInstruments(Song.Instruments.Duty)); 476 WriteHTT('./hUGEDriver/duty_instrument.htt', RenderInstruments(Song.Instruments.Duty));
303 WriteHTT('./hUGEDriver/wave_instrument.htt', RenderInstruments(Song.Instruments.Wave)); 477 WriteHTT('./hUGEDriver/wave_instrument.htt', RenderInstruments(Song.Instruments.Wave));
304 WriteHTT('./hUGEDriver/noise_instrument.htt', RenderInstruments(Song.Instruments.Noise)); 478 WriteHTT('./hUGEDriver/noise_instrument.htt',
479 RenderInstruments(Song.Instruments.Noise));
305 WriteRoutinesToFile(Song.Routines); 480 WriteRoutinesToFile(Song.Routines);
306 481
307 AssignFile(OutFile, './hUGEDriver/pattern.htt'); 482 AssignFile(OutFile, './hUGEDriver/pattern.htt');
@@ -326,10 +501,13 @@ begin
326 // Assemble 501 // Assemble
327 502
328 // TODO: this is fugly, wish there was a ternary operator in this language... 503 // TODO: this is fugly, wish there was a ternary operator in this language...
329 if Mode = emPreview then begin 504 if Mode = emPreview then
505 begin
330 if Assemble(Filename + '_driver.obj', 'driver.z80', ['PREVIEW_MODE']) <> 0 then 506 if Assemble(Filename + '_driver.obj', 'driver.z80', ['PREVIEW_MODE']) <> 0 then
331 goto AssemblyError; 507 goto AssemblyError;
332 end else begin 508 end
509 else
510 begin
333 if Assemble(Filename + '_driver.obj', 'driver.z80', []) <> 0 then 511 if Assemble(Filename + '_driver.obj', 'driver.z80', []) <> 0 then
334 goto AssemblyError; 512 goto AssemblyError;
335 end; 513 end;
@@ -337,11 +515,13 @@ begin
337 if Assemble(Filename + '_song.obj', 'song.z80', []) <> 0 then 515 if Assemble(Filename + '_song.obj', 'song.z80', []) <> 0 then
338 goto AssemblyError; 516 goto AssemblyError;
339 517
340 if Mode = emGBS then begin 518 if Mode = emGBS then
519 begin
341 if Assemble(Filename + '_gbs.obj', 'gbs.z80', []) <> 0 then 520 if Assemble(Filename + '_gbs.obj', 'gbs.z80', []) <> 0 then
342 goto AssemblyError; 521 goto AssemblyError;
343 end 522 end
344 else begin 523 else
524 begin
345 if Assemble(Filename + '_player.obj', 'player.z80', []) <> 0 then 525 if Assemble(Filename + '_player.obj', 'player.z80', []) <> 0 then
346 goto AssemblyError; 526 goto AssemblyError;
347 end; 527 end;
@@ -349,21 +529,23 @@ begin
349 // Link 529 // Link
350 if Mode = emGBS then 530 if Mode = emGBS then
351 begin 531 begin
352 if Link(Filename+'.gbs', [Filename + '_driver.obj', 532 if Link(Filename + '.gbs', [Filename + '_driver.obj', Filename +
353 Filename + '_song.obj', Filename + '_gbs.obj']) <> 0 then 533 '_song.obj', Filename + '_gbs.obj']) <> 0 then
354 goto AssemblyError; 534 goto AssemblyError;
355 end 535 end
356 else begin 536 else
357 if Link(Filename + '.gb', [Filename + '_driver.obj', 537 begin
358 Filename + '_song.obj', Filename + '_player.obj'], Filename + '.map', 538 if Link(Filename + '.gb', [Filename + '_driver.obj', Filename +
359 Filename + '.sym') <> 0 then 539 '_song.obj', Filename + '_player.obj'], Filename + '.map', Filename +
540 '.sym') <> 0 then
360 goto AssemblyError; 541 goto AssemblyError;
361 end; 542 end;
362 543
363 // Fix 544 // Fix
364 if Mode = emGBS then 545 if Mode = emGBS then
365 RectifyGBSFile(Filename+'.gbs') 546 RectifyGBSFile(Filename + '.gbs')
366 else begin 547 else
548 begin
367 if (Fix(Filename + '.gb') <> 0) then 549 if (Fix(Filename + '.gb') <> 0) then
368 goto AssemblyError; 550 goto AssemblyError;
369 end; 551 end;
@@ -407,8 +589,8 @@ begin
407 if OutSL.Text.Contains('routine') then 589 if OutSL.Text.Contains('routine') then
408 MessageDlg( 590 MessageDlg(
409 'Error!', 591 'Error!',
410 'There was an error assembling the song for playback.' + LineEnding + LineEnding + 592 'There was an error assembling the song for playback.' + LineEnding +
411 Proc.Executable + ' output:' + LineEnding + OutSL.Text, 593 LineEnding + Proc.Executable + ' output:' + LineEnding + OutSL.Text,
412 mtError, 594 mtError,
413 [mbOK], 595 [mbOK],
414 0) 596 0)
@@ -416,8 +598,9 @@ begin
416 begin 598 begin
417 MessageDlg( 599 MessageDlg(
418 'Error!', 600 'Error!',
419 'There was an error assembling the song for playback.' + LineEnding + LineEnding + 601 'There was an error assembling the song for playback.' + LineEnding +
420 Proc.Executable + ' output:' + LineEnding + OutSL.Text + LineEnding + LineEnding + 602 LineEnding + Proc.Executable + ' output:' + LineEnding + OutSL.Text +
603 LineEnding + LineEnding +
421 'Please report this issue on the hUGETracker GitHub issues page, and ' + 604 'Please report this issue on the hUGETracker GitHub issues page, and ' +
422 'post your song file!', 605 'post your song file!',
423 mtError, 606 mtError,
Modifiedtracker.lfm +454−429
@@ -1,13 +1,12 @@
1 object frmTracker: TfrmTracker 1 object frmTracker: TfrmTracker
2 Left = 474 2 Left = 1794
3 Height = 1410 3 Height = 806
4 Top = 184 4 Top = 68
5 Width = 2222 5 Width = 1270
6 AllowDropFiles = True 6 AllowDropFiles = True
7 Caption = 'hUGETracker' 7 Caption = 'hUGETracker'
8 ClientHeight = 1376 8 ClientHeight = 786
9 ClientWidth = 2222 9 ClientWidth = 1270
10 DesignTimePPI = 168
11 KeyPreview = True 10 KeyPreview = True
12 Menu = MainMenu1 11 Menu = MainMenu1
13 OnCloseQuery = FormCloseQuery 12 OnCloseQuery = FormCloseQuery
@@ -21,9 +20,9 @@ object frmTracker: TfrmTracker
21 LCLVersion = '2.0.9.0' 20 LCLVersion = '2.0.9.0'
22 object TreeView1: TTreeView 21 object TreeView1: TTreeView
23 Left = 0 22 Left = 0
24 Height = 1180 23 Height = 674
25 Top = 153 24 Top = 89
26 Width = 338 25 Width = 193
27 Align = alLeft 26 Align = alLeft
28 ParentFont = False 27 ParentFont = False
29 ReadOnly = True 28 ReadOnly = True
@@ -41,27 +40,27 @@ object frmTracker: TfrmTracker
41 } 40 }
42 end 41 end
43 object Splitter1: TSplitter 42 object Splitter1: TSplitter
44 Left = 338 43 Left = 193
45 Height = 1180 44 Height = 674
46 Top = 153 45 Top = 89
47 Width = 9 46 Width = 5
48 end 47 end
49 object Panel1: TPanel 48 object Panel1: TPanel
50 Left = 347 49 Left = 198
51 Height = 1180 50 Height = 674
52 Top = 153 51 Top = 89
53 Width = 1875 52 Width = 1072
54 Align = alClient 53 Align = alClient
55 BevelOuter = bvNone 54 BevelOuter = bvNone
56 ClientHeight = 1180 55 ClientHeight = 674
57 ClientWidth = 1875 56 ClientWidth = 1072
58 ParentFont = False 57 ParentFont = False
59 TabOrder = 2 58 TabOrder = 2
60 object PageControl1: TPageControl 59 object PageControl1: TPageControl
61 Left = 0 60 Left = 0
62 Height = 1180 61 Height = 674
63 Top = 0 62 Top = 0
64 Width = 1875 63 Width = 1072
65 ActivePage = InstrumentTabSheet 64 ActivePage = InstrumentTabSheet
66 Align = alClient 65 Align = alClient
67 ParentFont = False 66 ParentFont = False
@@ -73,68 +72,68 @@ object frmTracker: TfrmTracker
73 ClientWidth = 1064 72 ClientWidth = 1064
74 ParentFont = False 73 ParentFont = False
75 object SongInformationGroupbox: TGroupBox 74 object SongInformationGroupbox: TGroupBox
76 Left = 14 75 Left = 8
77 Height = 238 76 Height = 136
78 Top = 14 77 Top = 8
79 Width = 534 78 Width = 305
80 Caption = 'Song information' 79 Caption = 'Song information'
81 ClientHeight = 203 80 ClientHeight = 116
82 ClientWidth = 530 81 ClientWidth = 301
83 ParentFont = False 82 ParentFont = False
84 TabOrder = 0 83 TabOrder = 0
85 object Label15: TLabel 84 object Label15: TLabel
86 Left = 14 85 Left = 8
87 Height = 15 86 Height = 15
88 Top = 28 87 Top = 16
89 Width = 27 88 Width = 27
90 Caption = 'Song' 89 Caption = 'Song'
91 ParentColor = False 90 ParentColor = False
92 ParentFont = False 91 ParentFont = False
93 end 92 end
94 object Label16: TLabel 93 object Label16: TLabel
95 Left = 12 94 Left = 7
96 Height = 15 95 Height = 15
97 Top = 84 96 Top = 48
98 Width = 28 97 Width = 28
99 Caption = 'Artist' 98 Caption = 'Artist'
100 ParentColor = False 99 ParentColor = False
101 ParentFont = False 100 ParentFont = False
102 end 101 end
103 object SongEdit: TEdit 102 object SongEdit: TEdit
104 Left = 98 103 Left = 56
105 Height = 23 104 Height = 23
106 Hint = 'The name of your composition' 105 Hint = 'The name of your composition'
107 Top = 14 106 Top = 8
108 Width = 378 107 Width = 216
109 OnChange = SongEditChange 108 OnChange = SongEditChange
110 ParentFont = False 109 ParentFont = False
111 TabOrder = 0 110 TabOrder = 0
112 end 111 end
113 object ArtistEdit: TEdit 112 object ArtistEdit: TEdit
114 Left = 98 113 Left = 56
115 Height = 23 114 Height = 23
116 Hint = 'Your name or handle' 115 Hint = 'Your name or handle'
117 Top = 70 116 Top = 40
118 Width = 378 117 Width = 216
119 OnChange = ArtistEditChange 118 OnChange = ArtistEditChange
120 ParentFont = False 119 ParentFont = False
121 TabOrder = 1 120 TabOrder = 1
122 end 121 end
123 object Label21: TLabel 122 object Label21: TLabel
124 Left = 14 123 Left = 8
125 Height = 15 124 Height = 15
126 Top = 136 125 Top = 78
127 Width = 114 126 Width = 114
128 Caption = 'Tempo (ticks per row)' 127 Caption = 'Tempo (ticks per row)'
129 ParentColor = False 128 ParentColor = False
130 ParentFont = False 129 ParentFont = False
131 end 130 end
132 object TicksPerRowSpinEdit: TSpinEdit 131 object TicksPerRowSpinEdit: TSpinEdit
133 Left = 233 132 Left = 133
134 Height = 23 133 Height = 23
135 Hint = 'How many ticks should happen before the row changes. Higher means slower' 134 Hint = 'How many ticks should happen before the row changes. Higher means slower'
136 Top = 128 135 Top = 73
137 Width = 88 136 Width = 50
138 MaxValue = 20 137 MaxValue = 20
139 MinValue = 1 138 MinValue = 1
140 OnChange = TicksPerRowSpinEditChange 139 OnChange = TicksPerRowSpinEditChange
@@ -161,7 +160,7 @@ object frmTracker: TfrmTracker
161 TabOrder = 0 160 TabOrder = 0
162 object HeaderControl1: THeaderControl 161 object HeaderControl1: THeaderControl
163 Left = 1 162 Left = 1
164 Height = 52 163 Height = 30
165 Hint = 'Left click to mute, right click to solo' 164 Hint = 'Left click to mute, right click to solo'
166 Top = 1 165 Top = 1
167 Width = 838 166 Width = 838
@@ -170,35 +169,35 @@ object frmTracker: TfrmTracker
170 Sections = < 169 Sections = <
171 item 170 item
172 Alignment = taLeftJustify 171 Alignment = taLeftJustify
173 Width = 56 172 Width = 32
174 Visible = True 173 Visible = True
175 end 174 end
176 item 175 item
177 Alignment = taCenter 176 Alignment = taCenter
178 ImageIndex = 1 177 ImageIndex = 1
179 Text = 'Duty 1' 178 Text = 'Duty 1'
180 Width = 233 179 Width = 133
181 Visible = True 180 Visible = True
182 end 181 end
183 item 182 item
184 Alignment = taCenter 183 Alignment = taCenter
185 ImageIndex = 1 184 ImageIndex = 1
186 Text = 'Duty 2' 185 Text = 'Duty 2'
187 Width = 233 186 Width = 133
188 Visible = True 187 Visible = True
189 end 188 end
190 item 189 item
191 Alignment = taCenter 190 Alignment = taCenter
192 ImageIndex = 1 191 ImageIndex = 1
193 Text = 'Wave' 192 Text = 'Wave'
194 Width = 233 193 Width = 133
195 Visible = True 194 Visible = True
196 end 195 end
197 item 196 item
198 Alignment = taCenter 197 Alignment = taCenter
199 ImageIndex = 1 198 ImageIndex = 1
200 Text = 'Noise' 199 Text = 'Noise'
201 Width = 233 200 Width = 133
202 Visible = True 201 Visible = True
203 end> 202 end>
204 OnSectionClick = HeaderControl1SectionClick 203 OnSectionClick = HeaderControl1SectionClick
@@ -212,12 +211,11 @@ object frmTracker: TfrmTracker
212 Height = 614 211 Height = 614
213 Top = 31 212 Top = 31
214 Width = 838 213 Width = 838
215 HorzScrollBar.Increment = 3 214 HorzScrollBar.Increment = 5
216 HorzScrollBar.Page = 32 215 HorzScrollBar.Page = 56
217 HorzScrollBar.Smooth = True 216 HorzScrollBar.Smooth = True
218 HorzScrollBar.Tracking = True 217 HorzScrollBar.Tracking = True
219 VertScrollBar.Increment = 5 218 VertScrollBar.Page = 88
220 VertScrollBar.Page = 50
221 VertScrollBar.Smooth = True 219 VertScrollBar.Smooth = True
222 VertScrollBar.Tracking = True 220 VertScrollBar.Tracking = True
223 Align = alClient 221 Align = alClient
@@ -232,11 +230,11 @@ object frmTracker: TfrmTracker
232 Left = 0 230 Left = 0
233 Height = 614 231 Height = 614
234 Top = 0 232 Top = 0
235 Width = 56 233 Width = 32
236 Align = alLeft 234 Align = alLeft
237 BorderStyle = bsNone 235 BorderStyle = bsNone
238 ColCount = 1 236 ColCount = 1
239 DefaultColWidth = 56 237 DefaultColWidth = 32
240 Enabled = False 238 Enabled = False
241 ParentFont = False 239 ParentFont = False
242 RowCount = 64 240 RowCount = 64
@@ -249,41 +247,41 @@ object frmTracker: TfrmTracker
249 Left = 0 247 Left = 0
250 Height = 646 248 Height = 646
251 Top = 0 249 Top = 0
252 Width = 392 250 Width = 224
253 Align = alLeft 251 Align = alLeft
254 AutoEdit = False 252 AutoEdit = False
255 AutoFillColumns = True 253 AutoFillColumns = True
256 Columns = < 254 Columns = <
257 item 255 item
258 Alignment = taCenter 256 Alignment = taCenter
259 MinSize = 58 257 MinSize = 33
260 MaxSize = 58 258 MaxSize = 33
261 Title.Caption = 'Dty1' 259 Title.Caption = 'Dty1'
262 Width = 61 260 Width = 34
263 end 261 end
264 item 262 item
265 Alignment = taCenter 263 Alignment = taCenter
266 MinSize = 58 264 MinSize = 33
267 MaxSize = 58 265 MaxSize = 33
268 Title.Caption = 'Dty2' 266 Title.Caption = 'Dty2'
269 Width = 61 267 Width = 34
270 end 268 end
271 item 269 item
272 Alignment = taCenter 270 Alignment = taCenter
273 MinSize = 58 271 MinSize = 33
274 MaxSize = 58 272 MaxSize = 33
275 Title.Caption = 'Wav' 273 Title.Caption = 'Wav'
276 Width = 61 274 Width = 34
277 end 275 end
278 item 276 item
279 Alignment = taCenter 277 Alignment = taCenter
280 MinSize = 58 278 MinSize = 33
281 MaxSize = 58 279 MaxSize = 33
282 Title.Caption = 'Nse' 280 Title.Caption = 'Nse'
283 Width = 63 281 Width = 37
284 end> 282 end>
285 DefaultColWidth = 30 283 DefaultColWidth = 17
286 DefaultRowHeight = 37 284 DefaultRowHeight = 21
287 ExtendedSelect = False 285 ExtendedSelect = False
288 Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goRangeSelect, goRowMoving, goEditing, goTabs, goSmoothScroll, goFixedRowNumbering, goRowHighlight] 286 Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goRangeSelect, goRowMoving, goEditing, goTabs, goSmoothScroll, goFixedRowNumbering, goRowHighlight]
289 ParentFont = False 287 ParentFont = False
@@ -303,28 +301,28 @@ object frmTracker: TfrmTracker
303 OnKeyDown = OrderEditStringGridKeyDown 301 OnKeyDown = OrderEditStringGridKeyDown
304 OnValidateEntry = OrderEditStringGridValidateEntry 302 OnValidateEntry = OrderEditStringGridValidateEntry
305 ColWidths = ( 303 ColWidths = (
306 112 304 64
307 61 305 34
308 61 306 34
309 61 307 34
310 63 308 37
311 ) 309 )
312 end 310 end
313 end 311 end
314 object InstrumentTabSheet: TTabSheet 312 object InstrumentTabSheet: TTabSheet
315 Caption = 'Instruments' 313 Caption = 'Instruments'
316 ClientHeight = 1137 314 ClientHeight = 646
317 ClientWidth = 1867 315 ClientWidth = 1064
318 ParentFont = False 316 ParentFont = False
319 object PaintBox1: TPaintBox 317 object PaintBox1: TPaintBox
320 AnchorSideTop.Control = FlowPanel1 318 AnchorSideTop.Control = FlowPanel1
321 AnchorSideTop.Side = asrBottom 319 AnchorSideTop.Side = asrBottom
322 AnchorSideBottom.Side = asrBottom 320 AnchorSideBottom.Side = asrBottom
323 Left = 0 321 Left = 0
324 Height = 277 322 Height = 154
325 Hint = 'Preview of how the resulting waveform will look with envelope applied' 323 Hint = 'Preview of how the resulting waveform will look with envelope applied'
326 Top = 860 324 Top = 492
327 Width = 1867 325 Width = 1064
328 Align = alClient 326 Align = alClient
329 Color = clBlack 327 Color = clBlack
330 ParentColor = False 328 ParentColor = False
@@ -334,9 +332,9 @@ object frmTracker: TfrmTracker
334 end 332 end
335 object FlowPanel1: TFlowPanel 333 object FlowPanel1: TFlowPanel
336 Left = 0 334 Left = 0
337 Height = 860 335 Height = 492
338 Top = 0 336 Top = 0
339 Width = 1867 337 Width = 1064
340 Align = alTop 338 Align = alTop
341 AutoSize = True 339 AutoSize = True
342 BevelOuter = bvNone 340 BevelOuter = bvNone
@@ -371,26 +369,26 @@ object frmTracker: TfrmTracker
371 ParentFont = False 369 ParentFont = False
372 TabOrder = 0 370 TabOrder = 0
373 object InstrumentGroupBox: TGroupBox 371 object InstrumentGroupBox: TGroupBox
374 Left = 12 372 Left = 7
375 Height = 422 373 Height = 241
376 Top = 12 374 Top = 7
377 Width = 474 375 Width = 271
378 Anchors = [] 376 Anchors = []
379 BorderSpacing.Left = 12 377 BorderSpacing.Left = 7
380 BorderSpacing.Top = 12 378 BorderSpacing.Top = 7
381 BorderSpacing.Right = 12 379 BorderSpacing.Right = 7
382 BorderSpacing.Bottom = 12 380 BorderSpacing.Bottom = 7
383 Caption = 'Instrument' 381 Caption = 'Instrument'
384 ClientHeight = 387 382 ClientHeight = 221
385 ClientWidth = 470 383 ClientWidth = 267
386 ParentFont = False 384 ParentFont = False
387 TabOrder = 0 385 TabOrder = 0
388 object InstrumentNumberSpinner: TSpinEdit 386 object InstrumentNumberSpinner: TSpinEdit
389 Left = 140 387 Left = 80
390 Height = 38 388 Height = 23
391 Hint = 'What instrument to edit' 389 Hint = 'What instrument to edit'
392 Top = 66 390 Top = 38
393 Width = 308 391 Width = 176
394 MaxValue = 15 392 MaxValue = 15
395 MinValue = 1 393 MinValue = 1
396 OnChange = InstrumentNumberSpinnerChange 394 OnChange = InstrumentNumberSpinnerChange
@@ -399,50 +397,50 @@ object frmTracker: TfrmTracker
399 Value = 1 397 Value = 1
400 end 398 end
401 object Label1: TLabel 399 object Label1: TLabel
402 Left = 14 400 Left = 8
403 Height = 30 401 Height = 15
404 Top = 80 402 Top = 46
405 Width = 101 403 Width = 58
406 Caption = 'Instrument' 404 Caption = 'Instrument'
407 ParentColor = False 405 ParentColor = False
408 ParentFont = False 406 ParentFont = False
409 end 407 end
410 object Label2: TLabel 408 object Label2: TLabel
411 Left = 14 409 Left = 8
412 Height = 30 410 Height = 15
413 Top = 136 411 Top = 78
414 Width = 56 412 Width = 32
415 Caption = 'Name' 413 Caption = 'Name'
416 ParentColor = False 414 ParentColor = False
417 ParentFont = False 415 ParentFont = False
418 end 416 end
419 object InstrumentNameEdit: TEdit 417 object InstrumentNameEdit: TEdit
420 Left = 140 418 Left = 80
421 Height = 38 419 Height = 23
422 Hint = 'The name of the instrument' 420 Hint = 'The name of the instrument'
423 Top = 122 421 Top = 70
424 Width = 308 422 Width = 176
425 OnChange = InstrumentNameEditChange 423 OnChange = InstrumentNameEditChange
426 ParentFont = False 424 ParentFont = False
427 TabOrder = 1 425 TabOrder = 1
428 end 426 end
429 object Label3: TLabel 427 object Label3: TLabel
430 Left = 14 428 Left = 8
431 Height = 30 429 Height = 15
432 Top = 28 430 Top = 16
433 Width = 80 431 Width = 44
434 Caption = 'Channel' 432 Caption = 'Channel'
435 Font.Style = [fsBold] 433 Font.Style = [fsBold]
436 ParentColor = False 434 ParentColor = False
437 ParentFont = False 435 ParentFont = False
438 end 436 end
439 object InstrumentTypeCombobox: TComboBox 437 object InstrumentTypeCombobox: TComboBox
440 Left = 136 438 Left = 78
441 Height = 38 439 Height = 23
442 Hint = 'What type of channel this instrument will be played on' 440 Hint = 'What type of channel this instrument will be played on'
443 Top = 14 441 Top = 8
444 Width = 312 442 Width = 178
445 ItemHeight = 30 443 ItemHeight = 15
446 ItemIndex = 0 444 ItemIndex = 0
447 Items.Strings = ( 445 Items.Strings = (
448 'Square' 446 'Square'
@@ -456,52 +454,52 @@ object frmTracker: TfrmTracker
456 Text = 'Square' 454 Text = 'Square'
457 end 455 end
458 object LengthEnabledCheckbox: TCheckBox 456 object LengthEnabledCheckbox: TCheckBox
459 Left = 21 457 Left = 12
460 Height = 34 458 Height = 19
461 Hint = 'Cut the sound after a certain length of time' 459 Hint = 'Cut the sound after a certain length of time'
462 Top = 206 460 Top = 118
463 Width = 98 461 Width = 57
464 Caption = 'Length' 462 Caption = 'Length'
465 OnChange = LengthEnabledCheckboxChange 463 OnChange = LengthEnabledCheckboxChange
466 ParentFont = False 464 ParentFont = False
467 TabOrder = 3 465 TabOrder = 3
468 end 466 end
469 object InstrumentImportButton: TButton 467 object InstrumentImportButton: TButton
470 Left = 21 468 Left = 12
471 Height = 44 469 Height = 25
472 Top = 322 470 Top = 184
473 Width = 203 471 Width = 116
474 Caption = 'Import' 472 Caption = 'Import'
475 OnClick = InstrumentImportButtonClick 473 OnClick = InstrumentImportButtonClick
476 ParentFont = False 474 ParentFont = False
477 TabOrder = 4 475 TabOrder = 4
478 end 476 end
479 object InstrumentExportButton: TButton 477 object InstrumentExportButton: TButton
480 Left = 242 478 Left = 138
481 Height = 44 479 Height = 25
482 Top = 322 480 Top = 184
483 Width = 203 481 Width = 116
484 Caption = 'Export' 482 Caption = 'Export'
485 OnClick = InstrumentExportButtonClick 483 OnClick = InstrumentExportButtonClick
486 ParentFont = False 484 ParentFont = False
487 TabOrder = 5 485 TabOrder = 5
488 end 486 end
489 object Button1: TButton 487 object Button1: TButton
490 Left = 21 488 Left = 12
491 Height = 44 489 Height = 25
492 Hint = 'Test out the instrument with a C-5 note' 490 Hint = 'Test out the instrument with a C-5 note'
493 Top = 266 491 Top = 152
494 Width = 424 492 Width = 242
495 Caption = 'Test C-5' 493 Caption = 'Test C-5'
496 OnClick = Button1Click 494 OnClick = Button1Click
497 ParentFont = False 495 ParentFont = False
498 TabOrder = 6 496 TabOrder = 6
499 end 497 end
500 object LengthTrackbar: TTrackBar 498 object LengthTrackbar: TTrackBar
501 Left = 133 499 Left = 76
502 Height = 44 500 Height = 25
503 Top = 196 501 Top = 112
504 Width = 312 502 Width = 178
505 Max = 63 503 Max = 63
506 OnChange = LengthSpinnerChange 504 OnChange = LengthSpinnerChange
507 Position = 0 505 Position = 0
@@ -511,45 +509,45 @@ object frmTracker: TfrmTracker
511 end 509 end
512 end 510 end
513 object EnvelopeGroupBox: TGroupBox 511 object EnvelopeGroupBox: TGroupBox
514 Left = 510 512 Left = 292
515 Height = 238 513 Height = 136
516 Top = 12 514 Top = 7
517 Width = 1018 515 Width = 582
518 Anchors = [] 516 Anchors = []
519 BorderSpacing.Left = 12 517 BorderSpacing.Left = 7
520 BorderSpacing.Top = 12 518 BorderSpacing.Top = 7
521 BorderSpacing.Right = 12 519 BorderSpacing.Right = 7
522 BorderSpacing.Bottom = 12 520 BorderSpacing.Bottom = 7
523 Caption = 'Envelope' 521 Caption = 'Envelope'
524 ClientHeight = 203 522 ClientHeight = 116
525 ClientWidth = 1014 523 ClientWidth = 578
526 ParentFont = False 524 ParentFont = False
527 TabOrder = 1 525 TabOrder = 1
528 object Label4: TLabel 526 object Label4: TLabel
529 Left = 14 527 Left = 8
530 Height = 30 528 Height = 15
531 Top = 16 529 Top = 9
532 Width = 80 530 Width = 46
533 Caption = 'Start vol.' 531 Caption = 'Start vol.'
534 ParentColor = False 532 ParentColor = False
535 ParentFont = False 533 ParentFont = False
536 end 534 end
537 object Label5: TLabel 535 object Label5: TLabel
538 Left = 14 536 Left = 8
539 Height = 30 537 Height = 15
540 Top = 84 538 Top = 48
541 Width = 84 539 Width = 48
542 Caption = 'Direction' 540 Caption = 'Direction'
543 ParentColor = False 541 ParentColor = False
544 ParentFont = False 542 ParentFont = False
545 end 543 end
546 object DirectionComboBox: TComboBox 544 object DirectionComboBox: TComboBox
547 Left = 144 545 Left = 82
548 Height = 38 546 Height = 23
549 Hint = 'Whether to fade the sound in or out' 547 Hint = 'Whether to fade the sound in or out'
550 Top = 80 548 Top = 46
551 Width = 346 549 Width = 198
552 ItemHeight = 30 550 ItemHeight = 15
553 ItemIndex = 1 551 ItemIndex = 1
554 Items.Strings = ( 552 Items.Strings = (
555 'Up' 553 'Up'
@@ -562,40 +560,40 @@ object frmTracker: TfrmTracker
562 Text = 'Down' 560 Text = 'Down'
563 end 561 end
564 object Label6: TLabel 562 object Label6: TLabel
565 Left = 14 563 Left = 8
566 Height = 30 564 Height = 15
567 Top = 150 565 Top = 86
568 Width = 71 566 Width = 41
569 Caption = 'Change' 567 Caption = 'Change'
570 ParentColor = False 568 ParentColor = False
571 ParentFont = False 569 ParentFont = False
572 end 570 end
573 object Panel5: TPanel 571 object Panel5: TPanel
574 Left = 525 572 Left = 300
575 Height = 182 573 Height = 104
576 Top = 0 574 Top = 0
577 Width = 472 575 Width = 270
578 BevelOuter = bvLowered 576 BevelOuter = bvLowered
579 ClientHeight = 182 577 ClientHeight = 104
580 ClientWidth = 472 578 ClientWidth = 270
581 ParentFont = False 579 ParentFont = False
582 TabOrder = 1 580 TabOrder = 1
583 object EnvelopePaintbox: TPaintBox 581 object EnvelopePaintbox: TPaintBox
584 Left = 1 582 Left = 1
585 Height = 180 583 Height = 102
586 Hint = 'Preview of the volume envelope' 584 Hint = 'Preview of the volume envelope'
587 Top = 1 585 Top = 1
588 Width = 470 586 Width = 268
589 Align = alClient 587 Align = alClient
590 ParentFont = False 588 ParentFont = False
591 OnPaint = EnvelopePaintboxPaint 589 OnPaint = EnvelopePaintboxPaint
592 end 590 end
593 end 591 end
594 object StartVolTrackbar: TTrackBar 592 object StartVolTrackbar: TTrackBar
595 Left = 144 593 Left = 82
596 Height = 44 594 Height = 25
597 Top = 14 595 Top = 8
598 Width = 343 596 Width = 196
599 Max = 15 597 Max = 15
600 OnChange = StartVolSpinnerChange 598 OnChange = StartVolSpinnerChange
601 Position = 0 599 Position = 0
@@ -603,10 +601,10 @@ object frmTracker: TfrmTracker
603 TabOrder = 2 601 TabOrder = 2
604 end 602 end
605 object EnvChangeTrackbar: TTrackBar 603 object EnvChangeTrackbar: TTrackBar
606 Left = 144 604 Left = 82
607 Height = 44 605 Height = 25
608 Top = 144 606 Top = 82
609 Width = 343 607 Width = 196
610 Max = 7 608 Max = 7
611 OnChange = EnvChangeSpinnerChange 609 OnChange = EnvChangeSpinnerChange
612 Position = 0 610 Position = 0
@@ -615,36 +613,36 @@ object frmTracker: TfrmTracker
615 end 613 end
616 end 614 end
617 object SquareGroupBox: TGroupBox 615 object SquareGroupBox: TGroupBox
618 Left = 12 616 Left = 7
619 Height = 296 617 Height = 169
620 Top = 458 618 Top = 262
621 Width = 558 619 Width = 319
622 Anchors = [] 620 Anchors = []
623 BorderSpacing.Left = 12 621 BorderSpacing.Left = 7
624 BorderSpacing.Top = 12 622 BorderSpacing.Top = 7
625 BorderSpacing.Right = 12 623 BorderSpacing.Right = 7
626 BorderSpacing.Bottom = 12 624 BorderSpacing.Bottom = 7
627 Caption = 'Square' 625 Caption = 'Square'
628 ClientHeight = 261 626 ClientHeight = 149
629 ClientWidth = 554 627 ClientWidth = 315
630 ParentFont = False 628 ParentFont = False
631 TabOrder = 2 629 TabOrder = 2
632 object Label7: TLabel 630 object Label7: TLabel
633 Left = 14 631 Left = 8
634 Height = 30 632 Height = 15
635 Top = 28 633 Top = 16
636 Width = 107 634 Width = 61
637 Caption = 'Sweep time' 635 Caption = 'Sweep time'
638 ParentColor = False 636 ParentColor = False
639 ParentFont = False 637 ParentFont = False
640 end 638 end
641 object SweepTimeCombobox: TComboBox 639 object SweepTimeCombobox: TComboBox
642 Left = 182 640 Left = 104
643 Height = 38 641 Height = 23
644 Hint = 'How long to sweep' 642 Hint = 'How long to sweep'
645 Top = 14 643 Top = 8
646 Width = 350 644 Width = 200
647 ItemHeight = 30 645 ItemHeight = 15
648 ItemIndex = 0 646 ItemIndex = 0
649 Items.Strings = ( 647 Items.Strings = (
650 'Off - no frequency change' 648 'Off - no frequency change'
@@ -665,12 +663,12 @@ object frmTracker: TfrmTracker
665 Text = 'Off - no frequency change' 663 Text = 'Off - no frequency change'
666 end 664 end
667 object SweepDirectionCombobox: TComboBox 665 object SweepDirectionCombobox: TComboBox
668 Left = 182 666 Left = 104
669 Height = 38 667 Height = 23
670 Hint = 'The direction of the sweep' 668 Hint = 'The direction of the sweep'
671 Top = 70 669 Top = 40
672 Width = 350 670 Width = 200
673 ItemHeight = 30 671 ItemHeight = 15
674 ItemIndex = 1 672 ItemIndex = 1
675 Items.Strings = ( 673 Items.Strings = (
676 'Up' 674 'Up'
@@ -685,39 +683,39 @@ object frmTracker: TfrmTracker
685 Text = 'Down' 683 Text = 'Down'
686 end 684 end
687 object Label8: TLabel 685 object Label8: TLabel
688 Left = 14 686 Left = 8
689 Height = 30 687 Height = 15
690 Top = 84 688 Top = 48
691 Width = 147 689 Width = 84
692 Caption = 'Sweep direction' 690 Caption = 'Sweep direction'
693 ParentColor = False 691 ParentColor = False
694 ParentFont = False 692 ParentFont = False
695 end 693 end
696 object Label9: TLabel 694 object Label9: TLabel
697 Left = 14 695 Left = 8
698 Height = 30 696 Height = 15
699 Top = 147 697 Top = 84
700 Width = 101 698 Width = 56
701 Caption = 'Sweep size' 699 Caption = 'Sweep size'
702 ParentColor = False 700 ParentColor = False
703 ParentFont = False 701 ParentFont = False
704 end 702 end
705 object Label10: TLabel 703 object Label10: TLabel
706 Left = 14 704 Left = 8
707 Height = 30 705 Height = 15
708 Top = 210 706 Top = 120
709 Width = 44 707 Width = 25
710 Caption = 'Duty' 708 Caption = 'Duty'
711 ParentColor = False 709 ParentColor = False
712 ParentFont = False 710 ParentFont = False
713 end 711 end
714 object DutyCombobox: TComboBox 712 object DutyCombobox: TComboBox
715 Left = 182 713 Left = 104
716 Height = 38 714 Height = 23
717 Hint = 'Which duty cycle to use (changes timbre of wave)' 715 Hint = 'Which duty cycle to use (changes timbre of wave)'
718 Top = 196 716 Top = 112
719 Width = 350 717 Width = 200
720 ItemHeight = 30 718 ItemHeight = 15
721 ItemIndex = 2 719 ItemIndex = 2
722 Items.Strings = ( 720 Items.Strings = (
723 '12.5%' 721 '12.5%'
@@ -734,10 +732,10 @@ object frmTracker: TfrmTracker
734 Text = '50% (square)' 732 Text = '50% (square)'
735 end 733 end
736 object SweepSizeTrackbar: TTrackBar 734 object SweepSizeTrackbar: TTrackBar
737 Left = 184 735 Left = 105
738 Height = 44 736 Height = 25
739 Top = 140 737 Top = 80
740 Width = 343 738 Width = 196
741 Max = 7 739 Max = 7
742 OnChange = SweepSizeSpinnerChange 740 OnChange = SweepSizeSpinnerChange
743 Position = 0 741 Position = 0
@@ -746,45 +744,45 @@ object frmTracker: TfrmTracker
746 end 744 end
747 end 745 end
748 object WaveGroupBox: TGroupBox 746 object WaveGroupBox: TGroupBox
749 Left = 594 747 Left = 340
750 Height = 296 748 Height = 169
751 Top = 458 749 Top = 262
752 Width = 520 750 Width = 297
753 Anchors = [] 751 Anchors = []
754 BorderSpacing.Left = 12 752 BorderSpacing.Left = 7
755 BorderSpacing.Top = 12 753 BorderSpacing.Top = 7
756 BorderSpacing.Right = 12 754 BorderSpacing.Right = 7
757 BorderSpacing.Bottom = 12 755 BorderSpacing.Bottom = 7
758 Caption = 'Wave' 756 Caption = 'Wave'
759 ClientHeight = 261 757 ClientHeight = 149
760 ClientWidth = 516 758 ClientWidth = 293
761 ParentFont = False 759 ParentFont = False
762 TabOrder = 3 760 TabOrder = 3
763 object Label11: TLabel 761 object Label11: TLabel
764 Left = 14 762 Left = 8
765 Height = 30 763 Height = 15
766 Top = 28 764 Top = 16
767 Width = 70 765 Width = 40
768 Caption = 'Volume' 766 Caption = 'Volume'
769 ParentColor = False 767 ParentColor = False
770 ParentFont = False 768 ParentFont = False
771 end 769 end
772 object Label12: TLabel 770 object Label12: TLabel
773 Left = 14 771 Left = 8
774 Height = 30 772 Height = 15
775 Top = 84 773 Top = 48
776 Width = 95 774 Width = 55
777 Caption = 'Waveform' 775 Caption = 'Waveform'
778 ParentColor = False 776 ParentColor = False
779 ParentFont = False 777 ParentFont = False
780 end 778 end
781 object WaveformCombobox: TComboBox 779 object WaveformCombobox: TComboBox
782 Left = 182 780 Left = 104
783 Height = 38 781 Height = 23
784 Hint = 'Which waveform is associated with this instrument' 782 Hint = 'Which waveform is associated with this instrument'
785 Top = 70 783 Top = 40
786 Width = 308 784 Width = 176
787 ItemHeight = 30 785 ItemHeight = 15
788 ItemIndex = 0 786 ItemIndex = 0
789 Items.Strings = ( 787 Items.Strings = (
790 'Wave #0' 788 'Wave #0'
@@ -811,21 +809,21 @@ object frmTracker: TfrmTracker
811 Text = 'Wave #0' 809 Text = 'Wave #0'
812 end 810 end
813 object Panel4: TPanel 811 object Panel4: TPanel
814 Left = 14 812 Left = 8
815 Height = 103 813 Height = 59
816 Top = 140 814 Top = 80
817 Width = 476 815 Width = 272
818 BevelOuter = bvLowered 816 BevelOuter = bvLowered
819 ClientHeight = 103 817 ClientHeight = 59
820 ClientWidth = 476 818 ClientWidth = 272
821 ParentFont = False 819 ParentFont = False
822 TabOrder = 1 820 TabOrder = 1
823 object WavePaintbox: TPaintBox 821 object WavePaintbox: TPaintBox
824 Left = 1 822 Left = 1
825 Height = 101 823 Height = 57
826 Hint = 'Preview of the waveform associated with this instrument' 824 Hint = 'Preview of the waveform associated with this instrument'
827 Top = 1 825 Top = 1
828 Width = 474 826 Width = 270
829 Align = alClient 827 Align = alClient
830 Color = clBlack 828 Color = clBlack
831 ParentColor = False 829 ParentColor = False
@@ -834,12 +832,12 @@ object frmTracker: TfrmTracker
834 end 832 end
835 end 833 end
836 object WaveVolumeCombobox: TComboBox 834 object WaveVolumeCombobox: TComboBox
837 Left = 182 835 Left = 104
838 Height = 38 836 Height = 23
839 Hint = 'The initial volume of the wave' 837 Hint = 'The initial volume of the wave'
840 Top = 14 838 Top = 8
841 Width = 308 839 Width = 176
842 ItemHeight = 30 840 ItemHeight = 15
843 ItemIndex = 1 841 ItemIndex = 1
844 Items.Strings = ( 842 Items.Strings = (
845 'Mute (No sound)' 843 'Mute (No sound)'
@@ -855,26 +853,26 @@ object frmTracker: TfrmTracker
855 end 853 end
856 end 854 end
857 object NoiseGroupBox: TGroupBox 855 object NoiseGroupBox: TGroupBox
858 Left = 1138 856 Left = 651
859 Height = 390 857 Height = 223
860 Top = 458 858 Top = 262
861 Width = 695 859 Width = 397
862 Anchors = [] 860 Anchors = []
863 BorderSpacing.Left = 12 861 BorderSpacing.Left = 7
864 BorderSpacing.Top = 12 862 BorderSpacing.Top = 7
865 BorderSpacing.Right = 12 863 BorderSpacing.Right = 7
866 BorderSpacing.Bottom = 12 864 BorderSpacing.Bottom = 7
867 Caption = 'Noise' 865 Caption = 'Noise'
868 ClientHeight = 355 866 ClientHeight = 203
869 ClientWidth = 691 867 ClientWidth = 393
870 ParentFont = False 868 ParentFont = False
871 TabOrder = 4 869 TabOrder = 4
872 object SevenBitCounterCheckbox: TCheckBox 870 object SevenBitCounterCheckbox: TCheckBox
873 Left = 14 871 Left = 8
874 Height = 34 872 Height = 19
875 Hint = 'Select LFSR width. When checked, output will sound like a tone rather than noise' 873 Hint = 'Select LFSR width. When checked, output will sound like a tone rather than noise'
876 Top = 14 874 Top = 8
877 Width = 373 875 Width = 215
878 Alignment = taLeftJustify 876 Alignment = taLeftJustify
879 Caption = '7 bit counter (more tone-like output)' 877 Caption = '7 bit counter (more tone-like output)'
880 OnChange = SevenBitCounterCheckboxChange 878 OnChange = SevenBitCounterCheckboxChange
@@ -882,20 +880,20 @@ object frmTracker: TfrmTracker
882 TabOrder = 0 880 TabOrder = 0
883 end 881 end
884 object Panel6: TPanel 882 object Panel6: TPanel
885 Left = 14 883 Left = 8
886 Height = 266 884 Height = 152
887 Top = 70 885 Top = 40
888 Width = 658 886 Width = 376
889 BevelOuter = bvLowered 887 BevelOuter = bvLowered
890 ClientHeight = 266 888 ClientHeight = 152
891 ClientWidth = 658 889 ClientWidth = 376
892 ParentFont = False 890 ParentFont = False
893 TabOrder = 1 891 TabOrder = 1
894 object NoiseMacroPaintbox: TPaintBox 892 object NoiseMacroPaintbox: TPaintBox
895 Left = 1 893 Left = 1
896 Height = 264 894 Height = 150
897 Top = 1 895 Top = 1
898 Width = 656 896 Width = 374
899 Align = alClient 897 Align = alClient
900 ParentFont = False 898 ParentFont = False
901 OnMouseDown = NoiseMacroPaintboxMouseDown 899 OnMouseDown = NoiseMacroPaintboxMouseDown
@@ -921,7 +919,7 @@ object frmTracker: TfrmTracker
921 Width = 1064 919 Width = 1064
922 Align = alBottom 920 Align = alBottom
923 Anchors = [akTop, akLeft, akRight, akBottom] 921 Anchors = [akTop, akLeft, akRight, akBottom]
924 BorderSpacing.Top = 23 922 BorderSpacing.Top = 13
925 ParentFont = False 923 ParentFont = False
926 PopupMenu = WaveEditPopup 924 PopupMenu = WaveEditPopup
927 OnMouseDown = WaveEditPaintBoxMouseDown 925 OnMouseDown = WaveEditPaintBoxMouseDown
@@ -930,61 +928,61 @@ object frmTracker: TfrmTracker
930 OnPaint = WaveEditPaintBoxPaint 928 OnPaint = WaveEditPaintBoxPaint
931 end 929 end
932 object WaveEditGroupBox: TGroupBox 930 object WaveEditGroupBox: TGroupBox
933 Left = 14 931 Left = 8
934 Height = 243 932 Height = 139
935 Top = 14 933 Top = 8
936 Width = 994 934 Width = 568
937 Caption = 'Wave Editor' 935 Caption = 'Wave Editor'
938 ClientHeight = 208 936 ClientHeight = 119
939 ClientWidth = 990 937 ClientWidth = 564
940 ParentFont = False 938 ParentFont = False
941 TabOrder = 0 939 TabOrder = 0
942 object Label20: TLabel 940 object Label20: TLabel
943 Left = 28 941 Left = 16
944 Height = 15 942 Height = 15
945 Top = 28 943 Top = 16
946 Width = 29 944 Width = 29
947 Caption = 'Wave' 945 Caption = 'Wave'
948 ParentColor = False 946 ParentColor = False
949 ParentFont = False 947 ParentFont = False
950 end 948 end
951 object WaveEditNumberSpinner: TSpinEdit 949 object WaveEditNumberSpinner: TSpinEdit
952 Left = 112 950 Left = 64
953 Height = 23 951 Height = 23
954 Top = 14 952 Top = 8
955 Width = 140 953 Width = 80
956 MaxValue = 15 954 MaxValue = 15
957 OnChange = WaveEditNumberSpinnerChange 955 OnChange = WaveEditNumberSpinnerChange
958 ParentFont = False 956 ParentFont = False
959 TabOrder = 0 957 TabOrder = 0
960 end 958 end
961 object ImportWaveButton: TButton 959 object ImportWaveButton: TButton
962 Left = 28 960 Left = 16
963 Height = 44 961 Height = 25
964 Hint = 'Import a wave' 962 Hint = 'Import a wave'
965 Top = 84 963 Top = 48
966 Width = 257 964 Width = 147
967 Caption = 'Import' 965 Caption = 'Import'
968 OnClick = ImportWaveButtonClick 966 OnClick = ImportWaveButtonClick
969 ParentFont = False 967 ParentFont = False
970 TabOrder = 1 968 TabOrder = 1
971 end 969 end
972 object ExportWaveButton: TButton 970 object ExportWaveButton: TButton
973 Left = 28 971 Left = 16
974 Height = 44 972 Height = 25
975 Hint = 'Export a wave' 973 Hint = 'Export a wave'
976 Top = 140 974 Top = 80
977 Width = 257 975 Width = 147
978 Caption = 'Export' 976 Caption = 'Export'
979 OnClick = ExportWaveButtonClick 977 OnClick = ExportWaveButtonClick
980 ParentFont = False 978 ParentFont = False
981 TabOrder = 2 979 TabOrder = 2
982 end 980 end
983 object HexWaveEdit: TEdit 981 object HexWaveEdit: TEdit
984 Left = 504 982 Left = 288
985 Height = 23 983 Height = 23
986 Top = 14 984 Top = 8
987 Width = 462 985 Width = 264
988 MaxLength = 32 986 MaxLength = 32
989 OnChange = HexWaveEditEditingDone 987 OnChange = HexWaveEditEditingDone
990 OnEditingDone = HexWaveEditEditingDone 988 OnEditingDone = HexWaveEditEditingDone
@@ -992,18 +990,18 @@ object frmTracker: TfrmTracker
992 TabOrder = 3 990 TabOrder = 3
993 end 991 end
994 object Label13: TLabel 992 object Label13: TLabel
995 Left = 308 993 Left = 176
996 Height = 15 994 Height = 15
997 Top = 28 995 Top = 16
998 Width = 100 996 Width = 100
999 Caption = 'Hex representation' 997 Caption = 'Hex representation'
1000 ParentColor = False 998 ParentColor = False
1001 ParentFont = False 999 ParentFont = False
1002 end 1000 end
1003 object PlayWaveWhileDrawingCheckbox: TCheckBox 1001 object PlayWaveWhileDrawingCheckbox: TCheckBox
1004 Left = 308 1002 Left = 176
1005 Height = 19 1003 Height = 19
1006 Top = 70 1004 Top = 40
1007 Width = 149 1005 Width = 149
1008 Caption = 'Play wave while drawing' 1006 Caption = 'Play wave while drawing'
1009 ParentFont = False 1007 ParentFont = False
@@ -1026,16 +1024,16 @@ object frmTracker: TfrmTracker
1026 Width = 939 1024 Width = 939
1027 Align = alBottom 1025 Align = alBottom
1028 Anchors = [akTop, akLeft, akRight, akBottom] 1026 Anchors = [akTop, akLeft, akRight, akBottom]
1029 BorderSpacing.Top = 23 1027 BorderSpacing.Top = 13
1030 MaxLength = 255 1028 MaxLength = 255
1031 OnChange = CommentMemoChange 1029 OnChange = CommentMemoChange
1032 ParentFont = False 1030 ParentFont = False
1033 TabOrder = 0 1031 TabOrder = 0
1034 end 1032 end
1035 object Label17: TLabel 1033 object Label17: TLabel
1036 Left = 14 1034 Left = 8
1037 Height = 15 1035 Height = 15
1038 Top = 14 1036 Top = 8
1039 Width = 333 1037 Width = 333
1040 Caption = 'This is an area to write comments for anyone editing your tune.' 1038 Caption = 'This is an area to write comments for anyone editing your tune.'
1041 ParentColor = False 1039 ParentColor = False
@@ -1055,16 +1053,16 @@ object frmTracker: TfrmTracker
1055 Top = 128 1053 Top = 128
1056 Width = 939 1054 Width = 939
1057 Align = alBottom 1055 Align = alBottom
1058 BorderSpacing.Top = 23 1056 BorderSpacing.Top = 13
1059 Anchors = [akTop, akLeft, akRight, akBottom] 1057 Anchors = [akTop, akLeft, akRight, akBottom]
1060 Font.Height = -23 1058 Font.Height = -13
1061 Font.Name = 'Courier New' 1059 Font.Name = 'Courier New'
1062 Font.Pitch = fpFixed 1060 Font.Pitch = fpFixed
1063 Font.Quality = fqNonAntialiased 1061 Font.Quality = fqNonAntialiased
1064 ParentColor = False 1062 ParentColor = False
1065 ParentFont = False 1063 ParentFont = False
1066 TabOrder = 0 1064 TabOrder = 0
1067 Gutter.Width = 100 1065 Gutter.Width = 57
1068 Gutter.MouseActions = <> 1066 Gutter.MouseActions = <>
1069 RightGutter.Width = 0 1067 RightGutter.Width = 0
1070 RightGutter.MouseActions = <> 1068 RightGutter.MouseActions = <>
@@ -1518,11 +1516,11 @@ object frmTracker: TfrmTracker
1518 OnChange = RoutineSyneditChange 1516 OnChange = RoutineSyneditChange
1519 inline SynLeftGutterPartList1: TSynGutterPartList 1517 inline SynLeftGutterPartList1: TSynGutterPartList
1520 object SynGutterMarks1: TSynGutterMarks 1518 object SynGutterMarks1: TSynGutterMarks
1521 Width = 42 1519 Width = 24
1522 MouseActions = <> 1520 MouseActions = <>
1523 end 1521 end
1524 object SynGutterLineNumber1: TSynGutterLineNumber 1522 object SynGutterLineNumber1: TSynGutterLineNumber
1525 Width = 29 1523 Width = 17
1526 MouseActions = <> 1524 MouseActions = <>
1527 MarkupInfo.Background = clBtnFace 1525 MarkupInfo.Background = clBtnFace
1528 MarkupInfo.Foreground = clNone 1526 MarkupInfo.Foreground = clNone
@@ -1532,19 +1530,18 @@ object frmTracker: TfrmTracker
1532 LeadingZeros = False 1530 LeadingZeros = False
1533 end 1531 end
1534 object SynGutterChanges1: TSynGutterChanges 1532 object SynGutterChanges1: TSynGutterChanges
1535 Width = 7 1533 Width = 4
1536 MouseActions = <> 1534 MouseActions = <>
1537 ModifiedColor = 59900 1535 ModifiedColor = 59900
1538 SavedColor = clGreen 1536 SavedColor = clGreen
1539 end 1537 end
1540 object SynGutterSeparator1: TSynGutterSeparator 1538 object SynGutterSeparator1: TSynGutterSeparator
1541 Width = 4 1539 Width = 2
1542 MouseActions = <> 1540 MouseActions = <>
1543 MarkupInfo.Background = clWhite 1541 MarkupInfo.Background = clWhite
1544 MarkupInfo.Foreground = clGray 1542 MarkupInfo.Foreground = clGray
1545 end 1543 end
1546 object SynGutterCodeFolding1: TSynGutterCodeFolding 1544 object SynGutterCodeFolding1: TSynGutterCodeFolding
1547 Width = 18
1548 MouseActions = <> 1545 MouseActions = <>
1549 MarkupInfo.Background = clNone 1546 MarkupInfo.Background = clNone
1550 MarkupInfo.Foreground = clGray 1547 MarkupInfo.Foreground = clGray
@@ -1554,19 +1551,19 @@ object frmTracker: TfrmTracker
1554 end 1551 end
1555 end 1552 end
1556 object Label18: TLabel 1553 object Label18: TLabel
1557 Left = 14 1554 Left = 8
1558 Height = 15 1555 Height = 15
1559 Top = 28 1556 Top = 16
1560 Width = 41 1557 Width = 41
1561 Caption = 'Routine' 1558 Caption = 'Routine'
1562 ParentColor = False 1559 ParentColor = False
1563 ParentFont = False 1560 ParentFont = False
1564 end 1561 end
1565 object RoutineNumberSpinner: TSpinEdit 1562 object RoutineNumberSpinner: TSpinEdit
1566 Left = 112 1563 Left = 64
1567 Height = 23 1564 Height = 23
1568 Top = 14 1565 Top = 8
1569 Width = 308 1566 Width = 176
1570 MaxValue = 15 1567 MaxValue = 15
1571 MinValue = 1 1568 MinValue = 1
1572 OnChange = RoutineNumberSpinnerChange 1569 OnChange = RoutineNumberSpinnerChange
@@ -1575,9 +1572,9 @@ object frmTracker: TfrmTracker
1575 Value = 1 1572 Value = 1
1576 end 1573 end
1577 object Label19: TLabel 1574 object Label19: TLabel
1578 Left = 14 1575 Left = 8
1579 Height = 75 1576 Height = 75
1580 Top = 70 1577 Top = 40
1581 Width = 506 1578 Width = 506
1582 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!' 1579 Caption = 'Routines are an advanced feature of hUGETracker, and you likely won''t need them at all'#13#10'if you are only interested in composing music. If you want to create a custom effect, or interface'#13#10'with game code that you''re writing a soundtrack for, then routines will come in handy.'#13#10#13#10'Refer to the user manual for more information!'
1583 ParentColor = False 1580 ParentColor = False
@@ -1588,21 +1585,21 @@ object frmTracker: TfrmTracker
1588 end 1585 end
1589 object Panel2: TPanel 1586 object Panel2: TPanel
1590 Left = 0 1587 Left = 0
1591 Height = 112 1588 Height = 64
1592 Top = 41 1589 Top = 25
1593 Width = 2222 1590 Width = 1270
1594 Align = alTop 1591 Align = alTop
1595 BevelOuter = bvNone 1592 BevelOuter = bvNone
1596 ClientHeight = 112 1593 ClientHeight = 64
1597 ClientWidth = 2222 1594 ClientWidth = 1270
1598 ParentFont = False 1595 ParentFont = False
1599 TabOrder = 3 1596 TabOrder = 3
1600 object LEDMeter1: TLEDMeter 1597 object LEDMeter1: TLEDMeter
1601 AnchorSideRight.Control = Duty1Visualizer 1598 AnchorSideRight.Control = Duty1Visualizer
1602 Left = 0 1599 Left = 0
1603 Height = 56 1600 Height = 32
1604 Top = 56 1601 Top = 32
1605 Width = 842 1602 Width = 482
1606 Anchors = [akTop, akLeft, akRight] 1603 Anchors = [akTop, akLeft, akRight]
1607 BevelStyle = bvLowered 1604 BevelStyle = bvLowered
1608 Colors.Border = 2168839 1605 Colors.Border = 2168839
@@ -1623,9 +1620,9 @@ object frmTracker: TfrmTracker
1623 object LEDMeter2: TLEDMeter 1620 object LEDMeter2: TLEDMeter
1624 AnchorSideRight.Control = Duty1Visualizer 1621 AnchorSideRight.Control = Duty1Visualizer
1625 Left = 0 1622 Left = 0
1626 Height = 56 1623 Height = 32
1627 Top = 0 1624 Top = 0
1628 Width = 842 1625 Width = 482
1629 Anchors = [akTop, akLeft, akRight] 1626 Anchors = [akTop, akLeft, akRight]
1630 BevelStyle = bvLowered 1627 BevelStyle = bvLowered
1631 Colors.Border = 2168839 1628 Colors.Border = 2168839
@@ -1644,40 +1641,40 @@ object frmTracker: TfrmTracker
1644 Section3Value = 48 1641 Section3Value = 48
1645 end 1642 end
1646 object Duty1Visualizer: TPaintBox 1643 object Duty1Visualizer: TPaintBox
1647 Left = 842 1644 Left = 482
1648 Height = 112 1645 Height = 64
1649 Top = 0 1646 Top = 0
1650 Width = 345 1647 Width = 197
1651 Align = alRight 1648 Align = alRight
1652 ParentFont = False 1649 ParentFont = False
1653 OnClick = Duty1VisualizerClick 1650 OnClick = Duty1VisualizerClick
1654 OnPaint = Duty1VisualizerPaint 1651 OnPaint = Duty1VisualizerPaint
1655 end 1652 end
1656 object Duty2Visualizer: TPaintBox 1653 object Duty2Visualizer: TPaintBox
1657 Left = 1187 1654 Left = 679
1658 Height = 112 1655 Height = 64
1659 Top = 0 1656 Top = 0
1660 Width = 345 1657 Width = 197
1661 Align = alRight 1658 Align = alRight
1662 ParentFont = False 1659 ParentFont = False
1663 OnClick = Duty1VisualizerClick 1660 OnClick = Duty1VisualizerClick
1664 OnPaint = Duty2VisualizerPaint 1661 OnPaint = Duty2VisualizerPaint
1665 end 1662 end
1666 object WaveVisualizer: TPaintBox 1663 object WaveVisualizer: TPaintBox
1667 Left = 1532 1664 Left = 876
1668 Height = 112 1665 Height = 64
1669 Top = 0 1666 Top = 0
1670 Width = 345 1667 Width = 197
1671 Align = alRight 1668 Align = alRight
1672 ParentFont = False 1669 ParentFont = False
1673 OnClick = Duty1VisualizerClick 1670 OnClick = Duty1VisualizerClick
1674 OnPaint = WaveVisualizerPaint 1671 OnPaint = WaveVisualizerPaint
1675 end 1672 end
1676 object NoiseVisualizer: TPaintBox 1673 object NoiseVisualizer: TPaintBox
1677 Left = 1877 1674 Left = 1073
1678 Height = 112 1675 Height = 64
1679 Top = 0 1676 Top = 0
1680 Width = 345 1677 Width = 197
1681 Align = alRight 1678 Align = alRight
1682 ParentFont = False 1679 ParentFont = False
1683 OnClick = Duty1VisualizerClick 1680 OnClick = Duty1VisualizerClick
@@ -1686,19 +1683,19 @@ object frmTracker: TfrmTracker
1686 end 1683 end
1687 object StatusBar1: TStatusBar 1684 object StatusBar1: TStatusBar
1688 Left = 0 1685 Left = 0
1689 Height = 43 1686 Height = 23
1690 Top = 1333 1687 Top = 763
1691 Width = 2222 1688 Width = 1270
1692 AutoHint = True 1689 AutoHint = True
1693 Panels = < 1690 Panels = <
1694 item 1691 item
1695 Width = 817 1692 Width = 467
1696 end 1693 end
1697 item 1694 item
1698 Width = 350 1695 Width = 200
1699 end 1696 end
1700 item 1697 item
1701 Width = 350 1698 Width = 200
1702 end> 1699 end>
1703 ParentFont = False 1700 ParentFont = False
1704 ParentShowHint = False 1701 ParentShowHint = False
@@ -1707,9 +1704,9 @@ object frmTracker: TfrmTracker
1707 end 1704 end
1708 object ToolBar1: TToolBar 1705 object ToolBar1: TToolBar
1709 Left = 0 1706 Left = 0
1710 Height = 41 1707 Height = 25
1711 Top = 0 1708 Top = 0
1712 Width = 2222 1709 Width = 1270
1713 AutoSize = True 1710 AutoSize = True
1714 Caption = 'ToolBar1' 1711 Caption = 'ToolBar1'
1715 EdgeBorders = [ebBottom] 1712 EdgeBorders = [ebBottom]
@@ -1726,7 +1723,7 @@ object frmTracker: TfrmTracker
1726 ParentShowHint = False 1723 ParentShowHint = False
1727 end 1724 end
1728 object PanicToolButton: TToolButton 1725 object PanicToolButton: TToolButton
1729 Left = 851 1726 Left = 551
1730 Hint = 'Stops all sound output' 1727 Hint = 'Stops all sound output'
1731 Top = 0 1728 Top = 0
1732 AutoSize = True 1729 AutoSize = True
@@ -1737,17 +1734,17 @@ object frmTracker: TfrmTracker
1737 ShowHint = True 1734 ShowHint = True
1738 end 1735 end
1739 object ToolButton2: TToolButton 1736 object ToolButton2: TToolButton
1740 Left = 221 1737 Left = 145
1741 Top = 0 1738 Top = 0
1742 Action = PlayCursorAction 1739 Action = PlayCursorAction
1743 end 1740 end
1744 object ToolButton4: TToolButton 1741 object ToolButton4: TToolButton
1745 Left = 331 1742 Left = 219
1746 Top = 0 1743 Top = 0
1747 Action = StopAction 1744 Action = StopAction
1748 end 1745 end
1749 object ExportGBButton: TToolButton 1746 object ExportGBButton: TToolButton
1750 Left = 442 1747 Left = 287
1751 Hint = 'Export the song as a standalone ROM' 1748 Hint = 'Export the song as a standalone ROM'
1752 Top = 0 1749 Top = 0
1753 AutoSize = True 1750 AutoSize = True
@@ -1756,49 +1753,49 @@ object frmTracker: TfrmTracker
1756 OnClick = ExportGBButtonClick 1753 OnClick = ExportGBButtonClick
1757 end 1754 end
1758 object ToolButton8: TToolButton 1755 object ToolButton8: TToolButton
1759 Left = 120 1756 Left = 79
1760 Height = 39 1757 Height = 22
1761 Top = 0 1758 Top = 0
1762 Caption = 'ToolButton8' 1759 Caption = 'ToolButton8'
1763 Style = tbsDivider 1760 Style = tbsDivider
1764 end 1761 end
1765 object ToolButton6: TToolButton 1762 object ToolButton6: TToolButton
1766 Left = 433 1763 Left = 284
1767 Height = 39 1764 Height = 22
1768 Top = 0 1765 Top = 0
1769 Caption = 'ToolButton6' 1766 Caption = 'ToolButton6'
1770 Style = tbsDivider 1767 Style = tbsDivider
1771 end 1768 end
1772 object ToolButton7: TToolButton 1769 object ToolButton7: TToolButton
1773 Left = 1775 1770 Left = 1088
1774 Height = 39 1771 Height = 22
1775 Top = 0 1772 Top = 0
1776 Caption = 'ToolButton7' 1773 Caption = 'ToolButton7'
1777 Style = tbsSeparator 1774 Style = tbsSeparator
1778 end 1775 end
1779 object OctaveSpinEdit: TSpinEdit 1776 object OctaveSpinEdit: TSpinEdit
1780 Left = 1016 1777 Left = 654
1781 Height = 38 1778 Height = 23
1782 Hint = 'The octave offset for entering new notes' 1779 Hint = 'The octave offset for entering new notes'
1783 Top = 0 1780 Top = 0
1784 Width = 114 1781 Width = 65
1785 MaxValue = 5 1782 MaxValue = 5
1786 OnChange = OctaveSpinEditChange 1783 OnChange = OctaveSpinEditChange
1787 ParentFont = False 1784 ParentFont = False
1788 TabOrder = 0 1785 TabOrder = 0
1789 end 1786 end
1790 object ToolButton9: TToolButton 1787 object ToolButton9: TToolButton
1791 Left = 927 1788 Left = 606
1792 Height = 39 1789 Height = 22
1793 Top = 0 1790 Top = 0
1794 Caption = 'ToolButton9' 1791 Caption = 'ToolButton9'
1795 Style = tbsSeparator 1792 Style = tbsSeparator
1796 end 1793 end
1797 object Label22: TLabel 1794 object Label22: TLabel
1798 Left = 941 1795 Left = 611
1799 Height = 39 1796 Height = 22
1800 Top = 0 1797 Top = 0
1801 Width = 75 1798 Width = 43
1802 AutoSize = False 1799 AutoSize = False
1803 Caption = 'Octave ' 1800 Caption = 'Octave '
1804 Layout = tlCenter 1801 Layout = tlCenter
@@ -1806,10 +1803,10 @@ object frmTracker: TfrmTracker
1806 ParentFont = False 1803 ParentFont = False
1807 end 1804 end
1808 object Label23: TLabel 1805 object Label23: TLabel
1809 Left = 1130 1806 Left = 719
1810 Height = 39 1807 Height = 22
1811 Top = 0 1808 Top = 0
1812 Width = 122 1809 Width = 70
1813 AutoSize = False 1810 AutoSize = False
1814 Caption = ' Instrument ' 1811 Caption = ' Instrument '
1815 Layout = tlCenter 1812 Layout = tlCenter
@@ -1817,13 +1814,13 @@ object frmTracker: TfrmTracker
1817 ParentFont = False 1814 ParentFont = False
1818 end 1815 end
1819 object InstrumentComboBox: TComboBox 1816 object InstrumentComboBox: TComboBox
1820 Left = 1252 1817 Left = 789
1821 Height = 38 1818 Height = 23
1822 Hint = 'The selected instrument for new notes' 1819 Hint = 'The selected instrument for new notes'
1823 Top = 0 1820 Top = 0
1824 Width = 374 1821 Width = 214
1825 DropDownCount = 999 1822 DropDownCount = 999
1826 ItemHeight = 30 1823 ItemHeight = 15
1827 ItemIndex = 0 1824 ItemIndex = 0
1828 Items.Strings = ( 1825 Items.Strings = (
1829 '(no instrument)' 1826 '(no instrument)'
@@ -1835,10 +1832,10 @@ object frmTracker: TfrmTracker
1835 Text = '(no instrument)' 1832 Text = '(no instrument)'
1836 end 1833 end
1837 object Label24: TLabel 1834 object Label24: TLabel
1838 Left = 1626 1835 Left = 1003
1839 Height = 39 1836 Height = 22
1840 Top = 0 1837 Top = 0
1841 Width = 61 1838 Width = 35
1842 AutoSize = False 1839 AutoSize = False
1843 Caption = ' Step ' 1840 Caption = ' Step '
1844 Layout = tlCenter 1841 Layout = tlCenter
@@ -1846,23 +1843,23 @@ object frmTracker: TfrmTracker
1846 ParentFont = False 1843 ParentFont = False
1847 end 1844 end
1848 object StepSpinEdit: TSpinEdit 1845 object StepSpinEdit: TSpinEdit
1849 Left = 1687 1846 Left = 1038
1850 Height = 38 1847 Height = 23
1851 Hint = 'How many rows to step down after entering a new note' 1848 Hint = 'How many rows to step down after entering a new note'
1852 Top = 0 1849 Top = 0
1853 Width = 88 1850 Width = 50
1854 MaxValue = 63 1851 MaxValue = 63
1855 OnChange = StepSpinEditChange 1852 OnChange = StepSpinEditChange
1856 ParentFont = False 1853 ParentFont = False
1857 TabOrder = 2 1854 TabOrder = 2
1858 end 1855 end
1859 object ToolButton3: TToolButton 1856 object ToolButton3: TToolButton
1860 Left = 129 1857 Left = 82
1861 Top = 0 1858 Top = 0
1862 Action = PlayStartAction 1859 Action = PlayStartAction
1863 end 1860 end
1864 object ExportGBSButton: TToolButton 1861 object ExportGBSButton: TToolButton
1865 Left = 564 1862 Left = 368
1866 Hint = 'Export the song as a GBS soundtrack' 1863 Hint = 'Export the song as a GBS soundtrack'
1867 Top = 0 1864 Top = 0
1868 Caption = 'Export .GBS' 1865 Caption = 'Export .GBS'
@@ -1870,14 +1867,14 @@ object frmTracker: TfrmTracker
1870 OnClick = ExportGBSButtonClick 1867 OnClick = ExportGBSButtonClick
1871 end 1868 end
1872 object ToolButton5: TToolButton 1869 object ToolButton5: TToolButton
1873 Left = 842 1870 Left = 548
1874 Height = 39 1871 Height = 22
1875 Top = 0 1872 Top = 0
1876 Caption = 'ToolButton5' 1873 Caption = 'ToolButton5'
1877 Style = tbsDivider 1874 Style = tbsDivider
1878 end 1875 end
1879 object ToolButton10: TToolButton 1876 object ToolButton10: TToolButton
1880 Left = 697 1877 Left = 455
1881 Hint = 'Export the song as WAV or MP3' 1878 Hint = 'Export the song as WAV or MP3'
1882 Top = 0 1879 Top = 0
1883 Caption = 'Render Song' 1880 Caption = 'Render Song'
@@ -1887,8 +1884,8 @@ object frmTracker: TfrmTracker
1887 end 1884 end
1888 object MainMenu1: TMainMenu 1885 object MainMenu1: TMainMenu
1889 Images = ImageList1 1886 Images = ImageList1
1890 Left = 70 1887 Left = 40
1891 Top = 56 1888 Top = 32
1892 object MenuItem1: TMenuItem 1889 object MenuItem1: TMenuItem
1893 Caption = 'File' 1890 Caption = 'File'
1894 object MenuItem33: TMenuItem 1891 object MenuItem33: TMenuItem
@@ -1915,6 +1912,29 @@ object frmTracker: TfrmTracker
1915 object MenuItem35: TMenuItem 1912 object MenuItem35: TMenuItem
1916 Caption = '-' 1913 Caption = '-'
1917 end 1914 end
1915 object MenuItem54: TMenuItem
1916 Caption = 'Export .GB ROM ...'
1917 OnClick = ExportGBButtonClick
1918 end
1919 object MenuItem44: TMenuItem
1920 Caption = 'Export .GBS soundtrack ...'
1921 OnClick = ExportGBSButtonClick
1922 end
1923 object ExportRGBDSMenuItem: TMenuItem
1924 Caption = 'Export RGBDS .obj ...'
1925 OnClick = ExportRGBDSMenuItemClick
1926 end
1927 object ExportGBDKMenuItem: TMenuItem
1928 Caption = 'Export GBDK .o ...'
1929 OnClick = ExportGBDKMenuItemClick
1930 end
1931 object ExportCMenuItem: TMenuItem
1932 Caption = 'Export GBDK .c ...'
1933 OnClick = ExportCMenuItemClick
1934 end
1935 object MenuItem43: TMenuItem
1936 Caption = '-'
1937 end
1918 object MenuItem14: TMenuItem 1938 object MenuItem14: TMenuItem
1919 Caption = 'E&xit' 1939 Caption = 'E&xit'
1920 Hint = 'Exit' 1940 Hint = 'Exit'
@@ -2003,8 +2023,8 @@ object frmTracker: TfrmTracker
2003 end 2023 end
2004 object MenuBarActionList: TActionList 2024 object MenuBarActionList: TActionList
2005 Images = ImageList1 2025 Images = ImageList1
2006 Left = 182 2026 Left = 104
2007 Top = 126 2027 Top = 72
2008 object FileOpen1: TFileOpen 2028 object FileOpen1: TFileOpen
2009 Category = 'File' 2029 Category = 'File'
2010 Caption = '&Open ...' 2030 Caption = '&Open ...'
@@ -2107,8 +2127,8 @@ object frmTracker: TfrmTracker
2107 end 2127 end
2108 end 2128 end
2109 object ImageList1: TImageList 2129 object ImageList1: TImageList
2110 Left = 247 2130 Left = 152
2111 Top = 63 2131 Top = 32
2112 Bitmap = { 2132 Bitmap = {
2113 4C694E0000001000000010000000000000000000000000000000000000000000 2133 4C694E0000001000000010000000000000000000000000000000000000000000
2114 0000000000000000000000000000000000000000000000000000000000000000 2134 0000000000000000000000000000000000000000000000000000000000000000
@@ -4611,17 +4631,17 @@ object frmTracker: TfrmTracker
4611 end 4631 end
4612 object OpenDialog1: TOpenDialog 4632 object OpenDialog1: TOpenDialog
4613 Filter = 'hUGETracker Instruments|*.ugi' 4633 Filter = 'hUGETracker Instruments|*.ugi'
4614 Left = 140 4634 Left = 80
4615 Top = 98 4635 Top = 56
4616 end 4636 end
4617 object InstrumentSaveDialog: TSaveDialog 4637 object InstrumentSaveDialog: TSaveDialog
4618 Filter = 'hUGETracker Instruments|*.ugi' 4638 Filter = 'hUGETracker Instruments|*.ugi'
4619 Left = 140 4639 Left = 80
4620 Top = 98 4640 Top = 56
4621 end 4641 end
4622 object OrderEditPopup: TPopupMenu 4642 object OrderEditPopup: TPopupMenu
4623 Left = 504 4643 Left = 128
4624 Top = 56 4644 Top = 40
4625 object MenuItem17: TMenuItem 4645 object MenuItem17: TMenuItem
4626 Caption = 'Insert new row' 4646 Caption = 'Insert new row'
4627 Hint = 'Insert a new row filled with brand new patterns' 4647 Hint = 'Insert a new row filled with brand new patterns'
@@ -4652,8 +4672,8 @@ object frmTracker: TfrmTracker
4652 object ImageList2: TImageList 4672 object ImageList2: TImageList
4653 Height = 32 4673 Height = 32
4654 Width = 32 4674 Width = 32
4655 Left = 84 4675 Left = 48
4656 Top = 151 4676 Top = 86
4657 Bitmap = { 4677 Bitmap = {
4658 4C69020000002000000020000000000000000000000000000000000000000000 4678 4C69020000002000000020000000000000000000000000000000000000000000
4659 0000000000000000000000000000000000000000000000000000000000000000 4679 0000000000000000000000000000000000000000000000000000000000000000
@@ -4918,33 +4938,33 @@ object frmTracker: TfrmTracker
4918 Enabled = False 4938 Enabled = False
4919 Interval = 200 4939 Interval = 200
4920 OnTimer = OscilloscopeUpdateTimerTimer 4940 OnTimer = OscilloscopeUpdateTimerTimer
4921 Left = 154 4941 Left = 88
4922 Top = 84 4942 Top = 48
4923 end 4943 end
4924 object GBSSaveDialog: TSaveDialog 4944 object GBSSaveDialog: TSaveDialog
4925 Filter = 'Gameboy Soundtrack|*.gbs' 4945 Filter = 'Gameboy Soundtrack|*.gbs'
4926 Left = 112 4946 Left = 288
4927 Top = 98 4947 Top = 24
4928 end 4948 end
4929 object WaveSaveDialog: TSaveDialog 4949 object WaveSaveDialog: TSaveDialog
4930 Filter = 'hUGETracker Waves|*.ugw' 4950 Filter = 'hUGETracker Waves|*.ugw'
4931 Left = 112 4951 Left = 368
4932 Top = 84 4952 Top = 24
4933 end 4953 end
4934 object GBSaveDialog: TSaveDialog 4954 object GBSaveDialog: TSaveDialog
4935 Filter = 'Gameboy ROM|*.GB' 4955 Filter = 'Gameboy ROM|*.GB'
4936 Left = 210 4956 Left = 328
4937 Top = 154 4957 Top = 24
4938 end 4958 end
4939 object NoteHaltTimer: TTimer 4959 object NoteHaltTimer: TTimer
4940 Enabled = False 4960 Enabled = False
4941 OnTimer = NoteHaltTimerTimer 4961 OnTimer = NoteHaltTimerTimer
4942 Left = 140 4962 Left = 80
4943 Top = 151 4963 Top = 86
4944 end 4964 end
4945 object TrackerGridPopup: TPopupMenu 4965 object TrackerGridPopup: TPopupMenu
4946 Left = 434 4966 Left = 96
4947 Top = 56 4967 Top = 24
4948 object TrackerPopupEditEffect: TMenuItem 4968 object TrackerPopupEditEffect: TMenuItem
4949 Caption = 'Edit effect ...' 4969 Caption = 'Edit effect ...'
4950 OnClick = TrackerPopupEditEffectClick 4970 OnClick = TrackerPopupEditEffectClick
@@ -5091,8 +5111,8 @@ object frmTracker: TfrmTracker
5091 object WavSaveDialog: TSaveDialog 5111 object WavSaveDialog: TSaveDialog
5092 DefaultExt = '.wav' 5112 DefaultExt = '.wav'
5093 Filter = 'Wave files|*.wav' 5113 Filter = 'Wave files|*.wav'
5094 Left = 126 5114 Left = 408
5095 Top = 56 5115 Top = 24
5096 end 5116 end
5097 object SynAnySyn1: TSynAnySyn 5117 object SynAnySyn1: TSynAnySyn
5098 Enabled = False 5118 Enabled = False
@@ -5216,18 +5236,18 @@ object frmTracker: TfrmTracker
5216 Entity = False 5236 Entity = False
5217 DollarVariables = False 5237 DollarVariables = False
5218 ActiveDot = False 5238 ActiveDot = False
5219 Left = 14 5239 Left = 8
5220 Top = 151 5240 Top = 86
5221 end 5241 end
5222 object MODOpenDialog: TOpenDialog 5242 object MODOpenDialog: TOpenDialog
5223 DefaultExt = '.mod' 5243 DefaultExt = '.mod'
5224 Filter = 'GBT Player MOD files|*.mod' 5244 Filter = 'GBT Player MOD files|*.mod'
5225 Left = 182 5245 Left = 448
5226 Top = 56 5246 Top = 32
5227 end 5247 end
5228 object WaveEditPopup: TPopupMenu 5248 object WaveEditPopup: TPopupMenu
5229 Left = 14 5249 Left = 8
5230 Top = 56 5250 Top = 32
5231 object MenuItem37: TMenuItem 5251 object MenuItem37: TMenuItem
5232 Caption = 'Copy' 5252 Caption = 'Copy'
5233 OnClick = MenuItem37Click 5253 OnClick = MenuItem37Click
@@ -5239,8 +5259,8 @@ object frmTracker: TfrmTracker
5239 end 5259 end
5240 object ShortcutsActionList: TActionList 5260 object ShortcutsActionList: TActionList
5241 Images = ImageList1 5261 Images = ImageList1
5242 Left = 364 5262 Left = 208
5243 Top = 56 5263 Top = 32
5244 object PlayStartAction: TAction 5264 object PlayStartAction: TAction
5245 Caption = '▶️ Start' 5265 Caption = '▶️ Start'
5246 DisableIfNoHandler = False 5266 DisableIfNoHandler = False
@@ -5353,4 +5373,9 @@ object frmTracker: TfrmTracker
5353 ShortCut = 8381 5373 ShortCut = 8381
5354 end 5374 end
5355 end 5375 end
5376 object GBDKCSaveDialog: TSaveDialog
5377 Filter = 'GBDK C File|*.c'
5378 Left = 248
5379 Top = 24
5380 end
5356 end 5381 end
Modifiedtracker.pas +27−0
@@ -29,8 +29,15 @@ type
29 InsertRowForAllAction: TAction; 29 InsertRowForAllAction: TAction;
30 InsertRowAction: TAction; 30 InsertRowAction: TAction;
31 MenuItem39: TMenuItem; 31 MenuItem39: TMenuItem;
32 ExportCMenuItem: TMenuItem;
33 ExportGBDKMenuItem: TMenuItem;
34 ExportRGBDSMenuItem: TMenuItem;
35 MenuItem43: TMenuItem;
36 MenuItem44: TMenuItem;
37 MenuItem54: TMenuItem;
32 NoiseMacroPaintbox: TPaintBox; 38 NoiseMacroPaintbox: TPaintBox;
33 Panel6: TPanel; 39 Panel6: TPanel;
40 GBDKCSaveDialog: TSaveDialog;
34 StopAction: TAction; 41 StopAction: TAction;
35 PlayOrderAction: TAction; 42 PlayOrderAction: TAction;
36 PlayCursorAction: TAction; 43 PlayCursorAction: TAction;
@@ -247,6 +254,9 @@ type
247 procedure DeleteRowForAllActionExecute(Sender: TObject); 254 procedure DeleteRowForAllActionExecute(Sender: TObject);
248 procedure DeleteRowForAllActionUpdate(Sender: TObject); 255 procedure DeleteRowForAllActionUpdate(Sender: TObject);
249 procedure Duty1VisualizerClick(Sender: TObject); 256 procedure Duty1VisualizerClick(Sender: TObject);
257 procedure ExportCMenuItemClick(Sender: TObject);
258 procedure ExportGBDKMenuItemClick(Sender: TObject);
259 procedure ExportRGBDSMenuItemClick(Sender: TObject);
250 procedure FileSaveAs1BeforeExecute(Sender: TObject); 260 procedure FileSaveAs1BeforeExecute(Sender: TObject);
251 procedure FormCloseQuery(Sender: TObject; var CanClose: boolean); 261 procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
252 procedure FormDropFiles(Sender: TObject; const FileNames: array of String); 262 procedure FormDropFiles(Sender: TObject; const FileNames: array of String);
@@ -1852,6 +1862,23 @@ begin
1852 snd[Section.OriginalIndex].ChannelOFF := Section.ImageIndex = 0; 1862 snd[Section.OriginalIndex].ChannelOFF := Section.ImageIndex = 0;
1853 end; 1863 end;
1854 1864
1865 procedure TfrmTracker.ExportCMenuItemClick(Sender: TObject);
1866 begin
1867 if GBDKCSaveDialog.Execute then begin
1868 RenderSongToGBDKC(Song, GBDKCSaveDialog.FileName);
1869 end;
1870 end;
1871
1872 procedure TfrmTracker.ExportGBDKMenuItemClick(Sender: TObject);
1873 begin
1874 //
1875 end;
1876
1877 procedure TfrmTracker.ExportRGBDSMenuItemClick(Sender: TObject);
1878 begin
1879 //
1880 end;
1881
1855 procedure TfrmTracker.PasteActionExecute(Sender: TObject); 1882 procedure TfrmTracker.PasteActionExecute(Sender: TObject);
1856 begin 1883 begin
1857 PostMessage(Screen.ActiveControl.Handle, LM_PASTE, 0, 0); 1884 PostMessage(Screen.ActiveControl.Handle, LM_PASTE, 0, 0);