本文整理汇总了Java中org.herac.tuxguitar.io.tef.base.TEChord类的典型用法代码示例。如果您正苦于以下问题:Java TEChord类的具体用法?Java TEChord怎么用?Java TEChord使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TEChord类属于org.herac.tuxguitar.io.tef.base包,在下文中一共展示了TEChord类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addChord
import org.herac.tuxguitar.io.tef.base.TEChord; //导入依赖的package包/类
private void addChord(TEChord[] chords,TEComponentChord component,TGTrack tgTrack,TGMeasure tgMeasure){
if(component.getChord() >= 0 && component.getChord() < chords.length){
TEChord chord = chords[component.getChord()];
byte[] strings = chord.getStrings();
TGChord tgChord = this.manager.getFactory().newChord(tgTrack.stringCount());
tgChord.setName(chord.getName());
for(int i = 0; i < tgChord.countStrings(); i ++){
int value = ( ( i < strings.length )?strings[i]:-1 );
tgChord.addFretValue(i,value);
}
if(tgChord.countNotes() > 0){
TGBeat tgBeat = getBeat(tgMeasure, getStart(null, tgMeasure, component.getPosition()));
tgBeat.setChord(tgChord);
}
}
}
示例2: readChords
import org.herac.tuxguitar.io.tef.base.TEChord; //导入依赖的package包/类
private void readChords(){
for(int i = 0; i < this.song.getChords().length; i ++){
byte[] strings = this.readBytes(14);
byte[] name = this.readBytes(16);
this.song.setChord(i,new TEChord(strings,new String(name)));
this.skip(2);
}
}