[MID2Motion-plugin] Drums: left and right hand exclusive flags, etc.
@@ -22,6 +22,20 @@ | ||
22 | 22 | http://mmdmotion-java.osdn.jp/wiki/MID2Motion/sampler |
23 | 23 | を参照してください。 |
24 | 24 | |
25 | +== ノートナンバー == | |
26 | + | |
27 | +自分しか使わないテンプレートは自由にしていいと思いますが、 | |
28 | +他と組み合わせる場合は、大体こんな風に合わせると分かりやすいかもしれません。 | |
29 | + | |
30 | +0: frame 0 準備態勢 | |
31 | +1-11: 全体勢関連 | |
32 | +12-23: 足関連 | |
33 | +24(c0)-36 は演奏補助関連にするため避ける | |
34 | +36(c1)-59 は演奏関連にするため避ける | |
35 | +60-71: 上下半身とか | |
36 | +72-: 手とか | |
37 | +108-: 首とか | |
38 | + | |
25 | 39 | = 著作権・ライセンス = |
26 | 40 | ソースコードの著作権は、Copyright (c) nazo, 2015 です。 |
27 | 41 | MIT ライセンス扱いで、著作権の所在を明示的に示す限り、改変・再配布を許可します。 |
@@ -99,7 +99,7 @@ | ||
99 | 99 | JFileChooser jfc=new JFileChooser(s); |
100 | 100 | jfc.setFileSelectionMode(JFileChooser.FILES_ONLY); |
101 | 101 | jfc.setToolTipText("ファイル名を選ぶ"); |
102 | - jfc.setFileFilter(new FileNameExtensionFilter("MMD Motion File", "vmd","csv")); | |
102 | + jfc.setFileFilter(new FileNameExtensionFilter("MMD Motion File (*.vmd, *.csv)", "vmd","csv")); | |
103 | 103 | if(jfc.showSaveDialog(this)!=JFileChooser.APPROVE_OPTION){ |
104 | 104 | return; |
105 | 105 | } |
@@ -112,6 +112,9 @@ | ||
112 | 112 | motion.toCSV(fos); |
113 | 113 | fos.close(); |
114 | 114 | }else { |
115 | + if(!f.getName().toLowerCase().endsWith(".vmd")){ | |
116 | + f=new File(f.getParentFile(),f.getName()+".vmd"); | |
117 | + } | |
115 | 118 | fos=new FileOutputStream(f); |
116 | 119 | motion.toVMD(fos); |
117 | 120 | fos.close(); |
@@ -140,6 +143,7 @@ | ||
140 | 143 | progressBar = new javax.swing.JProgressBar(); |
141 | 144 | textLML = new javax.swing.JTextField(); |
142 | 145 | javax.swing.JLabel jLabel2 = new javax.swing.JLabel(); |
146 | + checkPitchAction = new javax.swing.JCheckBox(); | |
143 | 147 | |
144 | 148 | setLayout(new java.awt.GridBagLayout()); |
145 | 149 |
@@ -197,6 +201,13 @@ | ||
197 | 201 | gridBagConstraints.gridx = 2; |
198 | 202 | gridBagConstraints.gridy = 2; |
199 | 203 | add(jLabel2, gridBagConstraints); |
204 | + | |
205 | + checkPitchAction.setText("ピッチベンドまばたき機能"); | |
206 | + gridBagConstraints = new java.awt.GridBagConstraints(); | |
207 | + gridBagConstraints.gridx = 1; | |
208 | + gridBagConstraints.gridy = 0; | |
209 | + gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START; | |
210 | + add(checkPitchAction, gridBagConstraints); | |
200 | 211 | }// </editor-fold>//GEN-END:initComponents |
201 | 212 | |
202 | 213 | private void buttonLMLActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonLMLActionPerformed |
@@ -235,12 +246,13 @@ | ||
235 | 246 | return; |
236 | 247 | } |
237 | 248 | |
249 | + smb.setPitchAction(checkPitchAction.isSelected()); | |
238 | 250 | smb.addProgressListener(this); |
239 | 251 | buttonProgress.setEnabled(false); |
240 | 252 | new Thread(new Runnable() { |
241 | - private ProgressLisner perent; | |
253 | + private ProgressLisner parent; | |
242 | 254 | public Runnable setP(ProgressLisner l){ |
243 | - perent=l; | |
255 | + parent=l; | |
244 | 256 | return this; |
245 | 257 | } |
246 | 258 | @Override |
@@ -247,7 +259,7 @@ | ||
247 | 259 | public void run() { |
248 | 260 | smb.setMidiResolver(midiR); |
249 | 261 | smb.loadMessages(); |
250 | - smb.removeProgressListener(perent); | |
262 | + smb.removeProgressListener(parent); | |
251 | 263 | } |
252 | 264 | }.setP(this)).start(); |
253 | 265 | }//GEN-LAST:event_buttonProgressActionPerformed |
@@ -264,6 +276,7 @@ | ||
264 | 276 | // Variables declaration - do not modify//GEN-BEGIN:variables |
265 | 277 | private javax.swing.JButton buttonLML; |
266 | 278 | private javax.swing.JButton buttonProgress; |
279 | + private javax.swing.JCheckBox checkPitchAction; | |
267 | 280 | private javax.swing.JProgressBar progressBar; |
268 | 281 | private javax.swing.JTextField textLML; |
269 | 282 | // End of variables declaration//GEN-END:variables |
@@ -119,7 +119,7 @@ | ||
119 | 119 | JFileChooser jfc=new JFileChooser(s); |
120 | 120 | jfc.setFileSelectionMode(JFileChooser.FILES_ONLY); |
121 | 121 | jfc.setToolTipText("ファイル名を選ぶ"); |
122 | - jfc.setFileFilter(new FileNameExtensionFilter("MMD Motion File", "vmd","csv")); | |
122 | + jfc.setFileFilter(new FileNameExtensionFilter("MMD Motion File (*.vmd,*.csv)", "vmd","csv")); | |
123 | 123 | if(jfc.showSaveDialog(this)!=JFileChooser.APPROVE_OPTION){ |
124 | 124 | return; |
125 | 125 | } |
@@ -132,6 +132,9 @@ | ||
132 | 132 | motion.toCSV(fos); |
133 | 133 | fos.close(); |
134 | 134 | }else { |
135 | + if(!f.getName().toLowerCase().endsWith(".vmd")){ | |
136 | + f=new File(f.getParentFile(),f.getName()+".vmd"); | |
137 | + } | |
135 | 138 | fos=new FileOutputStream(f); |
136 | 139 | motion.toVMD(fos); |
137 | 140 | fos.close(); |
@@ -1,7 +1,25 @@ | ||
1 | 1 | /* |
2 | - * In Public Domain. | |
3 | - * This is an example of MID2Motion plugin (MotionBuilder) | |
4 | - * See http://mmdmotion-java.osdn.jp/wiki/MID2Motion for detail. | |
2 | + * The MIT License | |
3 | + * | |
4 | + * Copyright 2015 nazo. | |
5 | + * | |
6 | + * Permission is hereby granted, free of charge, to any person obtaining a copy | |
7 | + * of this software and associated documentation files (the "Software"), to deal | |
8 | + * in the Software without restriction, including without limitation the rights | |
9 | + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
10 | + * copies of the Software, and to permit persons to whom the Software is | |
11 | + * furnished to do so, subject to the following conditions: | |
12 | + * | |
13 | + * The above copyright notice and this permission notice shall be included in | |
14 | + * all copies or substantial portions of the Software. | |
15 | + * | |
16 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
17 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
18 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
19 | + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
20 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
21 | + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |
22 | + * THE SOFTWARE. | |
5 | 23 | */ |
6 | 24 | package plugin; |
7 | 25 |
@@ -34,6 +52,8 @@ | ||
34 | 52 | |
35 | 53 | private Map<String,Integer> mp; |
36 | 54 | private int [] chToMorph; |
55 | + /** ピッチベンドまばたき機能 */ | |
56 | + private boolean pitchAction; | |
37 | 57 | |
38 | 58 | public ShoutroidMotionBuilder() { |
39 | 59 | super(); |
@@ -40,6 +60,7 @@ | ||
40 | 60 | mp=new TreeMap<String, Integer>(); |
41 | 61 | chToMorph = new int[16]; |
42 | 62 | motion.setModelName("琴葉茜"); |
63 | + pitchAction=false; | |
43 | 64 | convert=new HashMap<String, String>(); |
44 | 65 | convert.put("あ","a"); |
45 | 66 | convert.put("い","i"); |
@@ -241,15 +262,16 @@ | ||
241 | 262 | p.factor=((float)velo)/127; |
242 | 263 | motion.put(p); |
243 | 264 | |
244 | - p.frame=frame+d-1; | |
245 | -// p.factor=((float)velo)/127; | |
246 | - motion.put(p); | |
247 | - | |
265 | + if(d>1){// 短すぎる(d=0)時にこれを口が開きっぱなしになるから避ける。 | |
266 | + p.frame=frame+d-1; | |
267 | + motion.put(p); | |
268 | + } | |
248 | 269 | p.frame=frame+d; |
249 | 270 | p.factor=0; |
250 | 271 | motion.put(p); |
251 | - } /*else if(com==ShortMessage.PITCH_BEND){ | |
252 | - // やめた機能: PITCH_BEND まばたき機能 | |
272 | + } if(pitchAction && com==ShortMessage.PITCH_BEND){ | |
273 | + // PITCH_BEND まばたき機能: ピッチが高いときに目を細くする。 | |
274 | + // 叫んでる感じが出るがビブラートにはよくない | |
253 | 275 | int pitch = sm.getData1() + sm.getData2() * 128 - 8192; |
254 | 276 | MorphPose p; |
255 | 277 | p=new MorphPose(); |
@@ -257,9 +279,25 @@ | ||
257 | 279 | p.frame=frame; |
258 | 280 | p.factor=(pitch<0)?0F:((float)pitch)/8192F*0.6F; |
259 | 281 | motion.put(p); |
260 | - }*/ | |
282 | + } | |
261 | 283 | } |
262 | 284 | } |
263 | 285 | reportProgressEnd(); /** 処理終了通知. */ |
264 | 286 | } |
287 | + | |
288 | + /** | |
289 | + * ピッチベンドまばたき機能の有無. | |
290 | + * @return ピッチベンドまばたき機能が設定されていると true. | |
291 | + */ | |
292 | + public boolean isPitchAction() { | |
293 | + return pitchAction; | |
294 | + } | |
295 | + | |
296 | + /** | |
297 | + * ピッチベンドまばたき機能のon/off. | |
298 | + * @param pitchAction true: on, false: off. デフォルトはfalse. | |
299 | + */ | |
300 | + public void setPitchAction(boolean pitchAction) { | |
301 | + this.pitchAction = pitchAction; | |
302 | + } | |
265 | 303 | } |
@@ -83,19 +83,29 @@ | ||
83 | 83 | /** |
84 | 84 | * 指譜の CVS 1 行からコンストラクト. |
85 | 85 | * @param csv 指譜の CVS 1 行 |
86 | + * @throws NumberFormatException 数字の場所に数字が書いてない. | |
86 | 87 | */ |
87 | - public TAB(String csv){ | |
88 | + public TAB(String csv) throws NumberFormatException { | |
88 | 89 | String []p =CsvSpliter.split(csv); |
89 | 90 | // if(p[0].charAt(0)==';') |
90 | - this.frame=Integer.parseInt(p[0]); | |
91 | - this.velocity=Byte.parseByte(p[1]); | |
91 | + frame=Integer.parseInt(p[0]); | |
92 | + velocity=Byte.parseByte(p[1]); | |
93 | + | |
92 | 94 | int i; |
93 | 95 | for(i=0;i<5;i++){ |
94 | - this.noteList[i]=Integer.parseInt(p[i+2]); | |
96 | + if(onList[i]=!p[i+2].contains("x")){ // on の可能性 | |
97 | + if(p[i+2].startsWith("-")){ // -0 という表記もある | |
98 | + noteList[i]=-Integer.parseInt(p[i+2]); | |
99 | + onList[i]=false; | |
100 | + }else { | |
101 | + noteList[i]=Integer.parseInt(p[i+2]); | |
102 | + onList[i]=true; | |
103 | + } | |
104 | + } else { | |
105 | + noteList[i]=-1; | |
106 | + onList[i]=false; | |
107 | + } | |
95 | 108 | } |
96 | - for(i=0;i<5;i++){ | |
97 | - this.onList[i]=p[i+7].contains("o"); | |
98 | - } | |
99 | 109 | } |
100 | 110 | |
101 | 111 | /** |
@@ -116,14 +126,11 @@ | ||
116 | 126 | String ret=frame+","+velocity; |
117 | 127 | int i; |
118 | 128 | for(i=0;i<5;i++){ |
119 | - ret+=","+noteList[i]; | |
129 | + ret+=","; | |
130 | + ret+=(noteList[i]==-1)?'x':((onList[i])?"":'-')+String.valueOf(noteList[i]); | |
120 | 131 | } |
121 | - for(i=0;i<5;i++){ | |
122 | - ret+=","+((onList[i])?'o':'x'); | |
123 | - } | |
124 | 132 | return ret; |
125 | 133 | } |
126 | - | |
127 | 134 | } |
128 | 135 | |
129 | 136 | /** |
@@ -135,8 +142,9 @@ | ||
135 | 142 | public int compare(Integer o1, Integer o2) { |
136 | 143 | return o2-o1; |
137 | 144 | } |
138 | - | |
139 | 145 | } |
146 | + | |
147 | + | |
140 | 148 | protected int LR_index; |
141 | 149 | |
142 | 150 | protected TreeMap<Integer,TAB> frame2TAB=new TreeMap<Integer,TAB>(); |
@@ -149,6 +157,7 @@ | ||
149 | 157 | noteNumber2Finger=new TreeMap<Integer,Finger>(); |
150 | 158 | } |
151 | 159 | } |
160 | + | |
152 | 161 | /** |
153 | 162 | * 指譜のコンストラクタ |
154 | 163 | * @param LR 0: 左, 1: 右 |
@@ -167,7 +176,7 @@ | ||
167 | 176 | * @param is InputStream of CSV |
168 | 177 | * @throws IOException IO Error(unreadable) |
169 | 178 | */ |
170 | - public KeyboardMotionFingerMap(int LR,InputStream is) throws IOException{ | |
179 | + public KeyboardMotionFingerMap(int LR,InputStream is) throws IOException { | |
171 | 180 | LR_index=LR; |
172 | 181 | init(); |
173 | 182 |
@@ -174,6 +183,7 @@ | ||
174 | 183 | BufferedReader br=new BufferedReader(new InputStreamReader(is,"MS932")); |
175 | 184 | String line; |
176 | 185 | TAB tab; |
186 | + | |
177 | 187 | while ((line=br.readLine())!=null){ |
178 | 188 | tab=new TAB(line); |
179 | 189 | this.frame2TAB.put(tab.frame,tab); |
@@ -1,5 +1,3 @@ | ||
1 | -package plugin; | |
2 | - | |
3 | 1 | /* |
4 | 2 | * The MIT License |
5 | 3 | * |
@@ -23,6 +21,7 @@ | ||
23 | 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
24 | 22 | * THE SOFTWARE. |
25 | 23 | */ |
24 | +package plugin; | |
26 | 25 | |
27 | 26 | import java.io.File; |
28 | 27 | import java.io.FileInputStream; |
@@ -120,7 +119,7 @@ | ||
120 | 119 | JFileChooser jfc=new JFileChooser(s); |
121 | 120 | jfc.setFileSelectionMode(JFileChooser.FILES_ONLY); |
122 | 121 | jfc.setToolTipText("ファイル名を選ぶ"); |
123 | - jfc.setFileFilter(new FileNameExtensionFilter("MMD Motion File", "vmd","csv")); | |
122 | + jfc.setFileFilter(new FileNameExtensionFilter("MMD Motion File (*.vmd,*.csv)", "vmd","csv")); | |
124 | 123 | if(jfc.showSaveDialog(this)!=JFileChooser.APPROVE_OPTION){ |
125 | 124 | return; |
126 | 125 | } |
@@ -133,6 +132,9 @@ | ||
133 | 132 | motion.toVMD(fos); |
134 | 133 | fos.close(); |
135 | 134 | }else { |
135 | + if(!f.getName().toLowerCase().endsWith(".vmd")){ | |
136 | + f=new File(f.getParentFile(),f.getName()+".vmd"); | |
137 | + } | |
136 | 138 | fos=new FileOutputStream(f); |
137 | 139 | motion.toCSV(fos); |
138 | 140 | fos.close(); |
@@ -292,9 +294,9 @@ | ||
292 | 294 | bmb.addProgressListener(this); |
293 | 295 | buttonProgress.setEnabled(false); |
294 | 296 | new Thread(new Runnable() { |
295 | - private ProgressLisner perent; | |
297 | + private ProgressLisner parent; | |
296 | 298 | public Runnable setP(ProgressLisner l){ |
297 | - perent=l; | |
299 | + parent=l; | |
298 | 300 | return this; |
299 | 301 | } |
300 | 302 | @Override |
@@ -301,7 +303,7 @@ | ||
301 | 303 | public void run() { |
302 | 304 | bmb.setMidiResolver(midiR); |
303 | 305 | bmb.loadMessages(); |
304 | - bmb.removeProgressListener(perent); | |
306 | + bmb.removeProgressListener(parent); | |
305 | 307 | } |
306 | 308 | }.setP(this)).start(); |
307 | 309 | }//GEN-LAST:event_buttonProgressActionPerformed |
@@ -119,7 +119,7 @@ | ||
119 | 119 | JFileChooser jfc=new JFileChooser(s); |
120 | 120 | jfc.setFileSelectionMode(JFileChooser.FILES_ONLY); |
121 | 121 | jfc.setToolTipText("ファイル名を選ぶ"); |
122 | - jfc.setFileFilter(new FileNameExtensionFilter("MMD Motion File", "vmd","csv")); | |
122 | + jfc.setFileFilter(new FileNameExtensionFilter("MMD Motion File (*.vmd,*.csv)", "vmd","csv")); | |
123 | 123 | if(jfc.showSaveDialog(this)!=JFileChooser.APPROVE_OPTION){ |
124 | 124 | return; |
125 | 125 | } |
@@ -132,6 +132,9 @@ | ||
132 | 132 | motion.toCSV(fos); |
133 | 133 | fos.close(); |
134 | 134 | }else { |
135 | + if(!f.getName().toLowerCase().endsWith(".vmd")){ | |
136 | + f=new File(f.getParentFile(),f.getName()+".vmd"); | |
137 | + } | |
135 | 138 | fos=new FileOutputStream(f); |
136 | 139 | motion.toVMD(fos); |
137 | 140 | fos.close(); |
@@ -295,16 +298,17 @@ | ||
295 | 298 | emb.addProgressListener(this); |
296 | 299 | buttonProgress.setEnabled(false); |
297 | 300 | new Thread(new Runnable() { |
298 | - private ProgressLisner perent; | |
301 | + private ProgressLisner parent; | |
299 | 302 | public Runnable setP(ProgressLisner l){ |
300 | - perent=l; | |
303 | + parent=l; | |
301 | 304 | return this; |
302 | 305 | } |
306 | + | |
303 | 307 | @Override |
304 | 308 | public void run() { |
305 | 309 | emb.setMidiResolver(midiR); |
306 | 310 | emb.loadMessages(); |
307 | - emb.removeProgressListener(perent); | |
311 | + emb.removeProgressListener(parent); | |
308 | 312 | } |
309 | 313 | }.setP(this)).start(); |
310 | 314 | }//GEN-LAST:event_buttonProgressActionPerformed |
@@ -29,11 +29,13 @@ | ||
29 | 29 | import java.io.InputStreamReader; |
30 | 30 | import java.util.Map; |
31 | 31 | import java.util.TreeMap; |
32 | +import java.util.ArrayList; | |
32 | 33 | import javax.sound.midi.MidiEvent; |
33 | 34 | import javax.sound.midi.ShortMessage; |
34 | 35 | import jp.sourceforge.mmd.midiMotion.MotionBuilder; |
35 | 36 | import jp.sourceforge.mmd.motion.BonePose; |
36 | 37 | import jp.sourceforge.mmd.motion.CsvSpliter; |
38 | +import jp.sourceforge.mmd.motion.MorphPose; | |
37 | 39 | import jp.sourceforge.mmd.motion.geo.Matrix; |
38 | 40 | import jp.sourceforge.mmd.motion.Motion; |
39 | 41 | import jp.sourceforge.mmd.motion.Pose; |
@@ -48,16 +50,25 @@ | ||
48 | 50 | protected Motion playerTemp; |
49 | 51 | protected Motion drumTemp; |
50 | 52 | protected Motion player; |
51 | - protected Map<Integer,int[]> note2frames; | |
53 | + protected Map<Integer,ArrayList<Integer[]>> note2frames; | |
52 | 54 | protected boolean openHH; |
53 | 55 | |
56 | + private int rightHand; | |
57 | + private int leftHand; | |
58 | + private int bodyAngle_time; | |
59 | + private int bodyAngle; | |
60 | + | |
54 | 61 | public DrumsMotionBuilder(){ |
55 | 62 | super(); |
56 | 63 | this.openHH = true; |
57 | 64 | player=new Motion(); |
58 | - note2frames=new TreeMap<Integer, int[]>(); | |
65 | + note2frames=new TreeMap<Integer, ArrayList<Integer[]>>(); | |
59 | 66 | playerTemp=null; |
60 | 67 | drumTemp=null; |
68 | + rightHand=-1; | |
69 | + leftHand=-1; | |
70 | + bodyAngle=0; | |
71 | + bodyAngle_time=-1; | |
61 | 72 | } |
62 | 73 | |
63 | 74 | public void setTemplate(Motion drum,Motion player){ |
@@ -75,15 +86,22 @@ | ||
75 | 86 | line=br.readLine(); |
76 | 87 | if(line.charAt(0)==';')continue; |
77 | 88 | p=CsvSpliter.split(line); |
78 | - note2frames.put(new Integer(p[5]), | |
79 | - new int []{ | |
80 | - Integer.parseInt(p[1]),//from | |
81 | - Integer.parseInt(p[2]),//hit | |
82 | - Integer.parseInt(p[3]),//player | |
83 | - Integer.parseInt(p[4]),//drum | |
84 | - Integer.parseInt(p[6]),// hh preopen | |
85 | - Integer.parseInt(p[7])// hh afteropen | |
86 | - }); | |
89 | + ArrayList<Integer[]> list=note2frames.get(new Integer(p[5])); | |
90 | + if(list==null){ | |
91 | + list = new ArrayList<Integer []>(); | |
92 | + } | |
93 | + list.add(new Integer []{ | |
94 | + new Integer(p[1]),//0:from | |
95 | + new Integer(p[2]),//1:hit | |
96 | + new Integer(p[3]),//2:player | |
97 | + new Integer(p[4]),//3:drum | |
98 | + new Integer(p[6]),//4:hh preopen | |
99 | + new Integer(p[7]),//5:hh afteropen | |
100 | + new Integer(p[8]),//6:left | |
101 | + new Integer(p[9]),//7:right | |
102 | + p[10].contains("n")?null:new Integer((int)(Float.parseFloat(p[10])*100))//8:body | |
103 | + }); | |
104 | + note2frames.put(new Integer(p[5]),list); | |
87 | 105 | } |
88 | 106 | } |
89 | 107 |
@@ -97,15 +115,9 @@ | ||
97 | 115 | } |
98 | 116 | |
99 | 117 | ShortMessage sm; |
118 | + int frame; | |
100 | 119 | int com; |
101 | - int note; | |
102 | - int vel; | |
103 | - int frame; | |
104 | - int put_frame; | |
105 | - int i,j; | |
106 | - BonePose p; | |
107 | - Pose<?> [] ps; | |
108 | - int []list; | |
120 | + int i; | |
109 | 121 | MidiEvent [] drums=mm.getChannelMessage(9); |
110 | 122 | |
111 | 123 | for(i=0;i<9;i++){ |
@@ -117,59 +129,113 @@ | ||
117 | 129 | |
118 | 130 | for(MidiEvent me:drums){ |
119 | 131 | sm=(ShortMessage)me.getMessage(); |
132 | + frame=ticsToFrame(me.getTick()); | |
133 | + reportProgress(frame); | |
120 | 134 | if((com=sm.getCommand())==ShortMessage.NOTE_ON){ |
121 | - note=sm.getData1(); | |
122 | - vel=sm.getData2(); | |
123 | - frame=ticsToFrame(me.getTick()); | |
124 | - reportProgress(frame); | |
135 | + keyOn(frame,sm.getData1(),sm.getData2()); | |
136 | + }/*end of noteON*/ | |
137 | + } | |
125 | 138 | |
126 | - list=note2frames.get(note); | |
127 | - if(list==null)continue; | |
139 | + player.putAll(playerTemp.get(0),0); | |
140 | + motion.putAll(drumTemp.get(0),0); | |
128 | 141 | |
129 | - if((list[4]==-1) && openHH){//close | |
130 | - ps=drumTemp.get(note2frames.get(257)[1]); | |
131 | - motion.putAll(ps, frame+list[0]-list[1]-1); | |
132 | - ps=playerTemp.get(note2frames.get(257)[1]); | |
133 | - player.putAll(ps, frame+list[0]-list[1]-1); | |
134 | - } else if((list[4]==1) && (!openHH) ){//open | |
135 | - ps=drumTemp.get(note2frames.get(258)[1]); | |
136 | - motion.putAll(ps, frame+list[0]-list[1]-1); | |
137 | - ps=playerTemp.get(note2frames.get(258)[1]); | |
138 | - player.putAll(ps, frame+list[0]-list[1]-1); | |
139 | - } | |
142 | + reportProgressEnd(); | |
143 | + } | |
140 | 144 | |
141 | - j=list[0]; | |
142 | - for(i=0;i<list[3];i++){ | |
143 | - ps = drumTemp.get(j); | |
144 | - put_frame=i+frame+list[0]-list[1]; | |
145 | - motion.putAll(ps, put_frame); | |
146 | - j++; | |
145 | + private void keyOn(int frame,int note,int vel){ | |
146 | + ArrayList<Integer[]> alist=note2frames.get(note); | |
147 | + if(alist==null)return; | |
148 | + | |
149 | + Integer [] list=null; | |
150 | + Pose<?> [] ps; | |
151 | + int i,j; | |
152 | + | |
153 | + if(alist.size()==1){ | |
154 | + list=alist.get(0); | |
155 | + } else { | |
156 | + if(bodyAngle_time>=frame){ | |
157 | + for(Integer [] o:alist){ | |
158 | + if(o[8]==bodyAngle){ | |
159 | + list=o; | |
160 | + break; | |
161 | + } | |
147 | 162 | } |
163 | + } else if(rightHand>=frame) { | |
164 | + for(Integer [] o:alist){ | |
165 | + if(o[7]==0){ | |
166 | + list=o; | |
167 | + break; | |
168 | + } | |
169 | + } | |
170 | + } else if(leftHand>=frame) { | |
171 | + for(Integer [] o:alist){ | |
172 | + if(o[6]==0){ | |
173 | + list=o; | |
174 | + break; | |
175 | + } | |
176 | + } | |
177 | + }else { | |
178 | + list=alist.get(0); | |
179 | + } | |
180 | + if(list==null){ | |
181 | + System.err.println("drum: frame: "+frame+", note: "+note+", alist size:"+alist.size()); | |
182 | + System.err.println("drum: body:"+bodyAngle+" left:"+leftHand+" right:"+rightHand); | |
183 | + return; | |
184 | + } | |
185 | + } | |
148 | 186 | |
149 | - j=list[0]; | |
150 | - Pose<?> [] hit=playerTemp.get(list[1]); | |
151 | - for(i=0;i<list[2];i++){ | |
152 | - ps = playerTemp.get(j); | |
153 | - if(hit!=null && note!=36 && note!=35 && i<list[1]-list[0] && ps!=null){ | |
154 | - swing(vel,ps,hit); | |
187 | + if((list[4]==-1) && openHH){ // hit hat mode:close | |
188 | + ps=drumTemp.get(note2frames.get(257).get(0)[1]); | |
189 | + motion.putAll(ps, frame+list[0]-list[1]-1); | |
190 | + ps=playerTemp.get(note2frames.get(257).get(0)[1]); | |
191 | + player.putAll(ps, frame+list[0]-list[1]-1); | |
192 | + } else if((list[4]==1) && (!openHH) ){//open | |
193 | + ps=drumTemp.get(note2frames.get(258).get(0)[1]); | |
194 | + motion.putAll(ps, frame+list[0]-list[1]-1); | |
195 | + ps=playerTemp.get(note2frames.get(258).get(0)[1]); | |
196 | + player.putAll(ps, frame+list[0]-list[1]-1); | |
197 | + } | |
198 | + | |
199 | + j=list[0]; | |
200 | + for(i=0;i<list[3];i++){ | |
201 | + ps = drumTemp.get(j); | |
202 | + motion.putAll(ps, i+frame+list[0]-list[1]); | |
203 | + j++; | |
204 | + } | |
205 | + | |
206 | + j=list[0]; | |
207 | + Pose<?> [] hit=playerTemp.get(list[1]); | |
208 | + for(i=0;i<list[2];i++){ | |
209 | + ps = playerTemp.get(j); | |
210 | + if(hit!=null){ | |
211 | + for(Pose<?> p:hit){ // hit に存在する同名のキーを削除 | |
212 | + if(p instanceof BonePose){ | |
213 | + player.remove(frame+j-list[1],p.nameOfBone); | |
214 | + }else if(p instanceof MorphPose){ | |
215 | + player.removeMorph(frame+j-list[1], p.nameOfBone); | |
155 | 216 | } |
156 | - put_frame=i+frame+list[0]-list[1]; | |
157 | - player.putAll(ps, put_frame); | |
158 | - j++; | |
159 | 217 | } |
160 | - openHH=(list[5]>0)?true:((list[5]<0)?false:openHH); | |
161 | - }/*end of noteON*/ | |
218 | + if(note!=36 && note!=35 && j<list[1] && ps!=null){ | |
219 | + swing(vel,ps,hit); | |
220 | + } | |
221 | + } | |
222 | + player.putAll(ps, frame+j-list[1]); | |
223 | + j++; | |
162 | 224 | } |
225 | + if(list[6]!=0){ | |
226 | + leftHand=frame+list[0]-list[1]+list[2]; | |
227 | + } | |
228 | + if(list[7]!=0){ | |
229 | + rightHand=frame+list[0]-list[1]+list[2]; | |
230 | + } | |
231 | + if(list[8]!=null){ | |
232 | + bodyAngle_time=frame+list[1]-list[0]; | |
233 | + bodyAngle=list[8]; | |
234 | + } | |
163 | 235 | |
164 | - ps = playerTemp.get(0); | |
165 | - player.putAll(ps,0); | |
166 | - ps = drumTemp.get(0); | |
167 | - motion.putAll(ps,0); | |
168 | - | |
169 | - reportProgressEnd(); | |
236 | + openHH=(list[5]>0)?true:((list[5]<0)?false:openHH); | |
170 | 237 | } |
171 | 238 | |
172 | - | |
173 | 239 | public Motion getMotionPlayer(){ |
174 | 240 | return player; |
175 | 241 | } |
@@ -588,15 +588,15 @@ | ||
588 | 588 | buttonProgress.setEnabled(false); |
589 | 589 | kbmb.setMidiResolver(midiR); |
590 | 590 | new Thread(new Runnable() { |
591 | - private ProgressLisner perent; | |
591 | + private ProgressLisner parent; | |
592 | 592 | public Runnable setP(ProgressLisner l){ |
593 | - perent=l; | |
593 | + parent=l; | |
594 | 594 | return this; |
595 | 595 | } |
596 | 596 | @Override |
597 | 597 | public void run() { |
598 | 598 | kbmb.loadMessages(); |
599 | - kbmb.removeProgressListener(perent); | |
599 | + kbmb.removeProgressListener(parent); | |
600 | 600 | } |
601 | 601 | }.setP(this)).start(); |
602 | 602 | }//GEN-LAST:event_buttonProgressActionPerformed |
@@ -55,6 +55,7 @@ | ||
55 | 55 | static final public int PROTOCOL_VORONOI = 1; |
56 | 56 | |
57 | 57 | private Motion player = null; |
58 | +// private Motion player_output = null; | |
58 | 59 | private Model playerModel = null; |
59 | 60 | private Model keyModel = null; |
60 | 61 |
@@ -122,8 +123,14 @@ | ||
122 | 123 | if (playerModel == null) return; |
123 | 124 | if (motion == null) { |
124 | 125 | this.player = new Motion(model.getName()); |
126 | +// player_output=new Motion(model.getName()); | |
125 | 127 | } else { |
126 | 128 | this.player = motion; |
129 | +// player_output=new Motion(motion.getModelName()); | |
130 | +// for(int frame=0;frame<motion.getMaxFrame();frame++){ | |
131 | +// Pose<?> []ps= motion.get(frame); | |
132 | +// player_output.putAll(ps, frame); | |
133 | + } | |
127 | 134 | } |
128 | 135 | |
129 | 136 | if(keyModel != null){ |
@@ -134,13 +141,13 @@ | ||
134 | 141 | for(int i=0;i<2;i++){ |
135 | 142 | iksArm[i] = new IKSolver(); |
136 | 143 | iksArm[i].setBones(new Bone[]{playerModel.get(PartName.makeArm(i,0)), |
137 | - playerModel.get(PartName.makeArm(i,1)), | |
138 | - playerModel.get(PartName.makeArm(i,2)) | |
144 | + playerModel.get(PartName.makeArm(i,1)), | |
145 | + playerModel.get(PartName.makeArm(i,2)) | |
139 | 146 | }); |
140 | 147 | iksArm[i].setLimits(0,IKSolver.RLIMIT_NOGlobalR); |
141 | 148 | iksArm[i].setLimits(1, IKSolver.RLIMIT_NOZ | IKSolver.RLIMIT_NOX); |
142 | 149 | } |
143 | - }catch(NullPointerException ex){ | |
150 | + } catch(NullPointerException ex){ | |
144 | 151 | throw new MmdFormatException("特定の指ボーンが見つかりません."+ex.getLocalizedMessage()); |
145 | 152 | } |
146 | 153 | } |
@@ -322,25 +329,33 @@ | ||
322 | 329 | } |
323 | 330 | } |
324 | 331 | |
332 | + /** 最後にもう一周 */ | |
325 | 333 | if (playerModel != null) { |
326 | 334 | KeyboardMotionFingerMap.TAB pre_tab; |
327 | 335 | for(int LR_index=0;LR_index<2;LR_index++){ |
328 | 336 | pre_tab=null; |
329 | - for(KeyboardMotionFingerMap.TAB tab:fingerMap[LR_index].getTAB()){ | |
330 | - reportProgress(tab.frame); | |
331 | - | |
337 | + for(KeyboardMotionFingerMap.TAB tab: fingerMap[LR_index].getTAB()){ | |
338 | + reportProgress(frame=tab.frame); | |
332 | 339 | if(pre_tab!=null){ |
333 | - for(;pre_tab.frame<tab.frame;pre_tab.frame++){ | |
334 | - ps = player.getInterporate(pre_tab.frame); | |
340 | + for(frame=pre_tab.frame+1;frame<tab.frame;frame++){ | |
341 | + ps = player.getInterporate(frame); | |
335 | 342 | playerModel.setPoses(ps); |
336 | 343 | playerModel.resetChanged(); |
344 | + | |
345 | + ps = motion.getInterporate(frame); | |
346 | + keyModel.setPoses(ps); | |
337 | 347 | makeFinger(LR_index, |
338 | 348 | pre_tab.onList, |
339 | 349 | pre_tab.noteList, |
340 | 350 | pre_tab.velocity); |
341 | 351 | ps = playerModel.getChanged(); |
342 | - player.putAll(ps, pre_tab.frame); | |
352 | + player.putAll(ps, frame); | |
343 | 353 | } |
354 | + for(Bone b:iksArm[LR_index].getBones()){ | |
355 | + BonePose bp=b.getPose(); | |
356 | + bp.frame=frame-1; | |
357 | + player.put(bp); | |
358 | + } | |
344 | 359 | } |
345 | 360 | ps = player.getInterporate(tab.frame); |
346 | 361 | playerModel.setPoses(ps); |
@@ -350,9 +365,9 @@ | ||
350 | 365 | if(makeFinger(LR_index, |
351 | 366 | tab.onList, |
352 | 367 | tab.noteList, |
353 | - tab.velocity)){ | |
368 | + tab.velocity)){// on | |
354 | 369 | pre_tab=tab; |
355 | - }else { | |
370 | + } else { // off | |
356 | 371 | pre_tab=null; |
357 | 372 | } |
358 | 373 | ps = playerModel.getChanged(); |
@@ -523,7 +538,7 @@ | ||
523 | 538 | * @param LR_index 0: left 1: right |
524 | 539 | * @param on 0: thumb, 1: direct, 3: ring, 4:small |
525 | 540 | * @param note_num the same with on |
526 | - * @return at least one finger is on a key, return true. | |
541 | + * @return 最低でも1つは指が鍵に乗っているなら, {@code true}. | |
527 | 542 | */ |
528 | 543 | private boolean makeFinger(int LR_index,boolean [] on,int [] note_num,int velo){ |
529 | 544 | Vector3D finger,lz; |
@@ -540,10 +555,13 @@ | ||
540 | 555 | Matrix keys_matrix=key60.getGMatrix(); |
541 | 556 | Vector3D key_x=keys_matrix.getLx(); |
542 | 557 | Bone wrist=playerModel.get(PartName.makeArm(LR_index,0)); |
543 | - double parityZ=(key_x.times(wrist.getLz())>0)?1D:-1D;// 消すな | |
558 | + double parityZ=(key_x.times(wrist.getLz())>0)?1D:-1D;// 重要: 消すな | |
544 | 559 | double parity=(LR_index>0 ^ parityZ>0)?1D:-1D;// y回転に必要 |
545 | 560 | int leadFinger=-1; |
546 | 561 | |
562 | + /** 手を広げた体勢 */ | |
563 | + playerModel.setPoses(fingerStanby[LR_index]); | |
564 | + | |
547 | 565 | /* 手首をキーに垂直に */ |
548 | 566 | wrist.rotateToG(new Matrix( |
549 | 567 | keys_matrix.getLz().rotate_vector( |
@@ -553,9 +571,6 @@ | ||
553 | 571 | key_x.times(parityZ) |
554 | 572 | )); |
555 | 573 | |
556 | - /** 手を広げた体勢 */ | |
557 | - playerModel.setPoses(fingerStanby[LR_index]); | |
558 | - | |
559 | 574 | /* lead finger 探し */ |
560 | 575 | for(int j:leadOrder){ |
561 | 576 | if(on[j]){ |
@@ -587,48 +602,44 @@ | ||
587 | 602 | /* リードフィンガーに対して手首を動かす. */ |
588 | 603 | Vector3D v=getVector(note_num[leadFinger], on[leadFinger]?0:1.0D * velo / 100); |
589 | 604 | if(v!=null){ |
590 | - finger=playerModel.get(PartName.makeArm(LR_index,0)).getPos() | |
605 | + finger=iks.getBones()[0].getPos() | |
591 | 606 | .sub(finger4[LR_index][leadFinger].getPos()); |
592 | 607 | iks.solve(v.add(finger)); |
593 | - for(Bone b:iks.getBones()){ | |
594 | - b.setChanged(); | |
595 | - } | |
596 | 608 | } |
597 | 609 | |
598 | 610 | /* 残りの指をIK で片付ける*/ |
599 | - int prenum=-1; | |
600 | 611 | for(int j=1;j<5;j++){ |
601 | 612 | if(j==leadFinger)continue; |
602 | - if(note_num[j]>=prenum){ | |
603 | - prenum=note_num[j]; | |
604 | - v=getVector(note_num[j], 0); | |
605 | - if(v==null)continue; | |
606 | - IKSolver ikf = new IKSolver(); | |
607 | - Bone [] bs; | |
608 | - if(on[j]){ | |
609 | - bs=new Bone[]{ | |
610 | - finger4[LR_index][j],finger3[LR_index][j], | |
611 | - finger2[LR_index][j],finger1[LR_index][j]}; | |
613 | + if(note_num[j]<0)continue; // IK 不要の状態 | |
614 | + v=getVector(note_num[j], 0); | |
615 | + if(v==null)continue; | |
616 | + IKSolver ikf = new IKSolver(); | |
617 | + Bone [] bs; | |
618 | + if(on[j]){ | |
619 | + // 付け根は始めにz 軸少しだけ曲げておく. | |
620 | + lz=finger1[LR_index][j].getLz(); | |
621 | + angle=10D*parityZ*Math.PI/180D; | |
622 | + finger1[LR_index][j].rotate(lz.times(Math.sin(angle)),Math.cos(angle)); | |
612 | 623 | |
613 | - lz=finger1[LR_index][j].getLz(); | |
614 | - angle=10D*parityZ*Math.PI/180D; | |
615 | - finger1[LR_index][j].rotate(lz.times(Math.sin(angle)),Math.cos(angle)); | |
624 | + bs=new Bone[]{ | |
625 | + finger4[LR_index][j],finger3[LR_index][j], | |
626 | + finger2[LR_index][j],finger1[LR_index][j]}; | |
616 | 627 | |
617 | - ikf.setBones(bs); | |
618 | - ikf.setLimits(1, IKSolver.RLIMIT_NOX|IKSolver.RLIMIT_NOY); | |
619 | - ikf.setLimits(2, IKSolver.RLIMIT_NOX|IKSolver.RLIMIT_NOY); | |
620 | - ikf.setLimits(3, IKSolver.RLIMIT_NOX|IKSolver.RLIMIT_NOZ); | |
621 | - for(Bone b: bs){ | |
622 | - b.setChanged(); | |
623 | - } | |
624 | - } else { | |
625 | - ikf.setBones(new Bone[]{finger4[LR_index][j],finger1[LR_index][j]}); | |
626 | - ikf.setLimits(1, IKSolver.RLIMIT_NOX|IKSolver.RLIMIT_NOZ); | |
627 | - } | |
628 | - ikf.solve(v); | |
628 | + ikf.setBones(bs); | |
629 | + ikf.setLimits(1, IKSolver.RLIMIT_ONLY_Z); | |
630 | + ikf.setLimits(2, IKSolver.RLIMIT_ONLY_Z); | |
631 | + ikf.setLimits(3, IKSolver.RLIMIT_ONLY_Y); | |
632 | + } else { // off: z方向には曲げない | |
633 | + bs=new Bone[]{finger4[LR_index][j],finger1[LR_index][j]}; | |
634 | + ikf.setBones(bs); | |
635 | + ikf.setLimits(1, IKSolver.RLIMIT_ONLY_Y); | |
629 | 636 | } |
637 | + ikf.solve(v); | |
638 | + for(Bone b: bs){ | |
639 | + b.setChanged(); | |
640 | + } | |
630 | 641 | } |
631 | - if(note_num[4]<note_num[3]){ | |
642 | + if(note_num[4]<0 && note_num[3]>=0){ // 小指がフリーで薬指が IK の状態では小指を外に向ける. | |
632 | 643 | lz=finger1[LR_index][4].getLy(); |
633 | 644 | angle=20D*parity*Math.PI/180D; |
634 | 645 | finger1[LR_index][4].rotate(lz.times(Math.sin(angle)),Math.cos(angle)); |
@@ -714,7 +725,7 @@ | ||
714 | 725 | } else { // 指0 が無いとき |
715 | 726 | double length_unit=key_unit.norm(); |
716 | 727 | |
717 | - i=1; | |
728 | + i=1;// 人差し指 | |
718 | 729 | Vector3D diff=finger1[LR_index][i].getPos().sub(finger1[LR_index][2].getPos()); |
719 | 730 | double temp_length=diff.times(finger1[LR_index][i].getGMatrix().getLz()); |
720 | 731 | if(temp_length>0){ |
@@ -726,7 +737,7 @@ | ||
726 | 737 | finger1[LR_index][2].getMatrix().getLz().times(temp_length) |
727 | 738 | ); |
728 | 739 | |
729 | - for(i=3;i<5;i++){ | |
740 | + for(i=3;i<5;i++){// 薬指・小指 | |
730 | 741 | diff=finger1[LR_index][i].getPos().sub(finger1[LR_index][2].getPos()); |
731 | 742 | temp_length=diff.times(finger1[LR_index][i].getGMatrix().getLz()); |
732 | 743 | if(temp_length>0){ |
@@ -737,7 +748,7 @@ | ||
737 | 748 | finger1[LR_index][i].translationTo(finger1[LR_index][2].getMatrix().getLz().times(temp_length)); |
738 | 749 | } |
739 | 750 | |
740 | - for(i=1;i<5;i++){ | |
751 | + for(i=1;i<5;i++){// ちょっとだけy軸に外側に曲げる. | |
741 | 752 | ly=finger1[LR_index][i].getGMatrix().getLy(); |
742 | 753 | radian=parity*Math.PI*(8D*(i-2))/180D; |
743 | 754 | finger1[LR_index][i].rotate(ly.times(Math.sin(radian)), Math.cos(radian)); |
@@ -72,12 +72,12 @@ | ||
72 | 72 | <dependency> |
73 | 73 | <groupId>jp.sourceforge.mmd</groupId> |
74 | 74 | <artifactId>MMDMotion</artifactId> |
75 | - <version>1.5</version> | |
75 | + <version>1.5.1</version> | |
76 | 76 | </dependency> |
77 | 77 | <dependency> |
78 | 78 | <groupId>jp.sourceforge.mmd</groupId> |
79 | 79 | <artifactId>MID2Motion</artifactId> |
80 | - <version>1.2</version> | |
80 | + <version>1.2.1</version> | |
81 | 81 | </dependency> |
82 | 82 | </dependencies> |
83 | 83 | </project> |
@@ -15,7 +15,7 @@ | ||
15 | 15 | 5. OpenOffice calc などCSV(Shift JIS)が扱えるソフトウェア |
16 | 16 | |
17 | 17 | = 何これ = |
18 | -MID2Motion のモーションビルダープラグインです。 | |
18 | +MID2Motion のモーションビルダープラグインの開発パッケージです。 | |
19 | 19 | Standard MIDIは、General MIDI でもある程度対応しますが、基本的には |
20 | 20 | MAGIX Music Maker および Samplitude 用の MIDI を想定します。 |
21 | 21 |
@@ -50,9 +50,10 @@ | ||
50 | 50 | Version 1.6 以降ならなんでも動くと思います。(IBM製では、swing を別に |
51 | 51 | インストールする必要があります。) |
52 | 52 | 2. MID2Motion が必要です。できるだけ最新バージョンを用意してください。 |
53 | - 3. Maven のリポジトリーにMID2Motion の全jar を登録します。 | |
53 | + 3. Maven のローカルリポジトリーにMID2Motion の全jar を登録 | |
54 | + (mvn install) します。 | |
54 | 55 | |
55 | -= コンパイル = | |
56 | += コンパイル法 = | |
56 | 57 | wiki の方が詳しいので、できれば見といてください。 |
57 | 58 | http://mmdmotion-java.osdn.jp/wiki/MID2Motion |
58 | 59 |
@@ -66,7 +67,7 @@ | ||
66 | 67 | 4. src/assembly/*.xml を書きます。 |
67 | 68 | 5. pom.xml の assembly.plugin を書き換えてあなたのplugin パッケージの |
68 | 69 | assembly/*.xml を指定します。 |
69 | - 6. このディレクトリーをカレントにして、mvn compile | |
70 | + 6. pom.xmlがあるディレクトリーをカレントにして、mvn compile | |
70 | 71 | 7. mvn assembly でplugin パッケージ (*.zip)が target 以下にできます。 |
71 | 72 | 8. zipの中身を確認して、MID2Motion のpluginに加えてください。 |
72 | 73 |
@@ -3,9 +3,9 @@ | ||
3 | 3 | ;!Template,keysPlayer.sample.vmd,,,,,, |
4 | 4 | ;name,note num,from,hit,length,extend type(1/0),note off start frame(0 means no note off),note off end |
5 | 5 | スタンバイ,0,0,0,1,0,0,0 |
6 | -前後,48,1,4,4,0,4,7 | |
7 | -腰振り,49,10,10,17,1,0,0 | |
8 | -左足ふみ,50,27,30,4,0,30,33 | |
9 | -右足ふみ,51,36,39,4,0,39,42 | |
10 | -左手上げ,52,43,46,4,0,46,49 | |
11 | -右手上げ,53,50,53,4,0,53,56 | |
6 | +前屈,62,1,4,4,0,4,7 | |
7 | +腰振り,64,10,10,17,1,0,0 | |
8 | +左足上げ,17,27,30,4,0,30,33 | |
9 | +右足上げ,16,36,39,4,0,39,42 | |
10 | +左手上げ,72,43,46,4,0,46,49 | |
11 | +右手上げ,73,50,53,4,0,53,56 |
@@ -2,16 +2,28 @@ | ||
2 | 2 | ; MID2Motion Ver. 1.2 標準,,,,,,, |
3 | 3 | ;!Template,common.temp.vmd,,,,,, |
4 | 4 | ;name,note num,from,hit,length,extend type(1/0),note off start frame(0 means no note off),note off end |
5 | -腰振り,47,165,165,13,1,0,0 | |
6 | -サイドステップ,48,5,5,26,1,0,0 | |
7 | -首たて,49,35,35,6,1,0,0 | |
8 | -首横,50,41,41,13,1,0,0 | |
9 | -足踏み,51,55,59,7,0,0,0 | |
10 | -ドロップ,52,65,67,8,0,0,0 | |
11 | -ツイスト,53,75,75,13,1,0,0 | |
12 | -ジャンプ,54,90,93,16,0,0,0 | |
13 | -前屈,55,110,113,4,0,113,116 | |
14 | -横屈,56,120,120,13,1,0,0 | |
15 | -のけぞり,57,135,140,6,0,140,145 | |
16 | -左手を見る,58,148,150,3,0,151,153 | |
17 | -右手を見る,59,155,157,3,0,158,160 | |
5 | +スタンバイ,0,0,0,1,0,0,0 | |
6 | +basic style,1,1,1,1,0,0,0 | |
7 | +基本 to stand,2,180,185,6,0,0,0 | |
8 | +stand to 基本,3,199,204,6,0,0,0 | |
9 | +サイドステップ,12,5,5,26,1,0,0 | |
10 | +足踏み(左小),13,55,59,7,0,0,0 | |
11 | +ドロップ,14,65,67,8,0,0,0 | |
12 | +ジャンプ,15,90,93,16,0,0,0 | |
13 | +右足上げ(stand),16,186,189,4,0,189,192 | |
14 | +左足上げ(stand),17,192,195,4,0,195,198 | |
15 | +ツイスト(往復),60,75,75,13,1,0,0 | |
16 | +横屈往復,61,120,120,13,1,0,0 | |
17 | +前屈,62,110,113,4,0,113,116 | |
18 | +のけぞり,63,135,140,6,0,140,145 | |
19 | +腰振り(往復),64,165,165,13,1,0,0 | |
20 | +右手上げ,72,206,206,1,0,0,0 | |
21 | +左手下げ,73,210,210,1,0,0,0 | |
22 | +右手右,74,207,207,1,0,0,0 | |
23 | +右手前,75,208,208,1,0,0,0 | |
24 | +首たて振り,108,35,35,6,1,0,0 | |
25 | +首横振り,109,41,41,13,1,0,0 | |
26 | +左手を見る,110,148,150,3,0,151,153 | |
27 | +下を見る,111,155,157,3,0,158,160 | |
28 | +左を見る,112,219,221,1,0,221,223 | |
29 | +右を見る,113,215,217,1,0,217,219 |
@@ -1,9 +1,15 @@ | ||
1 | -; sample motion builder file,きの式弦巻マキ,はむすタン,用,,,, | |
1 | +; sample motion builder file,きの式弦巻マキ,覇むすタン,用,,,, | |
2 | 2 | ; MID2Motion Ver. 1.2 標準,,,,,,, |
3 | +; 使い方: | |
4 | +; このテンプレートは換算表1つに対して、モーションテンプレートが2つあります。 | |
5 | +; 覇むすタンのセンターを弦巻マキの上半身に接続して使います。 | |
6 | +; あんまり手の位置があってないのは、p-guitar や v-guitar 用の前準備用だからです。 | |
7 | +; テンプレートは下の行の2つです。 | |
3 | 8 | ;!Template,kino_maki-hamustan.sample.vmd,hamustan-kino_maki.sample.vmd,,,,, |
4 | 9 | ;name,note num,from,hit,length,extend type(1/0),note off start frame(0 means no note off),note off end |
5 | 10 | 立つ,0,0,0,1,0,0,0 |
6 | 11 | スタンバイ,1,5,5,1,0,0,0 |
12 | +; ここから下4つは PowerGuitarMotionBuilder (p-guitar) ができるまでの臨時だったので今は使われない。,,,,,,, | |
7 | 13 | ダウンスイング,128,20,21,4,0,0,0 |
8 | 14 | アップスイング,129,24,25,4,0,0,0 |
9 | 15 | ブリッジミュートダウン,130,10,11,4,0,0,0 |
@@ -24,21 +30,21 @@ | ||
24 | 30 | E2(power),52,31,31,1,0,31,31 |
25 | 31 | F2(power),53,30,30,1,0,30,30 |
26 | 32 | ;,,,,,,, |
27 | -6th down swing,60,50,51,2,0,0,0 | |
28 | -5th down swing,61,52,53,2,0,0,0 | |
29 | -4th down swing,62,54,55,2,0,0,0 | |
30 | -3rd down swing,63,56,57,2,0,0,0 | |
31 | -2nd down swing,64,58,59,2,0,0,0 | |
32 | -1st down swing,65,60,61,2,0,0,0 | |
33 | +6th down swing,84,50,51,2,0,0,0 | |
34 | +5th down swing,85,52,53,2,0,0,0 | |
35 | +4th down swing,86,54,55,2,0,0,0 | |
36 | +3rd down swing,87,56,57,2,0,0,0 | |
37 | +2nd down swing,88,58,59,2,0,0,0 | |
38 | +1st down swing,89,60,61,2,0,0,0 | |
33 | 39 | ;,,,,,,, |
34 | -under form start,72,80,85,6,0,0,0 | |
35 | -under form return,73,85,90,6,0,0,0 | |
36 | -van halen start,74,90,95,6,0,0,0 | |
37 | -van halen return,75,95,100,6,0,0,0 | |
38 | -stand style,76,100,105,6,0,0,0 | |
39 | -stand style return,77,130,135,6,0,0,0 | |
40 | +under form start,4,80,85,6,0,0,0 | |
41 | +under form return,5,85,90,6,0,0,0 | |
42 | +van halen start,6,90,95,6,0,0,0 | |
43 | +van halen return,7,95,100,6,0,0,0 | |
44 | +基本 to stand,2,100,105,6,0,0,0 | |
45 | +stand to 基本,3,130,135,6,0,0,0 | |
40 | 46 | ;,,,,,,, |
41 | -right foot step,80,105,108,4,1,108,111 | |
42 | -left foot step,81,111,114,4,1,114,117 | |
43 | -guitar swing holizontal,82,118,121,4,1,121,124 | |
44 | -guitar swing vertical,83,124,127,4,1,127,130 | |
47 | +右足上げ(stand),16,105,108,4,1,108,111 | |
48 | +左足上げ(stand),17,111,114,4,1,114,117 | |
49 | +guitar swing holizontal,65,118,121,4,1,121,124 | |
50 | +guitar swing vertical,66,124,127,4,1,127,130 |
@@ -1,7 +1,16 @@ | ||
1 | -;Shift-JIS Japanese,,,, | |
2 | -;,,,, | |
3 | -;天音カナベース付き用テンプレート,,,, | |
4 | -; kadotanimitsuru さんの kanabass 互換です.,,,, | |
1 | +;Shift-JIS Japanese | |
2 | +;distributed under public domain | |
3 | +; | |
4 | +;MID2Motion BassMotionBuilder 天音カナベース付き用テンプレート | |
5 | +; kadotanimitsuru さんの kanabass 互換です。 | |
6 | +; ピッキングベース兼用です。 | |
7 | +; ピッキングベースにするときは、テンプレートを kanaPicBass.temp.vmd に合わせてください。 | |
8 | +; ピックは、すわとうさんの「ギターピック10枚セット」を使ってますが、今は配布されていない | |
9 | +; ようなので、手に入らないときは「覇むすタン」のおまけ(jamBAND ピック)を使ってみてください。 | |
10 | +; 右人指2の(x,y,z,Rx,Ry,Rz,T,S)=(-0.07,0,-0.09,30,80,-90,1,1)に接続. | |
11 | +; | |
12 | +;!Template,kanaBass.temp.vmd,kanaPicBass.temp.vmd | |
13 | +; | |
5 | 14 | ;text,note num,on/1st,off/2nd,string |
6 | 15 | stanby,0,10,0,0 |
7 | 16 | E1,40,0,0,4 |
@@ -1,5 +1,7 @@ | ||
1 | 1 | ;midi2drum (SJIS),,,,,,,,,, |
2 | -;モーションマップファイル,,,,,,,,,, | |
2 | +;drum モーション換算表,,,,,,,,,, | |
3 | +;!Template,rizumu-hoshinotama.temp.vmd,hoshinotama-rizumu.temp.vmd,,,,,,,, | |
4 | +;,,,,,,,,,, | |
3 | 5 | ;name,from,hit,player,drum,note_num,pre_hh_open,after_hh,left,right,body |
4 | 6 | ready,0,0,1,0,0,1,1,0,0,0 |
5 | 7 | standby,5,5,1,0,256,1,1,0,0,0 |
@@ -6,15 +8,19 @@ | ||
6 | 8 | bass,8,10,6,7,36,0,0,0,0,n |
7 | 9 | snare,18,20,6,0,38,0,0,1,0,0 |
8 | 10 | open hi,28,30,6,8,46,1,1,0,1,0 |
9 | -22 raid,38,40,6,23,51,0,0,1,0,0 | |
10 | -7 tamL,63,65,6,0,50,0,0,1,0,5.7 | |
11 | -7 tamR,73,75,6,0,48,0,0,1,0,5.7 | |
12 | -17 crash (crash 1),83,85,6,21,49,0,0,0,1,0 | |
13 | -8 tamR,93,95,6,0,47,0,0,0,1,-23.5 | |
14 | -8 tamL,103,105,6,0,45,0,0,1,0,-23.5 | |
15 | -Floor tam R,113,115,6,0,43,0,0,1,0,-43.5 | |
16 | -Floor tam L,123,125,6,0,41,0,0,0,1,-43.5 | |
11 | +22 raid,38,40,6,23,51,0,0,0,1,0 | |
12 | +7 tamL,61,63,6,0,48,0,0,1,0,5.7 | |
13 | +7 tamR,67,69,6,0,50,0,0,0,1,5.7 | |
14 | +7 tamL(0),73,75,6,0,48,0,0,-1,0,0 | |
15 | +17 crash (crash 1),83,85,6,21,49,0,0,1,0,0 | |
16 | +8 tamR,89,91,6,0,47,0,0,0,1,-23.5 | |
17 | +8 tamL,95,97,6,0,45,0,0,1,0,-23.5 | |
18 | +8 tamR(0),101,103,6,0,47,0,0,0,-1,0 | |
19 | +17 crash (crash 1)R,107,109,6,21,49,0,0,0,1,0 | |
20 | +Floor tam R,113,115,6,0,43,0,0,0,1,-43.5 | |
21 | +Floor tam L,123,125,6,0,41,0,0,1,0,-43.5 | |
17 | 22 | Chinese,133,135,6,16,52,0,0,0,1,-43.5 |
23 | +Floor tam R(0),143,145,6,0,43,0,0,0,-1,0 | |
18 | 24 | stick,153,155,6,0,37,0,0,1,1,n |
19 | 25 | open,164,164,1,1,258,-1,1,0,0,n |
20 | 26 | close,165,165,1,1,257,1,-1,0,0,n |
@@ -24,3 +30,10 @@ | ||
24 | 30 | clap,193,195,8,0,39,0,0,1,0,0 |
25 | 31 | close hit,203,205,6,6,42,-1,-1,0,1,0 |
26 | 32 | 15 crash (crash 2),213,215,6,16,57,0,0,0,1,0 |
33 | +7 tamL(-23.5),220,222,6,0,48,0,0,-1,0,-23.5 | |
34 | +8 tamR(5.7),226,228,6,0,47,0,0,0,-1,5.7 | |
35 | +ride bell,233,235,6,13,53,0,0,0,1,0 | |
36 | +8 tamL(-43.5),243,245,6,0,45,0,0,-1,0,-43.5 | |
37 | +Floor tam R(-23.5),253,255,6,0,43,0,0,0,-1,-23.5 | |
38 | +stick rotation L,260,260,15,0,2,0,0,1,0,n | |
39 | +stick rotation R,275,275,15,0,3,0,0,0,1,n |