日本黄色一级经典视频|伊人久久精品视频|亚洲黄色色周成人视频九九九|av免费网址黄色小短片|黄色Av无码亚洲成年人|亚洲1区2区3区无码|真人黄片免费观看|无码一级小说欧美日免费三级|日韩中文字幕91在线看|精品久久久无码中文字幕边打电话

當(dāng)前位置:首頁 > 芯聞號(hào) > 充電吧
[導(dǎo)讀]Atitit jfugue?midi make tour attilx sumup目錄1.1. Jyepu prob not support ,gazi nonge map trans支持簡譜解決方案

Atitit jfugue?midi make tour attilx sumup

目錄

1.1. Jyepu prob not support ,gazi nonge map trans支持簡譜解決方案 1

1.2. Tone len problem??note 音符?音長 1

1.3. Jyepai spltor prob ,,mosi not need ??jyepu hto d just for readd 節(jié)拍分隔符問題 1

1.4. 保存為mid文件 1

1.5. 分析mid文件為txt 4

?

1.1.?Jyepu prob not support ,gazi nonge map trans支持簡譜解決方案1.2.?Tone len problem??note 音符?音長

A5h ??,,must mid has 5.beir ingore

?

1.3.?Jyepai spltor prob ,,mosi not need ??jyepu hto d just for readd 節(jié)拍分隔符問題

?

1.4.?保存為mid文件

?

package?midtool;

?

import?java.io.File;

import?java.io.IOException;

import?java.util.HashMap;

import?java.util.List;

import?java.util.Map;

?

import?org.jfugue.midi.MidiFileManager;

import?org.jfugue.pattern.Pattern;

import?org.jfugue.player.Player;

import?org.staccato.ReplacementMapPreprocessor;

import?org.staccato.maps.SolfegeReplacementMap;

?

import?com.attilax.collection.listBuilder;

import?com.attilax.util.timestampUtil;

import?com.google.common.base.Joiner;

import?com.google.common.collect.Lists;

?

public?class?SolfegeReplacementMapDemo?{

public?static?void?main(String[]?args)?throws?IOException?{


?Map?rules?=?new?HashMap()?{{

??????????put("1",?"c");

??????????put("2",?"d");

??????????put("3",?"e");

??????????put("4",?"f");

??????????put("5",?"g");

??????????put("6",?"a");

??????????put("7",?"b"??);

??????????put("H",?"H"??);

?????????

????}};

????

????

//ReplacementMapPreprocessor rmp?= ReplacementMapPreprocessor.getInstance();

//rmp.setReplacementMap(rules).setRequireAngleBrackets(false);

//Player player = new Player();

//player.play(new Pattern("do re mi?fa?so la?ti?do")); // This will play "C D E F G A B"


?

// This next example brings back the brackets so durations can be added

//rmp.setRequireAngleBrackets(true);

//player.play(new Pattern("



Pattern?Pattern1?=?new?Pattern();???

String?s="1155665- ?4433221- ?5544332- ???5544332- ????1155665- ???4433221-";// ?5544332 ???5544332 ????1155665 ???4433221

listBuilder?listBuilder?=?strService.$(s).replace(" ???aaa","\|").toList().trimElement();

List?li=processToneLen(listBuilder.liObj,rules);

//String s2=listBuilder.join(" ").build();

String?joinSpaceAfted?=?Joiner.on(" ").join(li);

System.out.println(joinSpaceAfted);

Pattern1.add(joinSpaceAfted);??

File?file?=?new?File(?timestampUtil.join("c:\0log\atifirstmid@tmstmp@.mid").asTimeStamp_millsec_filenameencode()?);

new?MidiFileManager().savePatternToMidi(Pattern1,?file);

System.out.println("--");

}

?

private?static?List?processToneLen(List?liObj,?Map?rules)?{

?List?li=Lists.newArrayList();

String?lasttone;

for?(Object?object?:?liObj)?{

String?tone=(String)?object.toString().trim();

if(tone.trim().length()==0)

continue;

if(!tone.equals("-")?)

{

String?trueTone=(String)?rules.get(tone);

li.add(trueTone);continue;

}


if(tone.equals("-")?)

{

int?indexlast?=?li.size()-1;

String?li_lasttone=(String)?li.get(indexlast);

String?newtone=li_lasttone+"5H";

li.remove(indexlast);

li.add(newtone);

continue;

}

}


?

return?li;

}

}

?

1.5.?分析mid文件為txt

?

?

Player player = new Player();

//兩只老虎Pattern pattern1 = new Pattern("I[40] C5q D5q E5q C5q");

//跑得快Pattern pattern2 = new Pattern("E5q F5q G5h");

//一只沒有眼睛Pattern pattern3 = new Pattern("G5i A5i G5i F5i E5q C5q");

//真奇怪Pattern pattern4 = new Pattern("C5q G4q C5h");

// Put all of the patters together to form the songPattern song = new Pattern();song.add(pattern1, 2);

// Adds 'pattern1' to 'song' twicesong.add(pattern2, 2); // Adds 'pattern2' to 'song' twicesong.add(pattern3, 2);

// Adds 'pattern3' to 'song' twicesong.add(pattern4, 2);

?// Adds 'pattern4' to 'song' twice

// Play the song!player.play(song);

本站聲明: 本文章由作者或相關(guān)機(jī)構(gòu)授權(quán)發(fā)布,目的在于傳遞更多信息,并不代表本站贊同其觀點(diǎn),本站亦不保證或承諾內(nèi)容真實(shí)性等。需要轉(zhuǎn)載請聯(lián)系該專欄作者,如若文章內(nèi)容侵犯您的權(quán)益,請及時(shí)聯(lián)系本站刪除( 郵箱:macysun@21ic.com )。
換一批
延伸閱讀
關(guān)閉