Skip to content

Commit

Permalink
TAG752 2024/12/7 3rd
Browse files Browse the repository at this point in the history
  Core:PartCounter:.gwi:memo欄追加
  • Loading branch information
kumatan committed Dec 7, 2024
1 parent a7a1bcf commit b49506a
Show file tree
Hide file tree
Showing 8 changed files with 87 additions and 30 deletions.
3 changes: 3 additions & 0 deletions mml2vgm/CHANGE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
�X�V����
TAG752 2024/12/7 3rd
Core:PartCounter:.gwi:memo���lj�

TAG751 2024/12/7 2nd
Core:OPN�n(OPNA2����):yDT,yML,yyDT,yyML,yKS,yAR,yyKS,yyAR,yAM,yDR,yyAM,yyDR,ySL,yRR,yySL,yyRR�R�}���h�lj�

Expand Down
36 changes: 36 additions & 0 deletions mml2vgm/Corex64/MMLAnalyze.cs
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,10 @@ private void Commander(partWork pw, partPage page, char cmd)
log.Write("lylic");
CmdLyric(pw, page, mml);
break;
case '\'':
log.Write("memo");
CmdMemo(pw, page, mml);
break;
case '_':
log.Write("bend / Portament one shot");
CmdBend(pw, page, mml);
Expand Down Expand Up @@ -4093,6 +4097,38 @@ private void CmdLyric(partWork pw, partPage page, MML mml)
mml.args.Add(length);
}

private void CmdMemo(partWork pw, partPage page, MML mml)
{
pw.incPos(page);
mml.type = enmMMLType.Lyric;
mml.args = new List<object>();
string str = "";
while (true)
{
char ch = pw.getChar(page);
if (ch == '\'')
{
pw.incPos(page);
break;
}
if (ch == '\\')
{
pw.incPos(page);
if (ch != '\'')
{
str += '\\';
}
ch = pw.getChar(page);
}
if (ch == '\0') break;

str += ch;
pw.incPos(page);
}
mml.args.Add(str);

}

private void CmdBend(partWork pw, partPage page, MML mml)
{
pw.incPos(page);
Expand Down
31 changes: 17 additions & 14 deletions mml2vgm/Corex64/chips/clsChip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2218,23 +2218,26 @@ protected virtual void SetTieBend(partPage page, MML mml)

public virtual void CmdLyric(partPage page, MML mml)
{
string str = (string)mml.args[0];
int ml = (int)mml.args[1];

if (ml < 1)
if (mml.args.Count > 1)
{
msgBox.setErrMsg(msg.get("E10013")
, mml.line.Lp);
ml = (int)page.length;
}
string str = (string)mml.args[0];
int ml = (int)mml.args[1];

str = string.Format("[{0}]{1}", parent.dSample.ToString(), str);
parent.lyric += str;
//WaitClockの決定
page.waitCounter = ml;
page.tie = false;
if (ml < 1)
{
msgBox.setErrMsg(msg.get("E10013")
, mml.line.Lp);
ml = (int)page.length;
}

page.clockCounter += page.waitCounter;
str = string.Format("[{0}]{1}", parent.dSample.ToString(), str);
parent.lyric += str;
//WaitClockの決定
page.waitCounter = ml;
page.tie = false;

page.clockCounter += page.waitCounter;
}
SetDummyData(page, mml);
}

Expand Down
32 changes: 16 additions & 16 deletions mml2vgm/makeZip.bat
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ del /Q .\output\mml2vgmx64\*.*
del /Q .\output\mml2vgmx64\fnum\*.*
del /Q .\output\mml2vgmx64\lang\*.*

