MulchNote: Arranging for AudioMulch to play a predefined document when windows starts

Author: Ross Bencina
Last modified: 15th October, 2001

Introduction

Sometimes it is necessary to configure a computer to perform a specific task when it is turned on without any user interaction. This may be useful for a gallery exhibit or installation for example. This MulchNote describes how to set up a Windows computer to play a specific AudioMulch document when the computer starts. Note that it is usually necessary to perform additional configuration steps to make a computer perform optimally in a "turnkey" environment - these steps are not discussed here.

Getting Windows to Launch Programs When it Starts

A quick search of the Internet for the keywords "Windows autostart" will yield a number of web pages describing the many ways in which you can ask Windows to launch another program when it starts. One such method is to place the program, or a shortcut to it, in the C:\Windows\Start Menu\Programs\StartUp folder. This is the method employed below, however most of the information supplied is equally relevant to other techniques such as those employing batch files or registry entries.

Using Command Line Parameters to Change AudioMulch's Startup Behavior

Usually when AudioMulch is launched it will open with an empty untitled document without audio or the clock enabled. A newly created shortcut to mulch.exe will behave in the same way. For a stand alone installation AudioMulch will be required to open with a specific document loaded, with real-time audio enabled, and possibly with the clock and MIDI control and/or sync enabled too. This can be achieved by passing additional parameters to AudioMulch when it starts. There is a topic in the "User Reference" section of the AudioMulch help file entitled "Command Line Parameters" which describes the parameters that can be passed to mulch.exe to effect it's initial behaviour. For example, the /a command line flag enables real-time audio, and the /p flag (p for play) enables the clock. There are also flags for enabling MIDI controllers and MIDI sync. It is also possible to pass a command line parameter to mulch.exe which instructs it to open with an existing AudioMulch document.

Creating an Autostart Shortcut for AudioMulch

One method of creating a shortcut to mulch.exe is by right-clicking on the mulch.exe icon and selecting "Create shortcut" from the context menu. Once this shortcut has been created it should be edited to include the previously mentioned command line parameters which open an existing document and start audio, clock, MIDI control, and MIDI sync as required. The shortcut can be edited by right-clicking on it and selecting "Properties" from the context menu. The "Target" field in the Shortcut Properties dialog can be edited to add the required command line parameters. For example, using a standard install of AudioMulch 0.9b8, a shortcut which opens AudioMulch and loads the technoAutomation example document with audio and clock enabled would have the following Target property:

"C:\Program Files\AudioMulch 0.9b8\mulch.exe" /a /p "c:\Program Files\AudioMulch 0.9b8\Examples\technoAutomation.amh"

Placing this shortcut in the C:\Windows\Start Menu\Programs\StartUp folder will cause AudioMulch to load and play the technoAutomation document every time Windows starts.

Known Issues

There are two known issues associated with this technique. Firstly, it requires a registered version of AudioMulch, as unregistered version of AudioMulch display a warning message at startup which asks the user to click OK before continuing. Secondly, depending on the method used to shut down Windows, AudioMulch may prompt the user to save changes to the existing document when it is closed. Usually this occurs when Automation or MIDI controllers have been used. The recommended workaround for the first issue is to purchase an AudioMulch Shareware license for the installation. A partial workaround for the second issue is to power down the computer manually using the power switch rather than relying on software based shut down methods. Future versions of AudioMulch may provide a more elegant solution to the second issue.