improving a patch which fires quickly integers sequences

Learn about building and using Max for Live devices.
Post Reply
julienb
Posts: 1816
Joined: Sat Oct 29, 2005 1:15 pm
Location: France
Contact:

improving a patch which fires quickly integers sequences

Post by julienb » Sun Jan 31, 2010 12:13 pm

hello,

any ideas for optimizing this patch?

Code: Select all

----------begin_max5_patcher----------
980.3oc2X1zaaBCFG+bpT+NfP6vdIsBa.iY2l1ocY6vj1kopIRvMkofIhWzx
Z09tOvFZLMIEGxiSUykPdLu8++Ore7i8CWdwD6YYqYE1Vez5mVSl7PcKSDs0
zxjtFlXmFsd9xnBwEZyY+Ia1usm1dtR15RQ6kVyrRdr4ay3k7nTl3T+fkGGw
id7jYUkKYkk+cES9psmEwWXO0xNgW+rto6xRhE2c8a6J2fdO4hj6E2JBcsSW
67pzDd8iUnRTWqqhJmeWBewuxYyKkuMh+09SsPNN02qkKtI.W++Mu25mjTgh
GEVz5+t7hli0Gldzj5CMu7cSpOkmDsb+bZu7A4P2Mfb1CfvOCfnAMLwyUBHR
yuH59AD50AfBAGPNAmU.h.MfbodmU.J.b.QPmU.xGb.4ROq.jG3.B4aZ.kxJ
JhVv1lP3Qxm8AGLbvocJ91YvDYgPjSauGB78dPP26AG9hk+IAX3.dpGrWnfM
nWfTO.yFvq7AGHnhjPmV17LqxX.9L3ZLvNGFmPCyIY14g4D9UEmnvwo1D09x
BEcN8bp59DKxQwog4UH3SrE5J5WMXtIWv40pb1JFO1J61aKXk.N+enKb8ppq
DUoaU.8zmlhsdUt0aeSBx5JKz6rd+H6isGTEBOpji8jKXyLnRnmC0papIrmi
bFbHhmvOX+te2qe5ZddVZJiK+5MuJOu9+eOiu3qUoyX41i10xWk8t1RK6QNq
huCUOu4rKu84Md6K7X15uUUtpp7oFT9HsWlv2Z6AE5p4DOw1EYU4y69Z1MOg
kh3hYEkI7nxjLt5UE1+ptKINlw6I+zj3UY0oWaURfv3n.4f6MAV2r+uRZKZw
1fLrpEamzgI6PwtE44faNnD.jrC0S1zQJaLQQ1XBXx1WOYGLNY65GrQ1h.fj
cfdxlLRYSQJxtI.HY6omr8GorccUjcS.PxFomr8ForcBUjcS.LxVyQjnwo51
0tqD.DrwZk0lNxr1dAJYs8fZ.YyR2zf0ireMVtCRJAvfZ8x8MxIZvDkTeh.3
HMRKQiNDQivpnVMBFYS0R19GproDkZQ7QaEf8jWfLEiHBF+z.X7fiRcFYeGj
RhbQ.HhtYIdlnfPDxjUDFpUd7m5M8UsubWOTh.Q1tZVhBdjIxwNJvFCppGbb
Z3A2EgREqxUVEaGqAqLVslxzMXbjlP1.ZB4jVbh6QUZR.dq.uPekkQD5eZqP
z8npOT5fdAFyNdlzNxpzasiZfwriuIsibIds1QMvX1Ivj1gpLboWfwrCwf1o
c6NZcPu.SYGSlYqcaPjaSZ+.SYGpIsir1CkfsDcSC0G9OrtGmxA
-----------end_max5_patcher-----------
Julien Bayle
____________________________________________________________________________________________________

art + teaching/consulting
ableton certified trainer
____________________________________________________________________________________________________

jayemell
Posts: 95
Joined: Wed Nov 18, 2009 6:05 pm

Re: improving a patch which fires quickly integers sequences

Post by jayemell » Sun Jan 31, 2010 6:22 pm

do you need to always change the value of the incoming number?
if not, just use an initialization as such and store it for recall (bang it out from a list or coll).

other than that, i have no idea what you are attempting to do with this, so i can't be of more assistance.

jml

ring (Simon Slowik)
Posts: 121
Joined: Fri Oct 30, 2009 3:35 pm

Re: improving a patch which fires quickly integers sequences

Post by ring (Simon Slowik) » Sun Jan 31, 2010 6:26 pm

why optimizing it? It contains mostly "+"-boxes that need almost no cpu.

If you want though you could use javascript. I don't think that you can ease the patch very much.

jayemell
Posts: 95
Joined: Wed Nov 18, 2009 6:05 pm

Re: improving a patch which fires quickly integers sequences

Post by jayemell » Sun Jan 31, 2010 6:38 pm

FWIW, pushing somthing like this into JS will _not_ optimize in any way.
The only advantage is that it might feel more clean, but it will not offer you any significant performance improvement.

julienb
Posts: 1816
Joined: Sat Oct 29, 2005 1:15 pm
Location: France
Contact:

Re: improving a patch which fires quickly integers sequences

Post by julienb » Sun Jan 31, 2010 6:50 pm

okay, you just confirmed what I thought :)

thanks for your opinion/advice!!
Julien Bayle
____________________________________________________________________________________________________

art + teaching/consulting
ableton certified trainer
____________________________________________________________________________________________________

jayemell
Posts: 95
Joined: Wed Nov 18, 2009 6:05 pm

Re: improving a patch which fires quickly integers sequences

Post by jayemell » Sun Jan 31, 2010 7:04 pm

JS operates almost exclusively at a lower priority than the high-priority scheduler thread.
JSUI is drawn at low priority only.

You can push items into the high priority queue from JS if you use a Task() object. This is the only option that I know of.
I would not recommend using Task objects for your use case, as you seem to want (although I'm just guessing here; you haven't offered much information on what your intention is) a multi-functional patch that would integrate into other patch modules.

For example, you could poll the values with a metro, which has more features and is easier to spot on a max level.
There are cases where I use Task objects, but they are usually specific to some exclusively JS-based function set where I need some things to operate at low priority and some that can be more immediate.

Hope this helps,
jml

Post Reply