Skip to content

Commit

Permalink
Fixed output file name for DX7II VMEM+AMEM conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
BobanSpasic committed Nov 30, 2023
1 parent bf7130c commit 816b3c4
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 73 deletions.
5 changes: 3 additions & 2 deletions MDX_PerfConv.lpr
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ TMDX_PerfConv = class(TCustomApplication)
end;
end;
end;

if HasOption('r', 'renumber') and HasOption('n', 'numbering') then
begin
fDirectory := GetOptionValue('r', 'renumber');
Expand Down Expand Up @@ -332,7 +333,7 @@ TMDX_PerfConv = class(TCustomApplication)
begin
writeln('');
writeln('');
writeln('MDX_PerfConv 1.0 - Performance converter from TX7, DX7II, DX1 and DX5 to MiniDexed');
writeln('MDX Performance Converter 1.5 - Performance converter from TX7, DX7II, DX1 and DX5 to MiniDexed');
writeln('Author: Boban Spasic');
writeln('https://github.com/BobanSpasic/MDX_PerfConv');
writeln('');
Expand Down Expand Up @@ -392,7 +393,7 @@ TMDX_PerfConv = class(TCustomApplication)

begin
Application := TMDX_PerfConv.Create(nil);
Application.Title := 'MDX_PerfConv';
Application.Title := 'MDX Performance Converter';
Application.Run;
Application.Free;
end.
105 changes: 53 additions & 52 deletions MDX_PerfConv.lps
Original file line number Diff line number Diff line change
Expand Up @@ -74,26 +74,27 @@
<Unit>
<Filename Value="MDX_PerfConv.lpr"/>
<IsPartOfProject Value="True"/>
<IsVisibleTab Value="True"/>
<TopLine Value="335"/>
<CursorPos X="56" Y="358"/>
<TopLine Value="283"/>
<CursorPos X="5" Y="303"/>
<UsageCount Value="202"/>
<Loaded Value="True"/>
</Unit>
<Unit>
<Filename Value="untDispatcher.pas"/>
<IsPartOfProject Value="True"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="4"/>
<TopLine Value="165"/>
<CursorPos X="54" Y="189"/>
<TopLine Value="36"/>
<CursorPos X="44" Y="53"/>
<UsageCount Value="202"/>
<Loaded Value="True"/>
</Unit>
<Unit>
<Filename Value="untConverter.pas"/>
<IsPartOfProject Value="True"/>
<EditorIndex Value="5"/>
<CursorPos X="58" Y="668"/>
<TopLine Value="148"/>
<CursorPos X="59" Y="164"/>
<UsageCount Value="200"/>
<Loaded Value="True"/>
</Unit>
Expand Down Expand Up @@ -126,8 +127,8 @@
<Unit>
<Filename Value="units\untTX802Performance.pas"/>
<EditorIndex Value="2"/>
<TopLine Value="171"/>
<CursorPos X="61" Y="187"/>
<TopLine Value="383"/>
<CursorPos X="3" Y="392"/>
<UsageCount Value="100"/>
<Loaded Value="True"/>
</Unit>
Expand Down Expand Up @@ -309,50 +310,6 @@
</Unit>
</Units>
<JumpHistory HistoryIndex="29">
<Position>
<Filename Value="units\untDX7IIPerformanceBank.pas"/>
<Caret Line="149" TopLine="128"/>
</Position>
<Position>
<Filename Value="units\untDX7IIPerformanceBank.pas"/>
<Caret Line="37" Column="14" TopLine="19"/>
</Position>
<Position>
<Filename Value="units\untDX7IISupplement.pas"/>
<Caret Line="149" Column="19" TopLine="123"/>
</Position>
<Position>
<Filename Value="units\untDX7IIPerformance.pas"/>
<Caret Line="96" Column="14" TopLine="73"/>
</Position>
<Position>
<Filename Value="units\untDX7IIPerformanceBank.pas"/>
<Caret Line="37" Column="21" TopLine="23"/>
</Position>
<Position>
<Filename Value="units\untDX7IIPerformanceBank.pas"/>
<Caret Line="155" Column="3" TopLine="131"/>
</Position>
<Position>
<Filename Value="units\untDX7IIPerformance.pas"/>
<Caret Line="96" Column="14" TopLine="79"/>
</Position>
<Position>
<Filename Value="untExtract.pas"/>
<Caret Line="20" Column="52" TopLine="10"/>
</Position>
<Position>
<Filename Value="untExtract.pas"/>
<Caret Line="19" Column="45" TopLine="2"/>
</Position>
<Position>
<Filename Value="untExtract.pas"/>
<Caret Line="158" Column="25" TopLine="2"/>
</Position>
<Position>
<Filename Value="untExtract.pas"/>
<Caret Line="10" Column="50"/>
</Position>
<Position>
<Filename Value="untExtract.pas"/>
<Caret Line="24" Column="52" TopLine="7"/>
Expand Down Expand Up @@ -429,6 +386,50 @@
<Filename Value="units\untUtils.pas"/>
<Caret Line="24" Column="11" TopLine="6"/>
</Position>
<Position>
<Filename Value="MDX_PerfConv.lpr"/>
<Caret Line="303" Column="5" TopLine="283"/>
</Position>
<Position>
<Filename Value="untDispatcher.pas"/>
<Caret Line="22" Column="11" TopLine="4"/>
</Position>
<Position>
<Filename Value="untConverter.pas"/>
<Caret Line="26" Column="63"/>
</Position>
<Position>
<Filename Value="untConverter.pas"/>
<Caret Line="25" Column="11" TopLine="7"/>
</Position>
<Position>
<Filename Value="untConverter.pas"/>
<Caret Line="113" Column="59" TopLine="113"/>
</Position>
<Position>
<Filename Value="untConverter.pas"/>
<Caret Line="26" Column="11" TopLine="8"/>
</Position>
<Position>
<Filename Value="untConverter.pas"/>
<Caret Line="266" Column="61" TopLine="242"/>
</Position>
<Position>
<Filename Value="untConverter.pas"/>
<Caret Line="292" Column="69" TopLine="264"/>
</Position>
<Position>
<Filename Value="untConverter.pas"/>
<Caret Line="25" Column="21"/>
</Position>
<Position>
<Filename Value="untConverter.pas"/>
<Caret Line="164" Column="59" TopLine="148"/>
</Position>
<Position>
<Filename Value="untDispatcher.pas"/>
<Caret Line="44" Column="39" TopLine="26"/>
</Position>
</JumpHistory>
<RunParams>
<FormatVersion Value="2"/>
Expand Down
2 changes: 1 addition & 1 deletion Test_files/Convert_DX7II_Yamaha_Freeware.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
..\bin\Win_x64\MDX_PerfConv.exe -c -a DX7II_Yamaha_Freeware\dx711i.syx -n 193 -v
..\bin\Win_x64\MDX_PerfConv.exe -c -a DX7II_Yamaha_Freeware\dx7wx.syx -n 225 -v
..\bin\Win_x64\MDX_PerfConv.exe -c -a DX7II_Yamaha_Freeware\dx711g.syx -n 257 -v
..\bin\Win_x64\MDX_PerfConv.exe -c -a DX7II_Yamaha_Freeware\dx711h.syx -n 261 -v
..\bin\Win_x64\MDX_PerfConv.exe -c -a DX7II_Yamaha_Freeware\dx711h.syx -n 265 -v
pause
2 changes: 1 addition & 1 deletion Test_files/Convert_DX7II_Yamaha_Freeware.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
../bin/Linux/MDX_PerfConv -c -a DX7II_Yamaha_Freeware/dx711i.syx -n 193 -v
../bin/Linux/MDX_PerfConv -c -a DX7II_Yamaha_Freeware/dx7wx.syx -n 225 -v
../bin/Linux/MDX_PerfConv -c -a DX7II_Yamaha_Freeware/dx711g.syx -n 257 -v
../bin/Linux/MDX_PerfConv -c -a DX7II_Yamaha_Freeware/dx711h.syx -n 261 -v
../bin/Linux/MDX_PerfConv -c -a DX7II_Yamaha_Freeware/dx711h.syx -n 265 -v
18 changes: 9 additions & 9 deletions units/untTX802Performance.pas
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ interface
OutputVolume7: byte; // 0-99
OutputVolume8: byte; // 0-99
Detune_KASG_Outch1: byte; // | | | | | | | |
Detune_KASG_Outch2: byte; // | Detune |KASG|OutChAssg| Yamaha manual
Detune_KASG_Outch2: byte; // | Detune |KASG|OutChAssg| not like in the Yamaha manual
Detune_KASG_Outch3: byte; //
Detune_KASG_Outch4: byte; //
Detune_KASG_Outch5: byte; //
Expand Down Expand Up @@ -293,6 +293,14 @@ function PMEMtoPCED(aPar: TTX802_PMEM_Params): TTX802_PCED_Params;
t.Detune6 := (aPar.Detune_KASG_Outch6 shr 3) and 15;
t.Detune7 := (aPar.Detune_KASG_Outch7 shr 3) and 15;
t.Detune8 := (aPar.Detune_KASG_Outch8 shr 3) and 15;
t.KeyAssignGroup1 := (aPar.Detune_KASG_Outch1 shr 2) and 1;
t.KeyAssignGroup2 := (aPar.Detune_KASG_Outch2 shr 2) and 1;
t.KeyAssignGroup3 := (aPar.Detune_KASG_Outch3 shr 2) and 1;
t.KeyAssignGroup4 := (aPar.Detune_KASG_Outch4 shr 2) and 1;
t.KeyAssignGroup5 := (aPar.Detune_KASG_Outch5 shr 2) and 1;
t.KeyAssignGroup6 := (aPar.Detune_KASG_Outch6 shr 2) and 1;
t.KeyAssignGroup7 := (aPar.Detune_KASG_Outch7 shr 2) and 1;
t.KeyAssignGroup8 := (aPar.Detune_KASG_Outch8 shr 2) and 1;
t.OutputVolume1 := aPar.OutputVolume1 and 127;
t.OutputVolume2 := aPar.OutputVolume2 and 127;
t.OutputVolume3 := aPar.OutputVolume3 and 127;
Expand Down Expand Up @@ -341,14 +349,6 @@ function PMEMtoPCED(aPar: TTX802_PMEM_Params): TTX802_PCED_Params;
t.EGForcedDamp6 := (aPar.FDAMP_NoteShift6 shr 5) and 1;
t.EGForcedDamp7 := (aPar.FDAMP_NoteShift7 shr 5) and 1;
t.EGForcedDamp8 := (aPar.FDAMP_NoteShift8 shr 5) and 1;
t.KeyAssignGroup1 := 2;
t.KeyAssignGroup2 := 2;
t.KeyAssignGroup3 := 2;
t.KeyAssignGroup4 := 2;
t.KeyAssignGroup5 := 2;
t.KeyAssignGroup6 := 2;
t.KeyAssignGroup7 := 2;
t.KeyAssignGroup8 := 2;
t.MicroTuningTable1 := aPar.MicroTuningTable1;
t.MicroTuningTable2 := aPar.MicroTuningTable2;
t.MicroTuningTable3 := aPar.MicroTuningTable3;
Expand Down
12 changes: 6 additions & 6 deletions untConverter.pas
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ interface
untDXUtils, untParConst, untUtils, untTX802Performance, untTX802PerformanceBank, IniFiles, untConvFunct;

