Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sound effect channel enhancement #177

Merged
merged 3 commits into from
May 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DTXCreator/Code/05.Score/ScoreManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ private void t初期化_listレーンの生成()
this.listレーン.Add( new CLane( CLane.E種別.WAV, "SE5", 0x65, 0x65, false, Color.FromArgb( alpha, 160, 160, 160 ), 0, width, CLane.ELaneType.SE1_5, true ) );

// SE6~32は、初期状態では非表示とする。(n幅dotを0にし、bIsVisibleをfalseにする)
this.listレーン.Add( new CLane( CLane.E種別.WAV, "SE6", 0x66, 0x66, false, Color.FromArgb( alpha, 160, 160, 160 ), 0, 0, CLane.ELaneType.SE6_32, false ) );
this.listレーン.Add( new CLane( CLane.E種別.WAV, "SE6", 0x66, 0x66, true, Color.FromArgb( alpha, 160, 160, 160 ), 0, 0, CLane.ELaneType.SE6_32, false ) );
this.listレーン.Add( new CLane( CLane.E種別.WAV, "SE7", 0x67, 0x67, false, Color.FromArgb( alpha, 160, 160, 160 ), 0, 0, CLane.ELaneType.SE6_32, false ) );
this.listレーン.Add( new CLane( CLane.E種別.WAV, "SE8", 0x68, 0x68, false, Color.FromArgb( alpha, 160, 160, 160 ), 0, 0, CLane.ELaneType.SE6_32, false ) );
this.listレーン.Add( new CLane( CLane.E種別.WAV, "SE9", 0x69, 0x69, false, Color.FromArgb( alpha, 160, 160, 160 ), 0, 0, CLane.ELaneType.SE6_32, false ) );
Expand Down
12 changes: 9 additions & 3 deletions DTXMania/Code/Score,Song/CChip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -397,11 +397,17 @@ public bool b自動再生音チャンネルである
get
{
EChannel num = this.nChannelNumber;
if ((((num != EChannel.BGM) && ((EChannel.SE01 > num) || (num > EChannel.SE09))) && ((EChannel.SE10 > num) || (num > EChannel.SE19))) && ((EChannel.SE20 > num) || (num > EChannel.SE29)))
if (num == EChannel.BGM ||
(EChannel.SE01 <= num && num <= EChannel.SE09) ||
(EChannel.SE10 <= num && num <= EChannel.SE19) ||
(EChannel.SE20 <= num && num <= EChannel.SE29) ||
(EChannel.SE30 <= num && num <= EChannel.SE32)
)
{
return ((EChannel.SE30 <= num) && (num <= EChannel.SE32));
return true;
}
return true;

return false;
}
}
public bool bIsAutoPlayed; // 2011.6.10 yyagi
Expand Down
2 changes: 1 addition & 1 deletion DTXMania/Code/Score,Song/EChannel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public enum EChannel
SE17 = 119,
SE18 = 120,
SE19 = 121,
SE20 = 0x80,
SE20 = 128,
SE21 = 129,
SE22 = 130,
SE23 = 131,
Expand Down
21 changes: 17 additions & 4 deletions DTXMania/Code/Stage/07.Performance/CStagePerfCommonScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3223,12 +3223,27 @@ protected bool tUpdateAndDraw_Chips(EInstrumentPart ePlayMode)
}
break;
#endregion
#region [ 61-92: 自動再生(BGM, SE) ]
#region [ 61-65: 自動再生(Muting SE) ]
//SE01-05 are reserved as additional Muting channels i.e. only one wav can be played at any given time per channel
case EChannel.SE01:
case EChannel.SE02:
case EChannel.SE03:
case EChannel.SE04: // 自動再生(BGM, SE)
case EChannel.SE04:
case EChannel.SE05:
if (!pChip.bHit && (pChip.nDistanceFromBar.Drums < 0))
{
pChip.bHit = true;
if (configIni.bBGM音を発声する)
{
dTX.tStopPlayingWav(this.nLastPlayedBGMWAVNumber[pChip.nChannelNumber - EChannel.SE01]);
dTX.tPlayChip(pChip, CSoundManager.rcPerformanceTimer.n前回リセットした時のシステム時刻 + pChip.nPlaybackTimeMs, (int)ELane.BGM, dTX.nモニタを考慮した音量(EInstrumentPart.UNKNOWN));
this.nLastPlayedBGMWAVNumber[pChip.nChannelNumber - EChannel.SE01] = pChip.nIntegerValue_InternalNumber;
}
}
break;
#endregion
#region [ 66-92: 自動再生(Non-muting SE) ]
//SE06 to SE23, SE30 to SE32 are updated to be non-muting SE channels
case EChannel.SE06:
case EChannel.SE07:
case EChannel.SE08:
Expand All @@ -3255,9 +3270,7 @@ protected bool tUpdateAndDraw_Chips(EInstrumentPart ePlayMode)
pChip.bHit = true;
if (configIni.bBGM音を発声する)
{
dTX.tStopPlayingWav(this.nLastPlayedBGMWAVNumber[pChip.nChannelNumber - EChannel.SE01]);
dTX.tPlayChip(pChip, CSoundManager.rcPerformanceTimer.n前回リセットした時のシステム時刻 + pChip.nPlaybackTimeMs, (int)ELane.BGM, dTX.nモニタを考慮した音量(EInstrumentPart.UNKNOWN));
this.nLastPlayedBGMWAVNumber[pChip.nChannelNumber - EChannel.SE01] = pChip.nIntegerValue_InternalNumber;
}
}
break;
Expand Down