"Buffer" of custom length in mxj~

    Jan 08 2012 | 2:59 pm
    Hello everybody!
    I try to use a java class through mxj~ to output some sound. My problem is that I cannot "send as buffer" an array which is as "large" as I want, i.e. the length of the array is 64.
    For example, the code below would print 64 on the Max window.
    import com.cycling74.max.*; import com.cycling74.msp.*;
    public class MyTestClass extends MSPPerformer{ public MyTestClass(){ declareInlets(new int[]{DataTypes.ALL}); declareOutlets(new int[]{SIGNAL}); }
    public void perform(MSPSignal[] in , MSPSignal[] out){ float[] myOut = out[0].vec;
    post("" + myOut.length); } }
    THE QUESTION: Is there a way to define the length of the out[0].vec?
    I have searched a lot through the forums, but being realy new to java externals I might have stepped into the answer without realizing it!

    • Jan 08 2012 | 5:01 pm
      If you don't need audio into the mxj~ then try mxj. Have a look at the help file for 'mxj buf.Op' it has a 'setLength' message.