• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

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


Commit MetaInfo

Revisionaf7bd5cff0f1650d554e7a3a76fb59df01af975a (tree)
Zeit2018-04-11 12:33:00
Autoryoshy <yoshy@user...>
Commiteryoshy

Log Message

[UPGRADE] original 1.2.3

Ändern Zusammenfassung

Diff

--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -1,5 +1,5 @@
11
2-Copyright (c) 2010-2016, WADA Masashi <yknk@users.osdn.me>
2+Copyright (c) 2010-2017, WADA Masashi <yknk@users.osdn.me>
33 All rights reserved.
44
55 Redistribution and use in source and binary forms, with or without
--- a/MIDITrail/MIDITrailVersion.h
+++ b/MIDITrail/MIDITrailVersion.h
@@ -4,7 +4,7 @@
44 //
55 // MIDITrail バージョン定義
66 //
7-// Copyright (C) 2014-2016 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2014-2017 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -16,10 +16,10 @@
1616 //******************************************************************************
1717
1818 //バージョン文字列
19-#define MIDITRAIL_VERSION_STRING_X86 _T("Version 1.2.2 (32bit)")
20-#define MIDITRAIL_VERSION_STRING_X64 _T("Version 1.2.2 (64bit)")
19+#define MIDITRAIL_VERSION_STRING_X86 _T("Version 1.2.3 (32bit)")
20+#define MIDITRAIL_VERSION_STRING_X64 _T("Version 1.2.3 (64bit)")
2121
2222 //コピーライト
23-#define MIDITRAIL_COPYRIGHT _T("Copyright (C) 2010-2016 WADA Masashi");
23+#define MIDITRAIL_COPYRIGHT _T("Copyright (C) 2010-2017 WADA Masashi");
2424
2525
--- a/MIDITrail/MTNoteBox.cpp
+++ b/MIDITrail/MTNoteBox.cpp
@@ -4,7 +4,7 @@
44 //
55 // ノートボックス描画クラス
66 //
7-// Copyright (C) 2010-2012 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2010-2017 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -447,15 +447,11 @@ int MTNoteBox::_UpdateVertexOfActiveNotes(
447447 );
448448 if (result != 0) goto EXIT;
449449
450- //発音中ノートがピッチベンドで移動する場合
451450 //発音終了までオリジナルのノートを非表示にする
452451 if (!(m_pNoteStatus[i].isHide)) {
453- if ((m_pNotePitchBend->GetValue(note.portNo, note.chNo) != 0)
454- && (m_pNotePitchBend->GetSensitivity(note.portNo, note.chNo) != 0)) {
455- result = _HideNoteBox(m_pNoteStatus[i].index);
456- if (result != 0) goto EXIT;
457- m_pNoteStatus[i].isHide = true;
458- }
452+ result = _HideNoteBox(m_pNoteStatus[i].index);
453+ if (result != 0) goto EXIT;
454+ m_pNoteStatus[i].isHide = true;
459455 }
460456
461457 activeNoteNum++;
@@ -553,30 +549,62 @@ int MTNoteBox::_CreateVertexOfNote(
553549 //
554550
555551 //ノートボックス頂点座標取得
556- m_NoteDesign.GetNoteBoxVirtexPos(
557- note.startTime,
558- note.portNo,
559- note.chNo,
560- note.noteNo,
561- &vectorStartLU,
562- &vectorStartRU,
563- &vectorStartLD,
564- &vectorStartRD,
565- pitchBendValue,
566- pitchBendSensitivity
567- );
568- m_NoteDesign.GetNoteBoxVirtexPos(
569- note.endTime,
570- note.portNo,
571- note.chNo,
572- note.noteNo,
573- &vectorEndLU,
574- &vectorEndRU,
575- &vectorEndLD,
576- &vectorEndRD,
577- pitchBendValue,
578- pitchBendSensitivity
579- );
552+ if (elapsedTime == 0xFFFFFFFF) {
553+ //通常ノートの場合
554+ m_NoteDesign.GetNoteBoxVirtexPos(
555+ note.startTime,
556+ note.portNo,
557+ note.chNo,
558+ note.noteNo,
559+ &vectorStartLU,
560+ &vectorStartRU,
561+ &vectorStartLD,
562+ &vectorStartRD,
563+ pitchBendValue,
564+ pitchBendSensitivity
565+ );
566+ m_NoteDesign.GetNoteBoxVirtexPos(
567+ note.endTime,
568+ note.portNo,
569+ note.chNo,
570+ note.noteNo,
571+ &vectorEndLU,
572+ &vectorEndRU,
573+ &vectorEndLD,
574+ &vectorEndRD,
575+ pitchBendValue,
576+ pitchBendSensitivity
577+ );
578+ }
579+ else {
580+ //発音中ノートの場合:経過時間でサイズが変化する
581+ m_NoteDesign.GetActiveNoteBoxVirtexPos(
582+ note.startTime,
583+ note.portNo,
584+ note.chNo,
585+ note.noteNo,
586+ &vectorStartLU,
587+ &vectorStartRU,
588+ &vectorStartLD,
589+ &vectorStartRD,
590+ pitchBendValue,
591+ pitchBendSensitivity,
592+ elapsedTime
593+ );
594+ m_NoteDesign.GetActiveNoteBoxVirtexPos(
595+ note.endTime,
596+ note.portNo,
597+ note.chNo,
598+ note.noteNo,
599+ &vectorEndLU,
600+ &vectorEndRU,
601+ &vectorEndLD,
602+ &vectorEndRD,
603+ pitchBendValue,
604+ pitchBendSensitivity,
605+ elapsedTime
606+ );
607+ }
580608
581609 //頂点座標・・・法線が異なるので頂点を8個に集約できない
582610 //上の面
--- a/MIDITrail/MTNoteDesign.cpp
+++ b/MIDITrail/MTNoteDesign.cpp
@@ -4,7 +4,7 @@
44 //
55 // ノートデザインクラス
66 //
7-// Copyright (C) 2010-2013 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2010-2017 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -213,6 +213,42 @@ void MTNoteDesign::GetNoteBoxVirtexPos(
213213 }
214214
215215 //******************************************************************************
216+// 発音中ノートボックス頂点座標取得
217+//******************************************************************************
218+void MTNoteDesign::GetActiveNoteBoxVirtexPos(
219+ unsigned long curTickTime,
220+ unsigned char portNo,
221+ unsigned char chNo,
222+ unsigned char noteNo,
223+ D3DXVECTOR3* pVector0, //YZ平面+X軸方向を見て左上
224+ D3DXVECTOR3* pVector1, //YZ平面+X軸方向を見て右上
225+ D3DXVECTOR3* pVector2, //YZ平面+X軸方向を見て左下
226+ D3DXVECTOR3* pVector3, //YZ平面+X軸方向を見て右下
227+ short pitchBendValue, //省略可:ピッチベンド
228+ unsigned char pitchBendSensitivity, //省略可:ピッチベンド感度
229+ unsigned long elapsedTime //省略可:経過時間(ミリ秒)
230+ )
231+{
232+ D3DXVECTOR3 center;
233+ float bh, bw = 0.0f;
234+ float curSizeRatio = 1.0f;
235+
236+ center = GetNoteBoxCenterPosX(curTickTime, portNo, chNo, noteNo, pitchBendValue, pitchBendSensitivity);
237+
238+ if (elapsedTime < (unsigned long)m_ActiveNoteDuration) {
239+ curSizeRatio = 1.0f + (m_ActiveNoteBoxSizeRatio - 1.0f) * (1.0f - (float)elapsedTime / (float)m_ActiveNoteDuration);
240+ }
241+
242+ bh = GetNoteBoxHeight() * curSizeRatio;
243+ bw = GetNoteBoxWidht() * curSizeRatio;
244+
245+ *pVector0 = D3DXVECTOR3(center.x, center.y+(bh/2.0f), center.z+(bw/2.0f));
246+ *pVector1 = D3DXVECTOR3(center.x, center.y+(bh/2.0f), center.z-(bw/2.0f));
247+ *pVector2 = D3DXVECTOR3(center.x, center.y-(bh/2.0f), center.z+(bw/2.0f));
248+ *pVector3 = D3DXVECTOR3(center.x, center.y-(bh/2.0f), center.z-(bw/2.0f));
249+}
250+
251+//******************************************************************************
216252 // ライブモニタ用ノートボックス頂点座標取得
217253 //******************************************************************************
218254 void MTNoteDesign::GetNoteBoxVirtexPosLive(
@@ -608,6 +644,7 @@ void MTNoteDesign::_Clear(void)
608644
609645 m_ActiveNoteDuration = 400;
610646 m_ActiveNoteWhiteRate = 1.0f;
647+ m_ActiveNoteBoxSizeRatio = 1.0f;
611648 m_RippleDuration = 1600;
612649 }
613650
@@ -717,6 +754,10 @@ int MTNoteDesign::_LoadConfFile(
717754 if (result != 0) goto EXIT;
718755 m_ActiveNoteEmissive = DXColorUtil::MakeColorFromHexRGBA(hexColor);
719756
757+ //発音中ノート情報:ボックスサイズ比率
758+ result = confFile.GetFloat(_T("SizeRatio"), &m_ActiveNoteBoxSizeRatio, 1.4f);
759+ if (result != 0) goto EXIT;
760+
720761 //----------------------------------
721762 //波紋情報
722763 //----------------------------------
--- a/MIDITrail/MTNoteDesign.h
+++ b/MIDITrail/MTNoteDesign.h
@@ -4,7 +4,7 @@
44 //
55 // ノートデザインクラス
66 //
7-// Copyright (C) 2010-2013 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2010-2017 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -91,6 +91,21 @@ public:
9191 unsigned char pitchBendSensitivity = 0 //省略可:ピッチベンド感度
9292 );
9393
94+ //発音中ノートボックス頂点座標取得
95+ void GetActiveNoteBoxVirtexPos(
96+ unsigned long curTickTime,
97+ unsigned char portNo,
98+ unsigned char chNo,
99+ unsigned char noteNo,
100+ D3DXVECTOR3* pVector0, //YZ平面+X軸方向を見て左上
101+ D3DXVECTOR3* pVector1, //YZ平面+X軸方向を見て右上
102+ D3DXVECTOR3* pVector2, //YZ平面+X軸方向を見て左下
103+ D3DXVECTOR3* pVector3, //YZ平面+X軸方向を見て右下
104+ short pitchBendValue = 0, //省略可:ピッチベンド
105+ unsigned char pitchBendSensitivity = 0, //省略可:ピッチベンド感度
106+ unsigned long elapsedTime = 0 //省略可:経過時間(ミリ秒)
107+ );
108+
94109 //ライブモニタ用ノートボックス頂点座標取得
95110 void GetNoteBoxVirtexPosLive(
96111 unsigned long elapsedTime, //経過時間(ミリ秒)
@@ -201,6 +216,7 @@ private:
201216
202217 int m_ActiveNoteDuration;
203218 float m_ActiveNoteWhiteRate;
219+ float m_ActiveNoteBoxSizeRatio;
204220
205221 int m_RippleDuration;
206222
--- a/MIDITrail/MTNoteRipple.cpp
+++ b/MIDITrail/MTNoteRipple.cpp
@@ -4,7 +4,7 @@
44 //
55 // ノート波紋描画クラス
66 //
7-// Copyright (C) 2010-2012 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2010-2017 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -456,7 +456,7 @@ int MTNoteRipple::_SetVertexPosition(
456456
457457 //法線
458458 for (i = 0; i < 6; i++) {
459- pVertex[i].n = D3DXVECTOR3(-1.0f, 0.0f, 0.0f);
459+ pVertex[i].n = D3DXVECTOR3(0.0f, 0.0f, -1.0f);
460460 }
461461
462462 //透明度を徐々に落とす
--- a/README.en.txt
+++ b/README.en.txt
@@ -1,8 +1,8 @@
11 ******************************************************************************
22
3- MIDITrail source code Ver.1.2.2 for Windows
3+ MIDITrail source code Ver.1.2.3 for Windows
44
5- Copyright (C) 2010-2016 WADA Masashi. All Rights Reserved.
5+ Copyright (C) 2010-2017 WADA Masashi. All Rights Reserved.
66
77 Web : https://osdn.jp/projects/miditrail/
88 Mail: yknk@users.osdn.me
--- a/README.ja.txt
+++ b/README.ja.txt
@@ -1,8 +1,8 @@
11 ******************************************************************************
22
3- MIDITrail ソースコード Ver.1.2.2 for Windows
3+ MIDITrail ソースコード Ver.1.2.3 for Windows
44
5- Copyright (C) 2010-2016 WADA Masashi. All Rights Reserved.
5+ Copyright (C) 2010-2017 WADA Masashi. All Rights Reserved.
66
77 Web : https://osdn.jp/projects/miditrail/
88 Mail: yknk@users.osdn.me