Skip to content

Commit

Permalink
TAG753 2024/12/8
Browse files Browse the repository at this point in the history
  Core:PartCounter:.gwi:PPコマンド追加。パートの表示順を指定できます。
  • Loading branch information
kumatan committed Dec 8, 2024
1 parent b49506a commit 8b24b35
Show file tree
Hide file tree
Showing 17 changed files with 190 additions and 81 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����
TAG753 2024/12/8
Core:PartCounter:.gwi:PP�R�}���h�lj��B�p�[�g�̕\�������w��ł��܂��B

TAG752 2024/12/7 3rd
Core:PartCounter:.gwi:memo���lj�

Expand Down
Binary file modified mml2vgm/Core/MDSound.dll
Binary file not shown.
6 changes: 6 additions & 0 deletions mml2vgm/Core/chips/clsChip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2272,6 +2272,12 @@ public virtual void CmdPartColor(partPage page, MML mml)
//
SetDummyData(page, mml);
}

public virtual void CmdPartPriority(partPage page, MML mml)
{
//
SetDummyData(page, mml);
}

public void CheckInterrupt(partWork pw, partPage page)
{
Expand Down
5 changes: 5 additions & 0 deletions mml2vgm/Core/clsVgm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6542,6 +6542,11 @@ private void Commander(partWork pw, partPage page, MML mml)
page.chip.CmdPartColor(page, mml);
page.mmlPos++;
break;
case enmMMLType.PartPriority:
log.Write("PartPriority");
page.chip.CmdPartPriority(page, mml);
page.mmlPos++;
break;
case enmMMLType.PartArpeggio_Start:
log.Write("PartArpeggio_Start");
page.chip.CmdPartArpeggio_Start(page, mml);
Expand Down
1 change: 1 addition & 0 deletions mml2vgm/Corex64/Common.cs
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@ public static bool CheckDummyCommand(enmMMLType typ)
|| typ == enmMMLType.Lfo
|| typ == enmMMLType.TraceUpdateStack
|| typ == enmMMLType.PartColor
|| typ == enmMMLType.PartPriority
)
{
return true;
Expand Down
16 changes: 15 additions & 1 deletion mml2vgm/Corex64/MMLAnalyze.cs
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ private void Commander(partWork pw, partPage page, char cmd)
CmdPan(pw, page, mml);
break;
case 'P': // noise or tone mixer or phase reset or Page Direct send or Portament
log.Write("noise or tone mixer or phase reset or Page Direct send or Portament");
log.Write("noise or tone mixer or phase reset or Page Direct send or Portament or PartPriority");
CmdMixer(pw, page, mml);
break;
case 'q': // gatetime
Expand Down Expand Up @@ -2957,6 +2957,20 @@ private void CmdMixer(partWork pw, partPage page, MML mml)
CmdPortament(pw, page, mml);
return;
}
else if (pw.getChar(page) == 'P')//PP
{
pw.incPos(page);
if (!pw.getNum(page, out n))
{
msgBox.setErrMsg(msg.get("E05092"), mml.line.Lp);
return;

}
mml.type = enmMMLType.PartPriority;
mml.args = new List<object>();
mml.args.Add(n);
return;
}

if (!pw.getNum(page, out n))
{
Expand Down
6 changes: 6 additions & 0 deletions mml2vgm/Corex64/chips/clsChip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2276,6 +2276,12 @@ public virtual void CmdPartColor(partPage page, MML mml)
SetDummyData(page, mml);
}

public virtual void CmdPartPriority(partPage page, MML mml)
{
//
SetDummyData(page, mml);
}

public void CheckInterrupt(partWork pw, partPage page)
{
if (!page.requestInterrupt) return;
Expand Down
5 changes: 5 additions & 0 deletions mml2vgm/Corex64/clsVgm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6542,6 +6542,11 @@ private void Commander(partWork pw, partPage page, MML mml)
page.chip.CmdPartColor(page, mml);
page.mmlPos++;
break;
case enmMMLType.PartPriority:
log.Write("PartPriority");
page.chip.CmdPartPriority(page, mml);
page.mmlPos++;
break;
case enmMMLType.PartArpeggio_Start:
log.Write("PartArpeggio_Start");
page.chip.CmdPartArpeggio_Start(page, mml);
Expand Down
1 change: 1 addition & 0 deletions mml2vgm/Corex64/lang/message.ja-JP.txt
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ E05088=使用できないスロット番号が指定されています。slotは
E05089=指定できる数値の範囲を超えています
E05090='VGON/VGOF'コマンドの解析に失敗しました。
E05091='y'コマンドの解析に失敗しました。
E05092='PP'コマンドに指定された値が不正です。


;partWork.cs 06000
Expand Down
1 change: 1 addition & 0 deletions mml2vgm/Corex64/lang/message.txt
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ E05088=A slot number is specified that cannot be used. slot enumerates the numbe
E05089=The value exceeds the range of values that can be specified.
E05090=Unknown command ('VGO?') defined.
E05091=Unknown command ('y') defined.
E05092=Invalid number defined as 'PP' command.


;partWork.cs 06000
Expand Down
Binary file modified mml2vgm/Corex64/lib/musicDriverInterface.dll
Binary file not shown.
Binary file modified mml2vgm/mml2vgmIDE/musicDriverInterface.dll
Binary file not shown.
12 changes: 11 additions & 1 deletion mml2vgm/mml2vgmIDEx64/MMLParameter/Instrument.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public abstract class Instrument
public bool[] beforeTie;
public int[] clockCounter;
public int[] partColor;
public int[] partPriority;

public ConcurrentQueue<outDatum>[] TraceInfo;
public outDatum[] TraceInfoOld;
Expand Down Expand Up @@ -71,6 +72,7 @@ public Instrument(int n, SoundManager.Chip chip, Setting setting,MIDIKbd midiKbd
clockCounter = new int[n];
MIDIch = new int?[n];
partColor = new int[n];
partPriority = new int[n];

TraceInfo = new ConcurrentQueue<outDatum>[n];
for (int i = 0; i < n; i++)
Expand All @@ -81,6 +83,7 @@ public Instrument(int n, SoundManager.Chip chip, Setting setting,MIDIKbd midiKbd
volMode[i] = 0;
beforeTie[i] = false;
partColor[i] = 1;
partPriority[i] = 100;
}
TraceInfoOld = new outDatum[n];
this.chip = chip;
Expand Down Expand Up @@ -114,7 +117,7 @@ public Instrument(int n, SoundManager.Chip chip, Setting setting,MIDIKbd midiKbd
null, null, null, null, null,
null, SetHardLFO, null, null, null,
//80 -
null, null, null, null, null,
null, SetPartPriority, null, null, null,
null, null, null, null, null,
};
}
Expand Down Expand Up @@ -398,6 +401,13 @@ protected virtual void SetPartColor(outDatum od, int ch, int cc)
partColor[ch] = (int)od.args[0];
}

protected virtual void SetPartPriority(outDatum od, int ch, int cc)
{
if (ch >= partPriority.Length) return;

partPriority[ch] = (int)od.args[0];
}

protected virtual void SetHardLFO(outDatum od, int ch, int cc)
{
;
Expand Down
Loading

0 comments on commit 8b24b35

Please sign in to comment.