Commit a2e73c7

Nick Faro committed on
Convert noise macros to subpatterns on import
commit a2e73c72844bd1a4a4186fe2d9a43200c6926fc3 parent 6065fa1
2 changed files +18−1
ModifiedhUGEDriver +1−1
@@ -1 +1 @@
1 Subproject commit 3de1a849a85595b1c8890b52cf929bf1b78e5492 1 Subproject commit dd94884c56f51159eba1da8da06dc8f252bdf50d
Modifiedsong.pas +17−0
@@ -745,6 +745,19 @@ var
745 Result^[J].Volume := 0; 745 Result^[J].Volume := 0;
746 end; 746 end;
747 end; 747 end;
748
749 function ConvertNoiseMacro(NoiseMacro: TNoiseMacro): TPattern;
750 var
751 J: Integer;
752 WrapPoint: Integer;
753 begin
754 BlankPattern(@Result);
755 for J := Low(NoiseMacro) to High(NoiseMacro) do
756 Result[J+1].Note := NoiseMacro[J] + 36;
757
758 WrapPoint := Min(S.TicksPerRow, 7);
759 Result[WrapPoint-1].Volume := WrapPoint; // hold on last row
760 end;
748 begin 761 begin
749 SV6.Version:=6; 762 SV6.Version:=6;
750 763
@@ -771,6 +784,10 @@ begin
771 BlankPattern(@SV6.Instruments.All[I].Subpattern); 784 BlankPattern(@SV6.Instruments.All[I].Subpattern);
772 end; 785 end;
773 // TODO: Port over noise macro 786 // TODO: Port over noise macro
787 for I := Low(S.Instruments.Noise) to High(S.Instruments.Noise) do begin
788 SV6.Instruments.Noise[I].Subpattern := ConvertNoiseMacro(S.Instruments.Noise[I].NoiseMacro);
789 SV6.Instruments.Noise[I].SubpatternEnabled := True;
790 end;
774 791
775 SV6.Waves := S.Waves; 792 SV6.Waves := S.Waves;
776 793