OSDN Git Service

#34828 MidiInChecker2でも、コントロールチェンジNo4を受け付けるように変更。
authoryyagi <yyagi@16f42ceb-6dc6-49c8-ba94-f2d53467949d>
Thu, 22 Jan 2015 15:35:21 +0000 (15:35 +0000)
committeryyagi <yyagi@16f42ceb-6dc6-49c8-ba94-f2d53467949d>
Thu, 22 Jan 2015 15:35:21 +0000 (15:35 +0000)
また、MIDIのチャンネル情報が分かるよう、表示を若干見直した。

git-svn-id: http://svn.osdn.jp/svnroot/dtxmania/trunk@813 16f42ceb-6dc6-49c8-ba94-f2d53467949d

MidiInChecker2_Solution/MidiInChecker2_Project/Form_Main.cs
MidiInChecker2_Solution/MidiInChecker2_Project/PsuedoFDK/CInputManager.cs
MidiInChecker2_Solution/MidiInChecker2_Project/PsuedoFDK/CInputMidi.cs

index bbb4600..e6a37f7 100644 (file)
@@ -49,7 +49,7 @@ namespace MidiInChecker2
                                        {\r
                                                foreach ( STInputEvent ev in device.list入力イベント )\r
                                                {\r
-                                                       int nMIDIevent = ev.nKey & 0xF0;\r
+                                                       int nMIDIevent = ev.nKey & 0xFF;\r
                                                        int nNote = ( ev.nKey >> 8 ) & 0xFF;    // note#\r
                                                        // int nVelo = ( ev.nKey >> 16 ) & 0xFF;        // velocity\r
 \r
index 96631b3..47c6847 100644 (file)
@@ -157,7 +157,7 @@ namespace MidiInChecker2
                private void MidiInCallback( uint hMidiIn, uint wMsg, int dwInstance, int dwParam1, int dwParam2 )\r
                {\r
                        int p = dwParam1 & 0xF0;\r
-                       if ( wMsg != CWin32.MIM_DATA || ( p != 0x80 && p != 0x90 ) )\r
+                       if ( wMsg != CWin32.MIM_DATA || ( p != 0x80 && p != 0x90 && p != 0xB0 ) )\r
                                return;\r
 \r
                        //long time = this.timer.nシステム時刻;   // lock前に取得\r
index 3ade005..63bdc77 100644 (file)
@@ -32,11 +32,11 @@ namespace MidiInChecker2
                {\r
                        if ( wMsg == CWin32.MIM_DATA )\r
                        {\r
-                               int nMIDIevent = dwParam1 & 0xF0;\r
+                               int nMIDIevent = dwParam1 & 0xFF;\r
                                int nPara1 = ( dwParam1 >> 8 ) & 0xFF;\r
                                int nPara2 = ( dwParam1 >> 16 ) & 0xFF;\r
 \r
-                               // Trace.TraceInformation( "MIDIevent={0:X2} para1={1:X2} para2={2:X2}", nMIDIevent, nPara1, nPara2 );\r
+                               Trace.TraceInformation( "MIDIevent={0:X2} para1={1:X2} para2={2:X2}", nMIDIevent, nPara1, nPara2 );\r
 \r
 //                             if ( ( nMIDIevent == 0x90 ) && ( nPara2 != 0 ) )\r
                                {\r