Forums > MaxMSP

Macintosh Sleep and Wake report….

October 28, 2009 | 11:28 pm

Hi list,

I was hoping to find a simple way to report within Max if my MacMini is asleep or awake.

Here’s my situation: I am running an installation that uses a camera input (jit.qt.grab) to drive the patch. It works great until the computer goes to sleep – when the computer wakes up again I am not getting any signal from the camera. If there was a way to report in Max that it had awoke, then I could reset the camera.

I’ve considered trying to use the shell or aka.power objects to control the sleep mode and coordinate that with the jit.qt.grab reset, but was hoping for a simpler solution. Gestalt perhaps?

Thanks for any/all help.

Bart


October 29, 2009 | 1:43 am

It might be easier to set the sleep time to "never" from the energy saver menu in system preferences. Is there a reason you don’t want to do this?

lh


October 30, 2009 | 3:11 pm

Thanks, I have it set up to "never" sleep now, but it’s an installation that will be running 24/7 for a month, so I was hoping to set it to sleep when the gallery is closed for the weekends.


October 31, 2009 | 1:20 am

The "schedule" button in the same menu?

lh


November 12, 2009 | 12:26 pm

Have a look at my wakemess object in the St.ools…

or paste this:

– Pasted Max Patch, click to expand. –

November 12, 2009 | 1:10 pm
Quote:
Thanks, I have it set up to "never" sleep now, but it’s an installation that will be running 24/7 for a month, so I was hoping to set it to sleep when the gallery is closed for the weekends.

I don’t think you need to give the computer a break. The OS has been designed to be running all the time. However, because of possible memory leaks I think it would be ok to restart the application every now and then. What I have good experiences with is to ask the staff to take the power cord out in the evening, plug it in the morning and enable "restart after power failure" and put your app in the startup items.


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