Audio Latency Problems

Jan 18, 2008 at 7:23pm

Audio Latency Problems

Hi everyone, I am having trouble with a patch that is giving me some crazy latency.

It is a bandpass filter using cascade, (which “kjg” was so kind as to help me with in this thread … http://www.cycling74.com/forums/index.php?t=msg&th=30396&start=0&rid=5838&S=cb25f54275459f1ca01126a38d740d42 )

The filter is pretty much exactly as given to me by “kjg”, and it is encapsulated and the display is in its own window in a bpatcher
I tried kjg’s patch (which seems perfectly well written) by itself and I’m still getting the delay…

at first it’s not bad, it’s just about right on
about a minute later there’s a little delay, noticable but still I can still live with it
at about 1 more minute later it’s like a 50ms delay

about 15 minutes later it’s about a 400-500ms delay.

and I’ve tried all different I/O and Signal vector sizes
if they are too small, it starts off better, but then still continues to delay over time, and it distorts a little after a few minutes as well.

if it’s too large, then it starts a little more delayed and gets worse…

my CPU utilization never goes above 15%

I’m on an iMac G5 OSX 10.4.10 1.8GHz PowerPC 1GB DDR SDRAM

and nothing else is running on my computer, including any widgets

any suggestions???
thanks :)
Michael

#35438
Jan 18, 2008 at 9:16pm

bizarre, the only thing I could say is to try with Overdrive on and off and see if there’s a difference, but I don’t know if this matters in this case (unless maybe the “latency” is event-driven, as it might be…).

Don’t know enough about the low-level audio-card stuff, but I wonder if the problem is below Max and in the card? or how Max talks to this particular one?

There should be some other good answers to this one. –CJ

#120806
Jan 18, 2008 at 9:16pm

Michael schrieb:
> about 15 minutes later it’s about a 400-500ms delay.

half a second delay building up sounds weird. I remember the patch and
even started to play with it, but that wouldn’t create accumulating delays.
Just post your version of the patch again, I am sure there is an
explanation…

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com

#120807
Jan 19, 2008 at 12:24am

I should have mentioned this at first, but I also experienced similar problems a while ago when using a simple patch I wrote with fiddle~ converting frequencies to MIDI.

It is fine every time I turn the audio engine off and on again, but then the same problem happens again.

My audio interface is USB (the Event EZBus). And I’ve never had any problems with it anywhere else.

I’ll post the patch when I get home, and I’ll try it with Overdrive On and Off and see if there’s a difference.

thanks for the help so far

Michael Sperone

#120808
Jan 19, 2008 at 11:26am

Michael schrieb:
> I should have mentioned this at first, but I also experienced similar
> problems a while ago when using a simple patch I wrote with fiddle~
> converting frequencies to MIDI.

It seems to be a bug in the world simulator (matrix~) we are all living
in…

In other words, if latency is accumulating, there must be a memory for
that delay. If its not in Max, its in the matrix… ;-)

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com

#120809
Jan 21, 2008 at 5:54pm

Hi,
I tried turning overdrive off (it was on before) but that didn’t help anything

here is the cascade patch that I’m using…

