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


Java PdBase.sendMessage方法代码示例

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


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

示例1: cleanup

import org.puredata.core.PdBase; //导入方法依赖的package包/类
private void cleanup() {
	// let the screen blank again
	runOnUiThread(new Runnable() {
		@Override
		public void run() {
			getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
		}
	});
	// make sure to release all resources
	if (pdService != null) {
		pdService.stopAudio();
	}
	for(PdDroidPatchView view : patchviews)
	{
		view.getPatch().close();
	}
	
	PdBase.sendMessage("pd", "quit", "bang");
	PdBase.release();
	try {
		unbindService(serviceConnection);
	} catch (IllegalArgumentException e) {
		// already unbound
		pdService = null;
	}
	
	// release midi
	usbMidiManager.destroy();
	
	// release the lock on wifi multicasting
	NetworkHelper.releaseWifiMulticast();
}
 
开发者ID:b2renger,项目名称:PdDroidPublisher,代码行数:33,代码来源:PdDroidParty.java

示例2: sendMessage

import org.puredata.core.PdBase; //导入方法依赖的package包/类
@ProtoMethod(description = "Sends a message to PdLib", example = "")
@ProtoMethodParam(params = {"recv", "value"})
public void sendMessage(String recv, String value) {
    PdBase.sendMessage(recv, value);
}
 
开发者ID:victordiaz,项目名称:phonk,代码行数:6,代码来源:PPureData.java

示例3: evaluateMessage

import org.puredata.core.PdBase; //导入方法依赖的package包/类
private void evaluateMessage(String s) {
		String dest = "freq", symbol = null;
		boolean isAny = s.length() > 0 && s.charAt(0) == ';';
		Scanner sc = new Scanner(isAny ? s.substring(1) : s);
		if (isAny) {
			if (sc.hasNext()) dest = sc.next();
			else {
				toast("Message not sent (empty recipient)");
				return;
			}
			if (sc.hasNext()) symbol = sc.next();
			else {
				toast("Message not sent (empty symbol)");
			}
		}
		List<Object> list = new ArrayList<Object>();
		while (sc.hasNext()) {
			if (sc.hasNextInt()) {
				list.add(Float.valueOf(sc.nextInt()));
			} else if (sc.hasNextFloat()) {
				list.add(sc.nextFloat());
			} else {
				list.add(sc.next());
			}
		}
		if (isAny) {
			PdBase.sendMessage(dest, symbol, list.toArray());
		} else {
			switch (list.size()) {
			case 0:
				PdBase.sendBang(dest);
				break;
			case 1:
				Object x = list.get(0);
				if (x instanceof String) {
					PdBase.sendSymbol(dest, (String) x);
				} else {
					PdBase.sendFloat(dest, (Float) x);
				}
				break;
			default:
				PdBase.sendList(dest, list.toArray());
				break;
			}
		}
	
}
 
开发者ID:fermiyoung,项目名称:musetoolkit,代码行数:48,代码来源:Piano.java

示例4: sendMessage

import org.puredata.core.PdBase; //导入方法依赖的package包/类
private static void sendMessage(String actionTag, int pointerId, float x, float y) {
	PdBase.sendMessage(TOUCH_SYMBOL, actionTag, pointerId + 1, x, y);
}
 
开发者ID:fermiyoung,项目名称:musetoolkit,代码行数:4,代码来源:Touch.java

示例5: evaluateMessage

import org.puredata.core.PdBase; //导入方法依赖的package包/类
private void evaluateMessage(String s) {
		String dest = "spl", symbol = null;
		boolean isAny = s.length() > 0 && s.charAt(0) == ';';
		Scanner sc = new Scanner(isAny ? s.substring(1) : s);
		if (isAny) {
			if (sc.hasNext()) dest = sc.next();
			else {
				toast("Message not sent (empty recipient)");
				return;
			}
			if (sc.hasNext()) symbol = sc.next();
			else {
				toast("Message not sent (empty symbol)");
			}
		}
		List<Object> list = new ArrayList<Object>();
		while (sc.hasNext()) {
			if (sc.hasNextInt()) {
				list.add(Float.valueOf(sc.nextInt()));
			} else if (sc.hasNextFloat()) {
				list.add(sc.nextFloat());
			} else {
				list.add(sc.next());
			}
		}
		if (isAny) {
			PdBase.sendMessage(dest, symbol, list.toArray());
		} else {
			switch (list.size()) {
			case 0:
				PdBase.sendBang(dest);
				break;
			case 1:
				Object x = list.get(0);
				if (x instanceof String) {
					PdBase.sendSymbol(dest, (String) x);
				} else {
					PdBase.sendFloat(dest, (Float) x);
				}
				break;
			default:
				PdBase.sendList(dest, list.toArray());
				break;
			}
		}
	
}
 
开发者ID:fermiyoung,项目名称:musetoolkit,代码行数:48,代码来源:Spl.java

示例6: sendMessage

import org.puredata.core.PdBase; //导入方法依赖的package包/类
@Override
public int sendMessage(String recv, String msg, Object... args) {
	return PdBase.sendMessage(recv, msg, args);
	}
 
开发者ID:manhluong,项目名称:pd-for-libgdx,代码行数:5,代码来源:GdxPDAndroid.java


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