Skip to content

Commit b49506a

Browse files
author
kumatan
committed
TAG752 2024/12/7 3rd
Core:PartCounter:.gwi:memo欄追加
1 parent a7a1bcf commit b49506a

File tree

8 files changed

+87
-30
lines changed

8 files changed

+87
-30
lines changed

mml2vgm/CHANGE.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
�X�V����
2+
TAG752 2024/12/7 3rd
3+
Core:PartCounter:.gwi:memo���lj�
4+
25
TAG751 2024/12/7 2nd
36
Core:OPN�n(OPNA2����):yDT,yML,yyDT,yyML,yKS,yAR,yyKS,yyAR,yAM,yDR,yyAM,yyDR,ySL,yRR,yySL,yyRR�R�}���h�lj�
47

mml2vgm/Corex64/MMLAnalyze.cs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,10 @@ private void Commander(partWork pw, partPage page, char cmd)
283283
log.Write("lylic");
284284
CmdLyric(pw, page, mml);
285285
break;
286+
case '\'':
287+
log.Write("memo");
288+
CmdMemo(pw, page, mml);
289+
break;
286290
case '_':
287291
log.Write("bend / Portament one shot");
288292
CmdBend(pw, page, mml);
@@ -4093,6 +4097,38 @@ private void CmdLyric(partWork pw, partPage page, MML mml)
40934097
mml.args.Add(length);
40944098
}
40954099

4100+
private void CmdMemo(partWork pw, partPage page, MML mml)
4101+
{
4102+
pw.incPos(page);
4103+
mml.type = enmMMLType.Lyric;
4104+
mml.args = new List<object>();
4105+
string str = "";
4106+
while (true)
4107+
{
4108+
char ch = pw.getChar(page);
4109+
if (ch == '\'')
4110+
{
4111+
pw.incPos(page);
4112+
break;
4113+
}
4114+
if (ch == '\\')
4115+
{
4116+
pw.incPos(page);
4117+
if (ch != '\'')
4118+
{
4119+
str += '\\';
4120+
}
4121+
ch = pw.getChar(page);
4122+
}
4123+
if (ch == '\0') break;
4124+
4125+
str += ch;
4126+
pw.incPos(page);
4127+
}
4128+
mml.args.Add(str);
4129+
4130+
}
4131+
40964132
private void CmdBend(partWork pw, partPage page, MML mml)
40974133
{
40984134
pw.incPos(page);

mml2vgm/Corex64/chips/clsChip.cs

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2218,23 +2218,26 @@ protected virtual void SetTieBend(partPage page, MML mml)
22182218

22192219
public virtual void CmdLyric(partPage page, MML mml)
22202220
{
2221-
string str = (string)mml.args[0];
2222-
int ml = (int)mml.args[1];
2223-
2224-
if (ml < 1)
2221+
if (mml.args.Count > 1)
22252222
{
2226-
msgBox.setErrMsg(msg.get("E10013")
2227-
, mml.line.Lp);
2228-
ml = (int)page.length;
2229-
}
2223+
string str = (string)mml.args[0];
2224+
int ml = (int)mml.args[1];
22302225

2231-
str = string.Format("[{0}]{1}", parent.dSample.ToString(), str);
2232-
parent.lyric += str;
2233-
//WaitClockの決定
2234-
page.waitCounter = ml;
2235-
page.tie = false;
2226+
if (ml < 1)
2227+
{
2228+
msgBox.setErrMsg(msg.get("E10013")
2229+
, mml.line.Lp);
2230+
ml = (int)page.length;
2231+
}
22362232

2237-
page.clockCounter += page.waitCounter;
2233+
str = string.Format("[{0}]{1}", parent.dSample.ToString(), str);
2234+
parent.lyric += str;
2235+
//WaitClockの決定
2236+
page.waitCounter = ml;
2237+
page.tie = false;
2238+
2239+
page.clockCounter += page.waitCounter;
2240+
}
22382241
SetDummyData(page, mml);
22392242
}
22402243

mml2vgm/makeZip.bat

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ del /Q .\output\mml2vgmx64\*.*
66
del /Q .\output\mml2vgmx64\fnum\*.*
77
del /Q .\output\mml2vgmx64\lang\*.*
88