any more ideas? because I don’t know what else to do :(

-Michael

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 23 505 31 196617 dac~;
#P newex 38 233 31 196617 adc~;
#P inlet 532 52 15 0;
#P inlet 516 52 15 0;
#P outlet 0 564 15 0;
#P inlet 0 351 15 0;
#P newex 0 375 48 196617 cascade~;
#B color 15;
#P comment 252 458 155 196617 join the two lists of coefficients;
#P comment 606 249 127 196617 these coefficients 6 times;
#P comment 656 337 120 196617 12 dB/oct LPF @ 10 kHz;
#P message 159 212 45 196617 highpass;
#P newex 159 172 45 196617 loadbang;
#P message 159 193 51 196617 logfreq 1;
#P newex 46 402 45 196617 loadbang;
#P message 46 423 51 196617 logfreq 1;
#P newex 223 427 27 196617 t b l;
#P newex 211 457 39 196617 zl join;
#B color 15;
#P message 159 357 41 196617 lowpass;
#P newex 159 317 45 196617 loadbang;
#P message 159 338 51 196617 logfreq 1;
#P newex 644 277 69 196617 loadmess 0.8;
#P newex 522 277 84 196617 loadmess 10000;
#P flonum 644 299 47 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 522 299 47 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 227 397 270 196617 pack 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.;
#P window setfont “Sans Serif” 0.;
#P user filtergraph~ 217 319 440 70 3 0 30. 10000. 0.0625 1.781797 1 1 1 0 0 1 0;
#X frgb 170 170 170;
#X brgb 210 210 210;
#X rgb2 0 0 0;
#X rgb3 130 130 130;
#X rgb4 0 0 0;
#X rgb5 118 121 166;
#X rgb6 210 74 54;
#X rgb7 255 22 22;
#X linmarkers 5512.5 11025. 16537.5;
#X logmarkers 50. 500. 5000.;
#X nfilters 1;
#X setfilter 0 1 0 0 0 10000. 1. 0.8 0. 22050. 0.0001 2. 0.5 25.;
#X done;
#P window setfont “Sans Serif” 9.;
#P window linecount 2;
#P comment 435 468 113 196617 72 dB/oct HPF @ 30 + 48 dB/oct LPF @ 10kHz;
#P window linecount 1;
#P comment 656 193 123 196617 12 dB/oct HPF @ 30 Hz;
#P newex 638 131 69 196617 loadmess 0.8;
#P newex 516 131 66 196617 loadmess 30;
#P flonum 638 153 47 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 516 153 47 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont “Sans Serif” 0.;
#P user filtergraph~ 1 1 444 130 3 0 30. 10000. 0.0625 1.781797 0 1 1 0 0 1 1;
#X frgb 0 24 214;
#X brgb 8 12 255;
#X rgb2 0 0 0;
#X rgb3 130 130 130;
#X rgb4 0 0 0;
#X rgb5 118 121 166;
#X rgb6 210 74 54;
#X rgb7 255 22 22;
#X linmarkers 5512.5 11025. 16537.5;
#X logmarkers 50. 500. 5000.;
#X nfilters 10;
#X setfilter 9 0 1 0 0 1537.734375 1. 2.5 0. 0. 0. 0. 0. 0.;
#X setfilter 8 0 1 0 0 1025.15625 1. 2.5 0. 0. 0. 0. 0. 0.;
#X setfilter 7 0 1 0 0 683.4375 1. 2.5 0. 0. 0. 0. 0. 0.;
#X setfilter 6 0 1 0 0 455.625 1. 2.5 0. 0. 0. 0. 0. 0.;
#X setfilter 5 0 1 0 0 281.25 1. 1.3 30. 19845. 0.0625 16. 0.5 25.;
#X setfilter 4 0 1 0 0 562.5 1. 1.3 30. 19845. 0.0625 16. 0.5 25.;
#X setfilter 3 0 1 0 0 1125. 1. 1.3 30. 19845. 0.0625 16. 0.5 25.;
#X setfilter 2 0 1 0 0 2250. 1. 1.3 30. 19845. 0.0625 16. 0.5 25.;
#X setfilter 1 0 1 0 0 4500. 1. 1.3 30. 19845. 0.0625 16. 0.5 25.;
#X setfilter 0 0 0 0 0 1000. 1. 1. 0. 22050. 0.0001 2. 0.5 25.;
#X done;
#P window setfont “Sans Serif” 9.;
#P newex 210 479 81 196617 prepend cascade;
#P newex 211 249 391 196617 pack 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.;
#P window setfont “Sans Serif” 0.;
#P user filtergraph~ 211 173 440 70 3 0 30. 10000. 0.0625 1.781797 1 1 1 0 0 1 0;
#X frgb 170 170 170;
#X brgb 210 210 210;
#X rgb2 0 0 0;
#X rgb3 130 130 130;
#X rgb4 0 0 0;
#X rgb5 118 121 166;
#X rgb6 210 74 54;
#X rgb7 255 22 22;
#X linmarkers 5512.5 11025. 16537.5;
#X logmarkers 50. 500. 5000.;
#X nfilters 1;
#X setfilter 0 2 0 0 0 30. 1. 0.8 0. 22050. 0.0001 2. 0.5 25.;
#X done;
#P window setfont “Sans Serif” 9.;
#P comment 517 398 127 196617 these coefficients 4 times;
#P connect 31 0 30 0;
#P fasten 35 0 30 0 43 371 5 371;
#P fasten 35 1 30 0 64 371 5 371;
#P connect 30 0 32 0;
#P hidden connect 22 0 4 0;
#P hidden connect 3 0 4 0;
#P fasten 30 0 36 0 5 448 28 448;
#P connect 20 0 30 1;
#P fasten 30 0 36 1 5 448 49 448;
#P connect 23 0 22 0;
#P connect 25 0 24 0;
#P connect 25 0 26 0;
#P connect 18 0 17 0;
#P connect 18 0 19 0;
#P connect 20 0 3 0;
#P connect 26 0 1 0;
#P connect 1 0 2 0;
#P connect 21 0 20 0;
#P connect 2 0 20 0;
#P connect 19 0 11 0;
#P connect 17 0 11 0;
#P connect 12 0 21 0;
#P connect 11 0 12 0;
#P connect 21 1 20 1;
#P fasten 1 0 2 5 216 245 281 245;
#P fasten 11 0 12 5 222 390 297 390;
#P fasten 1 0 2 10 216 245 346 245;
#P fasten 11 0 12 10 222 390 362 390;
#P fasten 1 0 2 15 216 245 411 245;
#P fasten 11 0 12 15 222 390 427 390;
#P fasten 1 0 2 20 216 245 476 245;
#P connect 7 0 5 0;
#P connect 5 0 1 5;
#P connect 33 0 1 5;
#P connect 15 0 13 0;
#P connect 13 0 11 5;
#P fasten 34 0 11 5 537 70 527 70;
#P fasten 1 0 2 25 216 245 541 245;
#P connect 8 0 6 0;
#P connect 6 0 1 7;
#P connect 16 0 14 0;
#P connect 14 0 11 7;
#P window clipboard copycount 37;

#120810
Jan 22, 2008 at 2:40am

I’ve had this exact problem.
For me, I could fix the problem by using different sound cards.
The weird thing is, I had no problem with the built in sound card (on a G4 powerbook). Hope this helps.

David

#120811
Jan 24, 2008 at 11:16pm

YES!!!! It works!!!!

davydka, you are a genious! I am using the built-in sound and it works GREAT!!!

Thanks everybody for your help with this!

-Michael

#120812

You must be logged in to reply to this topic.