• 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ón613d74b807b642f156732bc1bdd908c7f4422a79 (tree)
Tiempo2022-08-12 01:17:15
Autoryoshy <yoshy.org.bitbucket@gz.j...>
Commiteryoshy

Log Message

[UPGRADE] original 1.3.6

Cambiar Resumen

Diferencia incremental

--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -1,5 +1,5 @@
11
2-Copyright (c) 2010-2021, WADA Masashi <yknk@users.osdn.me>
2+Copyright (c) 2010-2022, 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/DXDirLight.cpp
+++ b/MIDITrail/DXDirLight.cpp
@@ -4,7 +4,7 @@
44 //
55 // ディレクショナルライトクラス
66 //
7-// Copyright (C) 2010-2012 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2010-2022 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -105,13 +105,25 @@ D3DXVECTOR3 DXDirLight::GetDirection()
105105 }
106106
107107 //******************************************************************************
108-// デバイス登録
108+// デバイス登録:インデックス0
109109 //******************************************************************************
110110 int DXDirLight::SetDevice(
111111 LPDIRECT3DDEVICE9 pD3DDevice,
112112 BOOL isLightON
113113 )
114114 {
115+ return SetDevice(pD3DDevice, 0, isLightON);
116+}
117+
118+//******************************************************************************
119+// デバイス登録:インデックス指定
120+//******************************************************************************
121+int DXDirLight::SetDevice(
122+ LPDIRECT3DDEVICE9 pD3DDevice,
123+ DWORD index,
124+ BOOL isLightON
125+ )
126+{
115127 int result = 0;
116128 HRESULT hresult = D3D_OK;
117129
@@ -132,14 +144,14 @@ int DXDirLight::SetDevice(
132144 }
133145
134146 // ライトをレンダリングパイプラインに設定
135- hresult = pD3DDevice->SetLight(0, &m_Light);
147+ hresult = pD3DDevice->SetLight(index, &m_Light);
136148 if (FAILED(hresult)) {
137149 result = YN_SET_ERR("DirectX API error.", hresult, 0);
138150 goto EXIT;
139151 }
140152
141153 //ライト有効化
142- hresult = pD3DDevice->LightEnable(0, isLightON);
154+ hresult = pD3DDevice->LightEnable(index, isLightON);
143155 if (FAILED(hresult)) {
144156 result = YN_SET_ERR("DirectX API error.", hresult, isLightON);
145157 goto EXIT;
--- a/MIDITrail/DXDirLight.h
+++ b/MIDITrail/DXDirLight.h
@@ -4,7 +4,7 @@
44 //
55 // ディレクショナルライトクラス
66 //
7-// Copyright (C) 2010-2012 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2010-2022 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -42,6 +42,11 @@ public:
4242 LPDIRECT3DDEVICE9 pD3DDevice,
4343 BOOL isLightON
4444 );
45+ int SetDevice(
46+ LPDIRECT3DDEVICE9 pD3DDevice,
47+ DWORD index,
48+ BOOL isLightON
49+ );
4550
4651 private:
4752
--- a/MIDITrail/MIDITrail.rc
+++ b/MIDITrail/MIDITrail.rc
@@ -83,13 +83,26 @@ BEGIN
8383 MENUITEM "Stars", IDM_ENABLE_STARS
8484 MENUITEM "Counter", IDM_ENABLE_COUNTER
8585 MENUITEM "Background Image", IDM_ENABLE_BACKGROUNDIMAGE
86+ MENUITEM "Grid Line", IDM_ENABLE_GRIDLINE
87+ MENUITEM "Time Indicator", IDM_ENABLE_TIMEINDICATOR
8688 MENUITEM SEPARATOR
8789 MENUITEM "Viewpoint 1\t7", IDM_RESET_VIEWPOINT
8890 MENUITEM "Viewpoint 2\t8", IDM_VIEWPOINT2
8991 MENUITEM "Viewpoint 3\t9", IDM_VIEWPOINT3
92+ POPUP "My Viewpoint"
93+ BEGIN
94+ MENUITEM "My Viewpoint 1\tCtrl + 7", IDM_MYVIEWPOINT1
95+ MENUITEM "My Viewpoint 2\tCtrl + 8", IDM_MYVIEWPOINT2
96+ MENUITEM "My Viewpoint 3\tCtrl + 9", IDM_MYVIEWPOINT3
97+ MENUITEM SEPARATOR
98+ MENUITEM "Save My Viewpoint 1\tShift + Ctrl + 7", IDM_SAVE_MYVIEWPOINT1
99+ MENUITEM "Save My Viewpoint 2\tShift + Ctrl + 8", IDM_SAVE_MYVIEWPOINT2
100+ MENUITEM "Save My Viewpoint 3\tShift + Ctrl + 9", IDM_SAVE_MYVIEWPOINT3
101+ END
90102 MENUITEM SEPARATOR
91- MENUITEM "Window size...", IDM_WINDOWSIZE
103+ MENUITEM "Window Size...", IDM_WINDOWSIZE
92104 MENUITEM "Full Screen\tF11", IDM_FULLSCREEN
105+ MENUITEM "Menu Bar\tF12", IDM_MENUBAR
93106 END
94107 POPUP "Option"
95108 BEGIN
--- a/MIDITrail/MIDITrailApp.cpp
+++ b/MIDITrail/MIDITrailApp.cpp
@@ -4,7 +4,7 @@
44 //
55 // MIDITrail アプリケーションクラス
66 //
7-// Copyright (C) 2010-2021 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2010-2022 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -55,6 +55,7 @@ MIDITrailApp::MIDITrailApp(void)
5555 m_Title[0] = _T('\0');
5656 m_WndClassName[0] = _T('\0');
5757 m_isFullScreen = false;
58+ m_isEnableMenuBar = true;
5859 m_hMenu = NULL;
5960
6061 //レンダリング系
@@ -82,6 +83,8 @@ MIDITrailApp::MIDITrailApp(void)
8283 m_isEnableCounter = true;
8384 m_isEnableFileName = false;
8485 m_isEnableBackgroundImage = true;
86+ m_isEnableGridLine = true;
87+ m_isEnableTimeIndicator = true;
8588
8689 //シーン種別
8790 m_SceneType = Title;
@@ -204,6 +207,10 @@ int MIDITrailApp::Initialize(
204207 result = _LoadSceneConf();
205208 if (result != 0) goto EXIT;
206209
210+ //表示効果選択状態読み込み
211+ result = _LoadEffectStatus();
212+ if (result != 0) goto EXIT;
213+
207214 //メニュー選択マーク更新
208215 result = _UpdateMenuCheckmark();
209216 if (result != 0) goto EXIT;
@@ -463,6 +470,23 @@ int MIDITrailApp::_SetWindowSize()
463470 if (result != 0) goto EXIT;
464471 result = m_ViewConf.GetInt(_T("ApplyToViewArea"), &applyToViewArea, 0);
465472 if (result != 0) goto EXIT;
473+
474+ //ウィンドウスタイル設定
475+ apiresult = SetWindowLong(m_hWnd, GWL_STYLE, MIDITRAIL_WINDOW_STYLE);
476+ if (apiresult == 0) {
477+ result = YN_SET_ERR("Windows API error.", GetLastError(), (DWORD64)m_hWnd);
478+ goto EXIT;
479+ }
480+
481+ //メニューバー表示
482+ if (m_isEnableMenuBar) {
483+ result = _ShowMenu();
484+ if (result != 0) goto EXIT;
485+ }
486+ else {
487+ result = _HideMenu();
488+ if (result != 0) goto EXIT;
489+ }
466490
467491 //初回起動時のウィンドウサイズ
468492 if ((width <= 0) || (height <= 0)) {
@@ -489,18 +513,7 @@ int MIDITrailApp::_SetWindowSize()
489513 width = width + framew;
490514 height = height + frameh;
491515 }
492-
493- //ウィンドウスタイル設定
494- apiresult = SetWindowLong(m_hWnd, GWL_STYLE, MIDITRAIL_WINDOW_STYLE);
495- if (apiresult == 0) {
496- result = YN_SET_ERR("Windows API error.", GetLastError(), (DWORD64)m_hWnd);
497- goto EXIT;
498- }
499-
500- //メニューバー表示
501- result = _ShowMenu();
502- if (result != 0) goto EXIT;
503-
516+
504517 //ウィンドウサイズ変更
505518 bresult = SetWindowPos(
506519 m_hWnd, //ウィンドウハンドル
@@ -792,6 +805,16 @@ LRESULT MIDITrailApp::_WndProcImpl(
792805 result = _OnMenuEnableEffect(MTScene::EffectBackgroundImage);
793806 if (result != 0) goto EXIT;
794807 break;
808+ case IDM_ENABLE_GRIDLINE:
809+ //表示効果:グリッドライン
810+ result = _OnMenuEnableEffect(MTScene::EffectGridLine);
811+ if (result != 0) goto EXIT;
812+ break;
813+ case IDM_ENABLE_TIMEINDICATOR:
814+ //表示効果:タイムインジケータ
815+ result = _OnMenuEnableEffect(MTScene::EffectTimeIndicator);
816+ if (result != 0) goto EXIT;
817+ break;
795818 //自動視点保存と視点保存は廃止
796819 //case IDM_AUTO_SAVE_VIEWPOINT:
797820 // //自動視点保存
@@ -818,6 +841,36 @@ LRESULT MIDITrailApp::_WndProcImpl(
818841 result = _OnMenuViewpoint(3);
819842 if (result != 0) goto EXIT;
820843 break;
844+ case IDM_MYVIEWPOINT1:
845+ //私の視点1に移動
846+ result = _OnMenuMyViewpoint(1);
847+ if (result != 0) goto EXIT;
848+ break;
849+ case IDM_MYVIEWPOINT2:
850+ //私の視点2に移動
851+ result = _OnMenuMyViewpoint(2);
852+ if (result != 0) goto EXIT;
853+ break;
854+ case IDM_MYVIEWPOINT3:
855+ //私の視点3に移動
856+ result = _OnMenuMyViewpoint(3);
857+ if (result != 0) goto EXIT;
858+ break;
859+ case IDM_SAVE_MYVIEWPOINT1:
860+ //私の視点1を保存
861+ result = _OnMenuSaveMyViewpoint(1);
862+ if (result != 0) goto EXIT;
863+ break;
864+ case IDM_SAVE_MYVIEWPOINT2:
865+ //私の視点2を保存
866+ result = _OnMenuSaveMyViewpoint(2);
867+ if (result != 0) goto EXIT;
868+ break;
869+ case IDM_SAVE_MYVIEWPOINT3:
870+ //私の視点3を保存
871+ result = _OnMenuSaveMyViewpoint(3);
872+ if (result != 0) goto EXIT;
873+ break;
821874 case IDM_WINDOWSIZE:
822875 //ウィンドウサイズ設定
823876 result = _OnMenuWindowSize();
@@ -828,6 +881,11 @@ LRESULT MIDITrailApp::_WndProcImpl(
828881 result = _OnMenuFullScreen();
829882 if (result != 0) goto EXIT;
830883 break;
884+ case IDM_MENUBAR:
885+ //メニューバー
886+ result = _OnMenuMenuBar();
887+ if (result != 0) goto EXIT;
888+ break;
831889 case IDM_OPTION_MIDIOUT:
832890 //MIDI出力デバイス設定
833891 result = _OnMenuOptionMIDIOUT();
@@ -1475,6 +1533,44 @@ EXIT:;
14751533 }
14761534
14771535 //******************************************************************************
1536+// メニュー選択:私の視点移動
1537+//******************************************************************************
1538+int MIDITrailApp::_OnMenuMyViewpoint(
1539+ unsigned long viewpointNo
1540+ )
1541+{
1542+ int result = 0;
1543+
1544+ if (m_PlayStatus == NoData) goto EXIT;
1545+
1546+ //私の視点に移動
1547+ result = _MoveToMyViewpoint(viewpointNo);
1548+ if (result != 0) goto EXIT;
1549+
1550+EXIT:;
1551+ return result;
1552+}
1553+
1554+//******************************************************************************
1555+// メニュー選択:私の視点保存
1556+//******************************************************************************
1557+int MIDITrailApp::_OnMenuSaveMyViewpoint(
1558+ unsigned long viewpointNo
1559+ )
1560+{
1561+ int result = 0;
1562+
1563+ if (m_PlayStatus == NoData) goto EXIT;
1564+
1565+ //私の視点を保存
1566+ result = _SaveMyViewpoint(viewpointNo);
1567+ if (result != 0) goto EXIT;
1568+
1569+EXIT:;
1570+ return result;
1571+}
1572+
1573+//******************************************************************************
14781574 // メニュー選択:視点リセット
14791575 //******************************************************************************
14801576 int MIDITrailApp::_OnMenuResetViewpoint()
@@ -1539,14 +1635,27 @@ int MIDITrailApp::_OnMenuEnableEffect(
15391635 case MTScene::EffectBackgroundImage:
15401636 m_isEnableBackgroundImage = m_isEnableBackgroundImage ? false : true;
15411637 break;
1638+ case MTScene::EffectGridLine:
1639+ m_isEnableGridLine = m_isEnableGridLine ? false : true;
1640+ break;
1641+ case MTScene::EffectTimeIndicator:
1642+ m_isEnableTimeIndicator = m_isEnableTimeIndicator ? false : true;
1643+ break;
15421644 default:
15431645 break;
15441646 }
15451647
1648+ //表示効果反映
15461649 _UpdateEffect();
1650+
1651+ //メニュー選択マーク更新
15471652 _UpdateMenuCheckmark();
15481653
1549-//EXIT:;
1654+ //表示効果選択状態保存
1655+ result = _SaveEffectStatus();
1656+ if (result != 0) goto EXIT;
1657+
1658+EXIT:;
15501659 return result;
15511660 }
15521661
@@ -1587,6 +1696,21 @@ EXIT:;
15871696 }
15881697
15891698 //******************************************************************************
1699+// メニュー選択:メニューバー
1700+//******************************************************************************
1701+int MIDITrailApp::_OnMenuMenuBar()
1702+{
1703+ int result = 0;
1704+
1705+ //メニューバー表示切替
1706+ result = _ToggleMenuBar();
1707+ if (result != 0) goto EXIT;
1708+
1709+EXIT:;
1710+ return result;
1711+}
1712+
1713+//******************************************************************************
15901714 // メニュー選択:MIDI出力デバイス設定
15911715 //******************************************************************************
15921716 int MIDITrailApp::_OnMenuOptionMIDIOUT()
@@ -1897,6 +2021,23 @@ int MIDITrailApp::_OnMouseMove(
18972021 if (result != 0) goto EXIT;
18982022 }
18992023 }
2024+ //ウィンドウ表示の場合
2025+ else {
2026+ //メニュー非表示の場合
2027+ //マウスカーソルがウィンドウ上端近くに移動したときだけメニューを表示する
2028+ if (!m_isEnableMenuBar) {
2029+ if (point.y <= 5) {
2030+ //メニューバー表示
2031+ result = _ShowMenu();
2032+ if (result != 0) goto EXIT;
2033+ }
2034+ else {
2035+ //メニューバー非表示
2036+ result = _HideMenu();
2037+ if (result != 0) goto EXIT;
2038+ }
2039+ }
2040+ }
19002041
19012042 EXIT:;
19022043 return result;
@@ -1974,21 +2115,57 @@ int MIDITrailApp::_OnKeyDown(
19742115 break;
19752116 case '7':
19762117 case VK_NUMPAD7:
1977- //視点リセット
1978- result = _OnMenuResetViewpoint();
1979- if (result != 0) goto EXIT;
2118+ if ((GetKeyState(VK_SHIFT) & 0x8000) && (GetKeyState(VK_CONTROL) & 0x8000)) {
2119+ //私の視点1保存
2120+ result = _OnMenuSaveMyViewpoint(1);
2121+ if (result != 0) goto EXIT;
2122+ }
2123+ else if (GetKeyState(VK_CONTROL) & 0x8000) {
2124+ //私の視点1移動
2125+ result = _OnMenuMyViewpoint(1);
2126+ if (result != 0) goto EXIT;
2127+ }
2128+ else {
2129+ //視点リセット
2130+ result = _OnMenuResetViewpoint();
2131+ if (result != 0) goto EXIT;
2132+ }
19802133 break;
19812134 case '8':
19822135 case VK_NUMPAD8:
1983- //静的視点2移動
1984- result = _OnMenuViewpoint(2);
1985- if (result != 0) goto EXIT;
2136+ if ((GetKeyState(VK_SHIFT) & 0x8000) && (GetKeyState(VK_CONTROL) & 0x8000)) {
2137+ //私の視点2保存
2138+ result = _OnMenuSaveMyViewpoint(2);
2139+ if (result != 0) goto EXIT;
2140+ }
2141+ else if (GetKeyState(VK_CONTROL) & 0x8000) {
2142+ //私の視点2移動
2143+ result = _OnMenuMyViewpoint(2);
2144+ if (result != 0) goto EXIT;
2145+ }
2146+ else {
2147+ //静的視点2移動
2148+ result = _OnMenuViewpoint(2);
2149+ if (result != 0) goto EXIT;
2150+ }
19862151 break;
19872152 case '9':
19882153 case VK_NUMPAD9:
1989- //静的視点3移動
1990- result = _OnMenuViewpoint(3);
1991- if (result != 0) goto EXIT;
2154+ if ((GetKeyState(VK_SHIFT) & 0x8000) && (GetKeyState(VK_CONTROL) & 0x8000)) {
2155+ //私の視点3保存
2156+ result = _OnMenuSaveMyViewpoint(3);
2157+ if (result != 0) goto EXIT;
2158+ }
2159+ else if (GetKeyState(VK_CONTROL) & 0x8000) {
2160+ //私の視点3移動
2161+ result = _OnMenuMyViewpoint(3);
2162+ if (result != 0) goto EXIT;
2163+ }
2164+ else {
2165+ //静的視点3移動
2166+ result = _OnMenuViewpoint(3);
2167+ if (result != 0) goto EXIT;
2168+ }
19922169 break;
19932170 case 'O':
19942171 if (GetKeyState(VK_CONTROL) & 0x8000) {
@@ -2017,6 +2194,11 @@ int MIDITrailApp::_OnKeyDown(
20172194 result = _OnMenuFullScreen();
20182195 if (result != 0) goto EXIT;
20192196 break;
2197+ case VK_F12:
2198+ //メニューバー
2199+ result = _OnMenuMenuBar();
2200+ if (result != 0) goto EXIT;
2201+ break;
20202202 default:
20212203 break;
20222204 }
@@ -2630,11 +2812,20 @@ int MIDITrailApp::_ChangeMenuStyle()
26302812 IDM_ENABLE_STARS,
26312813 IDM_ENABLE_COUNTER,
26322814 IDM_ENABLE_BACKGROUNDIMAGE,
2815+ IDM_ENABLE_GRIDLINE,
2816+ IDM_ENABLE_TIMEINDICATOR,
26332817 IDM_RESET_VIEWPOINT,
26342818 IDM_VIEWPOINT2,
26352819 IDM_VIEWPOINT3,
2820+ IDM_MYVIEWPOINT1,
2821+ IDM_MYVIEWPOINT2,
2822+ IDM_MYVIEWPOINT3,
2823+ IDM_SAVE_MYVIEWPOINT1,
2824+ IDM_SAVE_MYVIEWPOINT2,
2825+ IDM_SAVE_MYVIEWPOINT3,
26362826 IDM_WINDOWSIZE,
26372827 IDM_FULLSCREEN,
2828+ IDM_MENUBAR,
26382829 IDM_OPTION_MIDIOUT,
26392830 IDM_OPTION_MIDIIN,
26402831 IDM_OPTION_GRAPHIC,
@@ -2672,11 +2863,20 @@ int MIDITrailApp::_ChangeMenuStyle()
26722863 { MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED }, //IDM_ENABLE_STARS
26732864 { MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED }, //IDM_ENABLE_COUNTER
26742865 { MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED }, //IDM_ENABLE_BACKGROUNDIMAGE
2866+ { MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED }, //IDM_ENABLE_GRIDLINE
2867+ { MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED }, //IDM_ENABLE_TIMEINDICATOR
26752868 { MF_GRAYED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED }, //IDM_RESET_VIEWPOINT
26762869 { MF_GRAYED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED }, //IDM_VIEWPOINT2
26772870 { MF_GRAYED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED }, //IDM_VIEWPOINT3
2871+ { MF_GRAYED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED }, //IDM_MYVIEWPOINT1
2872+ { MF_GRAYED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED }, //IDM_MYVIEWPOINT2
2873+ { MF_GRAYED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED }, //IDM_MYVIEWPOINT3
2874+ { MF_GRAYED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED }, //IDM_SAVE_MYVIEWPOINT1
2875+ { MF_GRAYED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED }, //IDM_SAVE_MYVIEWPOINT2
2876+ { MF_GRAYED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED }, //IDM_SAVE_MYVIEWPOINT3
26782877 { MF_ENABLED, MF_ENABLED, MF_GRAYED, MF_GRAYED, MF_ENABLED, MF_GRAYED }, //IDM_WINDOWSIZE
26792878 { MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED }, //IDM_FULLSCREEN
2879+ { MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED }, //IDM_MENUBAR
26802880 { MF_ENABLED, MF_ENABLED, MF_GRAYED, MF_GRAYED, MF_ENABLED, MF_GRAYED }, //IDM_OPTION_MIDIOUT
26812881 { MF_ENABLED, MF_ENABLED, MF_GRAYED, MF_GRAYED, MF_ENABLED, MF_GRAYED }, //IDM_OPTION_MIDIIN
26822882 { MF_ENABLED, MF_ENABLED, MF_GRAYED, MF_GRAYED, MF_ENABLED, MF_GRAYED }, //IDM_OPTION_GRAPHIC
@@ -2929,6 +3129,100 @@ EXIT:;
29293129 }
29303130
29313131 //******************************************************************************
3132+// 表示効果選択状態読み込み
3133+//******************************************************************************
3134+int MIDITrailApp::_LoadEffectStatus()
3135+{
3136+ int result = 0;
3137+ int value = 0;
3138+
3139+ result = m_ViewConf.SetCurSection(_T("Effect"));
3140+ if (result != 0) goto EXIT;
3141+
3142+ result = m_ViewConf.GetInt(_T("PianoKeyboard"), &value, 1);
3143+ if (result != 0) goto EXIT;
3144+ m_isEnablePianoKeyboard = (value > 0)? true : false;
3145+
3146+ result = m_ViewConf.GetInt(_T("Ripple"), &value, 1);
3147+ if (result != 0) goto EXIT;
3148+ m_isEnableRipple = (value > 0)? true : false;
3149+
3150+ result = m_ViewConf.GetInt(_T("PitchBend"), &value, 1);
3151+ if (result != 0) goto EXIT;
3152+ m_isEnablePitchBend = (value > 0)? true : false;
3153+
3154+ result = m_ViewConf.GetInt(_T("Stars"), &value, 1);
3155+ if (result != 0) goto EXIT;
3156+ m_isEnableStars = (value > 0)? true : false;
3157+
3158+ result = m_ViewConf.GetInt(_T("Counter"), &value, 1);
3159+ if (result != 0) goto EXIT;
3160+ m_isEnableCounter = (value > 0)? true : false;
3161+
3162+ result = m_ViewConf.GetInt(_T("BackgroundImage"), &value, 1);
3163+ if (result != 0) goto EXIT;
3164+ m_isEnableBackgroundImage = (value > 0)? true : false;
3165+
3166+ result = m_ViewConf.GetInt(_T("GridLine"), &value, 1);
3167+ if (result != 0) goto EXIT;
3168+ m_isEnableGridLine = (value > 0)? true : false;
3169+
3170+ result = m_ViewConf.GetInt(_T("TimeIndicator"), &value, 1);
3171+ if (result != 0) goto EXIT;
3172+ m_isEnableTimeIndicator = (value > 0)? true : false;
3173+
3174+EXIT:;
3175+ return result;
3176+}
3177+
3178+//******************************************************************************
3179+// 表示効果選択状態保存
3180+//******************************************************************************
3181+int MIDITrailApp::_SaveEffectStatus()
3182+{
3183+ int result = 0;
3184+ int value = 0;
3185+
3186+ result = m_ViewConf.SetCurSection(_T("Effect"));
3187+ if (result != 0) goto EXIT;
3188+
3189+ value = m_isEnablePianoKeyboard ? 1 : 0;
3190+ result = m_ViewConf.SetInt(_T("PianoKeyboard"), value);
3191+ if (result != 0) goto EXIT;
3192+
3193+ value = m_isEnableRipple ? 1 : 0;
3194+ result = m_ViewConf.SetInt(_T("Ripple"), value);
3195+ if (result != 0) goto EXIT;
3196+
3197+ value = m_isEnablePitchBend ? 1 : 0;
3198+ result = m_ViewConf.SetInt(_T("PitchBend"), value);
3199+ if (result != 0) goto EXIT;
3200+
3201+ value = m_isEnableStars ? 1 : 0;
3202+ result = m_ViewConf.SetInt(_T("Stars"), value);
3203+ if (result != 0) goto EXIT;
3204+
3205+ value = m_isEnableCounter ? 1 : 0;
3206+ result = m_ViewConf.SetInt(_T("Counter"), value);
3207+ if (result != 0) goto EXIT;
3208+
3209+ value = m_isEnableBackgroundImage ? 1 : 0;
3210+ result = m_ViewConf.SetInt(_T("BackgroundImage"), value);
3211+ if (result != 0) goto EXIT;
3212+
3213+ value = m_isEnableGridLine ? 1 : 0;
3214+ result = m_ViewConf.SetInt(_T("GridLine"), value);
3215+ if (result != 0) goto EXIT;
3216+
3217+ value = m_isEnableTimeIndicator ? 1 : 0;
3218+ result = m_ViewConf.SetInt(_T("TimeIndicator"), value);
3219+ if (result != 0) goto EXIT;
3220+
3221+EXIT:;
3222+ return result;
3223+}
3224+
3225+//******************************************************************************
29323226 // 視点読み込み
29333227 //******************************************************************************
29343228 int MIDITrailApp::_LoadViewpoint()
@@ -2996,6 +3290,74 @@ EXIT:;
29963290 }
29973291
29983292 //******************************************************************************
3293+// 私の視点に移動
3294+//******************************************************************************
3295+int MIDITrailApp::_MoveToMyViewpoint(
3296+ unsigned long viewpointNo
3297+ )
3298+{
3299+ int result = 0;
3300+ MTScene::MTViewParamMap defParamMap;
3301+ MTScene::MTViewParamMap viewParamMap;
3302+ MTScene::MTViewParamMap::iterator itr;
3303+ TCHAR section[256] = {_T('\0')};
3304+ float param = 0.0f;
3305+
3306+ //シーンからデフォルト視点を取得
3307+ m_pScene->GetDefaultViewParam(&defParamMap);
3308+
3309+ //セクション名
3310+ _stprintf_s(section, 256, _T("MyViewpoint-%d-"), viewpointNo);
3311+ _tcscat_s(section, 256, m_pScene->GetName());
3312+ result = m_ViewConf.SetCurSection(section);
3313+ if (result != 0) goto EXIT;
3314+
3315+ //パラメータを設定ファイルから取得(未設定の場合はデフォルト視点を適用)
3316+ for (itr = defParamMap.begin(); itr != defParamMap.end(); itr++) {
3317+ result = m_ViewConf.GetFloat((itr->first).c_str(), &param, itr->second);
3318+ if (result != 0) goto EXIT;
3319+ viewParamMap.insert(MTScene::MTViewParamMapPair((itr->first).c_str(), param));
3320+ }
3321+
3322+ //視点が切り替えられたことをシーンに伝達
3323+ m_pScene->SetViewParam(&viewParamMap);
3324+
3325+EXIT:;
3326+ return result;
3327+}
3328+
3329+//******************************************************************************
3330+// 私の視点保存
3331+//******************************************************************************
3332+int MIDITrailApp::_SaveMyViewpoint(
3333+ unsigned long viewpointNo
3334+ )
3335+{
3336+ int result = 0;
3337+ MTScene::MTViewParamMap viewParamMap;
3338+ MTScene::MTViewParamMap::iterator itr;
3339+ TCHAR section[256] = {_T('\0')};
3340+
3341+ //シーンから現在の視点を取得
3342+ m_pScene->GetViewParam(&viewParamMap);
3343+
3344+ //セクション名
3345+ _stprintf_s(section, 256, _T("MyViewpoint-%d-"), viewpointNo);
3346+ _tcscat_s(section, 256, m_pScene->GetName());
3347+ result = m_ViewConf.SetCurSection(section);
3348+ if (result != 0) goto EXIT;
3349+
3350+ //パラメータを設定ファイルに登録
3351+ for (itr = viewParamMap.begin(); itr != viewParamMap.end(); itr++) {
3352+ result = m_ViewConf.SetFloat((itr->first).c_str(), itr->second);
3353+ if (result != 0) goto EXIT;
3354+ }
3355+
3356+EXIT:;
3357+ return result;
3358+}
3359+
3360+//******************************************************************************
29993361 // グラフィック設定読み込み
30003362 //******************************************************************************
30013363 int MIDITrailApp::_LoadGraphicConf()
@@ -3335,12 +3697,21 @@ int MIDITrailApp::_UpdateMenuCheckmark()
33353697 //背景画像表示
33363698 _CheckMenuItem(IDM_ENABLE_BACKGROUNDIMAGE, m_isEnableBackgroundImage);
33373699
3338- //自動視点保存
3339- _CheckMenuItem(IDM_AUTO_SAVE_VIEWPOINT, m_isAutoSaveViewpoint);
3700+ //自動視点保存は廃止
3701+ //_CheckMenuItem(IDM_AUTO_SAVE_VIEWPOINT, m_isAutoSaveViewpoint);
3702+
3703+ //グリッドライン
3704+ _CheckMenuItem(IDM_ENABLE_GRIDLINE, m_isEnableGridLine);
3705+
3706+ //タイムインジケータ
3707+ _CheckMenuItem(IDM_ENABLE_TIMEINDICATOR, m_isEnableTimeIndicator);
33403708
33413709 //フルスクリーン
33423710 _CheckMenuItem(IDM_FULLSCREEN, m_isFullScreen);
3343-
3711+
3712+ //メニューバー
3713+ _CheckMenuItem(IDM_MENUBAR, m_isEnableMenuBar);
3714+
33443715 EXIT:;
33453716 return result;
33463717 }
@@ -3378,8 +3749,10 @@ void MIDITrailApp::_UpdateEffect()
33783749 m_pScene->SetEffect(MTScene::EffectPitchBend, m_isEnablePitchBend);
33793750 m_pScene->SetEffect(MTScene::EffectStars, m_isEnableStars);
33803751 m_pScene->SetEffect(MTScene::EffectCounter, m_isEnableCounter);
3381- m_pScene->SetEffect(MTScene::EffectFileName, m_isEnableFileName);
33823752 m_pScene->SetEffect(MTScene::EffectBackgroundImage, m_isEnableBackgroundImage);
3753+ m_pScene->SetEffect(MTScene::EffectGridLine, m_isEnableGridLine);
3754+ m_pScene->SetEffect(MTScene::EffectTimeIndicator, m_isEnableTimeIndicator);
3755+ m_pScene->SetEffect(MTScene::EffectFileName, m_isEnableFileName);
33833756 }
33843757 return;
33853758 }
@@ -4085,6 +4458,22 @@ EXIT:;
40854458 }
40864459
40874460 //******************************************************************************
4461+// メニューバー表示切替
4462+//******************************************************************************
4463+int MIDITrailApp::_ToggleMenuBar()
4464+{
4465+ int result = 0;
4466+
4467+ m_isEnableMenuBar = m_isEnableMenuBar ? false : true;
4468+
4469+ result = _ChangeWindowSize();
4470+ if (result != 0) goto EXIT;
4471+
4472+EXIT:;
4473+ return result;
4474+}
4475+
4476+//******************************************************************************
40884477 // メニュー表示
40894478 //******************************************************************************
40904479 int MIDITrailApp::_ShowMenu()
@@ -4263,3 +4652,4 @@ EXIT:;
42634652 return result;
42644653 }
42654654
4655+
--- a/MIDITrail/MIDITrailApp.h
+++ b/MIDITrail/MIDITrailApp.h
@@ -4,7 +4,7 @@
44 //
55 // MIDITrail アプリケーションクラス
66 //
7-// Copyright (C) 2010-2021 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2010-2022 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -45,7 +45,7 @@ using namespace SMIDILib;
4545
4646 //メニュースタイル制御
4747 //TAG:シーン追加
48-#define MT_MENU_NUM (37)
48+#define MT_MENU_NUM (46)
4949 #define MT_PLAYSTATUS_NUM (6)
5050
5151 //デバイスロスト警告メッセージ
@@ -161,6 +161,7 @@ private:
161161 TCHAR m_Title[MAX_LOADSTRING];
162162 TCHAR m_WndClassName[MAX_LOADSTRING];
163163 bool m_isFullScreen;
164+ bool m_isEnableMenuBar;
164165 HMENU m_hMenu;
165166
166167 //レンダリング系
@@ -196,6 +197,8 @@ private:
196197 bool m_isEnableCounter;
197198 bool m_isEnableFileName;
198199 bool m_isEnableBackgroundImage;
200+ bool m_isEnableGridLine;
201+ bool m_isEnableTimeIndicator;
199202
200203 //シーン種別
201204 SceneType m_SceneType;
@@ -288,10 +291,13 @@ private:
288291 int _OnMenuAutoSaveViewpoint();
289292 int _OnMenuResetViewpoint();
290293 int _OnMenuViewpoint(unsigned long viewpointNo);
294+ int _OnMenuMyViewpoint(unsigned long viewpointNo);
295+ int _OnMenuSaveMyViewpoint(unsigned long viewpointNo);
291296 int _OnMenuSaveViewpoint();
292297 int _OnMenuEnableEffect(MTScene::EffectType type);
293298 int _OnMenuWindowSize();
294299 int _OnMenuFullScreen();
300+ int _OnMenuMenuBar();
295301 int _OnMenuOptionMIDIOUT();
296302 int _OnMenuOptionMIDIIN();
297303 int _OnMenuOptionGraphic();
@@ -322,8 +328,12 @@ private:
322328 int _SaveSceneType();
323329 int _LoadSceneConf();
324330 int _SaveSceneConf();
331+ int _LoadEffectStatus();
332+ int _SaveEffectStatus();
325333 int _LoadViewpoint();
326334 int _SaveViewpoint();
335+ int _MoveToMyViewpoint(unsigned long viewpointNo);
336+ int _SaveMyViewpoint(unsigned long viewpointNo);
327337 int _LoadGraphicConf();
328338 int _LoadPlayerConf();
329339 int _OnDestroy();
@@ -348,6 +358,7 @@ private:
348358 int _StopPlaybackAndOpenFolder(const TCHAR* pFolderPath);
349359 int _FileOpenProc(const TCHAR* pFilePath);
350360 int _ToggleFullScreen();
361+ int _ToggleMenuBar();
351362 int _ShowMenu();
352363 int _HideMenu();
353364 int _GamePadProc();
--- a/MIDITrail/MIDITrailVersion.h
+++ b/MIDITrail/MIDITrailVersion.h
@@ -4,7 +4,7 @@
44 //
55 // MIDITrail バージョン定義
66 //
7-// Copyright (C) 2014-2021 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2014-2022 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -16,10 +16,10 @@
1616 //******************************************************************************
1717
1818 //バージョン文字列
19-#define MIDITRAIL_VERSION_STRING_X86 _T("Version 1.3.4 (32bit)")
20-#define MIDITRAIL_VERSION_STRING_X64 _T("Version 1.3.4 (64bit)")
19+#define MIDITRAIL_VERSION_STRING_X86 _T("Version 1.3.6 (32bit)")
20+#define MIDITRAIL_VERSION_STRING_X64 _T("Version 1.3.6 (64bit)")
2121
2222 //コピーライト
23-#define MIDITRAIL_COPYRIGHT _T("Copyright (C) 2010-2021 WADA Masashi");
23+#define MIDITRAIL_COPYRIGHT _T("Copyright (C) 2010-2022 WADA Masashi");
2424
2525
--- a/MIDITrail/MTGridBox.cpp
+++ b/MIDITrail/MTGridBox.cpp
@@ -4,7 +4,7 @@
44 //
55 // グリッドボックス描画クラス
66 //
7-// Copyright (C) 2010-2019 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2010-2022 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -22,6 +22,7 @@ MTGridBox::MTGridBox(void)
2222 {
2323 m_BarNum = 0;
2424 m_isVisible = true;
25+ m_isEnable = true;
2526 }
2627
2728 //******************************************************************************
@@ -192,7 +193,7 @@ int MTGridBox::Draw(
192193 {
193194 int result = 0;
194195
195- if (m_isVisible) {
196+ if (m_isEnable && m_isVisible) {
196197 result = m_Primitive.Draw(pD3DDevice);
197198 if (result != 0) goto EXIT;
198199 }
@@ -497,3 +498,13 @@ void MTGridBox::_MakeMaterial(
497498 pMaterial->Emissive.a = 0.0f;
498499 }
499500
501+//******************************************************************************
502+// 表示設定
503+//******************************************************************************
504+void MTGridBox::SetEnable(
505+ bool isEnable
506+ )
507+{
508+ m_isEnable = isEnable;
509+}
510+
--- a/MIDITrail/MTGridBox.h
+++ b/MIDITrail/MTGridBox.h
@@ -4,7 +4,7 @@
44 //
55 // グリッドボックス描画クラス
66 //
7-// Copyright (C) 2010-2012 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2010-2022 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -45,6 +45,9 @@ public:
4545 //解放
4646 void Release();
4747
48+ //表示設定
49+ void SetEnable(bool isEnable);
50+
4851 private:
4952
5053 DXPrimitive m_Primitive;
@@ -52,6 +55,7 @@ private:
5255 SMPortList m_PortList;
5356 MTNoteDesign m_NoteDesign;
5457 bool m_isVisible;
58+ bool m_isEnable;
5559
5660 //頂点バッファ構造体
5761 struct MTGRIDBOX_VERTEX {
--- a/MIDITrail/MTGridBoxLive.cpp
+++ b/MIDITrail/MTGridBoxLive.cpp
@@ -4,7 +4,7 @@
44 //
55 // ライブモニタ用グリッドボックス描画クラス
66 //
7-// Copyright (C) 2012 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2012-2022 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -21,6 +21,7 @@ using namespace YNBaseLib;
2121 MTGridBoxLive::MTGridBoxLive(void)
2222 {
2323 m_isVisible = true;
24+ m_isEnable = true;
2425 }
2526
2627 //******************************************************************************
@@ -155,7 +156,7 @@ int MTGridBoxLive::Draw(
155156 {
156157 int result = 0;
157158
158- if (m_isVisible) {
159+ if (m_isEnable && m_isVisible) {
159160 result = m_Primitive.Draw(pD3DDevice);
160161 if (result != 0) goto EXIT;
161162 }
@@ -292,4 +293,14 @@ void MTGridBoxLive::_MakeMaterial(
292293 pMaterial->Emissive.a = 0.0f;
293294 }
294295
296+//******************************************************************************
297+// 表示設定
298+//******************************************************************************
299+void MTGridBoxLive::SetEnable(
300+ bool isEnable
301+ )
302+{
303+ m_isEnable = isEnable;
304+}
305+
295306
--- a/MIDITrail/MTGridBoxLive.h
+++ b/MIDITrail/MTGridBoxLive.h
@@ -4,7 +4,7 @@
44 //
55 // ライブモニタ用グリッドボックス描画クラス
66 //
7-// Copyright (C) 2012 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2012-2022 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -42,11 +42,15 @@ public:
4242 //解放
4343 void Release();
4444
45+ //表示設定
46+ void SetEnable(bool isEnable);
47+
4548 private:
4649
4750 DXPrimitive m_Primitive;
4851 MTNoteDesign m_NoteDesign;
4952 bool m_isVisible;
53+ bool m_isEnable;
5054
5155 //頂点バッファ構造体
5256 struct MTGRIDBOXLIVE_VERTEX {
--- a/MIDITrail/MTGridRing.cpp
+++ b/MIDITrail/MTGridRing.cpp
@@ -4,7 +4,7 @@
44 //
55 // グリッドリング描画クラス
66 //
7-// Copyright (C) 2019 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2019-2022 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -23,6 +23,7 @@ MTGridRing::MTGridRing(void)
2323 {
2424 m_BarNum = 0;
2525 m_isVisible = true;
26+ m_isEnable = true;
2627 }
2728
2829 //******************************************************************************
@@ -174,7 +175,7 @@ int MTGridRing::Draw(
174175 {
175176 int result = 0;
176177
177- if (m_isVisible) {
178+ if (m_isEnable && m_isVisible) {
178179 result = m_Primitive.Draw(pD3DDevice);
179180 if (result != 0) goto EXIT;
180181 }
@@ -302,4 +303,14 @@ void MTGridRing::_MakeMaterial(
302303 pMaterial->Emissive.a = 0.0f;
303304 }
304305
306+//******************************************************************************
307+// 表示設定
308+//******************************************************************************
309+void MTGridRing::SetEnable(
310+ bool isEnable
311+ )
312+{
313+ m_isEnable = isEnable;
314+}
315+
305316
--- a/MIDITrail/MTGridRing.h
+++ b/MIDITrail/MTGridRing.h
@@ -4,7 +4,7 @@
44 //
55 // グリッドリング描画クラス
66 //
7-// Copyright (C) 2019 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2019-2022 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -42,6 +42,9 @@ public:
4242 //解放
4343 void Release();
4444
45+ //表示設定
46+ void SetEnable(bool isEnable);
47+
4548 private:
4649
4750 DXPrimitive m_Primitive;
@@ -49,6 +52,7 @@ private:
4952 SMPortList m_PortList;
5053 MTNoteDesignRing m_NoteDesign;
5154 bool m_isVisible;
55+ bool m_isEnable;
5256
5357 //頂点バッファ構造体
5458 struct MTGRIDBOX_VERTEX {
--- a/MIDITrail/MTGridRingLive.cpp
+++ b/MIDITrail/MTGridRingLive.cpp
@@ -4,7 +4,7 @@
44 //
55 // ライブモニタ用グリッドリング描画クラス
66 //
7-// Copyright (C) 2019 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2019-2022 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -22,6 +22,7 @@ using namespace YNBaseLib;
2222 MTGridRingLive::MTGridRingLive(void)
2323 {
2424 m_isVisible = true;
25+ m_isEnable = true;
2526 }
2627
2728 //******************************************************************************
@@ -156,7 +157,7 @@ int MTGridRingLive::Draw(
156157 {
157158 int result = 0;
158159
159- if (m_isVisible) {
160+ if (m_isEnable && m_isVisible) {
160161 result = m_Primitive.Draw(pD3DDevice);
161162 if (result != 0) goto EXIT;
162163 }
@@ -284,4 +285,14 @@ void MTGridRingLive::_MakeMaterial(
284285 pMaterial->Emissive.a = 0.0f;
285286 }
286287
288+//******************************************************************************
289+// 表示設定
290+//******************************************************************************
291+void MTGridRingLive::SetEnable(
292+ bool isEnable
293+ )
294+{
295+ m_isEnable = isEnable;
296+}
297+
287298
--- a/MIDITrail/MTGridRingLive.h
+++ b/MIDITrail/MTGridRingLive.h
@@ -4,7 +4,7 @@
44 //
55 // ライブモニタ用グリッドリング描画クラス
66 //
7-// Copyright (C) 2019 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2019-2022 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -39,11 +39,15 @@ public:
3939 //解放
4040 void Release();
4141
42+ //表示設定
43+ void SetEnable(bool isEnable);
44+
4245 private:
4346
4447 DXPrimitive m_Primitive;
4548 MTNoteDesignRing m_NoteDesign;
4649 bool m_isVisible;
50+ bool m_isEnable;
4751
4852 //頂点バッファ構造体
4953 struct MTGRIDBOXLIVE_VERTEX {
--- a/MIDITrail/MTScene.h
+++ b/MIDITrail/MTScene.h
@@ -4,7 +4,7 @@
44 //
55 // MIDITrail シーン基底クラス
66 //
7-// Copyright (C) 2010-2018 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2010-2022 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -34,6 +34,8 @@ public:
3434 EffectStars,
3535 EffectCounter,
3636 EffectBackgroundImage,
37+ EffectGridLine,
38+ EffectTimeIndicator,
3739 EffectFileName
3840 };
3941
--- a/MIDITrail/MTScenePianoRoll3D.cpp
+++ b/MIDITrail/MTScenePianoRoll3D.cpp
@@ -4,7 +4,7 @@
44 //
55 // ピアノロール3Dシーン描画クラス
66 //
7-// Copyright (C) 2010-2021 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2010-2022 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -100,7 +100,24 @@ int MTScenePianoRoll3D::Create(
100100 m_DirLight.SetDirection(D3DXVECTOR3(1.0f, -1.0f, 2.0f));
101101
102102 //ライトのデバイス登録
103- result = m_DirLight.SetDevice(pD3DDevice, m_IsEnableLight);
103+ result = m_DirLight.SetDevice(pD3DDevice, 0, m_IsEnableLight);
104+ if (result != 0) goto EXIT;
105+
106+ //----------------------------------
107+ // ライト2
108+ //----------------------------------
109+ //ライト初期化
110+ result = m_DirLight2.Initialize();
111+ if (result != 0) goto EXIT;
112+
113+ //ライト色
114+ _SetLightColor2(&m_DirLight2);
115+
116+ //ライト方向
117+ m_DirLight2.SetDirection(D3DXVECTOR3(-1.0f, 1.0f, -2.0f));
118+
119+ //ライトのデバイス登録
120+ result = m_DirLight2.SetDevice(pD3DDevice, 1, m_IsEnableLight);
104121 if (result != 0) goto EXIT;
105122
106123 //----------------------------------
@@ -280,7 +297,9 @@ int MTScenePianoRoll3D::Draw(
280297
281298 //ライトを一時的に無効にする
282299 // ノート波紋とダッシュボードの描画色はライトの方向に依存させないため
283- result = m_DirLight.SetDevice(pD3DDevice, FALSE);
300+ result = m_DirLight.SetDevice(pD3DDevice, 0, FALSE);
301+ if (result != 0) goto EXIT;
302+ result = m_DirLight2.SetDevice(pD3DDevice, 1, FALSE);
284303 if (result != 0) goto EXIT;
285304
286305 //ノート波紋描画
@@ -292,7 +311,9 @@ int MTScenePianoRoll3D::Draw(
292311 if (result != 0) goto EXIT;
293312
294313 //ライトを戻す
295- result = m_DirLight.SetDevice(pD3DDevice, m_IsEnableLight);
314+ result = m_DirLight.SetDevice(pD3DDevice, 0, m_IsEnableLight);
315+ if (result != 0) goto EXIT;
316+ result = m_DirLight2.SetDevice(pD3DDevice, 1, m_IsEnableLight);
296317 if (result != 0) goto EXIT;
297318
298319 EXIT:;
@@ -709,12 +730,18 @@ void MTScenePianoRoll3D::SetEffect(
709730 case EffectCounter:
710731 m_Dashboard.SetEnable(isEnable);
711732 break;
712- case EffectFileName:
713- m_Dashboard.SetEnableFileName(isEnable);
714- break;
715733 case EffectBackgroundImage:
716734 m_BackgroundImage.SetEnable(isEnable);
717735 break;
736+ case EffectGridLine:
737+ m_GridBox.SetEnable(isEnable);
738+ break;
739+ case EffectTimeIndicator:
740+ m_TimeIndicator.SetEnable(isEnable);
741+ break;
742+ case EffectFileName:
743+ m_Dashboard.SetEnableFileName(isEnable);
744+ break;
718745 default:
719746 break;
720747 }
@@ -765,6 +792,38 @@ void MTScenePianoRoll3D::_SetLightColor(
765792 }
766793
767794 //******************************************************************************
795+// ライト2色設定
796+//******************************************************************************
797+void MTScenePianoRoll3D::_SetLightColor2(
798+ DXDirLight* pLight
799+ )
800+{
801+ D3DXCOLOR diffuse;
802+ D3DXCOLOR specular;
803+ D3DXCOLOR ambient;
804+
805+ //拡散光
806+ diffuse.r = 1.2f;
807+ diffuse.g = 1.2f;
808+ diffuse.b = 1.2f;
809+ diffuse.a = 1.0f;
810+ //鏡面反射光
811+ specular.r = 0.0f;
812+ specular.g = 0.0f;
813+ specular.b = 0.0f;
814+ specular.a = 0.0f;
815+ //環境光
816+ ambient.r = 0.0f;
817+ ambient.g = 0.0f;
818+ ambient.b = 0.0f;
819+ ambient.a = 0.0f;
820+
821+ pLight->SetColor(diffuse, specular, ambient);
822+
823+ return;
824+}
825+
826+//******************************************************************************
768827 // 設定ファイル読み込み
769828 //******************************************************************************
770829 int MTScenePianoRoll3D::_LoadConf()
--- a/MIDITrail/MTScenePianoRoll3D.h
+++ b/MIDITrail/MTScenePianoRoll3D.h
@@ -4,7 +4,7 @@
44 //
55 // ピアノロール3Dシーン描画クラス
66 //
7-// Copyright (C) 2010-2019 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2010-2022 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -108,6 +108,7 @@ private:
108108
109109 //ライト
110110 DXDirLight m_DirLight;
111+ DXDirLight m_DirLight2;
111112
112113 //一人称カメラ
113114 MTFirstPersonCam m_FirstPersonCam;
@@ -143,6 +144,7 @@ private:
143144
144145 void _Reset();
145146 void _SetLightColor(DXDirLight* pLight);
147+ void _SetLightColor2(DXDirLight* pLight);
146148 int _LoadConf();
147149 int _LoadConfViewpoint(MTConfFile* pConfFile, unsigned long viewpointNo, MTScene::MTViewParamMap* pParamMap);
148150
--- a/MIDITrail/MTScenePianoRoll3DLive.cpp
+++ b/MIDITrail/MTScenePianoRoll3DLive.cpp
@@ -4,7 +4,7 @@
44 //
55 // ライブモニタ用ピアノロール3Dシーン描画クラス
66 //
7-// Copyright (C) 2012-2021 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2012-2022 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -94,12 +94,32 @@ int MTScenePianoRoll3DLive::Create(
9494 result = m_DirLight.Initialize();
9595 if (result != 0) goto EXIT;
9696
97+ //ライト色
98+ _SetLightColor(&m_DirLight);
99+
97100 //ライト方向
98101 // 原点を光源としてその方向をベクトルで表現する
99102 m_DirLight.SetDirection(D3DXVECTOR3(1.0f, -1.0f, 2.0f));
100103
101104 //ライトのデバイス登録
102- result = m_DirLight.SetDevice(pD3DDevice, m_IsEnableLight);
105+ result = m_DirLight.SetDevice(pD3DDevice, 0, m_IsEnableLight);
106+ if (result != 0) goto EXIT;
107+
108+ //----------------------------------
109+ // ライト2
110+ //----------------------------------
111+ //ライト初期化
112+ result = m_DirLight2.Initialize();
113+ if (result != 0) goto EXIT;
114+
115+ //ライト色
116+ _SetLightColor2(&m_DirLight2);
117+
118+ //ライト方向
119+ m_DirLight2.SetDirection(D3DXVECTOR3(-1.0f, 1.0f, -2.0f));
120+
121+ //ライトのデバイス登録
122+ result = m_DirLight2.SetDevice(pD3DDevice, 1, m_IsEnableLight);
103123 if (result != 0) goto EXIT;
104124
105125 //----------------------------------
@@ -279,7 +299,9 @@ int MTScenePianoRoll3DLive::Draw(
279299
280300 //ライトを一時的に無効にする
281301 // ノート波紋とダッシュボードの描画色はライトの方向に依存させないため
282- result = m_DirLight.SetDevice(pD3DDevice, FALSE);
302+ result = m_DirLight.SetDevice(pD3DDevice, 0, FALSE);
303+ if (result != 0) goto EXIT;
304+ result = m_DirLight2.SetDevice(pD3DDevice, 1, FALSE);
283305 if (result != 0) goto EXIT;
284306
285307 //ノート波紋描画
@@ -291,7 +313,9 @@ int MTScenePianoRoll3DLive::Draw(
291313 if (result != 0) goto EXIT;
292314
293315 //ライトを戻す
294- result = m_DirLight.SetDevice(pD3DDevice, m_IsEnableLight);
316+ result = m_DirLight.SetDevice(pD3DDevice, 0, m_IsEnableLight);
317+ if (result != 0) goto EXIT;
318+ result = m_DirLight2.SetDevice(pD3DDevice, 1, m_IsEnableLight);
295319 if (result != 0) goto EXIT;
296320
297321 EXIT:;
@@ -692,6 +716,12 @@ void MTScenePianoRoll3DLive::SetEffect(
692716 case EffectBackgroundImage:
693717 m_BackgroundImage.SetEnable(isEnable);
694718 break;
719+ case EffectGridLine:
720+ m_GridBoxLive.SetEnable(isEnable);
721+ break;
722+ case EffectTimeIndicator:
723+ m_TimeIndicator.SetEnable(isEnable);
724+ break;
695725 default:
696726 break;
697727 }
@@ -700,6 +730,70 @@ void MTScenePianoRoll3DLive::SetEffect(
700730 }
701731
702732 //******************************************************************************
733+// ライト色設定
734+//******************************************************************************
735+void MTScenePianoRoll3DLive::_SetLightColor(
736+ DXDirLight* pLight
737+ )
738+{
739+ D3DXCOLOR diffuse;
740+ D3DXCOLOR specular;
741+ D3DXCOLOR ambient;
742+
743+ //拡散光
744+ diffuse.r = 1.2f;
745+ diffuse.g = 1.2f;
746+ diffuse.b = 1.2f;
747+ diffuse.a = 1.0f;
748+ //鏡面反射光
749+ specular.r = 0.0f;
750+ specular.g = 0.0f;
751+ specular.b = 0.0f;
752+ specular.a = 0.0f;
753+ //環境光
754+ ambient.r = 0.2f;
755+ ambient.g = 0.2f;
756+ ambient.b = 0.2f;
757+ ambient.a = 1.0f;
758+
759+ pLight->SetColor(diffuse, specular, ambient);
760+
761+ return;
762+}
763+
764+//******************************************************************************
765+// ライト2色設定
766+//******************************************************************************
767+void MTScenePianoRoll3DLive::_SetLightColor2(
768+ DXDirLight* pLight
769+ )
770+{
771+ D3DXCOLOR diffuse;
772+ D3DXCOLOR specular;
773+ D3DXCOLOR ambient;
774+
775+ //拡散光
776+ diffuse.r = 1.2f;
777+ diffuse.g = 1.2f;
778+ diffuse.b = 1.2f;
779+ diffuse.a = 1.0f;
780+ //鏡面反射光
781+ specular.r = 0.0f;
782+ specular.g = 0.0f;
783+ specular.b = 0.0f;
784+ specular.a = 0.0f;
785+ //環境光
786+ ambient.r = 0.0f;
787+ ambient.g = 0.0f;
788+ ambient.b = 0.0f;
789+ ambient.a = 0.0f;
790+
791+ pLight->SetColor(diffuse, specular, ambient);
792+
793+ return;
794+}
795+
796+//******************************************************************************
703797 // 設定ファイル読み込み
704798 //******************************************************************************
705799 int MTScenePianoRoll3DLive::_LoadConf()
--- a/MIDITrail/MTScenePianoRoll3DLive.h
+++ b/MIDITrail/MTScenePianoRoll3DLive.h
@@ -4,7 +4,7 @@
44 //
55 // ライブモニタ用ピアノロール3Dシーン描画クラス
66 //
7-// Copyright (C) 2012-2019 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2012-2022 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -105,6 +105,7 @@ private:
105105
106106 //ライト
107107 DXDirLight m_DirLight;
108+ DXDirLight m_DirLight2;
108109
109110 //一人称カメラ
110111 MTFirstPersonCam m_FirstPersonCam;
@@ -139,6 +140,8 @@ private:
139140 bool m_IsSkipping;
140141
141142 void _Reset();
143+ void _SetLightColor(DXDirLight* pLight);
144+ void _SetLightColor2(DXDirLight* pLight);
142145 int _LoadConf();
143146 int _LoadConfViewpoint(MTConfFile* pConfFile, unsigned long viewpointNo, MTScene::MTViewParamMap* pParamMap);
144147
--- a/MIDITrail/MTScenePianoRollRain.cpp
+++ b/MIDITrail/MTScenePianoRollRain.cpp
@@ -4,7 +4,7 @@
44 //
55 // ピアノロールレインシーン描画クラス
66 //
7-// Copyright (C) 2010-2019 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2010-2022 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -658,12 +658,18 @@ void MTScenePianoRollRain::SetEffect(
658658 case EffectCounter:
659659 m_Dashboard.SetEnable(isEnable);
660660 break;
661- case EffectFileName:
662- m_Dashboard.SetEnableFileName(isEnable);
663- break;
664661 case EffectBackgroundImage:
665662 m_BackgroundImage.SetEnable(isEnable);
666663 break;
664+ case EffectGridLine:
665+ //表示対象無し
666+ break;
667+ case EffectTimeIndicator:
668+ //表示対象無し
669+ break;
670+ case EffectFileName:
671+ m_Dashboard.SetEnableFileName(isEnable);
672+ break;
667673 default:
668674 break;
669675 }
--- a/MIDITrail/MTScenePianoRollRainLive.cpp
+++ b/MIDITrail/MTScenePianoRollRainLive.cpp
@@ -4,7 +4,7 @@
44 //
55 // ライブモニタ用ピアノロールレインシーン描画クラス
66 //
7-// Copyright (C) 2012-2019 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2012-2022 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -643,6 +643,12 @@ void MTScenePianoRollRainLive::SetEffect(
643643 case EffectBackgroundImage:
644644 m_BackgroundImage.SetEnable(isEnable);
645645 break;
646+ case EffectGridLine:
647+ //表示対象無し
648+ break;
649+ case EffectTimeIndicator:
650+ //表示対象無し
651+ break;
646652 default:
647653 break;
648654 }
--- a/MIDITrail/MTScenePianoRollRing.cpp
+++ b/MIDITrail/MTScenePianoRollRing.cpp
@@ -4,7 +4,7 @@
44 //
55 // ピアノロールリングシーン描画クラス
66 //
7-// Copyright (C) 2019 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2019-2022 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -698,12 +698,18 @@ void MTScenePianoRollRing::SetEffect(
698698 case EffectCounter:
699699 m_Dashboard.SetEnable(isEnable);
700700 break;
701- case EffectFileName:
702- m_Dashboard.SetEnableFileName(isEnable);
703- break;
704701 case EffectBackgroundImage:
705702 m_BackgroundImage.SetEnable(isEnable);
706703 break;
704+ case EffectGridLine:
705+ m_GridRing.SetEnable(isEnable);
706+ break;
707+ case EffectTimeIndicator:
708+ m_TimeIndicator.SetEnable(isEnable);
709+ break;
710+ case EffectFileName:
711+ m_Dashboard.SetEnableFileName(isEnable);
712+ break;
707713 default:
708714 break;
709715 }
--- a/MIDITrail/MTScenePianoRollRingLive.cpp
+++ b/MIDITrail/MTScenePianoRollRingLive.cpp
@@ -4,7 +4,7 @@
44 //
55 // ライブモニタ用ピアノロールリングシーン描画クラス
66 //
7-// Copyright (C) 2019 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2019-2022 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -120,8 +120,8 @@ int MTScenePianoRollRingLive::Create(
120120 result = m_NoteRipple.Create(pD3DDevice, GetName(), pSeqData, &m_NotePitchBend);
121121 if (result != 0) goto EXIT;
122122
123- //グリッドボックス生成
124- result = m_GridBoxLive.Create(pD3DDevice, GetName());
123+ //グリッドリング生成
124+ result = m_GridRingLive.Create(pD3DDevice, GetName());
125125 if (result != 0) goto EXIT;
126126
127127 //ピクチャボード生成
@@ -202,8 +202,8 @@ int MTScenePianoRollRingLive::Transform(
202202 result = m_NoteBoxLive.Transform(pD3DDevice, rollAngle);
203203 if (result != 0) goto EXIT;
204204
205- //グリッドボックス更新
206- result = m_GridBoxLive.Transform(pD3DDevice, rollAngle);
205+ //グリッドリング更新
206+ result = m_GridRingLive.Transform(pD3DDevice, rollAngle);
207207 if (result != 0) goto EXIT;
208208
209209 //ピクチャボード更新
@@ -256,8 +256,8 @@ int MTScenePianoRollRingLive::Draw(
256256 result = m_BackgroundImage.Draw(pD3DDevice);
257257 if (result != 0) goto EXIT;
258258
259- //グリッドボックス描画
260- result = m_GridBoxLive.Draw(pD3DDevice);
259+ //グリッドリング描画
260+ result = m_GridRingLive.Draw(pD3DDevice);
261261 if (result != 0) goto EXIT;
262262
263263 //ノートボックス描画
@@ -298,7 +298,7 @@ EXIT:;
298298 void MTScenePianoRollRingLive::Release()
299299 {
300300 m_NoteBoxLive.Release();
301- m_GridBoxLive.Release();
301+ m_GridRingLive.Release();
302302 m_PictBoard.Release();
303303 m_DashboardLive.Release();
304304 m_Stars.Release();
@@ -681,6 +681,12 @@ void MTScenePianoRollRingLive::SetEffect(
681681 case EffectBackgroundImage:
682682 m_BackgroundImage.SetEnable(isEnable);
683683 break;
684+ case EffectGridLine:
685+ m_GridRingLive.SetEnable(isEnable);
686+ break;
687+ case EffectTimeIndicator:
688+ m_TimeIndicator.SetEnable(isEnable);
689+ break;
684690 default:
685691 break;
686692 }
--- a/MIDITrail/MTScenePianoRollRingLive.h
+++ b/MIDITrail/MTScenePianoRollRingLive.h
@@ -4,7 +4,7 @@
44 //
55 // ライブモニタ用ピアノロールリングシーン描画クラス
66 //
7-// Copyright (C) 2019 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2019-2022 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -113,7 +113,7 @@ private:
113113 MTNoteBoxRingLive m_NoteBoxLive;
114114 MTNoteRippleRingLive m_NoteRipple;
115115 MTNotePitchBend m_NotePitchBend;
116- MTGridRingLive m_GridBoxLive;
116+ MTGridRingLive m_GridRingLive;
117117 MTPictBoardRing m_PictBoard;
118118 MTDashboardLive m_DashboardLive;
119119 MTStars m_Stars;
--- a/MIDITrail/MTTimeIndicator.cpp
+++ b/MIDITrail/MTTimeIndicator.cpp
@@ -4,7 +4,7 @@
44 //
55 // タイムインジケータ描画クラス
66 //
7-// Copyright (C) 2010-2019 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2010-2022 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -23,6 +23,7 @@ MTTimeIndicator::MTTimeIndicator(void)
2323 m_CurPos = 0.0f;
2424 m_CurTickTime = 0;
2525 m_isEnableLine = false;
26+ m_isEnable = true;
2627 }
2728
2829 //******************************************************************************
@@ -203,6 +204,8 @@ int MTTimeIndicator::Draw(
203204 {
204205 int result = 0;
205206
207+ if (!m_isEnable) goto EXIT;
208+
206209 //テクスチャステージ設定
207210 // カラー演算:引数1を使用 引数1:テクスチャ
208211 pD3DDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG1);
@@ -384,3 +387,14 @@ D3DXVECTOR3 MTTimeIndicator::GetMoveVector()
384387 return D3DXVECTOR3(m_CurPos, 0.0f, 0.0f);
385388 }
386389
390+//******************************************************************************
391+// 表示設定
392+//******************************************************************************
393+void MTTimeIndicator::SetEnable(
394+ bool isEnable
395+ )
396+{
397+ m_isEnable = isEnable;
398+}
399+
400+
--- a/MIDITrail/MTTimeIndicator.h
+++ b/MIDITrail/MTTimeIndicator.h
@@ -4,7 +4,7 @@
44 //
55 // タイムインジケータ描画クラス
66 //
7-// Copyright (C) 2010-2013 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2010-2022 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -57,6 +57,9 @@ public:
5757 //移動ベクトル取得
5858 D3DXVECTOR3 GetMoveVector();
5959
60+ //表示設定
61+ void SetEnable(bool isEnable);
62+
6063 private:
6164
6265 DXPrimitive m_Primitive;
@@ -64,8 +67,8 @@ private:
6467 float m_CurPos;
6568 MTNoteDesign m_NoteDesign;
6669 bool m_isEnableLine;
67-
6870 unsigned long m_CurTickTime;
71+ bool m_isEnable;
6972
7073 //頂点バッファ構造体
7174 struct MTTIMEINDICATOR_VERTEX {
--- a/MIDITrail/MTTimeIndicatorRing.cpp
+++ b/MIDITrail/MTTimeIndicatorRing.cpp
@@ -4,7 +4,7 @@
44 //
55 // タイムインジケータリング描画クラス
66 //
7-// Copyright (C) 2019 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2019-2022 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -23,6 +23,7 @@ MTTimeIndicatorRing::MTTimeIndicatorRing(void)
2323 {
2424 m_CurPos = 0.0f;
2525 m_CurTickTime = 0;
26+ m_isEnable = true;
2627 }
2728
2829 //******************************************************************************
@@ -158,6 +159,8 @@ int MTTimeIndicatorRing::Draw(
158159 {
159160 int result = 0;
160161
162+ if (!m_isEnable) goto EXIT;
163+
161164 //テクスチャステージ設定
162165 // カラー演算:引数1を使用 引数1:テクスチャ
163166 pD3DDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG1);
@@ -268,4 +271,14 @@ D3DXVECTOR3 MTTimeIndicatorRing::GetMoveVector()
268271 return D3DXVECTOR3(m_CurPos, 0.0f, 0.0f);
269272 }
270273
274+//******************************************************************************
275+// 表示設定
276+//******************************************************************************
277+void MTTimeIndicatorRing::SetEnable(
278+ bool isEnable
279+ )
280+{
281+ m_isEnable = isEnable;
282+}
283+
271284
--- a/MIDITrail/MTTimeIndicatorRing.h
+++ b/MIDITrail/MTTimeIndicatorRing.h
@@ -4,7 +4,7 @@
44 //
55 // タイムインジケータリング描画クラス
66 //
7-// Copyright (C) 2019 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2019-2022 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -57,13 +57,16 @@ public:
5757 //移動ベクトル取得
5858 D3DXVECTOR3 GetMoveVector();
5959
60+ //表示設定
61+ void SetEnable(bool isEnable);
62+
6063 private:
6164
6265 DXPrimitive m_PrimitiveLine;
6366 float m_CurPos;
6467 MTNoteDesignRing m_NoteDesign;
65-
6668 unsigned long m_CurTickTime;
69+ bool m_isEnable;
6770
6871 //頂点バッファ構造体
6972 struct MTTIMEINDICATOR_VERTEX {
--- a/MIDITrail/resource.h
+++ b/MIDITrail/resource.h
@@ -76,6 +76,15 @@
7676 #define IDM_OPEN_FOLDER 32855
7777 #define IDM_PREVIOUS_FILE 32858
7878 #define IDM_NEXT_FILE 32860
79+#define IDM_MENUBAR 32861
80+#define IDM_MYVIEWPOINT1 32862
81+#define IDM_MYVIEWPOINT2 32863
82+#define IDM_MYVIEWPOINT3 32864
83+#define IDM_SAVE_MYVIEWPOINT1 32865
84+#define IDM_SAVE_MYVIEWPOINT2 32866
85+#define IDM_SAVE_MYVIEWPOINT3 32867
86+#define IDM_ENABLE_GRIDLINE 32868
87+#define IDM_ENABLE_TIMEINDICATOR 32869
7988 #define IDC_STATIC -1
8089
8190 // Next default values for new objects
@@ -84,7 +93,7 @@
8493 #ifndef APSTUDIO_READONLY_SYMBOLS
8594 #define _APS_NO_MFC 1
8695 #define _APS_NEXT_RESOURCE_VALUE 134
87-#define _APS_NEXT_COMMAND_VALUE 32861
96+#define _APS_NEXT_COMMAND_VALUE 32870
8897 #define _APS_NEXT_CONTROL_VALUE 1025
8998 #define _APS_NEXT_SYMED_VALUE 110
9099 #endif
--- a/README.en.txt
+++ b/README.en.txt
@@ -1,8 +1,8 @@
11 ******************************************************************************
22
3- MIDITrail source code Ver.1.3.4 for Windows
3+ MIDITrail source code Ver.1.3.6 for Windows
44
5- Copyright (C) 2010-2021 WADA Masashi. All Rights Reserved.
5+ Copyright (C) 2010-2022 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.3.4 for Windows
3+ MIDITrail ソースコード Ver.1.3.6 for Windows
44
5- Copyright (C) 2010-2021 WADA Masashi. All Rights Reserved.
5+ Copyright (C) 2010-2022 WADA Masashi. All Rights Reserved.
66
77 Web : https://osdn.jp/projects/miditrail/
88 Mail: yknk@users.osdn.me
--- a/Resources/LICENSE.txt
+++ b/Resources/LICENSE.txt
@@ -1,5 +1,5 @@
11
2-Copyright (c) 2010-2021, WADA Masashi <yknk@users.osdn.me>
2+Copyright (c) 2010-2022, WADA Masashi <yknk@users.osdn.me>
33 All rights reserved.
44
55 Redistribution and use in source and binary forms, with or without
--- a/Resources/README.en.txt
+++ b/Resources/README.en.txt
@@ -2,7 +2,7 @@
22
33 MIDITrail for Windows
44
5- Copyright (C) 2010-2021 WADA Masashi. All Rights Reserved.
5+ Copyright (C) 2010-2022 WADA Masashi. All Rights Reserved.
66
77 Web : https://osdn.jp/projects/miditrail/
88 Mail: yknk@users.osdn.me
@@ -17,7 +17,7 @@
1717
1818 (2) System requirement
1919
20- OS: Windows 7 / 8 / 10
20+ OS: Windows 7 / 8 / 10 / 11
2121 VIDEO: Support for DirectX 9.0c graphics
2222
2323 (3) Quick Start
--- a/Resources/README.ja.txt
+++ b/Resources/README.ja.txt
@@ -2,7 +2,7 @@
22
33 MIDITrail for Windows
44
5- Copyright (C) 2010-2021 WADA Masashi. All Rights Reserved.
5+ Copyright (C) 2010-2022 WADA Masashi. All Rights Reserved.
66
77 Web : https://osdn.jp/projects/miditrail/
88 Mail: yknk@users.osdn.me
@@ -16,7 +16,7 @@
1616
1717 (2) 動作環境
1818
19- OS: Windows 7 / 8 / 10
19+ OS: Windows 7 / 8 / 10 / 11
2020 VIDEO: DirectX 9.0c に対応したグラフィックチップが必要です。
2121
2222 (3) クイックスタート
Binary files a/Resources/doc/Files/ViewMenu-Effect.png and b/Resources/doc/Files/ViewMenu-Effect.png differ
Binary files a/Resources/doc/Files/ViewMenu-Mode.png and b/Resources/doc/Files/ViewMenu-Mode.png differ
--- a/Resources/doc/MANUAL.en.html
+++ b/Resources/doc/MANUAL.en.html
@@ -4,7 +4,7 @@
44 <meta http-equiv="content-type" content="text/html; charset=UTF-8">
55 <meta http-equiv="Content-Language" content="en">
66 <link rel="stylesheet" href="Files/doc.css" type="text/css">
7-<title>MIDITrail Ver.1.3.4 for Windows User Manual</title>
7+<title>MIDITrail Ver.1.3.6 for Windows User Manual</title>
88 </head>
99 <body>
1010
@@ -15,10 +15,10 @@
1515 English / <a href="MANUAL.ja.html">Japanese</a>
1616 </div>
1717
18-<h1>MIDITrail Ver.1.3.4 for Windows User Manual</h1>
18+<h1>MIDITrail Ver.1.3.6 for Windows User Manual</h1>
1919
2020 <p>
21-Copyright (c) 2010-2021, WADA Masashi All rights reserved.<br>
21+Copyright (c) 2010-2022, WADA Masashi All rights reserved.<br>
2222 Web: <a href="https://osdn.jp/projects/miditrail/">https://osdn.jp/projects/miditrail/</a><br>
2323 Mail: <img src="Files/mail.png" align="top"><br>
2424 </p>
@@ -62,7 +62,7 @@ Screenshot: PianoRollRain<br>
6262 <h2><a name="system"></a>2. System requirement</h2>
6363
6464 <p>
65-OS: Windows 7 / 8 / 10<br>
65+OS: Windows 7 / 8 / 10 / 11<br>
6666 VIDEO: Support for DirectX 9.0c graphics
6767 </p>
6868 <p>
@@ -286,15 +286,33 @@ If you use a mouse with your left hand, this one may be convenience.
286286 <h3>(5) Selection of the viewpoint</h3>
287287
288288 <p>
289-When you select "Viewpoint 1 / Viewpoint 2 / Viewpoint 3" from "View" menu,
289+When you select "Viewpoint 1 / 2 / 3" from "View" menu,
290290 or when you push following key, you can move to a fixed viewpoint.
291291 </p>
292292 <p>
293293 <table>
294294 <tr><th>Key</th><th>Action</th></tr>
295- <tr><td><kbd>7</kbd></td><td>Move to viewpoint 1</td></tr>
296- <tr><td><kbd>8</kbd></td><td>Move to viewpoint 2</td></tr>
297- <tr><td><kbd>9</kbd></td><td>Move to viewpoint 3</td></tr>
295+ <tr><td><kbd>7</kbd></td><td>Move to fixed viewpoint 1</td></tr>
296+ <tr><td><kbd>8</kbd></td><td>Move to fixed viewpoint 2</td></tr>
297+ <tr><td><kbd>9</kbd></td><td>Move to fixed viewpoint 3</td></tr>
298+</table>
299+</p>
300+
301+<p>
302+When you select "My Viewpoint 1 / 2 / 3" from "View" menu,
303+or when you push following key, you can move to a viewpoint saved by the user in advance.<br>
304+If you want to save current viewpoint, select "Save My Viewpoint 1 / 2 / 3" from "View" menu
305+or push following key.
306+</p>
307+<p>
308+<table>
309+ <tr><th>Key</th><th>Action</th></tr>
310+ <tr><td><kbd>CTRL</kbd> + <kbd>7</kbd></td><td>Move to my viewpoint 1</td></tr>
311+ <tr><td><kbd>CTRL</kbd> + <kbd>8</kbd></td><td>Move to my viewpoint 2</td></tr>
312+ <tr><td><kbd>CTRL</kbd> + <kbd>9</kbd></td><td>Move to my viewpoint 3</td></tr>
313+ <tr><td><kbd>SHIFT</kbd> + <kbd>CTRL</kbd> + <kbd>7</kbd></td><td>Save my viewpoint 1</td></tr>
314+ <tr><td><kbd>SHIFT</kbd> + <kbd>CTRL</kbd> + <kbd>8</kbd></td><td>Save my viewpoint 2</td></tr>
315+ <tr><td><kbd>SHIFT</kbd> + <kbd>CTRL</kbd> + <kbd>9</kbd></td><td>Save my viewpoint 3</td></tr>
298316 </table>
299317 </p>
300318
@@ -503,7 +521,7 @@ You can customize the window size.
503521 Please open following file by text editor, and edit "Width" and "Height".
504522 </p>
505523 <pre>
506-Windows 7 / 8 / 10
524+Windows 7 / 8 / 10 / 11
507525 C:\Users\(user name)\AppData\Roaming\yknk\MIDITrail\View.ini
508526 </pre>
509527 <pre>
@@ -831,7 +849,7 @@ MIDITrail is released under the BSD license.
831849 </p>
832850
833851 <pre>
834-Copyright (c) 2010-2021, WADA Masashi &lt;<img src="Files/mail.png" align="top">&gt;
852+Copyright (c) 2010-2022, WADA Masashi &lt;<img src="Files/mail.png" align="top">&gt;
835853 All rights reserved.
836854
837855 Redistribution and use in source and binary forms, with or without
@@ -867,33 +885,33 @@ POSSIBILITY OF SUCH DAMAGE.
867885 <p>
868886 <table>
869887 <tr><th>Date</th><th>Version</th><th>Changelog</th></tr>
870- <tr><td>2010/03/08</td><td>Ver.0.0.0</td><td>Development start.</td></tr>
871- <tr><td>2010/05/18</td><td>Ver.1.0.0 beta</td><td>Beta release.</td></tr>
872- <tr><td>2010/06/02</td><td>Ver.1.0.0</td><td>First formal release.</td></tr>
888+ <tr><td>2010/03/08</td><td>Ver.0.0.0</td><td>Development start</td></tr>
889+ <tr><td>2010/05/18</td><td>Ver.1.0.0 beta</td><td>Beta release</td></tr>
890+ <tr><td>2010/06/02</td><td>Ver.1.0.0</td><td>First formal release</td></tr>
873891 <tr><td>2010/06/05</td><td>Ver.1.0.1</td><td>
874892 #22102 Fixed bug (execution fails by missing Visual C++ runtime library)<br>
875893 #22106 Fixed bug (size of about dialog is big on Windows English version)<br>
876894 </td></tr>
877895 <tr><td>2010/06/20</td><td>Ver.1.0.2</td><td>
878-#22218 Added English manual.<br>
896+#22218 Added English manual<br>
879897 #22108 Fixed bug (crash when opening the MIDI file exported from VOCALOID)<br>
880898 #22217 Fixed bug (overlapped ripples flicker)<br>
881899 </td></tr>
882900 <tr><td>2010/07/11</td><td>Ver.1.0.3</td><td>
883-#22319 Added color effect to active piano roll bar.<br>
884-#22412 Added pitch bend effect to piano roll bar.<br>
885-#22425 Added view mode of piano roll 2D.<br>
886-#22442 Added switch interface of display and effect.<br>
901+#22319 Added color effect to active piano roll bar<br>
902+#22412 Added pitch bend effect to piano roll bar<br>
903+#22425 Added view mode of piano roll 2D<br>
904+#22442 Added switch interface of display and effect<br>
887905 #22413 Fixed bug (rendering performance has declined by specular effect)<br>
888906 #22414 Fixed bug (total count of notes is incorrect)<br>
889907 #22424 Fixed bug (duration of a ripple is not constant)<br>
890908 </td></tr>
891909 <tr><td>2010/07/25</td><td>Ver.1.0.4</td><td>
892-#22320 Added application icon.<br>
893-#22522 Added support for Recomposer data file.<br>
894-#22523 Added command line interface.<br>
895-#22582 Added double speed playback mode.<br>
896-#22585 Added function of piano roll rotation by a mouse wheel.<br>
910+#22320 Added application icon<br>
911+#22522 Added support for Recomposer data file<br>
912+#22523 Added command line interface<br>
913+#22582 Added double speed playback mode<br>
914+#22585 Added function of piano roll rotation by a mouse wheel<br>
897915 #22566 Fixed bug (Playback time was slightly short)<br>
898916 #22506 Fixed bug (Note may continue sounding after the end of playback)<br>
899917 </td></tr>
@@ -903,7 +921,7 @@ POSSIBILITY OF SUCH DAMAGE.
903921 #22709 Fixed bug (MIDITrail sends redundant "F7" to MIDI-OUT with multi-packet system exclusive message)<br>
904922 #22710 Fixed bug (Auto rotation speed of piano roll is not constant)<br>
905923 </td></tr>
906- <tr><td>2010/08/29</td><td>Ver.1.1.0 beta</td><td>Beta release.(Added "Piano Roll Rain")</td></tr>
924+ <tr><td>2010/08/29</td><td>Ver.1.1.0 beta</td><td>Beta release (Added "Piano Roll Rain")</td></tr>
907925 <tr><td>2010/09/19</td><td>Ver.1.1.0</td><td>
908926 #23174 Added view mode "Piano Roll Rain"<br>
909927 #23175 Fixed bug (File open dialog is not modal)<br>
@@ -915,10 +933,10 @@ POSSIBILITY OF SUCH DAMAGE.
915933 #23422 Fixed bug (Position of black is not correct in PianoRollRain)<br>
916934 </td></tr>
917935 <tr><td>2010/12/26</td><td>Ver.1.1.2</td><td>
918-This version was released with MIDITrail for Mac OS X.<br>
919-#23970 Added eye direction control by key operation.<br>
920-#23971 Updated texture images.<br>
921-#23972 Updated application icon.<br>
936+This version was released with MIDITrail for Mac OS X<br>
937+#23970 Added eye direction control by key operation<br>
938+#23971 Updated texture images<br>
939+#23972 Updated application icon<br>
922940 #23497 Fixed bug ("Piano Roll Rain" item in "View" menu is always enable)<br>
923941 #23968 Fixed bug (Time signature was always 4/4 after loading file)<br>
924942 #23969 Fixed bug (Space charactor in the title string has been ignored)<br>
@@ -996,8 +1014,8 @@ This version was released with MIDITrail for Mac OS X.<br>
9961014 #39675 Added view mode "Piano Roll Ring"<br>
9971015 </td></tr>
9981016 <tr><td>2019/11/09</td><td>Ver.1.3.1</td><td>
999-#39733 Changed keyboard display direction on Piano Roll Ring.<br>
1000-#39734 Changed processing to keep viewpoint when window size changed.<br>
1017+#39733 Changed keyboard display direction on Piano Roll Ring<br>
1018+#39734 Changed processing to keep viewpoint when window size changed<br>
10011019 #39735 Fixed bug (Assertion occurs in _controlfp_s when x64 debug configuration)<br>
10021020 #39736 Fixed bug (Exception occurs in "How to view" dialog when x64 debug configuration)<br>
10031021 </td></tr>
@@ -1011,6 +1029,14 @@ This version was released with MIDITrail for Mac OS X.<br>
10111029 <tr><td>2021/09/13</td><td>Ver.1.3.4</td><td>
10121030 #42859 Added setting of delay between songs<br>
10131031 </td></tr>
1032+ <tr><td>2022/07/14</td><td>Ver.1.3.6</td><td>
1033+#45088 Added menu bar display switch<br>
1034+#45089 Added feature of saving my viewpoint<br>
1035+#45090 Added display switch of grid line and time indicator<br>
1036+#45091 Added feature of saving display switch status<br>
1037+#45092 Added 2nd light for Piano Roll 3D<br>
1038+#45093 Added MIDI system message parsing<br>
1039+ </td></tr>
10141040 </table>
10151041 </p>
10161042
--- a/Resources/doc/MANUAL.ja.html
+++ b/Resources/doc/MANUAL.ja.html
@@ -4,7 +4,7 @@
44 <meta http-equiv="content-type" content="text/html; charset=UTF-8">
55 <meta http-equiv="Content-Language" content="ja">
66 <link rel="stylesheet" href="Files/doc.css" type="text/css">
7-<title>MIDITrail Ver.1.3.4 for Windows ユーザーマニュアル</title>
7+<title>MIDITrail Ver.1.3.6 for Windows ユーザーマニュアル</title>
88 </head>
99 <body>
1010
@@ -14,10 +14,10 @@
1414 <a href="MANUAL.en.html">English</a> / Japanese
1515 </div>
1616
17-<h1>MIDITrail Ver.1.3.4 for Windows ユーザーマニュアル</h1>
17+<h1>MIDITrail Ver.1.3.6 for Windows ユーザーマニュアル</h1>
1818
1919 <p>
20-Copyright (c) 2010-2021, WADA Masashi All rights reserved.<br>
20+Copyright (c) 2010-2022, WADA Masashi All rights reserved.<br>
2121 Web: <a href="https://osdn.jp/projects/miditrail/">https://osdn.jp/projects/miditrail/</a><br>
2222 Mail: <img src="Files/mail.png" align="top"><br>
2323 </p>
@@ -61,7 +61,7 @@ MIDITrailはWindows, macOS, iOSに対応しています。
6161 <h2><a name="system"></a>2. 動作環境</h2>
6262
6363 <p>
64-対応OS: Windows 7 / 8 / 10<br>
64+対応OS: Windows 7 / 8 / 10 / 11<br>
6565 DirectX 9.0c に対応したグラフィックチップが必要です。<br>
6666 </p>
6767 <p>
@@ -283,15 +283,32 @@ FPS(一人称シューティング)ゲームでおなじみの操作で、
283283
284284 <h3>(5) 視点の選択</h3>
285285 <p>
286-Viewメニューから「Viewpoint 1 / Viewpoint 2 / Viewpoint 3」を選択するか、次のキーを押すと、
286+Viewメニューから「Viewpoint 1 / 2 / 3」を選択するか、次のキーを押すと、
287287 あらかじめ固定された視点に移動することができます。
288288 </p>
289289 <p>
290290 <table>
291291 <tr><th>キー</th><th>動作</th></tr>
292- <tr><td><kbd>7</kbd></td><td>視点1に移動する</td></tr>
293- <tr><td><kbd>8</kbd></td><td>視点2に移動する</td></tr>
294- <tr><td><kbd>9</kbd></td><td>視点3に移動する</td></tr>
292+ <tr><td><kbd>7</kbd></td><td>固定視点1に移動する</td></tr>
293+ <tr><td><kbd>8</kbd></td><td>固定視点2に移動する</td></tr>
294+ <tr><td><kbd>9</kbd></td><td>固定視点3に移動する</td></tr>
295+</table>
296+</p>
297+<p>
298+Viewメニューから「My Viewpoint 1 / 2 / 3」を選択するか、次のキーを押すと、
299+あらかじめユーザが保存しておいた視点に移動することができます。<br>
300+現在の視点を保存するには、Viewメニューから「Save My Viewpoint 1 / 2 / 3」を選択するか、
301+次のキーを押します。
302+</p>
303+<p>
304+<table>
305+ <tr><th>キー</th><th>動作</th></tr>
306+ <tr><td><kbd>CTRL</kbd> + <kbd>7</kbd></td><td>私の視点1に移動する</td></tr>
307+ <tr><td><kbd>CTRL</kbd> + <kbd>8</kbd></td><td>私の視点2に移動する</td></tr>
308+ <tr><td><kbd>CTRL</kbd> + <kbd>9</kbd></td><td>私の視点3に移動する</td></tr>
309+ <tr><td><kbd>SHIFT</kbd> + <kbd>CTRL</kbd> + <kbd>7</kbd></td><td>私の視点1を保存する</td></tr>
310+ <tr><td><kbd>SHIFT</kbd> + <kbd>CTRL</kbd> + <kbd>8</kbd></td><td>私の視点2を保存する</td></tr>
311+ <tr><td><kbd>SHIFT</kbd> + <kbd>CTRL</kbd> + <kbd>9</kbd></td><td>私の視点3を保存する</td></tr>
295312 </table>
296313 </p>
297314
@@ -503,7 +520,7 @@ PCの処理能力を確認するために、音符の数が少ないMIDIデー
503520 次のファイルをテキストエディタで編集することにより、ウィンドウサイズをカスタマイズできます。
504521 </p>
505522 <pre>
506-Windows 7 / 8 / 10 の場合
523+Windows 7 / 8 / 10 / 11 の場合
507524 C:\Users\(ユーザー名)\AppData\Roaming\yknk\MIDITrail\View.ini
508525 </pre>
509526 <p>
@@ -821,7 +838,7 @@ MIDITrailは修正BSDライセンスを適用して公開しています。
821838 </p>
822839
823840 <pre>
824-Copyright (c) 2010-2021, WADA Masashi &lt;<img src="Files/mail.png" align="top">&gt;
841+Copyright (c) 2010-2022, WADA Masashi &lt;<img src="Files/mail.png" align="top">&gt;
825842 All rights reserved.
826843
827844 Redistribution and use in source and binary forms, with or without
@@ -856,7 +873,7 @@ POSSIBILITY OF SUCH DAMAGE.
856873
857874 <p>
858875 <table>
859- <tr><th>日時</th><th>バージョン</th><th>変更内容</th></tr>
876+ <tr><th>日付</th><th>バージョン</th><th>変更内容</th></tr>
860877 <tr><td>2010/03/08</td><td>Ver.0.0.0</td><td>開発開始</td></tr>
861878 <tr><td>2010/05/18</td><td>Ver.1.0.0 beta</td><td>ベータ版公開</td></tr>
862879 <tr><td>2010/06/02</td><td>Ver.1.0.0</td><td>正式版公開</td></tr>
@@ -1001,6 +1018,14 @@ MIDITrail for Mac OS Xと同時にリリース<br>
10011018 <tr><td>2021/09/13</td><td>Ver.1.3.4</td><td>
10021019 #42859 機能追加:曲間待機時間の設定を追加<br>
10031020 </td></tr>
1021+ <tr><td>2022/07/14</td><td>Ver.1.3.6</td><td>
1022+#45088 機能追加:メニューバー非表示対応<br>
1023+#45089 機能追加:視点保存機能を追加<br>
1024+#45090 機能追加:グリッドラインとタイムインジケータの表示切替対応<br>
1025+#45091 機能追加:表示/効果スイッチの選択状態を保存<br>
1026+#45092 機能追加:Piano Roll 3Dにライトを追加<br>
1027+#45093 機能追加:システムメッセージの解析処理を追加<br>
1028+ </td></tr>
10041029 </table>
10051030 </p>
10061031
--- a/SMIDILib/SMEventSysMsg.cpp
+++ b/SMIDILib/SMEventSysMsg.cpp
@@ -4,7 +4,7 @@
44 //
55 // システムメッセージイベントクラス
66 //
7-// Copyright (C) 2012 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2012-2022 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -90,6 +90,40 @@ EXIT:;
9090 return result;
9191 }
9292
93+//******************************************************************************
94+// システムメッセージ種別取得
95+//******************************************************************************
96+SMEventSysMsg::SysMsg SMEventSysMsg::GetSysMsg()
97+{
98+ SysMsg msg = None;
99+ unsigned char* pData = NULL;
100+ unsigned char size = 0;
101+
102+ if (m_pEvent == NULL) {
103+ goto EXIT;
104+ }
105+
106+ switch (m_pEvent->GetStatus()) {
107+ case 0xF1: msg = Common_QuarterFrame; size = 2; break;
108+ case 0xF2: msg = Common_SongPositionPointer; size = 3; break;
109+ case 0xF3: msg = Common_SongSelect; size = 2; break;
110+ case 0xF6: msg = Common_TuneRequest; size = 1; break;
111+ case 0xF8: msg = RealTime_TimingClock; size = 1; break;
112+ case 0xFA: msg = RealTime_Start; size = 1; break;
113+ case 0xFB: msg = RealTime_Continue; size = 1; break;
114+ case 0xFC: msg = RealTime_Stop; size = 1; break;
115+ case 0xFE: msg = RealTime_ActiveSensing; size = 1; break;
116+ case 0xFF: msg = RealTime_SystemReset; size = 1; break;
117+ default: break;
118+ }
119+ if ((m_pEvent->GetDataSize() + 1) != size) {
120+ msg = None;
121+ }
122+
123+EXIT:;
124+ return msg;
125+}
126+
93127 } // end of namespace
94128
95129
--- a/SMIDILib/SMEventSysMsg.h
+++ b/SMIDILib/SMEventSysMsg.h
@@ -4,7 +4,7 @@
44 //
55 // システムメッセージイベントクラス
66 //
7-// Copyright (C) 2012 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2012-2022 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -50,7 +50,26 @@ namespace SMIDILib {
5050 class SMIDILIB_API SMEventSysMsg
5151 {
5252 public:
53-
53+
54+ //システムメッセージ種別
55+ enum SysMsg {
56+ None = 0x00, // none
57+ //システムコモンメッセージ
58+ Common_QuarterFrame = 0xF1, // F1 dd
59+ Common_SongPositionPointer = 0xF2, // F2 dl dm
60+ Common_SongSelect = 0xF3, // F3 dd
61+ Common_TuneRequest = 0xF6, // F6
62+ //システムリアルタイムメッセージ
63+ RealTime_TimingClock = 0xF8, // F8
64+ RealTime_Start = 0xFA, // FA
65+ RealTime_Continue = 0xFB, // FB
66+ RealTime_Stop = 0xFC, // FC
67+ RealTime_ActiveSensing = 0xFE, // FE
68+ RealTime_SystemReset = 0xFF // FF
69+ };
70+
71+public:
72+
5473 //コンストラクタ/デストラクタ
5574 SMEventSysMsg();
5675 virtual ~SMEventSysMsg(void);
@@ -61,6 +80,9 @@ public:
6180 //MIDI出力メッセージ取得
6281 int GetMIDIOutShortMsg(unsigned long* pMsg, unsigned long* pSize);
6382
83+ //システムメッセージ取得
84+ SysMsg GetSysMsg();
85+
6486 private:
6587
6688 SMEvent* m_pEvent;
--- a/SMIDILib/SMEventWatcher.cpp
+++ b/SMIDILib/SMEventWatcher.cpp
@@ -4,13 +4,14 @@
44 //
55 // イベントウォッチャークラス
66 //
7-// Copyright (C) 2012 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2012-2022 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
1111 #include "StdAfx.h"
1212 #include "YNBaseLib.h"
1313 #include "SMEventWatcher.h"
14+#include "SMEventSysMsg.h"
1415
1516 using namespace YNBaseLib;
1617
@@ -57,6 +58,7 @@ int SMEventWatcher::WatchEvent(
5758 {
5859 int result = 0;
5960 SMEventMIDI eventMIDI;
61+ SMEventSysMsg eventSysMsg;
6062
6163 if (pEvent->GetType() == SMEvent::EventMIDI) {
6264 eventMIDI.Attach(pEvent);
@@ -73,6 +75,13 @@ int SMEventWatcher::WatchEvent(
7375 if (result != 0) goto EXIT;
7476 }
7577 }
78+ else if (pEvent->GetType() == SMEvent::EventSysMsg) {
79+ eventSysMsg.Attach(pEvent);
80+
81+ //システムメッセージイベント監視
82+ result = _WatchEventSysMsg(portNo, &eventSysMsg);
83+ if (result != 0) goto EXIT;
84+ }
7685
7786 EXIT:;
7887 return result;
@@ -325,6 +334,58 @@ int SMEventWatcher::_WatchEventControlChange2(
325334 return result;
326335 }
327336
337+//******************************************************************************
338+// システムメッセージイベント監視処理
339+//******************************************************************************
340+int SMEventWatcher::_WatchEventSysMsg(
341+ unsigned char portNo,
342+ SMEventSysMsg* pEventSysMsg
343+ )
344+{
345+ int result = 0;
346+
347+ //現状は何もしない
348+ goto EXIT;
349+
350+ switch (pEventSysMsg->GetSysMsg()) {
351+ case SMEventSysMsg::Common_QuarterFrame:
352+ OutputDebugString(_T("Common_QuarterFrame\n"));
353+ break;
354+ case SMEventSysMsg::Common_SongPositionPointer:
355+ OutputDebugString(_T("Common_SongPositionPointer\n"));
356+ break;
357+ case SMEventSysMsg::Common_SongSelect:
358+ OutputDebugString(_T("Common_SongSelect\n"));
359+ break;
360+ case SMEventSysMsg::Common_TuneRequest:
361+ OutputDebugString(_T("Common_TuneRequest\n"));
362+ break;
363+ case SMEventSysMsg::RealTime_TimingClock:
364+ OutputDebugString(_T("RealTime_TimingClock\n"));
365+ break;
366+ case SMEventSysMsg::RealTime_Start:
367+ OutputDebugString(_T("RealTime_Start\n"));
368+ break;
369+ case SMEventSysMsg::RealTime_Continue:
370+ OutputDebugString(_T("RealTime_Continue\n"));
371+ break;
372+ case SMEventSysMsg::RealTime_Stop:
373+ OutputDebugString(_T("RealTime_Stop\n"));
374+ break;
375+ case SMEventSysMsg::RealTime_ActiveSensing:
376+ OutputDebugString(_T("RealTime_ActiveSensing\n"));
377+ break;
378+ case SMEventSysMsg::RealTime_SystemReset:
379+ OutputDebugString(_T("RealTime_SystemReset\n"));
380+ break;
381+ default:
382+ break;
383+ }
384+
385+EXIT:;
386+ return result;
387+}
388+
328389 } // end of namespace
329390
330391
--- a/SMIDILib/SMEventWatcher.h
+++ b/SMIDILib/SMEventWatcher.h
@@ -4,7 +4,7 @@
44 //
55 // イベントウォッチャークラス
66 //
7-// Copyright (C) 2012 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2012-2022 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -18,6 +18,7 @@
1818
1919 #include "SMEvent.h"
2020 #include "SMEventMIDI.h"
21+#include "SMEventSysMsg.h"
2122 #include "SMMsgTransmitter.h"
2223 #include "SMCommon.h"
2324
@@ -78,6 +79,7 @@ private:
7879 int _WatchEventControlChange(unsigned char portNo, SMEventMIDI* pMIDIEvent);
7980 int _WatchEventControlChange2(unsigned char portNo, SMEventMIDI* pMIDIEvent);
8081 RPN_Type _GetCurRPNType(unsigned char portNo, unsigned char chNo);
82+ int _WatchEventSysMsg(unsigned char portNo, SMEventSysMsg* pEventSysMsg);
8183
8284 };
8385