Multisampler, groove, and the cpu

Mar 5, 2012 at 6:24pm

Multisampler, groove, and the cpu

Hey guys! This is my first post- I’ve been working with max all day every day for a few weeks now, and I’ve managed to construct, among other things, and with the help of generous reading of archived forum topics, my first multi-sampler. I have a polybuffer~ populating a coll with a kind of detonate mobile indeterminately playing back midi files that I generated in openmusic. Everything works pretty well, but the thing is really really cpu intensive. I’ve got a 2011 macbook pro, and every time I run my midi sequence, cpu is averaging at about 80% usage! :( This would be fine I guess, but it’s causing clicks and pops if I so much as touch anything! I think the problem lies in my use of poly~. Right now I have a poly~ inside of another poly~ (16 voice each) and I’m not sure if I totally understand how to make sure the poly~s (polies?) turn themselves on and off! The voice stealing and everything seems to be working correctly, but I feel like some faulty wiring on my part may be the cause of too much cpu usage! I know that I’m probably missing something obvious, but it’s geting really hard to extricate myself from the patching process and look at it objectively again! :o

I’m going to attach the two poly~ objects. They’re kinda disorganized, so I apologize in advance for that! :s

Thank you guys so much for you time/help!

best,

-Jesse

Attachments:
  1. players.maxpat
#62172
Mar 5, 2012 at 7:46pm

this isn’t really my thing as I’m not all that experienced with poly~ although it is on my list…

are you sure the synch out from groove that is turning the poly voice off is working correctly? have you tested it outside the poly just observing the toggle’s state change?

Also these are both poly patches right? so do you have a poly in a poly in a poly??

#224557
Mar 5, 2012 at 8:39pm

It seems like there’s a top-level patch missing, but in general, running at 80% cpu, as reported by Max, is too high.

What are your vector sizes, as seen in the Audio Status window? Sample rate?

Do you have multiple threads running? (are you sending parallel and treadcount messages to poly~)

#224558
Mar 5, 2012 at 9:33pm

Thank you guys so much for your replies! I hooked up some print objects at the trouble spot that Liam pointed out, and that looks like it may be at least one of my problems!

Chris: My vector size is 512, and the sample rate is 44100. I’ve not sent a thread or parallel message to poly. (Embarassingly, it slipped my mind to even try this- I kind of built this patch by getting one thing working at a time and the duplicating it… :/ )

I’ve attached the top level patch, which is just a couple of detonates that trade back and forth, but it’s very possible that I’ve sent something somewhere to the wrong inlet! (I keep reading that poly~ is one of the most difficult concepts to get your head around, so I guess this is my personal version of the struggle! ;) ) I really appreciate your help and patience! :)

Best,
-Jesse

#224559
Mar 5, 2012 at 10:10pm

Oops! Signal vector is 64, also! Sorry- Forgot! :s

#224560
Mar 6, 2012 at 12:20am

Got it fixed! I had a >~ 0.99 where a < = 0.~ should have been! :( And then my thispoly~ needed to be woken up, cuz all the voices were starting on mute- Now my CPU is hovering around 8 - 10% :)

Thanks guys!

-Jesse

#224561
Mar 6, 2012 at 12:27am

There are various dependencies that preclude me from running this, but if I were you I would crank my I/O vector to 1024, and signal vector to 512 and see if the clicking went away.

#224562

You must be logged in to reply to this topic.