The Magic Mirror
A haunted artifact brought to you by ImaginEERIEing.
Version 2.1

What I ask of you

You may use this digital puppet freely for your own haunts, with the following conditions:

1)  Please don't redistribute this program.  Instead, link to the original page at:
       http://homepage.mac.com/nephilim/imagineerieing

2)  Send me a link to a photo or, preferably, a link to a QuickTime movie of it in use at your haunt, and tell me how it worked out for you!  I'd love to hear your stories.  Send links to nephilim@mac.com.

3)  The Magic Mirror may be used freely for home haunts.  If you want to use the magic mirror for a commercial haunt, please contact me.  I'd be happy to work out a deal with you which would probably consist of free admission to your haunt (if I'm within easy travelling distance) or some video footage (if I'm not), and a credit somewhere in your haunt.  We could probably also change the face to suit the particular character of your haunt given enough notice.


How to control the Mirror

The Magic Mirror is designed to be run with your monitor set to 640x480 resolution.  At this size, it will fill your monitor screen.  For maximum effect, set the Mirror to "portrait" mode, and turn your monitor on its side.

In its default configuration, these keys control the Magic Mirror:

	A:		Change to 'asleep' face
	S:		Change to 'solemn' face
	D:		Change to 'angry' face
	F:		Change to 'happy' face
	Option:	Open the mouth (will stay open as long as you hold it down)
	N:		Display 'No costume No candy' sign

Using your microphone to control the Mirror

You can also use your microphone or other audio input to control the mouth motion of the Magic Mirror.  To do this, follow the directions below to turn on 'microphone_input' and set the 'microphone_sensitivity'.  Once you have these set, re-launch the Magic Mirror, and speak into your microphone (or play your CD, or whatever - use your standard OS controls to determine the sound input).  The mirror should move his mouth to the audio.

Often, the microphone sensitivity needs adjustment.  You can call up a console to dynamically adjust the sensitivity on-site.  In the default configuration, these controls are used to interact with the microphone console:

	\:		Toggle display of the microphone console.
	[:		Lower the volume threshold where the Mirror opens his mouth.
	]:		Raise the volume threshold where the Mirror opens his mouth.

The console displays the current volume input level, and the threshold you've currently defined.  By adjusting this while testing your audio, you should be able to get to a point where the mouth stays closed except when you're talking.

Note:  It is not recommended to use the Mirror in this fashion, but this feature was added by popular demand.  The volume waveform generally does not map cleanly onto how you'd want the Mirror mouth to open, and that's before you deal with ambient noise (from, say, excited trick-or-treaters!) or phonemes like "mmmm" which produce sound but would not normally cause the mouth to open.  Be sure to experiment with manual control before settling on microphone control - you get much better results with manual control.

If you do decide to use microphone control, here are some tricks you can use to maximize the performance of your Mirror when using microphone input:

	¥  Use the console each time you launch your Mirror, and re-calibrate if the noise level at your attraction changes.
	¥  Set the threshold just barely above where the ambient noise sits.  Have someone emulate trick-or-treater noise nearby to ensure that the mouth doesn't start opening when the kids talk.
	¥  Speak in long, emphatic tones, and avoid "hmm"s and "ooo"s.
	¥  Do everything you can to dampen extraneous noise.  Use a headset microphone so that your voice is very close to the microphone - the further away it is, the closer your voice will be to ambient noise, and therefore, the more likely you'll get false mouth openings and closings.
	¥  Practice!  Practice!  Practice!  Especially if you're going to be in a position where you cannot see the puppet.

Customizing the Mirror

When you first run the Magic Mirror, it will create a preferences file called "MAG_MIR.TXT" for you in the same directory as the Magic Mirror.  By editing this text file, you can customize how the mirror works.

You should be able to edit the file with any text editor, as long as it can save back into raw text format (in particular, don't save it as Microsoft Word!).  Quit the Magic Mirror before editing it.  For the most part, the options are either explained or are self-explanatory.

The simplest things to do is to change the control keys to ones which are more convenient for your own use.  For instance, suppose you wanted to control the Magic Mirror's mouth with the Shift key instead of the Option key (Windows users will want to turn off Sticky Keys if they do this).  All you need to do is open the preferences file, change "key_open_mouth option" to "key_open_mouth shift", save the file, and launch the Magic Mirror again.

You can also change the orientation of the Magic Mirror on the screen between "portrait" and "landscape".  "Landscape" is the default behavior.  "Portrait" gives you a larger mask face, but requires you to turn your monitor on its side.

Automating the Mirror

You can also "train" your Mirror to do performances without a puppeteer.  This will take some experimentation and patience on your part, but I tried to make it pretty easy.

The first thing you need is a sound file for the Mirror to work against.  It needs to be in a file format that QuickTime understands.  Place it in the same folder as the Magic Mirror, and edit the preferences file to set the "audiofile" option to the name of the file you just put in there.  Be sure to include the three-letter file extension (Windows users may have to right-click the file and look at the properties to see it).

This defines an audio file that the Mirror will load in when it starts up.  Once it is loading correctly, it can be used to automate your performance.

To record a performance, edit the preferences file, and choose keys for the "key_record_sequence" and "key_play_sequence" keys.

In the Magic Mirror program, press the key you defined to record a sequence, and the audio file will begin playing.  Act out the performance with the keys as if it were a live performance.  At the end of the sound file, it will automatically save your performance (replacing any performance that was previously saved).

You can view your performance using the key you defined to play a sequence.  If you decide to manually trigger your performance, you can stop now, and just trigger your saved performance with that key.  (It's a good idea to go back and redefine the record sequence key to "none" so you don't accidentally save over your performance.)

However, if you want to leave the Mirror unattended, go back and edit the preference file again once you have your performance recorded.  Change the "unattended" option to a number greater than -1.  (A value of -1 is normal operation, and any other number is "unattended" mode.)  The next time you launch the Magic Mirror, it will automatically play the sound file over and over again, waiting a number of seconds in between equal to the number you entered for the "unattended" option.  (In other words, if you changed "unattended" to five, it would wait five seconds before playing the audio file again.)

System Requirements

The Magic Mirror has only been tested on a snow iMac (256MB, 500MHz PowerPC G3, RAGE 128 Pro).  Your mileage may vary, but it should run fine on any newer Mac or PC.  The software is provided as-is.  Use it at your own risk.  If the Magic Mirror banishes the only copy of your dissertation to the shadownet, well, that's what you get for dabbling with dark powers, occult artifacts, and untested software all at the same time.
