当前位置: 首页>>代码示例>>Java>>正文


Java TGDuration.setDoubleDotted方法代码示例

本文整理汇总了Java中org.herac.tuxguitar.song.models.TGDuration.setDoubleDotted方法的典型用法代码示例。如果您正苦于以下问题:Java TGDuration.setDoubleDotted方法的具体用法?Java TGDuration.setDoubleDotted怎么用?Java TGDuration.setDoubleDotted使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.herac.tuxguitar.song.models.TGDuration的用法示例。


在下文中一共展示了TGDuration.setDoubleDotted方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: parseRhythm

import org.herac.tuxguitar.song.models.TGDuration; //导入方法依赖的package包/类
private void parseRhythm(GPXRhythm gpRhythm , TGDuration tgDuration){
	tgDuration.setDotted(gpRhythm.getAugmentationDotCount() == 1);
	tgDuration.setDoubleDotted(gpRhythm.getAugmentationDotCount() == 2);
	tgDuration.getDivision().setTimes(gpRhythm.getPrimaryTupletDen());
	tgDuration.getDivision().setEnters(gpRhythm.getPrimaryTupletNum());
	if(gpRhythm.getNoteValue().equals("Whole")){
		tgDuration.setValue(TGDuration.WHOLE);
	}else if(gpRhythm.getNoteValue().equals("Half")){
		tgDuration.setValue(TGDuration.HALF);
	}else if(gpRhythm.getNoteValue().equals("Quarter")){
		tgDuration.setValue(TGDuration.QUARTER);
	}else if(gpRhythm.getNoteValue().equals("Eighth")){
		tgDuration.setValue(TGDuration.EIGHTH);
	}else if(gpRhythm.getNoteValue().equals("16th")){
		tgDuration.setValue(TGDuration.SIXTEENTH);
	}else if(gpRhythm.getNoteValue().equals("32nd")){
		tgDuration.setValue(TGDuration.THIRTY_SECOND);
	}else if(gpRhythm.getNoteValue().equals("64th")){
		tgDuration.setValue(TGDuration.SIXTY_FOURTH);
	}
}
 
开发者ID:axlecho,项目名称:tuxguitar,代码行数:22,代码来源:GPXDocumentParser.java

示例2: createDurations

import org.herac.tuxguitar.song.models.TGDuration; //导入方法依赖的package包/类
public static List<TGDuration> createDurations(TGFactory factory,long time){
	List<TGDuration> durations = new ArrayList<TGDuration>();
	TGDuration minimum = factory.newDuration();
	minimum.setValue(TGDuration.SIXTY_FOURTH);
	minimum.setDotted(false);
	minimum.setDoubleDotted(false);
	minimum.getDivision().setEnters(3);
	minimum.getDivision().setTimes(2);
	
	long missingTime = time;
	while( missingTime > minimum.getTime() ){
		TGDuration duration = TGDuration.fromTime(factory, missingTime, minimum ,  10);
		durations.add( duration.clone(factory) );
		missingTime -= duration.getTime();
	}
	return durations;
}
 
开发者ID:axlecho,项目名称:tuxguitar,代码行数:18,代码来源:TGMeasureManager.java

示例3: readDuration

import org.herac.tuxguitar.song.models.TGDuration; //导入方法依赖的package包/类
private void readDuration(TGDuration duration) throws IOException{
	int header = readHeader();
	
	// leo el puntillo
	duration.setDotted((header & DURATION_DOTTED) != 0);
	
	//leo el doble puntillo
	duration.setDoubleDotted((header & DURATION_DOUBLE_DOTTED) != 0);
	
	//leo el valor
	duration.setValue(readByte());
	
	//leo el tipo de divisiones
	if(((header & DURATION_NO_TUPLET) != 0)){
		readDivisionType(duration.getDivision());
	}
	else{
		duration.getDivision().copyFrom(TGDivisionType.NORMAL);
	}
}
 
开发者ID:axlecho,项目名称:tuxguitar,代码行数:21,代码来源:TGInputStream.java

