Control Freak is a Windows program that loves to control things. It started as a utility to translate midi signals to ASCII keystrokes but decided it wanted more out of life, so now it can be controlled by all sorts of things in addition to midi and it can do all sorts of things in addition to sending ASCII keystrokes. For example it can make your joystick into a keyboard or a music player, or it can shut your computer down over the web. It doesn't install any DLL's or anything like that so it should play nice with everyone's computers.
This is in definite beta so please let me know how it works for you, especially if it crashes. And feel free to let me know any features you'd like added.
Programming Control Freak
You tell Control Freak which inputs you want it to listen to using the buttons at the bottom of its window. For example, if you want it to listen to the joystick, you'd click the Joystick button to turn joystick listening on. The button should turn red, meaning Windows successfully initialized the joystick. If there's some error initializing the device, it'll show in the main status window. Now when you click a button on the joystick you should see the event register in the "Last Event" area at the top of Control Freak's main window. To set an action for that event you'd click the "program this event" button and choose whatever you'd like.
Simple as that.
Events (things Control Freak can react to)
Keyboard keystrokes (including multimedia keys, the numpad, etc.)
Mouse events (clicks, mouse wheels)
Joystick (buttons, stick motion)
Midi (midi keyboards, etc.)
GUI Button Panel
Web interface (for triggering from other puters)
Infrared remote controlls (if you have a usb-uirt)
Actions (things Control Freak can do)
Open files (play song, movie, whatever)
Choose random song from directory
Choose random movie from directory
Speak some text
Control lights and appliances via X10
Play College and Community Radio
Control Windows (reboot, open CD tray, turn off monitors, etc)
Control Freak Events
These are the current interfaces that Control Freak listens to. You can enable/disable them using the buttons at the bottom of the screen. And you can erase the programming for an event by going to the "program this event" window and selecting "do nothing" for the event. Note that under Preferences you can also set "Beep with each event" if you want Control Freak to beep whenever it hears something. And you can uncheck "Show unprogrammed actions" if you don't want it to report every action it sees in the main message window, which is pretty handy when it wants to write a message about every keystroke it hears...
Control Freak should work with any joystick, even old crappy ones from the thriftshop. Remember to let Windows know you have the joystick installed by going to Control Panel --> Game Controllers. If Control Freak always thinks the joystick is moving even when it isn't, you might want to calibrate it by going to Control Panel --> Game Controllers --> Properties --> Settings --> Calibrate.
There's a lot of great midi controllers out there. I picked up an M-Audio MidiAir25, which is a wireless midi keyboard, works great. I have it at my desk controlling Winamp. When you click the Midi button to start monitoring midi devices, it'll prompt you to choose a midi device. Of all the inputs in ControlFreak, this appears to be the most temperamental. If you get a crash when opening your midi device, please let me know.
Nice feature: doesn't take exclusive control of your midi device, so you can still use it control Ableton Live or whatever, even while it controls Control Freak.
And note under preferences the option "flush midi at start": that attempts to clear the midi buffer so you don't get a crapload of midi signals when it first initializes your midi device. Experiemental, let me know if it gives you problems.
Obviously, you can use keystrokes to control Control Freak. But there's a couple of great little features here. First off, when you're programming a keystroke, note the "block this key from reaching Windows" checkbox: that makes it so the key is blocked by Control Freak and won't reach whatever application has focus. And second, note that Control Freak doesn't need to have focus to react to keystrokes.
Personally I never ever use the numpad, so with Control Freak I can turn any keyboard into a multimedia keyboard. When I have numlock activated my numpad is a set of shortcuts to my favorite Shoutcasts, and when numlock is off my numpad controls the lights in my office.
I'm not sure how well Control Freak works with multimedia keyboards since these appear to all send different types of signals, but so far so good. You're welcome to let me know how it works with yours...
And one note about the keyboard: Control Freak sets a "hook" so it can get as much info as possible about the keystrokes, and so it can block keystrokes. It can only do that when you first start the program, so you'll need to restart Control Freak when you turn keyboard listening on and off. And note also that Control Freak has trouble sending keystrokes when keyboard monitoring is on, so if you're going to be sending lots of keystrokes, turn keyboard monitoring off.
Control Freak can read all mouse gestures, but for now I only have it reacting to the mouse wheel, right-click, and center-click. In my opinion the mouse wheel control is worth the proverbial price of admission alone, since you can use it as a volume knob, etc.
I'd like to add mouse movement programming too. For example maybe it can send different midi notes depending on where the mouse is, so you can use any mouse as a midi controller....
As with the keyboard, you need to restart Control Freak when you enable/disable mouse listening. I know, life's tough.
ControlFreak has a graphical button panel styled after a classic jukebox interface that you can use to control things by clicking on graphical buttons. This works really well with touchscreens, for example. You can launch and control the button panel with the View menu at the top of the ControlFreak gui. Note that you can label each of the 3 lines on each button in the "program this button" interface.
One problem is that if the button panel is fullscreen, you can't program its action. Solve this by running the button panel in a non fullscreen window to program it, and fullscreen when you're ready to use it. For now, if you're using it fullscreen on monitor 1, you'll have to use alt-tab to return to the ControlFreak interface. Sometimes life is so cruel.
And if you'd like you can change the look of this panel by editing the graphical assets in c:\controlfreak\assets.
By default the webserver runs on port 80. To test it you can always use localhost (clicking that should register an event in Control Freak). To send a command from your computer or one on your LAN or over the internet, you'd type http://yourcomputer/?commandname. For example, if your computer's name is yada and you're on the same network and your firewall isn't blocking port 80, you'd type http://yada/?commandname. Note that there isn't any ".com" when accessing it this way.
If you're accessing the webserver over the internet or from a computer that isn't resolving your computer's name to an IP address, you'd use the IP#. Something like http://192.168.1.200/?commandname.
As far as the command name, that can be anything you'd like. Control Freak doesn't care what the command is, and after you send it one you'll see the command appear in the "last command" area of the Control Freak interface, and you can click "program this event" to set some action for it.
If you installed to the default location, there's a file called c:\controlfreak\cli.exe that lets you control ControlFreak from commandline. For example, you could run "c:\controlfreak\cli.exe whatever", and, if ControlFreak was listening to the commandline interface (i.e., if you have "commandline" clicked in the gui), it'll send the event "whatever" to ControlFreak, and you can then program it to do your bidding. Note that this file actually writes a text file to c:\controlfreak\utils\temp\cli.txt, so if you want to control ControlFreak from another program, you can control it that way too.
There's a handy dandy device called the USB-UIRT that lets your computer receive signals from almost any infrared remote control. I use it in our projector room, I press one button on the remote to launch a random Simpsons, another button to launch a random movie, another is a random Southpark. Eventually I'd like to add the ability to transmit IR signals as well. And add support for other IR receivers too, such as the popular IRMan.
This is all the things Control Freak can do when it receives any of the above inputs. Note that you can go to Preferences and uncheck "React to Events" to get Control Freak to stop doing these actions. And if you ever want to erase all the events you've programmed for Control Freak, just delete configuration.txt in the Control Freak directory.
Control Freak can send keystrokes when it receives a signal from any of the above inputs. For example, it can send a "j" key when you move the joystick up.It can also send a series of keystrokes, special characters like the enter key, key combinations and pauses. See the keystroke codes file for much more info on this. I'd like to make it so Control Freak can send a specific window/application the keystroke...
You can run any program, with or without commandline parameters. I'll start building a list of commandline programs that add lots o new features.
This opens a song or movie in the default player for that file type.
I love this feature: it goes to the directory you tell it to and picks a song at random. Searches subfolders too.
Same as above, but with movies.
Speaks some text using the default voice set in the Windows Control Panel --> Speech. Coming soon: ability to specify different voices, I hope.
Uses an X10 firecracker to control lights. Ok I admit this feature isn't working yet, but it will be, gremlins willing.
One of the handiest things about Control Freak is how well it controls Winamp. I use an old crappy thriftshop joystick to control volume (joystick up/down), skip songs (left/right), and choosing random songs (fire button). for this: up/down is volume, left/right is forward and backward in the playlist, and fire is choose a random song.
One feature that probably needs some extra documentation is the "seek to current time in file". That grabs the current position from Winamp and, you tell it what file you'd like to play. For example you could use that feature to bookmark your position in a book on tape, or for a poor man's sampler.
For some reason this isn't working yet, but it should be soon.
I heart college and community radio, and one of my other projects is goodradio.org, which is a database of college and community radio stations. ControlFreak plays nice with goodradio.org when you choose the action "Winamp Play Specific File or Shoutcast", and point it to the station you want to play. For example, to play wfmu, you'd point it to http://goodradio.org/wfmu. You can see what stations are avaialble by going to the database overview at goodradio.org.
Control Freak can do a bunch of things to Windows: it can shut it down, reboot, log-off, hibernate, go to standby. One coolio feature is it can turn off the monitors. And it can eject and close the CD tray. And fair warning: it's reboot is a forceful reboot, meaning it doesn't wait for programs to close gracefully. That can be a good thing if you're trying to reboot the computer and don't want to deal with any annoying "would you like to save this file" dialogs, but it can be bad if you meant ot save that file, so use with caution.
And yes I know I need to add Windows volume up/down/mute.
There's probably a lot wrong with Control Freak, but here's a few things that I know about it:
- iTunes control is broken. It works great when I run it from Python source, but for some reason when I compile it all hell breaks loose. Don't try to control iTunes, it crashes hard. Should be fixed soon.
- It crashes when initializing some midi devices. I'm trying to see what the pattern is here, so let me know if yours crashes. Note that I haven't found any devices that it flat-out doesn't work with, I just need to choose a different device name.
- If you're monitoring the keyboard, sending keystrokes doesn't work very well. That's because Control Freak sets a keyboard hook, and it doesn't play nice at all with the way it's sending keystrokes. If you need to send lots of keystrokes, definitely disable keyboard monitoring. The only way I can see to solve this issue is to use a different method to monitor the keyboard, and it wouldn't let me use multimedia keys, wouldn't let me distinguish between numpad and the rest of the keyboard, and wouldn't let me block keys.