@@ -47,6 +47,7 @@ var |
| 47 |
I, J: Integer; |
47 |
I, J: Integer; |
| 48 |
Pat: PPattern; |
48 |
Pat: PPattern; |
| 49 |
Cell: TCell; |
49 |
Cell: TCell; |
|
|
50 |
Instr: TInstrument; |
| 50 |
InstValue: Integer; |
51 |
InstValue: Integer; |
| 51 |
Highest: ^Integer; |
52 |
Highest: ^Integer; |
| 52 |
Waveform: Integer; |
53 |
Waveform: Integer; |
@@ -57,6 +58,17 @@ begin |
| 57 |
Result.HighestNoiseInst := -1; |
58 |
Result.HighestNoiseInst := -1; |
| 58 |
Result.HighestWaveform := -1; |
59 |
Result.HighestWaveform := -1; |
| 59 |
|
60 |
|
|
|
61 |
for Instr in Song.Instruments.Wave do begin |
|
|
62 |
if not Instr.SubpatternEnabled then Continue; |
|
|
63 |
|
|
|
64 |
for Cell in Instr.Subpattern do |
|
|
65 |
if Cell.EffectCode = $9 then begin |
|
|
66 |
Waveform := Cell.EffectParams.Value; |
|
|
67 |
if Waveform > Result.HighestWaveform then |
|
|
68 |
Result.HighestWaveform := Waveform; |
|
|
69 |
end; |
|
|
70 |
end; |
|
|
71 |
|
| 60 |
for I := Low(Song.OrderMatrix) to High(Song.OrderMatrix) do begin |
72 |
for I := Low(Song.OrderMatrix) to High(Song.OrderMatrix) do begin |
| 61 |
case I of |
73 |
case I of |
| 62 |
0, 1: Highest := @Result.HighestDutyInst; |
74 |
0, 1: Highest := @Result.HighestDutyInst; |
@@ -71,6 +83,12 @@ begin |
| 71 |
|
83 |
|
| 72 |
Pat := Song.Patterns.KeyData[Song.OrderMatrix[I, J]]; |
84 |
Pat := Song.Patterns.KeyData[Song.OrderMatrix[I, J]]; |
| 73 |
for Cell in Pat^ do begin |
85 |
for Cell in Pat^ do begin |
|
|
86 |
if (Cell.EffectCode = $9) and (I = 2) then begin // waveforms on wave channel |
|
|
87 |
Waveform := Cell.EffectParams.Value; |
|
|
88 |
if Waveform > Result.HighestWaveform then |
|
|
89 |
Result.HighestWaveform := Waveform; |
|
|
90 |
end; |
|
|
91 |
|
| 74 |
if Cell.Instrument = 0 then Continue; |
92 |
if Cell.Instrument = 0 then Continue; |
| 75 |
|
93 |
|
| 76 |
if InRange(Cell.Instrument, 0, 15) then |
94 |
if InRange(Cell.Instrument, 0, 15) then |