mxj with RNBO

owecanno's icon

Does RNBO include Java classes? I'm trying to decide whether to purchase RNBO in order to distribute an effect I put together.

I have written an mxj Chebyshev wave shaper, which calculates up to the 24th harmonic, at sample rate without making use of a wavetable like the cheby. max example does. It has 25 inputs, signals corresponding to the input signal and the amplitude/scale of each of 24 harmonics. That way, mc. multichannel objects can be used to modulate the transfer function at sample rate.

Joshua Kit Clayton's icon

There is no support for mxj/Java in RNBO, but if you have written code in Java, you may be able to port your Java code to RNBO Script in codebox as described here:

owecanno's icon

Being able to check the block of samples and decide whether or not to process something for that block is kind of useful. In this case, checking if for a given block ('WSVEC' or weights-vector in my Java) a given partial is assigned a weights value and the sample values need to be calculated (WSACT). In Codebox, there would be an if else that's run every sample to decide whether that sample needs to be calculated.

// reset WSVEC             
for (int i = 0; i < in0.length; i++)                 
for (int j = 0; j < wsvec[i].length; j++)                     
wsvec[i][j] = 0F;                          

// reset WSACT             
for (int j = 0; j < wsact.length; j++) // 0 - 23                 
wsact[j] = false;    
                      
// reset output             
for (int j = 0; j < out.length; j++)                  
for (int i = 0; j < out[j].vec.length; i++)
out[j].vec[i] = 0F;

// write to WSVEC
for (int i = 0; i < in0.length; i++)
wsvec[i] = Helper.interp4x(xyvec[0][I], xyvec[1][I], nw, ne, sw, se);    
                      
// write to WSACT
for (int j = 0; j < wsact.length; j++) // 0 - 23
for (int i = 0; i < in[0].vec.length; i++) // sample
if (wsvec[i][j] != 0) {
wsact[j] = true;
break; // and continue to the next partial       
              }     
                     
// write to XYVEC
for (int i = 0; i < in0.length; i++) {                 xyvec[0][i] = in[1].vec[i];                 xyvec[1][i] = in[2].vec[i];             }                          // clip XYVEC             Helper.clip(xyvec[0], -1F, 1F);             Helper.clip(xyvec[1], -1F, 1F);                          // write to INEXP             for (int i = 0; i < in0.length; i++)                 Helper.powersofx_24(in0[i], inexp[i]); 
    static float T1(float x) { return x; }
    static float T1(float[] xs) { return xs[1]; }
    static float T2(float[] xs) { return (2*xs[2])-1; }
    static float T3(float[] xs) { return (4*xs[3])-(3*xs[1]); }
    static float T4(float[] xs) { return (8*xs[4])-(8*xs[2])+1; }
    static float T5(float[] xs) { return (16*xs[5])-(20*xs[3])+(5*xs[1]); }
    static float T6(float[] xs) { return (32*xs[6])-(48*xs[4])+(18*xs[2])-1; }
    static float T7(float[] xs) { return (64*xs[7])-(112*xs[5])+(56*xs[3])-(7*xs[1]); }
    static float T8(float[] xs) { return (128*xs[8])-(256*xs[6])+(160*xs[4])-(32*xs[2])+1; }
    static float T9(float[] xs) { return (256*xs[9])-(576*xs[7])+(432*xs[5])-(120*xs[3])+(9*xs[1]); }
    static float T10(float[] xs) { return (512*xs[10])-(1280*xs[8])+(1120*xs[6])-(400*xs[4])+(50*xs[2])-1; }
    static float T11(float[] xs) { return (1024*xs[11])-(2816*xs[9])+(2816*xs[7])-(1232*xs[5])+(220*xs[3])-(11*xs[1]); }
    static float T12(float[] xs) { return (2048*xs[12])-(6144*xs[10])+(6912*xs[8])-(3584*xs[6])+(840*xs[4])-(72*xs[2])+1; }

....

    static float T23(float[] xs) { return (4194304*xs[23])-(24117248*xs[21])+(60293120*xs[19])-(85917696*xs[17])+(76873728*xs[15])-(44843008*xs[13])+(17145856*xs[11])-(4209920*xs[9])+(631488*xs[7])-(52624*xs[5])+(2024*xs[3])-(23*xs[1]); }
    static float T24(float[] xs) { return (8388608*xs[24])-(50331648*xs[22])+(132120576*xs[20])-(199229440*xs[18])+(190513152*xs[16])-(120324096*xs[14])+(50692096*xs[12])-(14057472*xs[10])+(2471040*xs[8])-(256256*xs[6])+(13728*xs[4])-(288*xs[2])+1; }
    /* 2147483648*x^32 - 17179869184*x^30 + 62277025792*x^28 - 135291469824*x^26 + 196293427200*x^24 - 200655503360*x^22
     * + 148562247680*x^20 - 80648077312*x^18 + 32133218304*x^16 - 9313976320*x^14 + 1926299648*x^12 - 275185664*x^10
     * + 25798656*x^8 - 1462272*x^6 + 43520*x^4 - 512*x^2 + 1
     */
    static float T32(float[] xs) { return (2147483648F * Helper.pow(xs[1], 32))-(17179869184F * Helper.pow(xs[1], 30))+(62277025792F * Helper.pow(xs[1], 28))
                                          -(135291469824F * Helper.pow(xs[1], 26))+(196293427200F*xs[24])-(200655503360F*xs[22])
                                          +(148562247680F*xs[20])-(80648077312F*xs[18])+(32133218304F*xs[16])
                                       -(9313976320F*xs[14])+(1926299648F*xs[12])-(275185664F*xs[10])
                                       +(25798656F*xs[8])-(1462272F*xs[6])+(43520F*xs[4])-(512F*xs[2])+1F; }
owecanno's icon

It could be only a matter of time before someone from sales/management decides that support for Java isn't a requirement to be able to make techno from a Frank-Lloyd Wright inspired Ableton space. It's sort of a canary in the coalmine, though, at least in terms of what of the original experiment is plundered and what is taken out, if that makes any sense.