//span = (TimeSpan) ( DateTime.Now - timeBeginLoad );\r
//Trace.TraceInformation( "空打確認時間: {0}", span.ToString() );\r
//timeBeginLoad = DateTime.Now;\r
- #region [ 拍子・拍線の挿入 ]\r
+ #region [ 拍子・拍線の挿入と、クリック音の挿入 ]\r
if (this.listChip.Count > 0)\r
{\r
this.listChip.Sort(); // 高速化のためにはこれを削りたいが、listChipの最後がn発声位置の終端である必要があるので、\r
this.strハッシュofDTXファイル = "00000000000000000000000000000000";\r
}\r
#endregion\r
- \r
+\r
// #36177 使用レーン数の表示 add ikanick 16.03.20\r
#region [ 使用レーン数カウント ]\r
\r
if ( this.n使用レーン数.Bass == EUseLanes.Other ) this.n使用レーン数.Bass = EUseLanes.GB_3;\r
}\r
}\r
-\r
+ Trace.TraceInformation( "LeftPedal使用=" + this.bチップがある.LeftPedal );\r
+ Trace.TraceInformation( "LeftBass使用 =" + this.bチップがある.LeftBassDrum );\r
+ Trace.TraceInformation( "Lane Type =" + this.n使用レーン数.Drums );\r
#endregion\r
\r
//span = (TimeSpan) ( DateTime.Now - timeBeginLoad );\r
}\r
}\r
}\r
+\r
+ /// <summary>\r
+ /// #34016 LP/LBD使用譜面の吸収\r
+ /// </summary>\r
+ public void ReassignLP()\r
+ {\r
+ if ( this.bチップがある.LeftPedal )\r
+ {\r
+ if ( this.bチップがある.LeftBassDrum )\r
+ { // LP かつ LBDがある場合\r
+ // → * LBDはBDに割り当て\r
+ // * LPは、HO(foot splash)に割り当て。あるいは、HO(foot splash)とHC(close)のいずれかに割り当てる。\r
+ // BPMから4分音符の長さを計算し、それより長いかどうかでHO/HCの仕分けを決定。 \r
+ // * チップ音にサウンドファイルが割り当てられていない場合は、HCに割り当て \r
+ // * HO未使用の譜面の場合は、HCに割り当て\r
+\r
+ double bpm = this.BPM + this.BASEBPM;\r
+ double dbBarLength = 1.0;\r
+ double nLen4thNoteMs = (int) ( ( 60.0 / bpm / dbBarLength ) * 10 * 10 * 10 );\r
+\r
+ for ( int i = 0; i < this.listChip.Count; i++ )\r
+ {\r
+ // switch-caseにすると、listchip[i]の書き換えができないので、if-elseで記述\r
+ if ( this.listChip[ i ].eチャンネル番号 == EChannel.LeftBassDrum )\r
+ {\r
+ this.listChip[ i ].eチャンネル番号 = EChannel.BassDrum;\r
+ }\r
+ else if ( this.listChip[ i ].eチャンネル番号 == EChannel.LeftPedal )\r
+ {\r
+ int len = this.listChip[ i ].GetDuration(); // WAV未割当の場合は0が返る\r
+ // HHOpen未使用の譜面であれば、無条件にHHCloseに落としこむ\r
+ this.listChip[ i ].eチャンネル番号 = ( len < nLen4thNoteMs || !this.bチップがある.HHOpen ) ? EChannel.HiHatClose : EChannel.HiHatOpen;\r
+ }\r
+ else if ( this.listChip[ i ].eチャンネル番号 == EChannel.BPM )\r
+ {\r
+ bpm = this.BPM + this.BASEBPM;\r
+ nLen4thNoteMs = (int) ( ( 60.0 / bpm / dbBarLength / 2 ) * 10 * 10 * 10 );\r
+ }\r
+ else if ( this.listChip[ i ].eチャンネル番号 == EChannel.BPMEx )\r
+ {\r
+ int n内部番号 = listChip[ i ].n整数値_内部番号;\r
+ if ( listBPM.ContainsKey( n内部番号 ) )\r
+ {\r
+ bpm = ( ( listBPM[ n内部番号 ].n表記上の番号 == 0 ) ? 0.0 : this.BASEBPM ) + listBPM[ n内部番号 ].dbBPM値;\r
+ }\r
+ }\r
+ else if ( this.listChip[ i ].eチャンネル番号 == EChannel.BarLength )\r
+ {\r
+ dbBarLength = this.listChip[ i ].db実数値;\r
+ }\r
+ }\r
+ }\r
+ else\r
+ { // LPしかない場合\r
+ // → LPを、BD, HO, HCに割り当てる必要がある。\r
+ // * BDへの割り当ては、BDレーンで同じ音を使っているかどうかで決定 \r
+ // * HO, HCへの割り当ては、(BDの可能性を除いた後) HOにアサイン、あるいはチップの長さを見てHC/HOにアサイン\r
+ // * チップ音にサウンドファイルが割り当てられていない場合は、HCに割り当て \r
+ // * HO未使用の譜面の場合は、HCに割り当て\r
+\r
+ double bpm = this.BPM + this.BASEBPM;\r
+ double dbBarLength = 1.0;\r
+ double nLen4thNoteMs = (int) ( ( 60.0 / bpm / dbBarLength ) * 10 * 10 * 10 );\r
+\r
+ #region [ BassDrumのファイル名一覧を作成 ]\r
+ List<string> listBDFilenames = new List<string>();\r
+ foreach ( CChip chip in listChip )\r
+ {\r
+ if (chip.eチャンネル番号 == EChannel.BassDrum)\r
+ {\r
+ string s = chip.GetSoundFilename();\r
+ if (s != null && !listBDFilenames.Contains(s))\r
+ {\r
+ listBDFilenames.Add(s);\r
+ }\r
+ }\r
+ }\r
+ #endregion\r
+\r
+ for ( int i = 0; i < this.listChip.Count; i++ )\r
+ {\r
+ if ( this.listChip[ i ].eチャンネル番号 == EChannel.LeftPedal )\r
+ {\r
+ string s = listChip[i].GetSoundFilename();\r
+ if (listBDFilenames.Contains(s))\r
+ {\r
+ this.listChip[i].eチャンネル番号 = EChannel.BassDrum;\r
+ }\r
+ else\r
+ {\r
+ int len = this.listChip[ i ].GetDuration(); // WAV未割当の場合は0が返る\r
+ // HHOpen未使用の譜面であれば、無条件にHHCloseに落としこむ\r
+ this.listChip[ i ].eチャンネル番号 = ( len < nLen4thNoteMs || !this.bチップがある.HHOpen ) ? EChannel.HiHatClose : EChannel.HiHatOpen;\r
+ }\r
+ }\r
+ else if ( this.listChip[ i ].eチャンネル番号 == EChannel.BPM )\r
+ {\r
+ bpm = this.BPM + this.BASEBPM;\r
+ nLen4thNoteMs = (int) ( ( 60.0 / bpm / dbBarLength / 2 ) * 10 * 10 * 10 );\r
+ }\r
+ else if ( this.listChip[ i ].eチャンネル番号 == EChannel.BPMEx )\r
+ {\r
+ int n内部番号 = listChip[ i ].n整数値_内部番号;\r
+ if ( listBPM.ContainsKey( n内部番号 ) )\r
+ {\r
+ bpm = ( ( listBPM[ n内部番号 ].n表記上の番号 == 0 ) ? 0.0 : this.BASEBPM ) + listBPM[ n内部番号 ].dbBPM値;\r
+ }\r
+ }\r
+ else if ( this.listChip[ i ].eチャンネル番号 == EChannel.BarLength )\r
+ {\r
+ dbBarLength = this.listChip[ i ].db実数値;\r
+ }\r
+ }\r
+ listBDFilenames.Clear();\r
+ listBDFilenames = null;\r
+ }\r
+ }\r
+ else if ( this.bチップがある.LeftBassDrum )\r
+ { // LBDのみがある場合\r
+ // → そのままBDに割り当て\r
+ for ( int i = 0; i < this.listChip.Count; i++ )\r
+ {\r
+ if ( this.listChip[ i ].eチャンネル番号 == EChannel.LeftBassDrum )\r
+ {\r
+ this.listChip[ i ].eチャンネル番号 = EChannel.BassDrum;\r
+ }\r
+ }\r
+ }\r
+ else\r
+ { // LPもLBDもない場合\r
+ // → 何もしない\r
+ }\r
+ }\r
private bool t入力_コマンド文字列を抜き出す(ref CharEnumerator ce, ref StringBuilder sb文字列)\r
{\r
if (!this.t入力_空白をスキップする(ref ce))\r
span = (TimeSpan)(DateTime.Now - timeBeginLoadBMPAVI);\r
Trace.TraceInformation("BMP/AVI読込所要時間({0,4}): {1}", (CDTXMania.Instance.DTX.listBMP.Count + CDTXMania.Instance.DTX.listBMPTEX.Count + CDTXMania.Instance.DTX.listAVI.Count), span.ToString());\r
\r
- span = (TimeSpan)(DateTime.Now - timeBeginLoad);\r
- Trace.TraceInformation("総読込時間: {0}", span.ToString());\r
\r
if (bitmapFilename != null)\r
{\r
ftFilename = null;\r
}\r
CDTXMania.Instance.Timer.t更新();\r
- base.eフェーズID = CStage.Eフェーズ.NOWLOADING_システムサウンドBGMの完了を待つ;\r
+ base.eフェーズID = CStage.Eフェーズ.NOWLOADING_LPを再配置する;\r
return (int)E曲読込画面の戻り値.継続;\r
}\r
\r
+ case CStage.Eフェーズ.NOWLOADING_LPを再配置する:\r
+ {\r
+ TimeSpan span;\r
+ DateTime timeReassignLP = DateTime.Now;\r
+ CDTXMania.Instance.DTX.ReassignLP();\r
+ \r
+ span = (TimeSpan) ( DateTime.Now - timeReassignLP );\r
+ Trace.TraceInformation( "LP再配置所要時間: {0}", span.ToString() );\r
+\r
+ span = (TimeSpan) ( DateTime.Now - timeBeginLoad );\r
+ Trace.TraceInformation( "総読込時間: {0}", span.ToString() );\r
+\r
+ base.eフェーズID = CStage.Eフェーズ.NOWLOADING_システムサウンドBGMの完了を待つ;\r
+ return (int) E曲読込画面の戻り値.継続;\r
+ }\r
case CStage.Eフェーズ.NOWLOADING_システムサウンドBGMの完了を待つ:\r
{\r
long nCurrentTime = CDTXMania.Instance.Timer.n現在時刻;\r