OSDN Git Service

MIDI Editor イベント表示のポケット・ミク(eVocaloid)対応:SysExの発音データに含まれる音節は1個だけでなく複数の場合があることが判明。最初の1文...
authorAkiyoshi Kamide <kamide@yk.rim.or.jp>
Thu, 17 Apr 2014 11:45:02 +0000 (11:45 +0000)
committerAkiyoshi Kamide <kamide@yk.rim.or.jp>
Thu, 17 Apr 2014 11:45:02 +0000 (11:45 +0000)
git-svn-id: https://svn.sourceforge.jp/svnroot/midichordhelper/MIDIChordHelper@39 302f1594-2db2-43b1-aaa4-6307b5a2a2de

src/camidion/chordhelper/ChordHelperApplet.java
src/camidion/chordhelper/music/MIDISpec.java

index 4747cc8..bc1a38c 100644 (file)
@@ -284,7 +284,7 @@ public class ChordHelperApplet extends JApplet {
         */\r
        public static class VersionInfo {\r
                public static final String      NAME = "MIDI Chord Helper";\r
-               public static final String      VERSION = "Ver.20140413.3";\r
+               public static final String      VERSION = "Ver.20140417.1";\r
                public static final String      COPYRIGHT = "Copyright (C) 2004-2014";\r
                public static final String      AUTHER = "@きよし - Akiyoshi Kamide";\r
                public static final String      URL = "http://www.yk.rim.or.jp/~kamide/music/chordhelper/";\r
index 22622ce..0c0828e 100644 (file)
@@ -1074,8 +1074,14 @@ public class MIDISpec {
                                        str += " [eVocaloid]";\r
                                        dataBytePos += 2;\r
                                        if( msgdata[3]==0x11 && msgdata[4]==0x0A && msgdata[5]==0 ) {\r
-                                               String pronounce = MIDISpec.nsx39LyricElements[msgdata[6]];\r
-                                               str += " pronounce["+pronounce+"]";\r
+                                               StringBuilder p = new StringBuilder();\r
+                                               for( int i=6; i<msgdata.length; i++ ) {\r
+                                                       int b = (msgdata[i] & 0xFF);\r
+                                                       if( b == 0xF7 ) break;\r
+                                                       String s = b<0 ? "?": MIDISpec.nsx39LyricElements[b];\r
+                                                       p.append(s);\r
+                                               }\r
+                                               str += " pronounce["+p+"]";\r
                                                return str;\r
                                        }\r
                                }\r