Skip to content

Commit

Permalink
load existing songs
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperDisk committed Dec 31, 2024
1 parent 2cc0748 commit e85f47c
Show file tree
Hide file tree
Showing 3 changed files with 254 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/hUGEDriver
16 changes: 11 additions & 5 deletions src/song.pas
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ ESongVersionException = class(Exception);
Comment: ShortString;

Instruments: TInstrumentCollectionV1;
Waves: TWaveBank;
Waves: TWaveBankV2;

TicksPerRow: Integer;

Expand All @@ -72,7 +72,7 @@ ESongVersionException = class(Exception);
Comment: ShortString;

Instruments: TInstrumentCollectionV2;
Waves: TWaveBank;
Waves: TWaveBankV2;

TicksPerRow: Integer;

Expand All @@ -92,7 +92,7 @@ ESongVersionException = class(Exception);
Comment: ShortString;

Instruments: TInstrumentCollection;
Waves: TWaveBank;
Waves: TWaveBankV2;

TicksPerRow: Integer;

Expand All @@ -113,7 +113,7 @@ ESongVersionException = class(Exception);
Comment: ShortString;

Instruments: TInstrumentCollection;
Waves: TWaveBank;
Waves: TWaveBankV3;

TicksPerRow: packed array[0..3] of Integer;

Expand Down Expand Up @@ -889,6 +889,7 @@ function UpgradeSong(S: TSongV4): TSong;
function UpgradeSong(S: TSongV6): TSong;
var
SV7: TSongV7;
I, J: Integer;
begin
SV7.Version := 7;

Expand All @@ -897,7 +898,12 @@ function UpgradeSong(S: TSongV6): TSong;
SV7.Comment := S.Comment;

SV7.Instruments := S.Instruments;
SV7.Waves := S.Waves;
for I := Low(S.Waves) to High(S.Waves) do
SV7.Waves[I] := S.Waves[I];

for I := Length(S.Waves) to High(SV7.Waves) do
for J := Low(SV7.Waves[I]) to High(SV7.Waves[I]) do
SV7.Waves[I, J] := Random($F);

