Forums > Java

mxj~ crackling when moving windows etc

October 12, 2007 | 12:36 pm

Hello,

Has anybody else experienced audio breaking up when using an mxj~? Even the
simplest mxj~ object seems to make loud crackling sounds when I move or
resize a window. A bit gutting as I’ve just spent far too much time building
a bunch of effects! Should have done a bit more testing first. (Win Max
4.6.3)

Thanks,

Simon


October 12, 2007 | 12:39 pm

Hi,

What’s your CPU usage like? Crackling often indicates a resource shortage.

When you say moving windows – which ones? Max windows, or are you doing
Java gui things?


Owen

lists@simonadcock.co.uk wrote:
> Hello,
>
>
>
> Has anybody else experienced audio breaking up when using an mxj~? Even the
> simplest mxj~ object seems to make loud crackling sounds when I move or
> resize a window. A bit gutting as I’ve just spent far too much time building
> a bunch of effects! Should have done a bit more testing first. (Win Max
> 4.6.3)
>
>
>
> Thanks,
>
> Simon
>
>
>
>
> ————————————————————————
>


October 12, 2007 | 1:33 pm

You’re right it is a CPU thing. I’m not doing anything fancy whatsoever – for testing I’ve got an mxj~ object that simply copies the in to the out so the cpu reads more or less 0%, then I’ll do something like minimize the patch, or drag the patcher window somewhere and the CPU shoots up and the sound crackles. hmm… does this mean I should really be doing this in C instead of Java?

Simon


October 12, 2007 | 1:40 pm

I can’t see any intrinsic reason why it should, but I’ll admit to be
being a bit mystified. At this point it may help to know some details,
like os, java version etc. If you post your code, I can test here and
see if I can replicate (or spot any boo-boos).


Owen

simon adcock wrote:
> You’re right it is a CPU thing. I’m not doing anything fancy
> whatsoever – for testing I’ve got an mxj~ object that simply copies
> the in to the out so the cpu reads more or less 0%, then I’ll do
> something like minimize the patch, or drag the patcher window
> somewhere and the CPU shoots up and the sound crackles. hmm… does
> this mean I should really be doing this in C instead of Java?
>
> Simon _______________________________________________ java-dev
>


October 12, 2007 | 2:05 pm

That would be great thanks. I’m using Win XP, Max 4.6.3, JRE 1.5.0.120.

Below is the code I’m testing with:


import com.cycling74.max.*;
import com.cycling74.msp.*;

public class thru extends MSPPerformer
{
private static final String[] INLET_ASSIST = new String[]{
"input (sig)"
};
private static final String[] OUTLET_ASSIST = new String[]{
"output (sig)"
};

public thru()
{
declareInlets(new int[]{SIGNAL});
declareOutlets(new int[]{SIGNAL});

setInletAssist(INLET_ASSIST);
setOutletAssist(OUTLET_ASSIST);
}

public void dspsetup(MSPSignal[] ins, MSPSignal[] outs)
{
}

public void perform(MSPSignal[] ins, MSPSignal[] outs)
{

int i;
float[] in = ins[0].vec;
float[] out = outs[0].vec;
int vec_size = ins[0].n;

for(i = 0; i < vec_size; i++)
{
out[i] = in[i];
}
}
}

Thanks,
Simon


Viewing 5 posts - 1 through 5 (of 5 total)