Looping for set time amount
This may have been answered (I’m brand new to this program). Is there a way to run a loop for a set amount of time so the loop turns itself off? I am setting up a sound installation that needs to run for 30 minutes based on a single sound. I may not be able to be there to turn it off and want a way for the loop to shut itself off so the people running the installation wont have to do it themselves.
There is probably a better way, but this works.
----------begin_max5_patcher---------- 857.3oc0XstaZCCE92vSgU1e1jXU9Rtto8i8BrWfooJCwPSUvNJ1zQaU2y97 EBMskDBYoQYRfM1bb7246bwGmGmOyaoXOS5A9B3mfYydb9rY1oLSL6v3Ydao 6WkSkVw7VI1tkwUdKb+mhsWYmODB1CHPv2.nXHD7Q8O2lw2oXxOUIaAUs5lL 9lqKYqTt8DkfuBt3XWLzzg0sfecXQqEbkL6AlQdjQJ2zYo1cUr71Oi88pIKm t0Jq22Kyn4U+CemFL4LkUGPOOoXmpZ1pm75xMKsiuBZl3o4yMMK5H8vY+Vio 2vN4BZ5VlTBxEhB.57LBNjX5hBs7RTCDRxI4CbO4CGYntuf4fhm2wM8kTEpG DC6gT5p+zhhGYTF.I12z4GT0dDB00PzI0C7osq8.rJwlM4r1rRjvqvAZyjeT kG6q7aqCWXqzdAsTaiTrxqYb5xbVcmw2XRxzgdCnUwtusYUzQjZ0jPrVEW3I hbZ0DEdYdWq0AECrxHkzMr2D7A6hgDaC6HXi5hhunDPnKMATkiZQISpykRUY BdcL4aYaLwF7COzbDPuqgoMwgskxJ1EC7uvfjdxfuqbQC4xkqKxo2e9fFbhM EteRONSCgFJBQlsgaVCvaIkuoI5oZ4R5cUK7C+vrniJqlZ0lU8GLLIz3Q5lw 6q5G4.xsrba8CsFw5Wqjgfv9vtvghcsb5hlc6vCK0zJuDEX75bmeR5Csj7eJ qb9bSGbV5EqDOkYkFSWGE1Bo3BZPtt.2g5WVB6noX95yV0lyYv2p1DTU6opk IXxVwVCwAZ3TJ.HXqoNc5uKCQDpGwBjAMV38mUVI1w0loymev39q4DRet94E xIAs4nb3PUy2V7a7GvLEhBF+7kx3tMJIpGoJPAiYtBqHd4Y7W+VMr5lY9WxQ RwtxUUaPUsAfm0uTlTkwsUnWWH+WHzMYooLd8r.oYRShgzlu.ZWwCtKvANdv oS3AMZ34Ua0owi48E.PSL7LR1K3Dyd42E9Y77mM27bRgmt3+XdSKiEdBlV9O wcANjQCNIcw6QKCdTPSWrUISpSthmTnIZzNlfzQ+F3jwuouwTtBxnEE2wJkG djVfnKO8VQoYX3B6vLtan8VVdkr6xpjmXmgVpKNUoqLcWoqDx8g9dyM6ySy+ KP2PUn. -----------end_max5_patcher-----------
That worked great. Thank you very much!
The principle you want to be aware of is scheduling an event to happen at some time in the future. That’s what Max excels at. Mike’s solution continually schedules events 1 second in the future, counts them, and reports when 1800 of them have occurred. But that means lots of scheduling and testing, and you know that 1799 of the tests will have a negative result. If you know in advance the point in time when you want something to happen, you can simply schedule that one event. The delay object is fine for that (or the timepoint object if you’re working in transport-based time).
----------begin_max5_patcher---------- 432.3ocwTtraCBCDEcM7UX40oQg2ztqeGUUUFXJwQfMx1jlzn7uWaCjGMOTZ KJkEV3qMdtyYF7FWGbFeEHwnmPufbb1353XkLBN8ycv0jU4UDoca3bdcMvT3 IcqofUpNcBKGpPzcq7tnLyrxroyFT3Lkj9IXT872IyZqorJPYOeu8h7V0f5v VaHp74TV4aBHW04Zuf.8Ig7CMiQQ120gD8Z+mPKr1ims3A+X7ANgQpsNA+rf RpvlE155ZFl7GQgLeNTzVA2eXDGtmEwoWkEgiKKpAojTBmvhLBqD+CRY+dwt 7UstA5xLLdWVbLM7tLMRMzFEZGCRLidommFI2GXHU7l+KX3EFd.MBtFMhFWZ vfOzm5Ivn.pHq0dXl4YTnhsW621ljXhFJ8wq8SSvsAF6mhqnrueypM3F8iok j2JxGRh9B.ZuAJ.ohxHJJmcvdBNZOyoEE.6vaGpoEMbJS0aAunfoQSLWPDYy x922GDpjjUA1bc1YKx2p4SFAyeI2zQVRSyRPH6ORqQzcbK3Byz3I1oTV2Tac GKfkzg8GXUHBcafR2CzJ5phqRi00Pcb159EyJ.Jg -----------end_max5_patcher-----------
I knew there was a better way! Thanks Christopher for helping me think from the "schedular’s" perspective.
Your welcome ShawnT, hope the installation goes swimmingly.
Thank you Christopher and Mike! I am testing out the delay feature now (need to be certain over 30 minutes not just the 5 seconds I tried first) though I am sure it will work. Mike your option was also very effective thank you. The trick with this installation is that I may not be able to be there so I have to design it to be idiot proof and to turn off when the time is up.