Skip to content

Commit

Permalink
OPLL:リズムモードに切り替えと同時にボリューム設定するとそれが反映できないケースがあるのを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
kuma committed Oct 15, 2018
1 parent 0d00ff5 commit c894b67
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 41 deletions.
51 changes: 26 additions & 25 deletions mml2vgm/Core/chips/YM2413.cs
Original file line number Diff line number Diff line change
Expand Up @@ -409,32 +409,7 @@ public override void MultiChannelCommand()

partWork p0, p1;
byte dat;


//Rhythm Volume
p0 = lstPartWork[9];
if (p0.beforeVolume != p0.volume)
{
p0.beforeVolume = p0.volume;
parent.OutData(p0.port0, 0x36, (byte)(15 - (p0.volume & 0xf)));
}
p0 = lstPartWork[10];
p1 = lstPartWork[13];
if (p0.beforeVolume != p0.volume || p1.beforeVolume != p1.volume)
{
p0.beforeVolume = p0.volume;
p1.beforeVolume = p1.volume;
parent.OutData(p0.port0, 0x37, (byte)((15 - (p0.volume & 0xf)) | ((15 - (p1.volume & 0xf)) << 4)));
}
p0 = lstPartWork[12];
p1 = lstPartWork[11];
if (p0.beforeVolume != p0.volume || p1.beforeVolume != p1.volume)
{
p0.beforeVolume = p0.volume;
p1.beforeVolume = p1.volume;
parent.OutData(p0.port0, 0x38, (byte)((15 - (p0.volume & 0xf)) | ((15 - (p1.volume & 0xf)) << 4)));
}


//Key Off
if (lstPartWork[9].keyOff
Expand Down Expand Up @@ -541,6 +516,32 @@ public override void MultiChannelCommand()
}
}


//Rhythm Volume
p0 = lstPartWork[9];
if (p0.beforeVolume != p0.volume)
{
p0.beforeVolume = p0.volume;
parent.OutData(p0.port0, 0x36, (byte)(15 - (p0.volume & 0xf)));
}
p0 = lstPartWork[10];
p1 = lstPartWork[13];
if (p0.beforeVolume != p0.volume || p1.beforeVolume != p1.volume)
{
p0.beforeVolume = p0.volume;
p1.beforeVolume = p1.volume;
parent.OutData(p0.port0, 0x37, (byte)((15 - (p0.volume & 0xf)) | ((15 - (p1.volume & 0xf)) << 4)));
}
p0 = lstPartWork[12];
p1 = lstPartWork[11];
if (p0.beforeVolume != p0.volume || p1.beforeVolume != p1.volume)
{
p0.beforeVolume = p0.volume;
p1.beforeVolume = p1.volume;
parent.OutData(p0.port0, 0x38, (byte)((15 - (p0.volume & 0xf)) | ((15 - (p1.volume & 0xf)) << 4)));
}


}

}
Expand Down
5 changes: 4 additions & 1 deletion mml2vgm/mml2vgm/sample/testC140.gwi
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,8 @@
Y01-03 !

Y01 D0o4l4v125@0cdefgab>c1^1^1
'Y01 D0o4l4q0v125@1cdefgab>>>c2_<<c&c2_<c^1^1
'Y01 D0o4l4q0p255,255v255@1cdefgab>>>c2_<<c&c2_<c^1^1
'Y01 D0o1l4q0p255,255v255@1[cdefgab>]7
'Y01 o4p0,255c4p16,255c4p32,255c4p48,255c4p64,255c4p80,255c4p96,255c4p112,255c4p128,255c4
'Y01 o4p144,255c4p160,255c4p176,255c4p192,255c4p208,255c4p224,255c4p240,255c4p255,255c4
Y01 D0o4l4v125@2cdefgab>c1^1^1
Binary file added mml2vgm/mml2vgm/sample/testC140.vgm
Binary file not shown.
34 changes: 19 additions & 15 deletions mml2vgm/mml2vgm/sample/testOPLL.gwi
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,30 @@
L01-03 !

作成音色
'L01 D0o4v15@110cdefgab>c
L01 D0o4v15@110cdefgab>c
プリセット音色
'L01 D0o4v15@I2cdefgab>c
'L01 D20o4v15cv14dv13ev12fv11gv10av9b>v8c
'L01 D0o3v15Q1[c8c16c16>][l8dl16dd]
'L01 D0o3v15q1[c8c16c16>][l8dl16dd]
'L01 MSV0,1,10,100,0a1r1
'L01 MST0,1,1, 1,0a1r1
'L01 SS0y0,0
L01 D0o4v15@I2cdefgab>c
L01 D20o4v15cv14dv13ev12fv11gv10av9b>v8c
L01 D0o3v15Q1[c8c16c16>][l8dl16dd]
L01 D0o3v15q1[c8c16c16>][l8dl16dd]
L01 MSV0,1,10,100,0a1r1
L01 MST0,1,1, 1,0a1r1
L01 SS0y0,0

L01 o4v15@I2cdefg
N7 o4v15rrrrrcdefg
A1 o4v15rrrrrrrrrrcdefg
S1 o3v15rrrrrrrrrrrrrrrcdefg

L10 m1v15l4q0o3[c8c16c16]4
L11 m1v15l4q0o3[rc]2
L14 m1v10l4q0o3[cc]2
L11 m1o3q0v0[c4)1]15
L12 m1o5 v0[c4)1]15
L13 m1o5q0v0[c4)1]15
L14 m1o3q0v0[c4)1]15
'L10 m1

L10 v15l4q0o3[c8c16c16]4
'L11 v15l4q0o3[rc]2
L14 v13l4q0o3[cc]2
L11 o3q0v0[c4)1]15
L14 o3v9r4c4v10c4v9c4v10c4
[c4)1]15
L12 o5q0v0[c4)1]15
L13 o5q0v0[c4)1]15
L14 o3q0v0[c4)1]15

Binary file added mml2vgm/mml2vgm/sample/testOPLL.vgm
Binary file not shown.
Binary file added mml2vgm/mml2vgm/sample/testOPLL.vgm.bak
Binary file not shown.

0 comments on commit c894b67

Please sign in to comment.