本文整理汇总了Java中org.puredata.core.PdBase.readArray方法的典型用法代码示例。如果您正苦于以下问题:Java PdBase.readArray方法的具体用法?Java PdBase.readArray怎么用?Java PdBase.readArray使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.puredata.core.PdBase
的用法示例。
在下文中一共展示了PdBase.readArray方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getArray
import org.puredata.core.PdBase; //导入方法依赖的package包/类
@ProtoMethod(description = "Gets an array from PdLib", example = "")
@ProtoMethodParam(params = {"name", "size"})
public float[] getArray(String source, int n) {
// public void getArray(float[] destination, int destOffset, String
// source, int srcOffset, int n) {
// PdBase.readArray(destination, destOffset, source, srcOffset, n);
float[] destination = new float[n];
PdBase.readArray(destination, 0, source, 0, n);
return destination;
}
示例2: updateData
import org.puredata.core.PdBase; //导入方法依赖的package包/类
@Override
public void updateData()
{
if(array != null)
{
PdBase.readArray(array.buffer, 0, array.name, 0, array.buffer.length);
}
else
{
for(Widget widget : widgets)
{
widget.updateData();
}
}
}
示例3: getArrayFromPd
import org.puredata.core.PdBase; //导入方法依赖的package包/类
public float[] getArrayFromPd(String arrayName) {
int sizeArray = PdBase.arraySize(arrayName);
float[] putHereTheArray = new float[sizeArray];
PdBase.readArray(putHereTheArray, 0, arrayName, 0, sizeArray);
return putHereTheArray;
}
示例4: matrixDraw
import org.puredata.core.PdBase; //导入方法依赖的package包/类
public static void matrixDraw() {
float [] tempSeq = new float[128];
PdBase.readArray(tempSeq,0,"seq",0,128);
int i = 0;
for(int h = 0; h<8; h++){
for(int w = 0; w<16; w++){
m1.matrix[w][h].on = PApplet.parseBoolean(PApplet.parseInt(tempSeq[i++]));
}
}
}
示例5: copyPattern
import org.puredata.core.PdBase; //导入方法依赖的package包/类
public void copyPattern() {
// println("copy");
pName = textField.getText();
PdBase.readArray(seq,0,"seq",0,128);
PdBase.readArray(vel,0,"vel",0,128);
PdBase.readArray( pit,0,"pit",0,128);
PdBase.readArray( start,0,"sstart",0,128);
PdBase.readArray( slength,0,"length",0,128);
PdBase.readArray( verb,0,"verb",0,128);
PdBase.readArray( delay,0,"delay",0,128);
PdBase.readArray( pan,0,"pan",0,128);
//0 bpm, 1 groove, 2 dlyFB,3 dlyStep,4 rvbLive, 5 rvbXver, 6 rvbDamp
sliderval[0] = cp5.getController("bpm").getValue();
sliderval[1] = cp5.getController("shuffle").getValue();
sliderval[2] = cp5.getController("dFB").getValue();
sliderval[3] = cp5.getController("dStep").getValue();
sliderval[4] = cp5.getController("vDecay").getValue();
sliderval[5] = cp5.getController("vXover").getValue();
sliderval[6] = cp5.getController("vDamp").getValue();
for(int s = 0; s< drmvol.length; s++){
drmvol[s] = drumvol[s].getValue();
}
for(int s = 0; s< drmName.length; s++){
drmName[s] = instrSelect[s].getLabel();
}
for(int s = 0; s< drmPathName.length; s++){
drmPathName[s] = patterns[PApplet.parseInt(sbar)].drmPathName[s];
}
}
示例6: readArray
import org.puredata.core.PdBase; //导入方法依赖的package包/类
@Override
public int readArray(float[] destination,
int destOffset,
String source,
int srcOffset,
int n) {
return PdBase.readArray(destination, destOffset, source, srcOffset, n);
}
示例7: display
import org.puredata.core.PdBase; //导入方法依赖的package包/类
public void display() {
PdBase.readArray(dispvalues,0,b,0,aSize);
// draw plot bg
fill(155);
noStroke();
rectMode(CORNERS);
//rect(plotX1, plotY1, plotX2, plotY2);
float x, y;
// float x1, y1;
beginShape();
noFill();
stroke(lineColor);
strokeWeight(2);
for (int i = 0; i < values.length; i++) {
values[i] = dispvalues[i*(aSize/plotWidth)];
x = map(i, 0, values.length-1, plotX1+(circleSize/2), plotX2-(circleSize/2));
y = (map(values[i], -1, 1,locY, locY+plotHeight));
vertex(x, y);
}
endShape();
beginShape();
noFill();
stroke(175);
strokeWeight(2);
for (int i = 0; i < values.length; i++) {
values[i] = dispvalues[i*(aSize/plotWidth)];
x = map(i, 0, values.length-1, plotX1+(circleSize/2), plotX2-(circleSize/2));
y = (map(values[i], -1, 1,locY, locY+plotHeight));
vertex(x, y+2);
}
endShape();
}