Forums > MaxMSP

effeciency tips?

September 18, 2006 | 3:22 pm

Hi all,
I am after some pointers on how to make amy Max patches more effecient and therefore run smoother.
Currently I am reading some data from a number of text files and using that data to mainuplate some video footage. Each text object is being controlled by the same metro (have tried using multiple metros – no real difference) which triggers a counter which in turn causes the text object to step to the next line in the text file when the count = one of the variables in the text file. If I just run one of these metro/text combinations then everything runs reasonably smoothly, but as soon as I add more then everything starts to judder and stutter and the patch becomes unusable (all controls become sluggish and it takes an age to turn the patch off again).
I appreciate that using video and performing operations/manipulations can be fairly processor intensive, but without the text objects it all runs fine.

Spec: Win XP, 2.4Ghz, 768MB RAM.

Any tips for increasing the effeciency of Max in general would be greatly appreciated

Cheers


September 18, 2006 | 10:09 pm

Have you tried using the uvyv mode for the video objects, usually gives you some kind of performance boost, alternatively could do all the effects in the open GL world (depends how good your graphics card is- but means that all the video processing is done on your video card, which leaves your processor alone = lovely boost!)

Also if you are not using audio patchers all the time use mute~ to stop them using any processing when not in use.

Hope this helps
T


September 18, 2006 | 10:30 pm

Also, do not embed or hide GUI objects that self update if you do not
intend to use them in your actual user interface.

ie – having a hidden number or flonum will force the Max runtime to
manage what should be drawn, even if its hidden. Better to replace
with int and float respectively, and same for any other objects that
are logic, and not UI.

v a d e //

http://www.vade.info
abstrakt.vade.info

On Sep 18, 2006, at 6:10 PM, Tristram Cox wrote:

>
> Have you tried using the uvyv mode for the video objects, usually
> gives you some kind of performance boost, alternatively could do
> all the effects in the open GL world (depends how good your
> graphics card is- but means that all the video processing is done
> on your video card, which leaves your processor alone = lovely boost!)
>
> Also if you are not using audio patchers all the time use mute~ to
> stop them using any processing when not in use.
>
> Hope this helps
> T


September 19, 2006 | 8:22 am

Thanks for these, most useful. I’ll give them a try. One thing I did find that helped was rather than reading through a text file using the text object. It seems to be faster parsing the data into a coll object and then using that to step through instead.


September 19, 2006 | 10:47 am

Hi, sorry for hijacking this thread but, I’ve been building a step sequencer which is currently extremely inefficient.

At the moment it only deals with one instrument and the data is fed into 3 funbuffs and a coll, which are then stepped through by a counter.

Would it be more efficient instead to dump the data into one mtr or seq object instead? How would i be able to send messages to either of these objects that could delete and insert messages whilst playing back?

more details in another post: http://www.cycling74.com/forums/index.php?t=msg&th=21830&start=0&rid=4392&S=659d89f486adca6507ac40dea2ddc3e6

Any help much appreciated!
cheers

————————
2.4GHz Celeron, 512Mb


September 19, 2006 | 11:21 am


September 20, 2006 | 8:38 am

Investigation yesterday led me to the conclusion that my patches’ inefficiency was due to

1. refreshing th jsui window too frequently (every clock tick)
2. large amounts of low priority data being sent out en bloc, at the expense of maintaining rigid timing.

How can you deal with message priority within javascript and max? How is this usually dealt with in programming terms? (i’m no coder….)

Cheers
Tom


September 20, 2006 | 1:05 pm

Quote: mathsieve wrote on Wed, 20 September 2006 02:38
—————————————————-
> Investigation yesterday led me to the conclusion that my patches’ inefficiency was due to
>
> 1. refreshing th jsui window too frequently (every clock tick)
> 2. large amounts of low priority data being sent out en bloc, at the expense of maintaining rigid timing.
>
> How can you deal with message priority within javascript and max? How is this usually dealt with in programming terms? (i’m no coder….)
>
> Cheers
> Tom
—————————————————-
defer, deferlow, qball.
isn’t there a js command for putting it high priority thread?
to my finding, jsui is a real hog, i try to avoid it.


September 20, 2006 | 2:49 pm

cheers for that, i will have a go with defer and deferlow. I guess that actually i need to use a speedlim or qlim at some point when my gui has to send out a load of (low priority) messages to the colls/funbuffs.
i find that manipulating arrays etc is so much easier in js that i mainly use it for that. perhaps i should learn how to port this into mxj… i think learning C is still a step beyond.
cheers
tom


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