rem mml2vgm(簡易UI版)のコピー
xcopy .\mml2vgm\bin\Release\*.* .\output\mml2vgm /E /R /Y /I /K
rem rem mml2vgm(簡易UI版)のコピー
rem xcopy .\mml2vgm\bin\Release\*.* .\output\mml2vgm /E /R /Y /I /K
rem mml2vgmx64(簡易UI版)のコピー
xcopy .\mml2vgmx64\bin\Release\net8.0-windows\*.* .\output\mml2vgmx64 /E /R /Y /I /K
rem mvc(コマンドライン版)のコピー
xcopy .\mvc\bin\Release\*.* .\output\mml2vgm /E /R /Y /I /K
rem rem mvc(コマンドライン版)のコピー
rem xcopy .\mvc\bin\Release\*.* .\output\mml2vgm /E /R /Y /I /K
rem mvcx64(コマンドライン版)のコピー
xcopy .\mvc\bin\Release\net8.0\*.* .\output\mml2vgmx64 /E /R /Y /I /K
rem サンプルファイルのコピー
xcopy .\mml2vgm\sample\*.* .\output\mml2vgm\sample /E /R /Y /I /K
rem mml2vgmIDEのコピー
xcopy .\mml2vgmIDE\bin\Release\*.* .\output\mml2vgmIDE /E /R /Y /I /K
xcopy .\mml2vgm\sample\*.* .\output\mml2vgmx64\sample /E /R /Y /I /K
rem rem mml2vgmIDEのコピー
rem xcopy .\mml2vgmIDE\bin\Release\*.* .\output\mml2vgmIDE /E /R /Y /I /K
rem mml2vgmIDEx64のコピー
xcopy .\mml2vgmIDEx64\bin\x64\Release\net8.0-windows7.0\*.* .\output\mml2vgmIDEx64 /E /R /Y /I /K

Expand All @@ -26,7 +26,7 @@ copy /Y .\IDE.txt .\output
copy /Y .\Script.txt .\output
copy /Y .\..\LICENSE.txt .\output
copy /Y .\..\mml2vgm_MMLCommandMemo.txt .\output
copy /Y .\..\mml2vgm_MMLCommandMemo.txt .\output\mml2vgmIDE
rem copy /Y .\..\mml2vgm_MMLCommandMemo.txt .\output\mml2vgmIDE
copy /Y .\..\mml2vgm_MMLCommandMemo.txt .\output\mml2vgmIDEx64
copy /Y .\..\mmlCommandTable.md .\output
copy /Y .\..\README.md .\output
Expand All @@ -39,18 +39,18 @@ copy /Y .\..\..\mucomDotNET\MML.txt .\output\OtherDocuments
copy /Y .\..\m98コマンド・リファレンス.pdf .\output\OtherDocuments

rem del /Q .\output\mml2vgm\*.config
del /Q .\output\mml2vgm\*.pdb
del /Q .\output\mml2vgm\*.wav
rem del /Q .\output\mml2vgm\*.pdb
rem del /Q .\output\mml2vgm\*.wav
del /Q .\output\mml2vgmx64\*.pdb
del /Q .\output\mml2vgmx64\*.wav

rem del /Q .\output\mml2vgmIDE\*.config
del /Q .\output\mml2vgmIDE\*.pdb
del /Q .\output\mml2vgmIDE\scci.dll
del /Q .\output\mml2vgmIDE\scciconfig.exe
del /Q .\output\mml2vgmIDE\*.wav
rem rem del /Q .\output\mml2vgmIDE\*.config
rem del /Q .\output\mml2vgmIDE\*.pdb
rem del /Q .\output\mml2vgmIDE\scci.dll
rem del /Q .\output\mml2vgmIDE\scciconfig.exe
rem del /Q .\output\mml2vgmIDE\*.wav

