Messages to be sent to [thispatcher] are stored in a coll. [line] triggers them out of the coll, and the message is passed to [thispatcher]. This works fine. But as a smaller part of a larger patch, this crashes max every time. In the larger patch, [thispatcher] has a handful of other messages connecting to it, but none triggering simultaneously with the disconnect messages. Any advice on what how I’m making max angry.. ?
----------begin_max5_patcher---------- 747.3ocyWt0jZBCEG+Y7SQF1WsN4Dtnz9T+BzY5y633fPVMcffCD2Z6N628l KfqqKvhHR8gMqbLl7+7iykjWlXYuN6.svF8UziHKqWlXYoMoLXU9rkcZ3gnj vB8zrixRSobg8Ty2InGDZ6wrhnLNmFIPhsTDee5ZZNxr7kyUZKauHgJzqDtz 5SYbQA6uTkMfLqx7tPQzVFeypb4RZDXf5aQfuYbg5eD7LLZ4IqDOLUuR1eOm ElTsyrXssr0+5K.9D4v3UpAT1dcxD0vzNhh06EhLd8dGTZ0XR7mcTiOXuNju w9njqwKAWP4YNyUidP03wexI9h2f4Jb5ukK3GdoljEFqEbq9XCuAubWm3Gnb WW0fOtmueu0LQrkUn0NMudrPtPrXOU9WqQDdN5HBWcHggQWNXBpGLkFKBetR OO7Ckhdmahr+lZ3gepFo7XiEzxdP0TZQQ3F5GvpCpHJmsSfNoPhToORVhv5O 3H+vvDG1JrcHlpLDOMlmqKy.KtTZunVZSFPfQZ.XPEvHiDvvZDEDbU7Z9fwK Smmpk64v7i6sIJZXRZYpVfcnjlImELst75YMM+gqlVqvg7+ANd9WCbbGI3.i MbLmyAtJ3PFL3zTYHP1XRJuwnRCAqOY.f0kl8b6YkFxvUpogSMw3TDHk6Hc9 .B1jGQLGYzummOn9pLNCXrx8QGdvbnZhK4p5X44byawCeVKd73PLRf9.ny0Y bD.2OfE.25Dunrjj5wgaex4l1gbOGLXtNpoLcvLudcoEmO8v4wqjSTtsqBEh bl7pmlqsacjPV1TY6K8Zh0FzLshrZ8nqLc1s809jx96wcQ197nJZTdWSzadU LsPv3gBl79uuMGUo0SlzVVbLke5c8SYw6xjM.KpxDwJdAXSlH3b7oFtZQWEK zAwt3xz5Hnn42cJJ.FWIISCjMNaWSp5tinlNKltAN4OpZ5rsqdMAiKmBf6OM c110R7DLdwS2eXZw8mj75xatfqPRxGdcx+frSF06 -----------end_max5_patcher-----------
hard to say without seeing the entire patch (plus I am not an expert on thispatcher). however I would question the use if line in this example. since the time-grain of your line is 20 msec, each disconnect message is sent out multiple times… maybe you are getting things crossed from other parts of the patch?? try using counter or uzi and see if it improves stability. if you are hellbent on line put a change object in between line and coll or calculate the proper time-grain…
Good point about the grain time. If you connect the message box to [print] you can see that many messages are sent. Uzi works in principle, but i’m still crashing my patch sending the messages to [thispatcher]. i’ll look into my other issues…. Thank you for the quick advice !
I think I’ve traced the problem. Your [line] advice was entirely correct. Not only was I sending several duplicate messages, but one of the messages was impossible for thispatcher to execute. I was basically asking thispatcher to make a disconnection that didnt exist in the first place because of the format of a sprintf message. And the incorrect message was sent like 10 times… thanks for pointing me in the right direction !
[trigger] and [defer] might also help when you’re dealing with tons of commands sent very fast. sometimes you need a more explicit order-of-operations (trigger) when certain things take a bit of time, and sometimes you need to allow a command to wait a bit (defer) before executing. I’d imagine this is the case with lots of scripting messages.