本文整理汇总了Java中org.herac.tuxguitar.io.tef.base.TETrack.isPercussion方法的典型用法代码示例。如果您正苦于以下问题:Java TETrack.isPercussion方法的具体用法?Java TETrack.isPercussion怎么用?Java TETrack.isPercussion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.herac.tuxguitar.io.tef.base.TETrack
的用法示例。
在下文中一共展示了TETrack.isPercussion方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addNote
import org.herac.tuxguitar.io.tef.base.TETrack; //导入方法依赖的package包/类
private void addNote(TETrack track,TEComponentNote note,int string,int strings,TGMeasure tgMeasure){
int value = note.getFret();
if(track.isPercussion() ){
int tuning = (Math.min( (strings - 2) ,(PERCUSSION_TUNINGS.length )) - 1);
if(string >= 0 && string < PERCUSSION_TUNINGS[tuning].length){
value += PERCUSSION_TUNINGS[tuning][string];
}
}
TGNote tgNote = this.manager.getFactory().newNote();
tgNote.setString( string + 1 );
tgNote.setValue( value );
TGDuration tgDuration = getDuration( note.getDuration() );
TGBeat tgBeat = getBeat(tgMeasure, getStart(tgDuration, tgMeasure, note.getPosition()));
tgBeat.getVoice(0).getDuration().copyFrom(tgDuration);
tgBeat.getVoice(0).addNote(tgNote);
}
示例2: addNote
import org.herac.tuxguitar.io.tef.base.TETrack; //导入方法依赖的package包/类
private void addNote(TETrack track,TEComponentNote note,int string,int strings,TGMeasure tgMeasure){
int value = note.getFret();
if(track.isPercussion() ){
int tuning = (Math.min( (strings - 2) ,(PERCUSSION_TUNINGS.length )) - 1);
if(string >= 0 && string < PERCUSSION_TUNINGS[tuning].length){
value += PERCUSSION_TUNINGS[tuning][string];
}
}
TGNote tgNote = this.manager.getFactory().newNote();
tgNote.setString( string + 1 );
tgNote.setValue( value );
TGDuration tgDuration = getDuration( note.getDuration() );
TGBeat tgBeat = getBeat(tgMeasure, getStart(tgDuration, tgMeasure, note.getPosition()));
tgDuration.copy(tgBeat.getVoice(0).getDuration());
tgBeat.getVoice(0).addNote(tgNote);
}