Feature Request: Power Plan

Hey folks,

just a small feature request, which I imagine, can be implemented easily: I’d love to have the option to have Cantabile revert to a specific Windows Power Plan (i.e. Balanced) upon leaving the app. I always forget to switch it back manually.

Maybe, if there is already a solution to this, someone could point out to me how to do it.

Best Regards and a big Thanks to Brad for his work! Cantabile saved me a lot of time and trouble now. Developing software this close to the community is usually a thing of the past, but I appreciate it sooo much.

Hi Stw,

This can be done using bindings in the background rack. The binding target is the Execute Script choice. That said here is the procedure to set it up.

First open a DOS window and get a list of your available power plans so you can copy and paste the GUID numbers into the bindings when ready … e.g

As you see mine is set to balanced and all the available plans sure ID’d and listed so open Cantabile and open the background rack and put these 2 bindings in. The first binding set’s the power plan to HIGH so you would copy the GUID number for the HIGH plan from the DOS window into the clipboard

then you would add it to the DOS “powercfg /setactive” command in the target value for the binding.

next you would do the Balanced binding so you can switch back when you close Cantabile. You do the same procedure except you copy the Balanced GUID number …

and paste to the value of the binding

Hope this helps :grinning:

Cheers,

Dave

3 Likes

This only works for Cantabile Performer right? Because I don’t see any “On Load/Unload” Events.

I’m currently running the Solo Version, but it’s good to know that it can be done, I’ll keep it in mind. Thank you for the effort!

I found kind of a workaround. Setting the power plan to High on Startup is no problem, because this can already be done in the Cantabile Audio Engine Settings.

I used your script to bind the cmd line for Balanced to Key Press F1. When I close Cantabile now I press F1 then Escape and it works.

I still think it should be a checkbox in the settings though. Thank you again for the help. Didn’t know you can actually use cmd line in Cantabile, makes it even more flexible and opens up so many possibilities.

This software is quite the nugget, reminds me of the old days, when you had to take care of Windows basically by yourself. Good times… I guess :wink:

Hi Stw,

Sorry, bad picture from me! The balanced style binding would fire when the rack “unloaded” (when C3 shuts down) but if you have a fix you like use it. Every DAW I use it has to be set manually or with a script like this before starting the the host program so this was a nice helper anyway…

Cheers,

Dave

This option automatically sets and then restores the power plan whenever Cantabile’s audio engine starts/stops:

1 Like

Granted, when I start Cantabile switches to High Performance - works perfectly. But when I close Cantabile it doesn’t restore to Balanced (which was the active power plan before I started Cantabile in the first place). Maybe it’s just a issue with my Computers (because this behaviour is present on all 3 of them).

I just did some testing here and it seems to work fine. See this video.

If you’re not seeing that behaviour, can you send me a log file?

  1. Make sure Cantabile set to switch to high performance mode and close it
  2. Make sure Windows balanced plan selected
  3. Start Cantabile
  4. From Tools menu, choose Open Settings Folder
  5. Close Cantabile

From the folder opened in step 4, send me the files log.txt, log-previous.txt and settings.json

Brad

CantabilePowerPlan.zip (4.1 MB)

Hi Brad, thanks for checking this out. I sent the Files you requested and a short screencast of the issue.

Yet another easy button feature I missed! Great stuff @brad :wink: as usual I found another way that was complex :rofl:

Cheers,

Dave

1 Like

Hi @Stw

Thanks for sending that through. I had a look at the log files and it shows the plan switching when the engine starts:

00002933        1   [14564:2]:     CoreEngine - Switching to power plan 'Höchstleistung'

and reverting when stopped:

00028722        0   [14564:2]:   CoreEngine - Reverting power plan to 'Ausbalanciert'

However… neither log file covers the complete shut down of Cantabile so I can’t see what’s happening just before the app exists and can’t see the final revert. Which makes me wonder if something is actually crashing near the end of shutdown and not getting captured for some reason.

Can you please try two things:

  1. What happens if you just power cycle Cantabile audio engine with the power button at the top right (like in the video I posted). Does the power plan revert correctly when the audio engine is off?

  2. Go to Options -> Diagnostics, turn on the option “Log File Write-Through” and reproduce the steps to create a new log and send it through. (Don’t need another video).

Brad

I think you’re right, I just tried it with a different Song Setting and it worked. I believe it’s the UVI Workstation Plugin running Ravenscroft 275 that causes the crash, because if I try to manually delete the Plugin from the Routing View Cantabile crashes.

Deactivating the Audio Engine also switches the Power Plan to Balanced and back to High Power when activated just like you demonstrated in the video.

New Logs with the Write-Through box checked.

logs_new.zip (22.5 KB)

Hi @Stw

Yep, I agree - looks like UVIWorkstation is crashing which is causing the power plan not to get reverted.

Are you getting a crash report dialog for this? If so, have you sent the crashes through. Best bet is probably to get the crash reports sent to UVI so they can investigate. Are you running the latest version of UVI?

Brad

Mh haven’t checked the version in a long time, probably a good idea. I’m getting a crash report dialog, when restarting Cantabile after I closed it. Asks if I want to Load the last Song etc. I was wondering about that the longest time. Thank you for the clarification and investigating. I’ll try updating the Plugin, resetting the preset and see if the issue persists.

Cheers,
Stw

1 Like

Thanks, @dave_dore. I just stumbled on this - real nice workaround on my new Lenovo that does not expose the High Performance power plan. I normally included it in the shortcuts to Cantabile, but this is much smarter.

1 Like