Skip to content

Commit 8b24b35

Browse files
author
kumatan
committed
TAG753 2024/12/8
Core:PartCounter:.gwi:PPコマンド追加。パートの表示順を指定できます。
1 parent b49506a commit 8b24b35

File tree

17 files changed

+190
-81
lines changed

17 files changed

+190
-81
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+
TAG753 2024/12/8
3+
Core:PartCounter:.gwi:PP�R�}���h�lj��B�p�[�g�̕\�������w��ł��܂��B
4+
25
TAG752 2024/12/7 3rd
36
Core:PartCounter:.gwi:memo���lj�
47

mml2vgm/Core/MDSound.dll

1.5 KB
Binary file not shown.

mml2vgm/Core/chips/clsChip.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2272,6 +2272,12 @@ public virtual void CmdPartColor(partPage page, MML mml)
22722272
//
22732273
SetDummyData(page, mml);
22742274
}
2275+
2276+
public virtual void CmdPartPriority(partPage page, MML mml)
2277+
{
2278+
//
2279+
SetDummyData(page, mml);
2280+
}
22752281

22762282
public void CheckInterrupt(partWork pw, partPage page)
22772283
{

mml2vgm/Core/clsVgm.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6542,6 +6542,11 @@ private void Commander(partWork pw, partPage page, MML mml)
65426542
page.chip.CmdPartColor(page, mml);
65436543
page.mmlPos++;
65446544
break;
6545+
case enmMMLType.PartPriority:
6546+
log.Write("PartPriority");
6547+
page.chip.CmdPartPriority(page, mml);
6548+
page.mmlPos++;
6549+
break;
65456550
case enmMMLType.PartArpeggio_Start:
65466551
log.Write("PartArpeggio_Start");
65476552
page.chip.CmdPartArpeggio_Start(page, mml);

mml2vgm/Corex64/Common.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,7 @@ public static bool CheckDummyCommand(enmMMLType typ)
491491
|| typ == enmMMLType.Lfo
492492
|| typ == enmMMLType.TraceUpdateStack
493493
|| typ == enmMMLType.PartColor
494+
|| typ == enmMMLType.PartPriority
494495
)
495496
{
496497
return true;

mml2vgm/Corex64/MMLAnalyze.cs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ private void Commander(partWork pw, partPage page, char cmd)
354354
CmdPan(pw, page, mml);
355355
break;
356356
case 'P': // noise or tone mixer or phase reset or Page Direct send or Portament
357-
log.Write("noise or tone mixer or phase reset or Page Direct send or Portament");
357+
log.Write("noise or tone mixer or phase reset or Page Direct send or Portament or PartPriority");
358358
CmdMixer(pw, page, mml);
359359
break;
360360
case 'q': // gatetime
@@ -2957,6 +2957,20 @@ private void CmdMixer(partWork pw, partPage page, MML mml)
29572957
CmdPortament(pw, page, mml);
29582958
return;
29592959
}
2960+
else if (pw.getChar(page) == 'P')//PP
2961+
{
2962+
pw.incPos(page);
2963+
if (!pw.getNum(page, out n))
2964+
{
2965+
msgBox.setErrMsg(msg.get("E05092"), mml.line.Lp);
2966+
return;
2967+
2968+
}
2969+
mml.type = enmMMLType.PartPriority;
2970+
mml.args = new List<object>();
2971+
mml.args.Add(n);
2972+
return;
2973+
}
29602974

29612975
if (!pw.getNum(page, out n))
29622976
{

mml2vgm/Corex64/chips/clsChip.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2276,6 +2276,12 @@ public virtual void CmdPartColor(partPage page, MML mml)
22762276
SetDummyData(page, mml);
22772277
}
22782278

2279+
public virtual void CmdPartPriority(partPage page, MML mml)
2280+
{
2281+
//
2282+
SetDummyData(page, mml);
2283+
}
2284+
22792285
public void CheckInterrupt(partWork pw, partPage page)
22802286
{
22812287
if (!page.requestInterrupt) return;

mml2vgm/Corex64/clsVgm.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6542,6 +6542,11 @@ private void Commander(partWork pw, partPage page, MML mml)
65426542
page.chip.CmdPartColor(page, mml);
65436543
page.mmlPos++;
65446544
break;
6545+
case enmMMLType.PartPriority:
6546+
log.Write("PartPriority");
6547+
page.chip.CmdPartPriority(page, mml);
6548+
page.mmlPos++;
6549+
break;
65456550
case enmMMLType.PartArpeggio_Start:
65466551
log.Write("PartArpeggio_Start");
65476552
page.chip.CmdPartArpeggio_Start(page, mml);

mml2vgm/Corex64/lang/message.ja-JP.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ E05088=使用できないスロット番号が指定されています。slotは
257257
E05089=指定できる数値の範囲を超えています
258258
E05090='VGON/VGOF'コマンドの解析に失敗しました。
259259
E05091='y'コマンドの解析に失敗しました。
260+
E05092='PP'コマンドに指定された値が不正です。
260261

261262

262263
;partWork.cs 06000

mml2vgm/Corex64/lang/message.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ E05088=A slot number is specified that cannot be used. slot enumerates the numbe
254254
E05089=The value exceeds the range of values that can be specified.
255255
E05090=Unknown command ('VGO?') defined.
256256
E05091=Unknown command ('y') defined.
257+
E05092=Invalid number defined as 'PP' command.
257258

258259

259260
;partWork.cs 06000
512 Bytes
Binary file not shown.
512 Bytes
Binary file not shown.

mml2vgm/mml2vgmIDEx64/MMLParameter/Instrument.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public abstract class Instrument
3535
public bool[] beforeTie;
3636
public int[] clockCounter;
3737
public int[] partColor;
38+
public int[] partPriority;
3839

3940
public ConcurrentQueue<outDatum>[] TraceInfo;
4041
public outDatum[] TraceInfoOld;
@@ -71,6 +72,7 @@ public Instrument(int n, SoundManager.Chip chip, Setting setting,MIDIKbd midiKbd
7172
clockCounter = new int[n];
7273
MIDIch = new int?[n];
7374
partColor = new int[n];
75+
partPriority = new int[n];
7476

7577
TraceInfo = new ConcurrentQueue<outDatum>[n];
7678
for (int i = 0; i < n; i++)
@@ -81,6 +83,7 @@ public Instrument(int n, SoundManager.Chip chip, Setting setting,MIDIKbd midiKbd
8183
volMode[i] = 0;
8284
beforeTie[i] = false;
8385
partColor[i] = 1;
86+
partPriority[i] = 100;
8487
}
8588
TraceInfoOld = new outDatum[n];
8689
this.chip = chip;
@@ -114,7 +117,7 @@ public Instrument(int n, SoundManager.Chip chip, Setting setting,MIDIKbd midiKbd
114117
null, null, null, null, null,
115118
null, SetHardLFO, null, null, null,
116119
//80 -
117-
null, null, null, null, null,
120+
null, SetPartPriority, null, null, null,
118121
null, null, null, null, null,
119122
};
120123
}
@@ -398,6 +401,13 @@ protected virtual void SetPartColor(outDatum od, int ch, int cc)
398401
partColor[ch] = (int)od.args[0];
399402
}
400403

404+
protected virtual void SetPartPriority(outDatum od, int ch, int cc)
405+
{
406+
if (ch >= partPriority.Length) return;
407+
408+
partPriority[ch] = (int)od.args[0];
409+
}
410+
401411
protected virtual void SetHardLFO(outDatum od, int ch, int cc)
402412
{
403413
;

0 commit comments

Comments
 (0)