本文整理汇总了Java中org.puredata.core.PdBase.sendBang方法的典型用法代码示例。如果您正苦于以下问题:Java PdBase.sendBang方法的具体用法?Java PdBase.sendBang怎么用?Java PdBase.sendBang使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.puredata.core.PdBase
的用法示例。
在下文中一共展示了PdBase.sendBang方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setPontoParaAtivo
import org.puredata.core.PdBase; //导入方法依赖的package包/类
public void setPontoParaAtivo(int index) {
int antIndex = indexEmSom;
indexEmSom = index;
if (antIndex != indexEmSom) {
if ( listaBangs.get(indexEmSom) != null ) {
if ( (String) listaBangs.get(indexEmSom).get(1) == "sin_efecto") {
PdBase.sendFloat("efecto"+(String) listaBangs.get(indexEmSom).get(0), 0);
// pontosNota.get(indexEmSom).conEfecto = false;
} else {
PdBase.sendFloat( (String) listaBangs.get(indexEmSom).get(1), 1);
// pontosNota.get(indexEmSom).conEfecto = true;
}
// Log.i("Galho", "efecto: " + (String) listaBangs.get(indexEmSom).get(1) );
PdBase.sendBang( (String) listaBangs.get(indexEmSom).get(0) );
}
}
}
示例2: initPd
import org.puredata.core.PdBase; //导入方法依赖的package包/类
private void initPd() {
Resources res = getResources();
File patchFile = null;
try {
PdBase.sendBang("trigger");
PdBase.setReceiver(receiver);
PdBase.subscribe("freq");
// PdBase.sendFloat("midinote", 64);
InputStream in = res.openRawResource(R.raw.pianotuner);
patchFile = IoUtils.extractResource(in, "pinaotuner.pd", getCacheDir());
PdBase.openPatch(patchFile);
PdBase.sendFloat("midinote", 69); //此处确保初始化时,按下按钮能听到标准音A发声
} catch (IOException e) {
Log.e(TAG, e.toString());
finish();
} finally {
if (patchFile != null) patchFile.delete();
}
}
示例3: onClick
import org.puredata.core.PdBase; //导入方法依赖的package包/类
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.piano_button:
startAudio();
PdBase.sendBang("Bang");
// PdBase.sendFloat("midinote", 64);
break;
// if (pdService.isRunning()) {
// stopAudio();
// } else {
// startAudio();
// }
// default:
// stopAudio();
// break;
}
}
示例4: fileRecSave
import org.puredata.core.PdBase; //导入方法依赖的package包/类
public void fileRecSave(File selection) {
if (selection == null) {
// println("Window was closed or the user hit cancel.");
} else {
// println("User selected " + selection.getAbsolutePath());
// Save to File
// The same file is overwritten by adding the data folder path to saveStrings().
PdBase.sendSymbol("pd_recName", selection.getAbsolutePath());
PdBase.sendBang("pd_rwav");
PdBase.sendBang("pd_recStart");
PdBase.sendFloat("pd_power", 1);
//PdBase.sendBang("pd_rewind");
}
}
示例5: onClick
import org.puredata.core.PdBase; //导入方法依赖的package包/类
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.wnoise_button:
startAudio();
PdBase.sendBang("trigger");
// PdBase.sendFloat("midinote", 64);
break;
// if (pdService.isRunning()) {
// stopAudio();
// } else {
// startAudio();
// }
// default:
// stopAudio();
// break;
}
}
示例6: initPd
import org.puredata.core.PdBase; //导入方法依赖的package包/类
private void initPd() {
Resources res = getResources();
File patchFile = null;
try {
PdBase.sendBang("trigger");
// PdBase.sendFloat("midinote", 64);
InputStream in = res.openRawResource(R.raw.sine);
patchFile = IoUtils.extractResource(in, "sine.pd", getCacheDir());
PdBase.openPatch(patchFile);
} catch (IOException e) {
Log.e(TAG, e.toString());
finish();
} finally {
if (patchFile != null) patchFile.delete();
}
}
示例7: initPd
import org.puredata.core.PdBase; //导入方法依赖的package包/类
private void initPd() {
Resources res = getResources();
File patchFile = null;
try {
PdBase.sendBang("trigger");
// PdBase.sendFloat("midinote", 64);
InputStream in = res.openRawResource(R.raw.triangle);
patchFile = IoUtils.extractResource(in, "triangle.pd", getCacheDir());
PdBase.openPatch(patchFile);
} catch (IOException e) {
Log.e(TAG, e.toString());
finish();
} finally {
if (patchFile != null) patchFile.delete();
}
}
示例8: onClick
import org.puredata.core.PdBase; //导入方法依赖的package包/类
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.triangle_button:
startAudio();
PdBase.sendBang("trigger");
// PdBase.sendFloat("midinote", 64);
break;
// if (pdService.isRunning()) {
// stopAudio();
// } else {
// startAudio();
// }
// default:
// stopAudio();
// break;
}
}
示例9: initPd
import org.puredata.core.PdBase; //导入方法依赖的package包/类
private void initPd() {
Resources res = getResources();
File patchFile = null;
try {
PdBase.sendBang("trigger");
// PdBase.sendFloat("midinote", 64);
// InputStream in = res.openRawResource(R.raw.pnoise);
// patchFile = IoUtils.extractResource(in, "pnoise.pd", getCacheDir());
// PdBase.openPatch(patchFile);
File dir = getFilesDir();
IoUtils.extractZipResource(
getResources().openRawResource(R.raw.pnoise), dir, true);
File pFile = new File(dir, "pnoise.pd");
PdBase.openPatch(pFile.getAbsolutePath());
} catch (IOException e) {
Log.e(TAG, e.toString());
finish();
} finally {
if (patchFile != null) patchFile.delete();
}
}
示例10: onClick
import org.puredata.core.PdBase; //导入方法依赖的package包/类
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.pnoise_button:
startAudio();
PdBase.sendBang("trigger");
// PdBase.sendFloat("midinote", 64);
break;
// if (pdService.isRunning()) {
// stopAudio();
// } else {
// startAudio();
// }
// default:
// stopAudio();
// break;
}
}
示例11: initPd
import org.puredata.core.PdBase; //导入方法依赖的package包/类
private void initPd() {
Resources res = getResources();
File patchFile = null;
try {
PdBase.sendBang("trigger");
// PdBase.sendFloat("midinote", 64);
InputStream in = res.openRawResource(R.raw.sawtooth);
patchFile = IoUtils.extractResource(in, "sawtooth.pd", getCacheDir());
PdBase.openPatch(patchFile);
} catch (IOException e) {
Log.e(TAG, e.toString());
finish();
} finally {
if (patchFile != null) patchFile.delete();
}
}
示例12: onClick
import org.puredata.core.PdBase; //导入方法依赖的package包/类
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.sawtooth_button:
startAudio();
PdBase.sendBang("trigger");
// PdBase.sendFloat("midinote", 64);
break;
// if (pdService.isRunning()) {
// stopAudio();
// } else {
// startAudio();
// }
// default:
// stopAudio();
// break;
}
}
示例13: initPd
import org.puredata.core.PdBase; //导入方法依赖的package包/类
private void initPd() {
Resources res = getResources();
File patchFile = null;
try {
PdBase.sendBang("play");
// PdBase.sendFloat("midinote", 64);
InputStream in = res.openRawResource(R.raw.metro);
patchFile = IoUtils.extractResource(in, "metro.pd", getCacheDir());
PdBase.openPatch(patchFile);
} catch (IOException e) {
Log.e(TAG, e.toString());
finish();
} finally {
if (patchFile != null) patchFile.delete();
}
}
示例14: onClick
import org.puredata.core.PdBase; //导入方法依赖的package包/类
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.metro_button:
startAudio();
PdBase.sendBang("play");
// PdBase.sendFloat("midinote", 64);
break;
// if (pdService.isRunning()) {
// stopAudio();
// } else {
// startAudio();
// }
// default:
// stopAudio();
// break;
}
}
示例15: onClick
import org.puredata.core.PdBase; //导入方法依赖的package包/类
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.sweep_button:
startAudio();
PdBase.sendBang("trigger");
PdBase.sendBang("toggle");
// PdBase.sendFloat("midinote", 64);
break;
// if (pdService.isRunning()) {
// stopAudio();
// } else {
// startAudio();
// }
// default:
// stopAudio();
// break;
}
}