9-
rem mml2vgm(簡易UI版)のコピー
10-
xcopy .\mml2vgm\bin\Release\*.* .\output\mml2vgm /E /R /Y /I /K
9+
rem rem mml2vgm(簡易UI版)のコピー
10+
rem xcopy .\mml2vgm\bin\Release\*.* .\output\mml2vgm /E /R /Y /I /K
1111
rem mml2vgmx64(簡易UI版)のコピー
1212
xcopy .\mml2vgmx64\bin\Release\net8.0-windows\*.* .\output\mml2vgmx64 /E /R /Y /I /K
13-
rem mvc(コマンドライン版)のコピー
14-
xcopy .\mvc\bin\Release\*.* .\output\mml2vgm /E /R /Y /I /K
13+
rem rem mvc(コマンドライン版)のコピー
14+
rem xcopy .\mvc\bin\Release\*.* .\output\mml2vgm /E /R /Y /I /K
1515
rem mvcx64(コマンドライン版)のコピー
1616
xcopy .\mvc\bin\Release\net8.0\*.* .\output\mml2vgmx64 /E /R /Y /I /K
1717
rem サンプルファイルのコピー
18-
xcopy .\mml2vgm\sample\*.* .\output\mml2vgm\sample /E /R /Y /I /K
19-
rem mml2vgmIDEのコピー
20-
xcopy .\mml2vgmIDE\bin\Release\*.* .\output\mml2vgmIDE /E /R /Y /I /K
18+
xcopy .\mml2vgm\sample\*.* .\output\mml2vgmx64\sample /E /R /Y /I /K
19+
rem rem mml2vgmIDEのコピー
20+
rem xcopy .\mml2vgmIDE\bin\Release\*.* .\output\mml2vgmIDE /E /R /Y /I /K
2121
rem mml2vgmIDEx64のコピー
2222
xcopy .\mml2vgmIDEx64\bin\x64\Release\net8.0-windows7.0\*.* .\output\mml2vgmIDEx64 /E /R /Y /I /K
2323

@@ -26,7 +26,7 @@ copy /Y .\IDE.txt .\output
2626
copy /Y .\Script.txt .\output
2727
copy /Y .\..\LICENSE.txt .\output
2828
copy /Y .\..\mml2vgm_MMLCommandMemo.txt .\output
29-
copy /Y .\..\mml2vgm_MMLCommandMemo.txt .\output\mml2vgmIDE
29+
rem copy /Y .\..\mml2vgm_MMLCommandMemo.txt .\output\mml2vgmIDE
3030
copy /Y .\..\mml2vgm_MMLCommandMemo.txt .\output\mml2vgmIDEx64
3131
copy /Y .\..\mmlCommandTable.md .\output
3232
copy /Y .\..\README.md .\output
@@ -39,18 +39,18 @@ copy /Y .\..\..\mucomDotNET\MML.txt .\output\OtherDocuments
3939
copy /Y .\..\m98コマンド・リファレンス.pdf .\output\OtherDocuments
4040

4141
rem del /Q .\output\mml2vgm\*.config
42-
del /Q .\output\mml2vgm\*.pdb
43-
del /Q .\output\mml2vgm\*.wav
42+
rem del /Q .\output\mml2vgm\*.pdb
43+
rem del /Q .\output\mml2vgm\*.wav
4444
del /Q .\output\mml2vgmx64\*.pdb
4545
del /Q .\output\mml2vgmx64\*.wav
4646

47-
rem del /Q .\output\mml2vgmIDE\*.config
48-
del /Q .\output\mml2vgmIDE\*.pdb
49-
del /Q .\output\mml2vgmIDE\scci.dll
50-
del /Q .\output\mml2vgmIDE\scciconfig.exe
51-
del /Q .\output\mml2vgmIDE\*.wav
47+
rem rem del /Q .\output\mml2vgmIDE\*.config
48+
rem del /Q .\output\mml2vgmIDE\*.pdb
49+
rem del /Q .\output\mml2vgmIDE\scci.dll
50+
rem del /Q .\output\mml2vgmIDE\scciconfig.exe
51+
rem del /Q .\output\mml2vgmIDE\*.wav
5252