SV7.TicksPerRow[0] := S.TicksPerRow;
SV7.TicksPerRow[1] := S.TicksPerRow;
Expand Down
246 changes: 242 additions & 4 deletions src/tracker.lfm
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ object frmTracker: TfrmTracker
Height = 598
Top = 0
Width = 936
ActivePage = WavesTabSheet
ActivePage = InstrumentTabSheet
Align = alClient
ParentFont = False
TabIndex = 3
TabIndex = 2
TabOrder = 0
object GeneralTabSheet: TTabSheet
Caption = 'General'
Expand Down Expand Up @@ -936,7 +936,6 @@ object frmTracker: TfrmTracker
Top = 40
Width = 176
ItemHeight = 0
ItemIndex = 0
Items.Strings = (
'Wave #0'
'Wave #1'
Expand All @@ -954,11 +953,250 @@ object frmTracker: TfrmTracker
'Wave #13'
'Wave #14'
'Wave #15'
'Wave #16'
'Wave #17'
'Wave #18'
'Wave #19'
'Wave #20'
'Wave #21'
'Wave #22'
'Wave #23'
'Wave #24'
'Wave #25'
'Wave #26'
'Wave #27'
'Wave #28'
'Wave #29'
'Wave #30'
'Wave #31'
'Wave #32'
'Wave #33'
'Wave #34'
'Wave #35'
'Wave #36'
'Wave #37'
'Wave #38'
'Wave #39'
'Wave #40'
'Wave #41'
'Wave #42'
'Wave #43'
'Wave #44'
'Wave #45'
'Wave #46'
'Wave #47'
'Wave #48'
'Wave #49'
'Wave #50'
'Wave #51'
'Wave #52'
'Wave #53'
'Wave #54'
'Wave #55'
'Wave #56'
'Wave #57'
'Wave #58'
'Wave #59'
'Wave #60'
'Wave #61'
'Wave #62'
'Wave #63'
'Wave #64'
'Wave #65'
'Wave #66'
'Wave #67'
'Wave #68'
'Wave #69'
'Wave #70'
'Wave #71'
'Wave #72'
'Wave #73'
'Wave #74'
'Wave #75'
'Wave #76'
'Wave #77'
'Wave #78'
'Wave #79'
'Wave #80'
'Wave #81'
'Wave #82'
'Wave #83'
'Wave #84'
'Wave #85'
'Wave #86'
'Wave #87'
'Wave #88'
'Wave #89'
'Wave #90'
'Wave #91'
'Wave #92'
'Wave #93'
'Wave #94'
'Wave #95'
'Wave #96'
'Wave #97'
'Wave #98'
'Wave #99'
'Wave #100'
'Wave #101'
'Wave #102'
'Wave #103'
'Wave #104'
'Wave #105'
'Wave #106'
'Wave #107'
'Wave #108'
'Wave #109'
'Wave #110'
'Wave #111'
'Wave #112'
'Wave #113'
'Wave #114'
'Wave #115'
'Wave #116'
'Wave #117'
'Wave #118'
'Wave #119'
'Wave #120'
'Wave #121'
'Wave #122'
'Wave #123'
'Wave #124'
'Wave #125'
'Wave #126'
'Wave #127'
'Wave #128'
'Wave #129'
'Wave #130'
'Wave #131'
'Wave #132'
'Wave #133'
'Wave #134'
'Wave #135'
'Wave #136'
'Wave #137'
'Wave #138'
'Wave #139'
'Wave #140'
'Wave #141'
'Wave #142'
'Wave #143'
'Wave #144'
'Wave #145'
'Wave #146'
'Wave #147'
'Wave #148'
'Wave #149'
'Wave #150'
'Wave #151'
'Wave #152'
'Wave #153'
'Wave #154'
'Wave #155'
'Wave #156'
'Wave #157'
'Wave #158'
'Wave #159'
'Wave #160'
'Wave #161'
'Wave #162'
'Wave #163'
'Wave #164'
'Wave #165'
'Wave #166'
'Wave #167'
'Wave #168'
'Wave #169'
'Wave #170'
'Wave #171'
'Wave #172'
'Wave #173'
'Wave #174'
'Wave #175'
'Wave #176'
'Wave #177'
'Wave #178'
'Wave #179'
'Wave #180'
'Wave #181'
'Wave #182'
'Wave #183'
'Wave #184'
'Wave #185'
'Wave #186'
'Wave #187'
'Wave #188'
'Wave #189'
'Wave #190'
'Wave #191'
'Wave #192'
'Wave #193'
'Wave #194'
'Wave #195'
'Wave #196'
'Wave #197'
'Wave #198'
'Wave #199'
'Wave #200'
'Wave #201'
'Wave #202'
'Wave #203'
'Wave #204'
'Wave #205'
'Wave #206'
'Wave #207'
'Wave #208'
'Wave #209'
'Wave #210'
'Wave #211'
'Wave #212'
'Wave #213'
'Wave #214'
'Wave #215'
'Wave #216'
'Wave #217'
'Wave #218'
'Wave #219'
'Wave #220'
'Wave #221'
'Wave #222'
'Wave #223'
'Wave #224'
'Wave #225'
'Wave #226'
'Wave #227'
'Wave #228'
'Wave #229'
'Wave #230'
'Wave #231'
'Wave #232'
'Wave #233'
'Wave #234'
'Wave #235'
'Wave #236'
'Wave #237'
'Wave #238'
'Wave #239'
'Wave #240'
'Wave #241'
'Wave #242'
'Wave #243'
'Wave #244'
'Wave #245'
'Wave #246'
'Wave #247'
'Wave #248'
'Wave #249'
'Wave #250'
'Wave #251'
'Wave #252'
'Wave #253'
'Wave #254'
'Wave #255'
)
ParentFont = False
Style = csDropDownList
TabOrder = 0
Text = 'Wave #0'
OnChange = WaveformComboboxChange
end
object Panel4: TPanel
Expand Down

0 comments on commit e85f47c

Please sign in to comment.