• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-cqtcocoa誰得pythonphprubygameguibathyscaphec翻訳計画中(planning stage)omegatframeworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

MIDITrail をピカピカにする。鍵盤方向自動切替・多ポート・歌詞対応等


Commit MetaInfo

Revisión7bdd8737b6a2d2b224670e42d8bfbfb0ce3b8e5e (tree)
Tiempo2019-12-24 23:49:22
Autoryoshy <yoshy@user...>
Commiteryoshy

Log Message

[WORKING] PianoRollRingシーンのリップルオブジェクトをMod化

Cambiar Resumen

Diferencia incremental

--- a/MIDITrail/MIDITrail.vcxproj
+++ b/MIDITrail/MIDITrail.vcxproj
@@ -197,6 +197,8 @@
197197 <ResourceCompile Include="MIDITrail.rc" />
198198 </ItemGroup>
199199 <ItemGroup>
200+ <ClCompile Include="MTNoteDesignRingMod.cpp" />
201+ <ClCompile Include="MTNoteRippleRingMod.cpp" />
200202 <ClCompile Include="MTGridRingMod.cpp" />
201203 <ClCompile Include="MTScenePianoRollRingMod.cpp" />
202204 <ClCompile Include="MTTimeIndicatorMod.cpp" />
@@ -287,6 +289,8 @@
287289 </ClCompile>
288290 </ItemGroup>
289291 <ItemGroup>
292+ <ClInclude Include="MTNoteDesignRingMod.h" />
293+ <ClInclude Include="MTNoteRippleRingMod.h" />
290294 <ClInclude Include="MTGridRingMod.h" />
291295 <ClInclude Include="MTScenePianoRollRingMod.h" />
292296 <ClInclude Include="MTTimeIndicatorMod.h" />
--- a/MIDITrail/MIDITrail.vcxproj.filters
+++ b/MIDITrail/MIDITrail.vcxproj.filters
@@ -299,6 +299,12 @@
299299 <ClCompile Include="MTTimeIndicatorRingMod.cpp">
300300 <Filter>Sources\SceneObject</Filter>
301301 </ClCompile>
302+ <ClCompile Include="MTNoteRippleRingMod.cpp">
303+ <Filter>Sources\SceneObject</Filter>
304+ </ClCompile>
305+ <ClCompile Include="MTNoteDesignRingMod.cpp">
306+ <Filter>Sources\SceneObject</Filter>
307+ </ClCompile>
302308 </ItemGroup>
303309 <ItemGroup>
304310 <ClInclude Include="MIDITrailApp.h">
@@ -562,5 +568,11 @@
562568 <ClInclude Include="MTTimeIndicatorRingMod.h">
563569 <Filter>Sources\SceneObject</Filter>
564570 </ClInclude>
571+ <ClInclude Include="MTNoteRippleRingMod.h">
572+ <Filter>Sources\SceneObject</Filter>
573+ </ClInclude>
574+ <ClInclude Include="MTNoteDesignRingMod.h">
575+ <Filter>Sources\SceneObject</Filter>
576+ </ClInclude>
565577 </ItemGroup>
566578 </Project>
\ No newline at end of file
--- a/MIDITrail/MTNoteDesignMod.h
+++ b/MIDITrail/MTNoteDesignMod.h
@@ -45,7 +45,7 @@ public:
4545 );
4646
4747 //発音中ノートボックス頂点座標取得
48- void GetActiveNoteBoxVirtexPos(
48+ virtual void GetActiveNoteBoxVirtexPos(
4949 unsigned long curTickTime,
5050 unsigned char portNo,
5151 unsigned char chNo,
--- a/MIDITrail/MTNoteDesignRing.cpp
+++ b/MIDITrail/MTNoteDesignRing.cpp
@@ -385,6 +385,12 @@ int MTNoteDesignRing::_LoadConfFile(
385385 int result = 0;
386386 MTConfFile confFile;
387387
388+// >>> modify 20191224 yossiepon begin
389+ //基底クラスの読み込み処理を呼び出す
390+ result = MTNoteDesign::_LoadConfFile(pSceneName);
391+ if (result != 0) goto EXIT;
392+// <<< modify 20191224 yossiepon end
393+
388394 //設定ファイル読み込み
389395 result = MTNoteDesign::_LoadConfFile(pSceneName);
390396 if (result != 0) goto EXIT;
--- a/MIDITrail/MTNoteDesignRing.h
+++ b/MIDITrail/MTNoteDesignRing.h
@@ -102,7 +102,9 @@ public:
102102 //世界座標配置移動ベクトル取得
103103 virtual D3DXVECTOR3 GetWorldMoveVector();
104104
105-private:
105+// >>> modify access level to proteced 20191224 yossiepon begin
106+protected:
107+// <<< modify access level to proteced 20191224 yossiepon end
106108
107109 bool m_isLiveMode;
108110 float m_NoteAngleStep;
--- /dev/null
+++ b/MIDITrail/MTNoteDesignRingMod.cpp
@@ -0,0 +1,221 @@
1+//******************************************************************************
2+//
3+// MIDITrail / MTNoteDesignRingMod
4+//
5+// ノートデザインリングModクラス
6+//
7+// Copyright (C) 2019 WADA Masashi. All Rights Reserved.
8+//
9+//******************************************************************************
10+
11+#include "StdAfx.h"
12+#include "MTNoteDesignRingMod.h"
13+#include "DXH.h"
14+
15+
16+//******************************************************************************
17+// コンストラクタ
18+//******************************************************************************
19+MTNoteDesignRingMod::MTNoteDesignRingMod(void)
20+{
21+}
22+
23+//******************************************************************************
24+// デストラクタ
25+//******************************************************************************
26+MTNoteDesignRingMod::~MTNoteDesignRingMod(void)
27+{
28+}
29+
30+//******************************************************************************
31+// 初期化
32+//******************************************************************************
33+int MTNoteDesignRingMod::Initialize(
34+ const TCHAR* pSceneName,
35+ SMSeqData* pSeqData
36+)
37+{
38+ int result = 0;
39+
40+ result = MTNoteDesignRing::Initialize(pSceneName, pSeqData);
41+ if (result != 0) goto EXIT;
42+
43+ result = MTNoteDesignMod::Initialize(pSceneName, pSeqData);
44+ if (result != 0) goto EXIT;
45+
46+EXIT:;
47+ return result;
48+}
49+
50+//******************************************************************************
51+// ノートボックス中心座標取得
52+//******************************************************************************
53+D3DXVECTOR3 MTNoteDesignRingMod::GetNoteBoxCenterPosX(
54+ unsigned long curTickTime,
55+ unsigned char portNo,
56+ unsigned char chNo,
57+ unsigned char noteNo,
58+ short pitchBendValue, //省略可:ピッチベンド
59+ unsigned char pitchBendSensitivity //省略可:ピッチベンド感度
60+)
61+{
62+ return MTNoteDesignRing::GetNoteBoxCenterPosX(curTickTime, portNo, chNo, noteNo, pitchBendValue, pitchBendSensitivity);
63+}
64+
65+//******************************************************************************
66+// ノートボックス頂点座標取得
67+//******************************************************************************
68+void MTNoteDesignRingMod::GetNoteBoxVirtexPos(
69+ unsigned long curTickTime,
70+ unsigned char portNo,
71+ unsigned char chNo,
72+ unsigned char noteNo,
73+ D3DXVECTOR3* pVector0, //YZ平面+X軸方向を見て左上
74+ D3DXVECTOR3* pVector1, //YZ平面+X軸方向を見て右上
75+ D3DXVECTOR3* pVector2, //YZ平面+X軸方向を見て左下
76+ D3DXVECTOR3* pVector3, //YZ平面+X軸方向を見て右下
77+ short pitchBendValue, //省略可:ピッチベンド
78+ unsigned char pitchBendSensitivity //省略可:ピッチベンド感度
79+
80+)
81+{
82+ MTNoteDesignRing::GetNoteBoxVirtexPos(
83+ curTickTime, portNo, chNo, noteNo, pVector0, pVector1, pVector2, pVector3, pitchBendValue, pitchBendSensitivity);
84+}
85+
86+//******************************************************************************
87+// 発音中ノートボックス頂点座標取得
88+//******************************************************************************
89+void MTNoteDesignRingMod::GetActiveNoteBoxVirtexPos(
90+ unsigned long curTickTime,
91+ unsigned char portNo,
92+ unsigned char chNo,
93+ unsigned char noteNo,
94+ D3DXVECTOR3* pVector0, //YZ平面+X軸方向を見て左上
95+ D3DXVECTOR3* pVector1, //YZ平面+X軸方向を見て右上
96+ D3DXVECTOR3* pVector2, //YZ平面+X軸方向を見て左下
97+ D3DXVECTOR3* pVector3, //YZ平面+X軸方向を見て右下
98+ short pitchBendValue, //省略可:ピッチベンド
99+ unsigned char pitchBendSensitivity, //省略可:ピッチベンド感度
100+ unsigned long elapsedTime //省略可:経過時間(ミリ秒)
101+)
102+{
103+ MTNoteDesignRing::GetActiveNoteBoxVirtexPos(
104+ curTickTime, portNo, chNo, noteNo, pVector0, pVector1, pVector2, pVector3, pitchBendValue, pitchBendSensitivity, elapsedTime);
105+}
106+
107+//******************************************************************************
108+// 発音中ノートボックス頂点座標取得
109+//******************************************************************************
110+void MTNoteDesignRingMod::GetActiveNoteBoxVirtexPos(
111+ unsigned long curTickTime,
112+ unsigned char portNo,
113+ unsigned char chNo,
114+ unsigned char noteNo,
115+ D3DXVECTOR3* pVector0, //YZ平面+X軸方向を見て左上
116+ D3DXVECTOR3* pVector1, //YZ平面+X軸方向を見て右上
117+ D3DXVECTOR3* pVector2, //YZ平面+X軸方向を見て左下
118+ D3DXVECTOR3* pVector3, //YZ平面+X軸方向を見て右下
119+ short pitchBendValue, //省略可:ピッチベンド
120+ unsigned char pitchBendSensitivity, //省略可:ピッチベンド感度
121+ float rate //省略可:サイズ比率
122+)
123+{
124+ D3DXVECTOR3 basePos0;
125+ D3DXVECTOR3 basePos1;
126+ D3DXVECTOR3 basePos2;
127+ float angle0 = 0.0f;
128+ float angle1 = 0.0f;
129+ float angle2 = 0.0f;
130+ float curSizeRatio = 1.0f;
131+
132+ if (rate > 0.0f) {
133+ curSizeRatio = 1.0f + (MTNoteDesignMod::m_ActiveNoteBoxSizeRatio - 1.0f) * GetDecayCoefficient(rate, 30.0f);
134+ }
135+
136+ //ノート基準座標
137+ basePos0 = _GetNoteBasePos(curTickTime, portNo, chNo);
138+ basePos1 = basePos0;
139+ basePos1.y -= MTNoteDesignMod::GetNoteBoxWidth() * curSizeRatio / 2.0f;
140+ basePos2 = basePos0;
141+ basePos2.y += MTNoteDesignMod::GetNoteBoxWidth() * curSizeRatio / 2.0f;
142+
143+ //ノート番号で角度を決定
144+ angle0 = _GetNoteAngle(noteNo, pitchBendValue, pitchBendSensitivity);
145+ angle1 = angle0 - (m_NoteAngleStep * curSizeRatio / 2.0f);
146+ angle2 = angle0 + (m_NoteAngleStep * curSizeRatio / 2.0f);
147+
148+ *pVector0 = DXH::RotateYZ(0.0f, 0.0f, basePos2, angle1);
149+ *pVector1 = DXH::RotateYZ(0.0f, 0.0f, basePos2, angle2);
150+ *pVector2 = DXH::RotateYZ(0.0f, 0.0f, basePos1, angle1);
151+ *pVector3 = DXH::RotateYZ(0.0f, 0.0f, basePos1, angle2);
152+}
153+
154+//******************************************************************************
155+// ライブモニタ用ノートボックス頂点座標取得
156+//******************************************************************************
157+void MTNoteDesignRingMod::GetNoteBoxVirtexPosLive(
158+ unsigned long elapsedTime,
159+ unsigned char portNo,
160+ unsigned char chNo,
161+ unsigned char noteNo,
162+ D3DXVECTOR3* pVector0, //YZ平面+X軸方向を見て左上
163+ D3DXVECTOR3* pVector1, //YZ平面+X軸方向を見て右上
164+ D3DXVECTOR3* pVector2, //YZ平面+X軸方向を見て左下
165+ D3DXVECTOR3* pVector3, //YZ平面+X軸方向を見て右下
166+ short pitchBendValue, //省略可:ピッチベンド
167+ unsigned char pitchBendSensitivity //省略可:ピッチベンド感度
168+)
169+{
170+ MTNoteDesignRing::GetNoteBoxVirtexPosLive(
171+ elapsedTime, portNo, chNo, noteNo, pVector0, pVector1, pVector2, pVector3, pitchBendValue, pitchBendSensitivity);
172+}
173+
174+//******************************************************************************
175+// ポート原点Y座標取得
176+//******************************************************************************
177+float MTNoteDesignRingMod::GetPortOriginY(
178+ unsigned char portNo
179+)
180+{
181+ return MTNoteDesignRing::GetPortOriginY(portNo);
182+}
183+
184+//******************************************************************************
185+// ポート原点Z座標取得
186+//******************************************************************************
187+float MTNoteDesignRingMod::GetPortOriginZ(
188+ unsigned char portNo
189+)
190+{
191+ return MTNoteDesignRing::GetPortOriginZ(portNo);
192+}
193+
194+//******************************************************************************
195+// 世界座標配置移動ベクトル取得
196+//******************************************************************************
197+D3DXVECTOR3 MTNoteDesignRingMod::GetWorldMoveVector()
198+{
199+ return MTNoteDesignRing::GetWorldMoveVector();
200+}
201+
202+//******************************************************************************
203+// 設定ファイル読み込み
204+//******************************************************************************
205+int MTNoteDesignRingMod::_LoadConfFile(
206+ const TCHAR* pSceneName
207+)
208+{
209+ int result = 0;
210+
211+ result = MTNoteDesignRing::_LoadConfFile(pSceneName);
212+ if (result != 0) goto EXIT;
213+
214+ result = MTNoteDesignMod::_LoadConfFile(pSceneName);
215+ if (result != 0) goto EXIT;
216+
217+EXIT:;
218+ return result;
219+}
220+
221+
--- /dev/null
+++ b/MIDITrail/MTNoteDesignRingMod.h
@@ -0,0 +1,112 @@
1+//******************************************************************************
2+//
3+// MIDITrail / MTNoteDesignRingMod
4+//
5+// ノートデザインリングModクラス
6+//
7+// Copyright (C) 2019 Yossiepon Oniichan. All Rights Reserved.
8+//
9+//******************************************************************************
10+
11+#pragma once
12+
13+#include "MTNoteDesignMod.h"
14+#include "MTNoteDesignRing.h"
15+
16+using namespace SMIDILib;
17+
18+
19+//******************************************************************************
20+// ノートデザインリングModクラス
21+//******************************************************************************
22+class MTNoteDesignRingMod : public MTNoteDesignMod, public MTNoteDesignRing
23+{
24+public:
25+
26+ //コンストラクタ/デストラクタ
27+ MTNoteDesignRingMod(void);
28+ virtual ~MTNoteDesignRingMod(void);
29+
30+ virtual int Initialize(const TCHAR* pSceneName, SMSeqData* pSeqData);
31+
32+ //ノートボックス中心座標取得
33+ virtual D3DXVECTOR3 GetNoteBoxCenterPosX(
34+ unsigned long curTickTime,
35+ unsigned char portNo,
36+ unsigned char chNo,
37+ unsigned char noteNo,
38+ short pitchBendValue = 0, //省略可:ピッチベンド
39+ unsigned char pitchBendSensitivity = 0 //省略可:ピッチベンド感度
40+ );
41+
42+ //ノートボックス頂点座標取得
43+ virtual void GetNoteBoxVirtexPos(
44+ unsigned long curTickTime,
45+ unsigned char portNo,
46+ unsigned char chNo,
47+ unsigned char noteNo,
48+ D3DXVECTOR3* pVector0, //YZ平面+X軸方向を見て左上
49+ D3DXVECTOR3* pVector1, //YZ平面+X軸方向を見て右上
50+ D3DXVECTOR3* pVector2, //YZ平面+X軸方向を見て左下
51+ D3DXVECTOR3* pVector3, //YZ平面+X軸方向を見て右下
52+ short pitchBendValue = 0, //省略可:ピッチベンド
53+ unsigned char pitchBendSensitivity = 0 //省略可:ピッチベンド感度
54+ );
55+
56+ //発音中ノートボックス頂点座標取得
57+ virtual void GetActiveNoteBoxVirtexPos(
58+ unsigned long curTickTime,
59+ unsigned char portNo,
60+ unsigned char chNo,
61+ unsigned char noteNo,
62+ D3DXVECTOR3* pVector0, //YZ平面+X軸方向を見て左上
63+ D3DXVECTOR3* pVector1, //YZ平面+X軸方向を見て右上
64+ D3DXVECTOR3* pVector2, //YZ平面+X軸方向を見て左下
65+ D3DXVECTOR3* pVector3, //YZ平面+X軸方向を見て右下
66+ short pitchBendValue = 0, //省略可:ピッチベンド
67+ unsigned char pitchBendSensitivity = 0, //省略可:ピッチベンド感度
68+ unsigned long elapsedTime = 0 //省略可:経過時間(ミリ秒)
69+ );
70+
71+ //発音中ノートボックス頂点座標取得
72+ virtual void GetActiveNoteBoxVirtexPos(
73+ unsigned long curTickTime,
74+ unsigned char portNo,
75+ unsigned char chNo,
76+ unsigned char noteNo,
77+ D3DXVECTOR3* pVector0, //YZ平面+X軸方向を見て左上
78+ D3DXVECTOR3* pVector1, //YZ平面+X軸方向を見て右上
79+ D3DXVECTOR3* pVector2, //YZ平面+X軸方向を見て左下
80+ D3DXVECTOR3* pVector3, //YZ平面+X軸方向を見て右下
81+ short pitchBendValue = 0, //省略可:ピッチベンド
82+ unsigned char pitchBendSensitivity = 0, //省略可:ピッチベンド感度
83+ float rate = 0.0f //省略可:サイズ比率
84+ );
85+
86+ //ライブモニタ用ノートボックス頂点座標取得
87+ virtual void GetNoteBoxVirtexPosLive(
88+ unsigned long elapsedTime, //経過時間(ミリ秒)
89+ unsigned char portNo,
90+ unsigned char chNo,
91+ unsigned char noteNo,
92+ D3DXVECTOR3* pVector0, //YZ平面+X軸方向を見て左上
93+ D3DXVECTOR3* pVector1, //YZ平面+X軸方向を見て右上
94+ D3DXVECTOR3* pVector2, //YZ平面+X軸方向を見て左下
95+ D3DXVECTOR3* pVector3, //YZ平面+X軸方向を見て右下
96+ short pitchBendValue = 0, //省略可:ピッチベンド
97+ unsigned char pitchBendSensitivity = 0 //省略可:ピッチベンド感度
98+ );
99+
100+ //ポート原点座標取得
101+ virtual float GetPortOriginY(unsigned char portNo);
102+ virtual float GetPortOriginZ(unsigned char portNo);
103+
104+ //世界座標配置移動ベクトル取得
105+ virtual D3DXVECTOR3 GetWorldMoveVector();
106+
107+private:
108+
109+ virtual int _LoadConfFile(const TCHAR* pSceneName);
110+};
111+
112+
--- a/MIDITrail/MTNoteRippleMod.cpp
+++ b/MIDITrail/MTNoteRippleMod.cpp
@@ -21,6 +21,7 @@ using namespace YNBaseLib;
2121 //******************************************************************************
2222 MTNoteRippleMod::MTNoteRippleMod(void) : MTNoteRipple()
2323 {
24+ m_pNoteDesignMod = NULL;
2425 m_PlayTimeMSec = 0;
2526 m_CurNoteIndex = 0;
2627 m_pNoteStatusMod = NULL;
@@ -48,14 +49,10 @@ int MTNoteRippleMod::Create(
4849 int result = 0;
4950 SMTrack track;
5051
51- Release();
52-
53- //// 基底クラスの生成処理を呼び出す
54- //result = MTNoteRipple::Create(pD3DDevice, pSceneName, pSeqData, pNotePitchBend);
55- //if (result != 0) goto EXIT;
52+ //解放およびノートデザインModオブジェクト生成は基底クラスからオーバライド経由で行う
5653
57- //ノートデザインModオブジェクト初期化
58- result = m_NoteDesignMod.Initialize(pSceneName, pSeqData);
54+ // 基底クラスの生成処理を呼び出す
55+ result = MTNoteRipple::Create(pD3DDevice, pSceneName, pSeqData, pNotePitchBend);
5956 if (result != 0) goto EXIT;
6057
6158 //トラック取得
@@ -66,9 +63,26 @@ int MTNoteRippleMod::Create(
6663 result = track.GetNoteListWithRealTime(&m_NoteListRT, pSeqData->GetTimeDivision());
6764 if (result != 0) goto EXIT;
6865
69- // 基底クラスの生成処理を呼び出す
70- result = MTNoteRipple::Create(pD3DDevice, pSceneName, pSeqData, pNotePitchBend);
71- if (result != 0) goto EXIT;
66+EXIT:;
67+ return result;
68+}
69+
70+//******************************************************************************
71+// ノートデザイン生成
72+//******************************************************************************
73+int MTNoteRippleMod::_CreateNoteDesign()
74+{
75+ int result = 0;
76+
77+ try {
78+ //ノートデザインModオブジェクト生成
79+ m_pNoteDesignMod = new MTNoteDesignMod();
80+ m_pNoteDesign = m_pNoteDesignMod;
81+ }
82+ catch (std::bad_alloc) {
83+ result = YN_SET_ERR("Could not allocate memory.", 0, 0);
84+ goto EXIT;
85+ }
7286
7387 EXIT:;
7488 return result;
@@ -112,8 +126,8 @@ int MTNoteRippleMod::_UpdateStatusOfRipple(
112126 SMNote note;
113127
114128 //波紋ディケイ・リリース時間(msec)
115- unsigned long decayDuration = m_NoteDesignMod.GetRippleDecayDuration();
116- unsigned long releaseDuration = m_NoteDesignMod.GetRippleReleaseDuration();
129+ unsigned long decayDuration = m_pNoteDesignMod->GetRippleDecayDuration();
130+ unsigned long releaseDuration = m_pNoteDesignMod->GetRippleReleaseDuration();
117131
118132 //ノート情報を更新する
119133 for (i = 0; i < MTNOTERIPPLE_MAX_RIPPLE_NUM; i++) {
@@ -320,7 +334,7 @@ int MTNoteRippleMod::_UpdateVertexOfRipple(
320334 ZeroMemory(m_KeyDownRate, sizeof(float) * MTNOTERIPPLE_MAX_PORT_NUM * SM_MAX_CH_NUM * SM_MAX_NOTE_NUM);
321335
322336 // 波紋上書き回数
323- unsigned long overwriteTimes = m_NoteDesignMod.GetRippleOverwriteTimes();
337+ unsigned long overwriteTimes = m_pNoteDesignMod->GetRippleOverwriteTimes();
324338
325339 //発音中ノートの波紋について頂点を更新
326340 for (i = 0; i < MTNOTERIPPLE_MAX_RIPPLE_NUM; i++) {
@@ -392,8 +406,8 @@ int MTNoteRippleMod::Draw(
392406 pD3DDevice->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR);
393407
394408 //レンダリングステート設定:ブレンド指定値
395- pD3DDevice->SetRenderState(D3DRS_SRCBLEND, m_NoteDesignMod.GetRippleSrcBlend());
396- pD3DDevice->SetRenderState(D3DRS_DESTBLEND, m_NoteDesignMod.GetRippleDestBlend());
409+ pD3DDevice->SetRenderState(D3DRS_SRCBLEND, m_pNoteDesignMod->GetRippleSrcBlend());
410+ pD3DDevice->SetRenderState(D3DRS_DESTBLEND, m_pNoteDesignMod->GetRippleDestBlend());
397411
398412 //プリミティブ描画
399413 if (m_ActiveNoteNum > 0) {
@@ -415,10 +429,12 @@ EXIT:;
415429 //******************************************************************************
416430 void MTNoteRippleMod::Release()
417431 {
418- if(m_pNoteStatusMod != NULL) {
419- delete [] m_pNoteStatusMod;
420- m_pNoteStatusMod = NULL;
421- }
432+ delete m_pNoteDesignMod;
433+ m_pNoteDesignMod = NULL;
434+ m_pNoteDesign = NULL;
435+
436+ delete [] m_pNoteStatusMod;
437+ m_pNoteStatusMod = NULL;
422438
423439 MTNoteRipple::Release();
424440 }
@@ -463,7 +479,7 @@ int MTNoteRippleMod::_CreateVertex(
463479 MTNOTERIPPLE_VERTEX* pVertex = NULL;
464480
465481 // 波紋上書き回数
466- unsigned long overwriteTimes = m_NoteDesignMod.GetRippleOverwriteTimes();
482+ unsigned long overwriteTimes = m_pNoteDesignMod->GetRippleOverwriteTimes();
467483
468484 //プリミティブ初期化
469485 result = m_Primitive.Initialize(
@@ -526,11 +542,11 @@ int MTNoteRippleMod::_SetVertexPosition(
526542 );
527543
528544 //波紋サイズ
529- rh = m_NoteDesignMod.GetRippleHeight(pNoteStatus->keyDownRate);
530- rw = m_NoteDesignMod.GetRippleWidth(pNoteStatus->keyDownRate);
545+ rh = m_pNoteDesignMod->GetRippleHeight(pNoteStatus->keyDownRate);
546+ rw = m_pNoteDesignMod->GetRippleWidth(pNoteStatus->keyDownRate);
531547
532548 //波紋描画間隔
533- spacing = m_NoteDesignMod.GetRippleSpacing();
549+ spacing = m_pNoteDesignMod->GetRippleSpacing();
534550
535551 //描画終了確認
536552 if ((rh <= 0.0f) || (rw <= 0.0f)) {
@@ -562,7 +578,7 @@ int MTNoteRippleMod::_SetVertexPosition(
562578 }
563579
564580 //透明度を徐々に落とす
565- alpha = m_NoteDesignMod.GetRippleAlpha(pNoteStatus->keyDownRate);
581+ alpha = m_pNoteDesignMod->GetRippleAlpha(pNoteStatus->keyDownRate);
566582
567583 //各頂点のディフューズ色
568584 for (i = 0; i < 6; i++) {
--- a/MIDITrail/MTNoteRippleMod.h
+++ b/MIDITrail/MTNoteRippleMod.h
@@ -78,10 +78,12 @@ private:
7878 float keyDownRate;
7979 };
8080
81-private:
81+protected:
8282
8383 //ノートデザイン
84- MTNoteDesignMod m_NoteDesignMod;
84+ MTNoteDesignMod *m_pNoteDesignMod;
85+
86+private:
8587
8688 //ノートリスト
8789 SMNoteList m_NoteListRT;
@@ -94,6 +96,8 @@ private:
9496 //ノート発音状態情報
9597 NoteStatusMod* m_pNoteStatusMod;
9698
99+ virtual int _CreateNoteDesign();
100+
97101 int _SetVertexPosition(
98102 MTNOTERIPPLE_VERTEX* pVertex,
99103 SMNote note,
--- /dev/null
+++ b/MIDITrail/MTNoteRippleRingMod.cpp
@@ -0,0 +1,54 @@
1+//******************************************************************************
2+//
3+// MIDITrail / MTNoteRippleRingMod
4+//
5+// ノート波紋リング描画Modクラス
6+//
7+// Copyright (C) 2019 Yossiepon Oniichan. All Rights Reserved.
8+//
9+//******************************************************************************
10+
11+#include "StdAfx.h"
12+#include "YNBaseLib.h"
13+#include "MTNoteDesignRingMod.h"
14+#include "MTNoteRippleRingMod.h"
15+
16+using namespace YNBaseLib;
17+
18+
19+//******************************************************************************
20+// コンストラクタ
21+//******************************************************************************
22+MTNoteRippleRingMod::MTNoteRippleRingMod(void)
23+{
24+}
25+
26+//******************************************************************************
27+// デストラクタ
28+//******************************************************************************
29+MTNoteRippleRingMod::~MTNoteRippleRingMod(void)
30+{
31+}
32+
33+//******************************************************************************
34+// ノートデザイン生成
35+//******************************************************************************
36+int MTNoteRippleRingMod::_CreateNoteDesign()
37+{
38+ int result = 0;
39+
40+ try {
41+ //ノートデザインModオブジェクト生成
42+ m_pNoteDesignMod = new MTNoteDesignRingMod();
43+ m_pNoteDesign = m_pNoteDesignMod;
44+ }
45+ catch (std::bad_alloc) {
46+ result = YN_SET_ERR("Could not allocate memory.", 0, 0);
47+ goto EXIT;
48+ }
49+
50+EXIT:;
51+ return result;
52+}
53+
54+
--- /dev/null
+++ b/MIDITrail/MTNoteRippleRingMod.h
@@ -0,0 +1,33 @@
1+//******************************************************************************
2+//
3+// MIDITrail / MTNoteRippleRingMod
4+//
5+// ノート波紋リング描画Modクラス
6+//
7+// Copyright (C) 2019 Yossiepon Oniichan. All Rights Reserved.
8+//
9+//******************************************************************************
10+
11+#pragma once
12+
13+#include "MTNoteRippleMod.h"
14+
15+
16+//******************************************************************************
17+// リング用ノート波紋描画Modクラス
18+//******************************************************************************
19+class MTNoteRippleRingMod : public MTNoteRippleMod
20+{
21+public:
22+
23+ //コンストラクタ/デストラクタ
24+ MTNoteRippleRingMod(void);
25+ virtual ~MTNoteRippleRingMod(void);
26+
27+private:
28+
29+ virtual int _CreateNoteDesign();
30+
31+};
32+
33+
--- a/MIDITrail/MTScenePianoRollRing.h
+++ b/MIDITrail/MTScenePianoRollRing.h
@@ -101,9 +101,7 @@ public:
101101 void MoveToStaticViewpoint(unsigned long viewpointNo);
102102
103103 //視点リセット
104- // >>> modify 20191222 yossiepon begin
105104 void ResetViewpoint();
106- // <<< modify 20191222 yossiepon end
107105
108106 //エフェクト設定
109107 // >>> modify 20191222 yossiepon begin
--- a/MIDITrail/MTScenePianoRollRingMod.cpp
+++ b/MIDITrail/MTScenePianoRollRingMod.cpp
@@ -213,9 +213,10 @@ int MTScenePianoRollRingMod::OnRecvSequencerMsg(
213213 }
214214 //演奏チックタイム通知
215215 else if (parser.GetMsg() == SMMsgParser::MsgPlayTime) {
216- m_Dashboard.SetPlayTimeSec(parser.GetPlayTimeSec());
216+ m_Dashboard.SetPlayTimeMSec(parser.GetPlayTimeMSec());
217217 m_FirstPersonCam.SetCurTickTime(parser.GetPlayTickTime());
218218 m_TimeIndicatorMod.SetCurTickTime(parser.GetPlayTickTime());
219+ m_NoteRippleMod.SetPlayTimeMSec(parser.GetPlayTimeMSec());
219220 m_NoteRippleMod.SetCurTickTime(parser.GetPlayTickTime());
220221 m_PictBoard.SetCurTickTime(parser.GetPlayTickTime());
221222 m_NoteBox.SetCurTickTime(parser.GetPlayTickTime());
@@ -234,12 +235,12 @@ int MTScenePianoRollRingMod::OnRecvSequencerMsg(
234235 }
235236 //ノートOFF通知
236237 else if (parser.GetMsg() == SMMsgParser::MsgNoteOff) {
237- m_NoteRippleMod.SetNoteOff(parser.GetPortNo(), parser.GetChNo(), parser.GetNoteNo());
238+ //m_NoteRippleMod.SetNoteOff(parser.GetPortNo(), parser.GetChNo(), parser.GetNoteNo());
238239 }
239240 //ノートON通知
240241 else if (parser.GetMsg() == SMMsgParser::MsgNoteOn) {
241242 m_Dashboard.SetNoteOn();
242- m_NoteRippleMod.SetNoteOn(parser.GetPortNo(), parser.GetChNo(), parser.GetNoteNo(), parser.GetVelocity());
243+ //m_NoteRippleMod.SetNoteOn(parser.GetPortNo(), parser.GetChNo(), parser.GetNoteNo(), parser.GetVelocity());
243244 }
244245 //ピッチベンド通知
245246 else if (parser.GetMsg() == SMMsgParser::MsgPitchBend) {
@@ -304,4 +305,3 @@ void MTScenePianoRollRingMod::SetEffect(
304305
305306 return;
306307 }
307-
--- a/MIDITrail/MTScenePianoRollRingMod.h
+++ b/MIDITrail/MTScenePianoRollRingMod.h
@@ -10,6 +10,7 @@
1010
1111 #pragma once
1212
13+#include "MTNoteRippleRingMod.h"
1314 #include "MTGridRingMod.h"
1415 #include "MTTimeIndicatorRingMod.h"
1516 #include "MTScenePianoRollRing.h"
@@ -59,7 +60,7 @@ public:
5960 protected:
6061
6162 //描画オブジェクト
62- MTNoteRippleRing m_NoteRippleMod;
63+ MTNoteRippleRingMod m_NoteRippleMod;
6364 MTGridRingMod m_GridRingMod;
6465 MTTimeIndicatorRingMod m_TimeIndicatorMod;
6566
--- a/Resources/conf/PianoRollRing.ini
+++ b/Resources/conf/PianoRollRing.ini
@@ -62,14 +62,23 @@ EmissiveRGBA=1A1A1A1A
6262 SizeRatio=1.4
6363
6464 [Ripple]
65-Duration=1600
65+;Duration=1600
66+DecayDuration=100
67+ReleaseDuration=250
68+;-- D3dBlendType : ZERO=1, ONE=2, SRCALPHA=5, INVSRCALPHA=6, DESTALPHA=7, INVDESTALPHA=8
69+SrcBlend=5
70+DestBlend=2
71+OverwriteTimes=3
72+;-- e.g.) BlackBG : Src/Dest/Overwrite = 5/2/3, PictureBG : Src/Dest/Overwrite = 5/2/1
73+Spacing=0.002
6674
6775 [Stars]
6876 NumberOfStars=2000
6977
7078 [Bitmap]
7179 Board=data\Board.png
72-Ripple=data\Ripple.png
80+Ripple=data\Ripple2.png
81+;Keyboard=data\Keyboard.png
7382
7483 #[Mesh]
7584 #XFile=mesh\model.x
@@ -95,3 +104,33 @@ Theta=90.0
95104 ManualRollAngle=0.0
96105 AutoRollVelocity=0.0
97106
107+;[PianoKeyboard]
108+;KeyDownDuration=40
109+;KeyUpDuration=40
110+;KeyboardStepY=0.34
111+;KeyboardStepZ=1.5
112+;KeyboardMaxDispNum=16
113+;WhiteKeyColor=FFFFFFDD
114+;BlackKeyColor=FFFFFFDD
115+;ActiveKeyColorType=STANDARD
116+;;ActiveKeyColor=FF0000FF
117+;Ch-01-ActiveKeyColor=E61A1AEE
118+;Ch-02-ActiveKeyColor=1FFF01EE
119+;Ch-03-ActiveKeyColor=013DFFEE
120+;Ch-04-ActiveKeyColor=FF6101EE
121+;Ch-05-ActiveKeyColor=01FF43EE
122+;Ch-06-ActiveKeyColor=2501FFEE
123+;Ch-07-ActiveKeyColor=FFC001EE
124+;Ch-08-ActiveKeyColor=01FFA2EE
125+;Ch-09-ActiveKeyColor=7F01FFEE
126+;Ch-10-ActiveKeyColor=DEFF01EE
127+;Ch-11-ActiveKeyColor=01FCFFEE
128+;Ch-12-ActiveKeyColor=DE01FFEE
129+;Ch-13-ActiveKeyColor=7FFF01EE
130+;Ch-14-ActiveKeyColor=019DFFEE
131+;Ch-15-ActiveKeyColor=FF01C0EE
132+;Ch-16-ActiveKeyColor=FF0161EE
133+;ActiveKeyColorDuration=400
134+;ActiveKeyColorTailRate=0.5
135+;KeyDispRangeStart=0
136+;KeyDispRangeEnd=127