rem del /Q .\output\mml2vgmIDE\*.config
rem rem del /Q .\output\mml2vgmIDE\*.config
del /Q .\output\mml2vgmIDEx64\*.pdb
del /Q .\output\mml2vgmIDEx64\scci.dll
del /Q .\output\mml2vgmIDEx64\scciconfig.exe
Expand Down
2 changes: 2 additions & 0 deletions mml2vgm/mml2vgmIDE/MMLParameter/Instrument.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public abstract class Instrument
public string[] lfoSw;
public string[] lfo;
public string[] hlfo;
public string[] memo;
public int?[] detune;
public int?[] keyShift;
public int?[] keyOnMeter;
Expand Down Expand Up @@ -62,6 +63,7 @@ public Instrument(int n, SoundManager.Chip chip, Setting setting,MIDIKbd midiKbd
lfoSw = new string[n];
lfo = new string[n];
hlfo = new string[n];
memo = new string[n];
detune = new int?[n];
keyShift = new int?[n];
keyOnMeter = new int?[n];
Expand Down
1 change: 1 addition & 0 deletions mml2vgm/mml2vgmIDE/form/FrmPartCounter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ private void Timer_Tick(object sender, EventArgs e)
dgvPartCounter.Rows[p].Cells["ClmDetune"].Value = mmli.detune[r] == null ? "-" : mmli.detune[r].ToString();
dgvPartCounter.Rows[p].Cells["ClmKeyShift"].Value = mmli.keyShift[r] == null ? "-" : mmli.keyShift[r].ToString();
dgvPartCounter.Rows[p].Cells["ClmMIDIch"].Value = mmli.MIDIch[r] == null ? "-" : mmli.MIDIch[r].ToString();
dgvPartCounter.Rows[p].Cells["ClmMemo"].Value = mmli.memo[r] == null ? "" : mmli.memo[r].ToString();
DrawMeter(dgvPartCounter.Rows[p].Cells["ClmMeter"], mmli, r);
}

Expand Down
10 changes: 10 additions & 0 deletions mml2vgm/mml2vgmIDEx64/MMLParameter/Instrument.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public abstract class Instrument
public string[] lfoSw;
public string[] lfo;
public string[] hlfo;
public string[] memo;
public int?[] detune;
public int?[] keyShift;
public int?[] keyOnMeter;
Expand Down Expand Up @@ -62,6 +63,7 @@ public Instrument(int n, SoundManager.Chip chip, Setting setting,MIDIKbd midiKbd
lfoSw = new string[n];
lfo = new string[n];
hlfo = new string[n];
memo = new string[n];
detune = new int?[n];
keyShift = new int?[n];
keyOnMeter = new int?[n];
Expand Down Expand Up @@ -356,6 +358,14 @@ protected virtual void SetRest(outDatum od, int ch, int cc)

protected virtual void SetLyric(outDatum od, int ch, int cc)
{
if (od.args.Count > 1)
{
//通常の歌詞
return;
}

//メモ
memo[ch]=(string)od.args[0];
}

protected virtual void SetVelocity(outDatum od, int ch, int cc)
Expand Down
2 changes: 2 additions & 0 deletions mml2vgm/mml2vgmIDEx64/form/FrmPartCounter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ private void Timer_Tick(object sender, EventArgs e)
dgvPartCounter.Rows[p].Cells["ClmDetune"].Value = mmli.detune[r] == null ? "-" : mmli.detune[r].ToString();
dgvPartCounter.Rows[p].Cells["ClmKeyShift"].Value = mmli.keyShift[r] == null ? "-" : mmli.keyShift[r].ToString();
dgvPartCounter.Rows[p].Cells["ClmMIDIch"].Value = mmli.MIDIch[r] == null ? "-" : mmli.MIDIch[r].ToString();
dgvPartCounter.Rows[p].Cells["ClmMemo"].Value = mmli.memo[r] == null ? "" : mmli.memo[r].ToString();
DrawMeter(dgvPartCounter.Rows[p].Cells["ClmMeter"], mmli, r);
}

Expand Down Expand Up @@ -730,6 +731,7 @@ private dgvColumnInfo[] getDisplayIndex()
new Tuple<string,string,string,bool,DataGridViewContentAlignment>("text","ClmDetune" ,"Detune" ,true,DataGridViewContentAlignment.NotSet),
new Tuple<string,string,string,bool,DataGridViewContentAlignment>("text","ClmKeyShift" ,"Key shift" ,true,DataGridViewContentAlignment.NotSet),
new Tuple<string,string,string,bool,DataGridViewContentAlignment>("image","ClmMeter" ,"KeyOn" ,true,DataGridViewContentAlignment.NotSet),
new Tuple<string,string,string,bool,DataGridViewContentAlignment>("text","ClmMemo" ,"Memo" ,true,DataGridViewContentAlignment.NotSet),
new Tuple<string,string,string,bool,DataGridViewContentAlignment>("text","ClmSpacer" ,"" ,true,DataGridViewContentAlignment.NotSet)
};

Expand Down

0 comments on commit b49506a

Please sign in to comment.