From 371ff5b8796e2f71606079d6ea87523adbbd8b3a Mon Sep 17 00:00:00 2001 From: fisyher Date: Sat, 18 May 2024 17:35:12 +0800 Subject: [PATCH 1/3] Changed SE6 to SE23 and SE30 to SE32 as auto-play channels that does not stop current playing wav before playing a new wav --- DTXCreator/Code/05.Score/ScoreManager.cs | 2 +- DTXMania/Code/Score,Song/CChip.cs | 12 +++++++--- DTXMania/Code/Score,Song/EChannel.cs | 2 +- .../07.Performance/CStagePerfCommonScreen.cs | 23 +++++++++++++++---- 4 files changed, 30 insertions(+), 9 deletions(-) diff --git a/DTXCreator/Code/05.Score/ScoreManager.cs b/DTXCreator/Code/05.Score/ScoreManager.cs index b03fd761..a9bdc8fc 100644 --- a/DTXCreator/Code/05.Score/ScoreManager.cs +++ b/DTXCreator/Code/05.Score/ScoreManager.cs @@ -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 ) ); diff --git a/DTXMania/Code/Score,Song/CChip.cs b/DTXMania/Code/Score,Song/CChip.cs index 667c116e..4bdbcadc 100644 --- a/DTXMania/Code/Score,Song/CChip.cs +++ b/DTXMania/Code/Score,Song/CChip.cs @@ -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 diff --git a/DTXMania/Code/Score,Song/EChannel.cs b/DTXMania/Code/Score,Song/EChannel.cs index d5ba9a7a..b0aa7cad 100644 --- a/DTXMania/Code/Score,Song/EChannel.cs +++ b/DTXMania/Code/Score,Song/EChannel.cs @@ -93,7 +93,7 @@ public enum EChannel SE17 = 119, SE18 = 120, SE19 = 121, - SE20 = 0x80, + SE20 = 128, SE21 = 129, SE22 = 130, SE23 = 131, diff --git a/DTXMania/Code/Stage/07.Performance/CStagePerfCommonScreen.cs b/DTXMania/Code/Stage/07.Performance/CStagePerfCommonScreen.cs index a820befd..d13064cd 100644 --- a/DTXMania/Code/Stage/07.Performance/CStagePerfCommonScreen.cs +++ b/DTXMania/Code/Stage/07.Performance/CStagePerfCommonScreen.cs @@ -3223,12 +3223,29 @@ protected bool tUpdateAndDraw_Chips(EInstrumentPart ePlayMode) } break; #endregion - #region [ 61-92: 自動再生(BGM, SE) ] + #region [ 61-65: 自動再生(BGM) ] + //SE01-05 are reserved as extra BGM channel, one chip can be played at any one 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音を発声する) + { + //Force stop playing current wav in this channel + 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: 自動再生(SE) ] + //SE06 to SE23, SE30 to SE32 can be used for additional auto-play chips containing short sound effects + //Current wav are not stopped case EChannel.SE06: case EChannel.SE07: case EChannel.SE08: @@ -3255,9 +3272,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; From 21c690eb97df0b7a37ed8dcfb97d67e109ad4697 Mon Sep 17 00:00:00 2001 From: fisyher Date: Sat, 18 May 2024 18:07:26 +0800 Subject: [PATCH 2/3] Update comments --- DTXMania/Code/Stage/07.Performance/CStagePerfCommonScreen.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DTXMania/Code/Stage/07.Performance/CStagePerfCommonScreen.cs b/DTXMania/Code/Stage/07.Performance/CStagePerfCommonScreen.cs index d13064cd..948ab69e 100644 --- a/DTXMania/Code/Stage/07.Performance/CStagePerfCommonScreen.cs +++ b/DTXMania/Code/Stage/07.Performance/CStagePerfCommonScreen.cs @@ -3224,7 +3224,7 @@ protected bool tUpdateAndDraw_Chips(EInstrumentPart ePlayMode) break; #endregion #region [ 61-65: 自動再生(BGM) ] - //SE01-05 are reserved as extra BGM channel, one chip can be played at any one time per channel + //SE01-05 are reserved as extra BGM channels, only one wav can be played at any given time per channel case EChannel.SE01: case EChannel.SE02: case EChannel.SE03: From 99d25b6c7f580c3149daf207ee5af90db9c01fa3 Mon Sep 17 00:00:00 2001 From: fisyher Date: Sun, 19 May 2024 15:35:02 +0800 Subject: [PATCH 3/3] Further update comments --- .../Stage/07.Performance/CStagePerfCommonScreen.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/DTXMania/Code/Stage/07.Performance/CStagePerfCommonScreen.cs b/DTXMania/Code/Stage/07.Performance/CStagePerfCommonScreen.cs index 948ab69e..86df8b07 100644 --- a/DTXMania/Code/Stage/07.Performance/CStagePerfCommonScreen.cs +++ b/DTXMania/Code/Stage/07.Performance/CStagePerfCommonScreen.cs @@ -3223,8 +3223,8 @@ protected bool tUpdateAndDraw_Chips(EInstrumentPart ePlayMode) } break; #endregion - #region [ 61-65: 自動再生(BGM) ] - //SE01-05 are reserved as extra BGM channels, only one wav can be played at any given time per channel + #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: @@ -3235,7 +3235,6 @@ protected bool tUpdateAndDraw_Chips(EInstrumentPart ePlayMode) pChip.bHit = true; if (configIni.bBGM音を発声する) { - //Force stop playing current wav in this channel 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; @@ -3243,9 +3242,8 @@ protected bool tUpdateAndDraw_Chips(EInstrumentPart ePlayMode) } break; #endregion - #region [ 66-92: 自動再生(SE) ] - //SE06 to SE23, SE30 to SE32 can be used for additional auto-play chips containing short sound effects - //Current wav are not stopped + #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: