本文整理匯總了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);
}