-- The purpose of this macro is to enable a "graceful" shutdown of the software. When you enable the "Run" pin for this script, it will fade out all of the mix masters (regardless of how many mixes you have on your host) simultaneously, and then shutdown the engine when the fade is complete. This example is meant to work with the "Graceful" Startup macro, which will create a startup macro that will gracefully fade in all of your mixes after selecting specific media.
-- Determine how many mixes exist on the host
mixCount = HippoNet.LocalHost.Engine.MixCount
-- Iterate through the mixes and fade them all out in one second