53-
rem del /Q .\output\mml2vgmIDE\*.config
53+
rem rem del /Q .\output\mml2vgmIDE\*.config
5454
del /Q .\output\mml2vgmIDEx64\*.pdb
5555
del /Q .\output\mml2vgmIDEx64\scci.dll
5656
del /Q .\output\mml2vgmIDEx64\scciconfig.exe

mml2vgm/mml2vgmIDE/MMLParameter/Instrument.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public abstract class Instrument
2727
public string[] lfoSw;
2828
public string[] lfo;
2929
public string[] hlfo;
30+
public string[] memo;
3031
public int?[] detune;
3132
public int?[] keyShift;
3233
public int?[] keyOnMeter;
@@ -62,6 +63,7 @@ public Instrument(int n, SoundManager.Chip chip, Setting setting,MIDIKbd midiKbd
6263
lfoSw = new string[n];
6364
lfo = new string[n];
6465
hlfo = new string[n];
66+
memo = new string[n];
6567
detune = new int?[n];
6668
keyShift = new int?[n];
6769
keyOnMeter = new int?[n];

mml2vgm/mml2vgmIDE/form/FrmPartCounter.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,7 @@ private void Timer_Tick(object sender, EventArgs e)
419419
dgvPartCounter.Rows[p].Cells["ClmDetune"].Value = mmli.detune[r] == null ? "-" : mmli.detune[r].ToString();
420420
dgvPartCounter.Rows[p].Cells["ClmKeyShift"].Value = mmli.keyShift[r] == null ? "-" : mmli.keyShift[r].ToString();
421421
dgvPartCounter.Rows[p].Cells["ClmMIDIch"].Value = mmli.MIDIch[r] == null ? "-" : mmli.MIDIch[r].ToString();
422+
dgvPartCounter.Rows[p].Cells["ClmMemo"].Value = mmli.memo[r] == null ? "" : mmli.memo[r].ToString();
422423
DrawMeter(dgvPartCounter.Rows[p].Cells["ClmMeter"], mmli, r);
423424
}
424425

mml2vgm/mml2vgmIDEx64/MMLParameter/Instrument.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public abstract class Instrument
2727
public string[] lfoSw;
2828
public string[] lfo;
2929
public string[] hlfo;
30+
public string[] memo;
3031
public int?[] detune;
3132
public int?[] keyShift;
3233
public int?[] keyOnMeter;
@@ -62,6 +63,7 @@ public Instrument(int n, SoundManager.Chip chip, Setting setting,MIDIKbd midiKbd
6263
lfoSw = new string[n];
6364
lfo = new string[n];
6465
hlfo = new string[n];
66+
memo = new string[n];
6567
detune = new int?[n];
6668
keyShift = new int?[n];
6769
keyOnMeter = new int?[n];
@@ -356,6 +358,14 @@ protected virtual void SetRest(outDatum od, int ch, int cc)
356358

357359
protected virtual void SetLyric(outDatum od, int ch, int cc)
358360
{
361+
if (od.args.Count > 1)
362+
{
363+
//通常の歌詞
364+
return;
365+
}
366+
367+
//メモ
368+
memo[ch]=(string)od.args[0];
359369
}
360370

361371
protected virtual void SetVelocity(outDatum od, int ch, int cc)

mml2vgm/mml2vgmIDEx64/form/FrmPartCounter.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,7 @@ private void Timer_Tick(object sender, EventArgs e)
419419
dgvPartCounter.Rows[p].Cells["ClmDetune"].Value = mmli.detune[r] == null ? "-" : mmli.detune[r].ToString();
420420
dgvPartCounter.Rows[p].Cells["ClmKeyShift"].Value = mmli.keyShift[r] == null ? "-" : mmli.keyShift[r].ToString();
421421
dgvPartCounter.Rows[p].Cells["ClmMIDIch"].Value = mmli.MIDIch[r] == null ? "-" : mmli.MIDIch[r].ToString();
422+
dgvPartCounter.Rows[p].Cells["ClmMemo"].Value = mmli.memo[r] == null ? "" : mmli.memo[r].ToString();
422423
DrawMeter(dgvPartCounter.Rows[p].Cells["ClmMeter"], mmli, r);
423424
}
424425

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

0 commit comments

Comments
 (0)