示例4: processAction

import org.herac.tuxguitar.song.models.TGDuration; //导入方法依赖的package包/类
protected void processAction(TGActionContext context) {
	TGDuration duration = ((TGDuration) context.getAttribute(TGDocumentContextAttributes.ATTRIBUTE_DURATION));
	
	if( duration.getValue() < TGDuration.SIXTY_FOURTH ){
		duration.setValue(duration.getValue() * 2);
		duration.setDotted(false);
		duration.setDoubleDotted(false);
		
		TGActionManager tgActionManager = TGActionManager.getInstance(getContext());
		tgActionManager.execute(TGSetDurationAction.NAME, context);
	}
}
 
开发者ID:axlecho,项目名称:tuxguitar,代码行数:13,代码来源:TGIncrementDurationAction.java

示例5: processAction

import org.herac.tuxguitar.song.models.TGDuration; //导入方法依赖的package包/类
protected void processAction(TGActionContext context) {
	TGVoice voice = ((TGVoice) context.getAttribute(TGDocumentContextAttributes.ATTRIBUTE_VOICE));
	TGDuration duration = ((TGDuration) context.getAttribute(TGDocumentContextAttributes.ATTRIBUTE_DURATION));
	
	if( duration.getValue() != VALUE || (!voice.isEmpty() && voice.getDuration().getValue() != VALUE) ){
		duration.setValue(VALUE);
		duration.setDotted(false);
		duration.setDoubleDotted(false);
		
		TGActionManager tgActionManager = TGActionManager.getInstance(getContext());
		tgActionManager.execute(TGSetDurationAction.NAME, context);
	}
}
 
开发者ID:axlecho,项目名称:tuxguitar,代码行数:14,代码来源:TGSetWholeDurationAction.java

示例6: processAction

import org.herac.tuxguitar.song.models.TGDuration; //导入方法依赖的package包/类
protected void processAction(TGActionContext context) {
	TGDuration duration = ((TGDuration) context.getAttribute(TGDocumentContextAttributes.ATTRIBUTE_DURATION));
	
	duration.setDotted(!duration.isDotted());
	duration.setDoubleDotted(false);
	
	TGActionManager tgActionManager = TGActionManager.getInstance(getContext());
	tgActionManager.execute(TGSetDurationAction.NAME, context);
}
 
开发者ID:axlecho,项目名称:tuxguitar,代码行数:10,代码来源:TGChangeDottedDurationAction.java

示例7: processAction

import org.herac.tuxguitar.song.models.TGDuration; //导入方法依赖的package包/类
protected void processAction(TGActionContext context) {
	TGDuration duration = ((TGDuration) context.getAttribute(TGDocumentContextAttributes.ATTRIBUTE_DURATION));
	
	duration.setDoubleDotted(!duration.isDoubleDotted());
	duration.setDotted(false);
	
	TGActionManager tgActionManager = TGActionManager.getInstance(getContext());
	tgActionManager.execute(TGSetDurationAction.NAME, context);
}
 
开发者ID:axlecho,项目名称:tuxguitar,代码行数:10,代码来源:TGChangeDoubleDottedDurationAction.java

示例8: processAction

import org.herac.tuxguitar.song.models.TGDuration; //导入方法依赖的package包/类
protected void processAction(TGActionContext context) {
	TGDuration duration = ((TGDuration) context.getAttribute(TGDocumentContextAttributes.ATTRIBUTE_DURATION));
	
	if( duration.getValue() > TGDuration.WHOLE ){
		duration.setValue(duration.getValue() / 2);
		duration.setDotted(false);
		duration.setDoubleDotted(false);
		
		TGActionManager tgActionManager = TGActionManager.getInstance(getContext());
		tgActionManager.execute(TGSetDurationAction.NAME, context);
	}
}
 
开发者ID:axlecho,项目名称:tuxguitar,代码行数:13,代码来源:TGDecrementDurationAction.java


注:本文中的org.herac.tuxguitar.song.models.TGDuration.setDoubleDotted方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。