procedure ConvertTX7toMDX(var ms: TMemoryStream; APath: string; ANumber: integer; AVerbose: boolean); // VMEM + PMEM 1-32
procedure ConvertDX7IItoMDX(var ms: TMemoryStream; APath: string; ANumber: integer; AVerbose: boolean; ASettings: string); // VMEM + AMEM 1-32
procedure ConvertMultiDX7IItoMDX(var ms: TMemoryStream; APath: string; ANumber: integer; AVerbose: boolean; ASettings: string); // multiple VMEM + AMEM 1-32
procedure ConvertDX7IItoMDX(var ms: TMemoryStream; AName, APath: string; ANumber: integer; AVerbose: boolean; ASettings: string); // VMEM + AMEM 1-32
procedure ConvertMultiDX7IItoMDX(var ms: TMemoryStream; AName, APath: string; ANumber: integer; AVerbose: boolean; ASettings: string); // multiple VMEM + AMEM 1-32
procedure ConvertDX5toMDX(var ms: TMemoryStream; APath: string; ANumber: integer; AVerbose: boolean); // 4xVMEM, PMEM
procedure ConvertTX802ToMDX(var ms: TMemoryStream; APath: string; ANumber: integer; AVerbose: boolean; ASettings: string); // 4xVMEM, 4xAMEM, 2xPMEM
procedure ConvertBigDX7IItoMDX(var ms: TMemoryStream; APath: string; ANumber: integer; AVerbose: boolean; ASettings: string); // 2xVMEM, 2xAMEM, 1xPMEM
Expand Down Expand Up @@ -110,7 +110,7 @@ procedure ConvertTX7toMDX(var ms: TMemoryStream; APath: string; ANumber: integer
MDX.Free;
end;

procedure ConvertDX7IItoMDX(var ms: TMemoryStream; APath: string; ANumber: integer; AVerbose: boolean; ASettings: string);
procedure ConvertDX7IItoMDX(var ms: TMemoryStream; AName, APath: string; ANumber: integer; AVerbose: boolean; ASettings: string);
var
DX7: TDX7BankContainer;
DX7II: TDX7IISupplBankContainer;
Expand Down Expand Up @@ -161,7 +161,7 @@ procedure ConvertDX7IItoMDX(var ms: TMemoryStream; APath: string; ANumber: integ
MDX.FMDX_Params.General.Origin := 'Conversion from DX7II Voices';

sName := Format('%.6d', [i + ANumber + 1]) + '_' +
Trim(ExtractFileNameWithoutExt(ExtractFileName(APath)));
Trim(ExtractFileNameWithoutExt(ExtractFileName(AName)));
sName := copy(sName, 1, 19) + '_' + IntToStr(i);

for j := 1 to 8 do
Expand Down Expand Up @@ -201,7 +201,7 @@ procedure ConvertDX7IItoMDX(var ms: TMemoryStream; APath: string; ANumber: integ
MDX.Free;
end;

procedure ConvertMultiDX7IItoMDX(var ms: TMemoryStream; APath: string; ANumber: integer; AVerbose: boolean; ASettings: string);
procedure ConvertMultiDX7IItoMDX(var ms: TMemoryStream; AName, APath: string; ANumber: integer; AVerbose: boolean; ASettings: string);
var
DX7: TDX7BankContainer;
DX7II: TDX7IISupplBankContainer;
Expand Down Expand Up @@ -263,7 +263,7 @@ procedure ConvertMultiDX7IItoMDX(var ms: TMemoryStream; APath: string; ANumber:
MDX.FMDX_Params.General.Origin := 'Conversion from DX7II Voices';

sName := Format('%.6d', [i + ANumber + bank_counter + 1]) + '_' +
Trim(ExtractFileNameWithoutExt(ExtractFileName(APath)));
Trim(ExtractFileNameWithoutExt(ExtractFileName(AName)));
sName := copy(sName, 1, 19) + '_' + IntToStr(i + bank_counter);

for j := 1 to 8 do
Expand Down
4 changes: 2 additions & 2 deletions untDispatcher.pas
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ procedure DispatchCheck(ABank: string; ANumber: integer; AVerbose: boolean; AOut
begin
WriteLn('It is a DX7II bank with supplement');
if AVerbose then WriteLn('Using ConvertDX7IItoMDX with one stream');
ConvertDX7IItoMDX(msBank, AOutput, ANumber, AVerbose, ASettings);
ConvertDX7IItoMDX(msBank, ABank, AOutput, ANumber, AVerbose, ASettings);
end;
end;
if (VMEM in ms) and (AMEM in ms) and (D_VMEM in ms) and (D_AMEM in ms) and not ((PMEM in ms) or (LMPMEM in ms)) then
Expand All @@ -50,7 +50,7 @@ procedure DispatchCheck(ABank: string; ANumber: integer; AVerbose: boolean; AOut
begin
WriteLn('It is a multiple DX7II bank with supplement');
if AVerbose then WriteLn('Using ConvertMultiDX7IItoMDX with one stream');
ConvertMultiDX7IItoMDX(msBank, AOutput, ANumber, AVerbose, ASettings);
ConvertMultiDX7IItoMDX(msBank, ABank, AOutput, ANumber, AVerbose, ASettings);
end;
end;
if (VMEM in ms) and (PMEM in ms) and not ((AMEM in ms) or (LMPMEM in ms)) then
Expand Down

0 comments on commit 816b3c4

Please sign in to comment.