Visual Studio C++ Windows Programs

These are some of the Windows software programs I have written over the last few years.

***WARNING*** These programs are located on the hard drive of a computer either at work or home. The advantage of this is that I don't have to upload new executables and source code everytime I make a minor change. The only catch is that occasionally I will be in the middle of working on a program, so you might accidentally download a non-working version.

Key

Links:

  • exe --> the executable
  • src --> the source code
  • lib --> requires one or more items from _Lib in to compile
  • dev --> requires one or more items from Devices to compile.
  • dll --> requires the specified dll(s) to run the executable
  • txt --> requires a specified text/io file.
  • doc --> documentation.

------------------------------

Directory structure:

  • Root Folder
    • Common-vs8
      • _Lib
      • Devices
    • ProjectFolder (ex: MovieMonitor or FractAlgs)
***All code uses Visual Studio 8 unless indicated otherwise***


MovieMonitor [exe][src][lib][alcohol][bsplayer]: I have some DVDs with movies on them and many of the movies were in two or three part avi's or cd images. I needed a way to simplify the process of grouping movie sections together and mounting images if necessary when a DVD full of movies is inserted. MovieMonitor automatically does all this for me... so all i have to do is insert the DVD disk and pick a movie. MovieMonitor detects the movies, groups them, mounts the images with Alcohol 120%, creates a playlist, and starts playing the first one with BSPlayer. You need to do two things for MovieMonitor to work:

  1. Install Alcohol 120% and set it up for 3 virtual drives (assuming all your SVCD images come in less than or equal to 3 parts). (see link above)
  2. Install BSPlayer. (see link above)

_Lib [lib]: This is my personal collection of useful classes and functions -- they're robust, easy to use, and self contained. I wrote most of the classes, but there are a couple that I didn't write, in which case, credit is given in the header.


Swarms [exe][src][lib]: This is a simple experiment to test the concept of intelligent agent/bot swarming. By coding only a few simple rules for each "bot", the application demonstrates an emergent behavior similar to the swarming of fish or bees. Each agent/bot is stupid, yet, the end result is a comparitively complicated behavior for the entire collection as a whole. The rules are basically:

  1. Try to align with the direction of your neighbors that fall within a certain radius, (the organism's range of view).
  2. If you get too close to another organism then turn away from it, (avoid collisions).
  3. Avoid walls within the range of view by turning toward the wall's normal. (don't bonk the wall).

It's quite impressive how each individual bot seems to avoid collisions and appears to cooperate with it's peers. Upon close inspection, you can see that despite the large number of moving bots, collisions are quite rare.

This program is much simpler than in real life though because each fish has access to the direction vectors, coordinates, and velocities belonging to it's neighbors. If one were to make a swarm of robots, the robots could easily relay their information to each other or a central command center via a wireless link. In animals however, the direction vector and coordinate information of an organism's neighbors is not readily available, so the animal must possess some way of estimating its neighbor's direction, velocity, and distance -- a rather remarkable feat. In most animals, vision appears to be the preferred method of determining this information, but other means such as sonar can be used as well.


FractAlgs [exe][src][lib]: A program to demonstrate my raytracer class. I'm currently working on it, so the executable might not work. The Fractalg application itself is very basic, and all it does is render a couple of scenes. As of this writing, (March 23, 2004), the raytracer supports: camera, lights, spheres, triangles, infinite planes, quaternion rotation, Diffuse/Labertian shading, spectral/Phong shading, and reflection. The refraction isn't working --still trying to figure out what's up there.

There are two reasons for creating this raytracer. One is to accurately render a 3 dimensional slice of a quaternion in the Julia set, and the other is to learn and practice 3 dimensional mathematics for simulation. I suspect that after I add a "Julia quaternion object", the only other features I would like to add are refraction, cubes, and possibly textures.

Thanks goes to Hue Mccoy for passing on the graphics theory, and to Alessandro Rosa for the Julia quaternion advice and tutorials.


Net3 [exe][src][lib]: Net3 is actually several proof-of-concept programs in one. The first one trains a neural network to learn the XOR function and shows you its weights during the process, and the second one trains a neural network to do basic optical character recognition, (OCR) -- in other words, translate my messy handwriting! Another program is used to build and save networks. There is also a demo that inputs images and trains the network to threshold them (still in the experimental stage).


CottonEye [doc]: The project I have undertaken at the Southwestern Cotton Ginning Research Lab. It is a particle recognition system that uses a high-resolution video camera to capture images and analyze them to determine the amounts and types of trash objects that are found during the process of turning puffs of cotton into that shirt you're wearing. We use a neural network to estimate the functions required to identify the bark, stick, leaves, etc...


QPortal [exe][src]: This program raytraces a 3 dimensional slice of a 4 dimensional Julia quaternion through its imaginary hypercube. The only parameters that you can change so far are the parameters to manipulate the quaternion -- the raytracing parameters do NOT work at the moment. I started developing a raytracer, so I abandoned the program half way through completion. Here are a couple of renderings I've made so far: [0][1][2][3].


Noise [exe][src]: This is a crude attempt at a text-to-voice synthesizer. The voice sounds like a cross between an intoxicated southerner and a brain damaged parrot, but it's good for a laugh!

I used a relativly basic method to enforce language pronuciation rules. There still are quite a few words and spellings that will trip it up. As for words like "read", it is almost impossible to tell if it should be pronounced "reed" or "red" without super advanced AI or sentence analysis, so I left out those types of checks completely.

When parsing text to determine word pronunciation, there are tons of rules and exceptions to rules in the English language. In fact, there are so many, that it leads me to believe that programming each rule is next to impossible. My theory as to how commercial text-to-speech systems are written is that a dictionary is used, in which each entry has a corresponding phonetic representation. The dictionary is first queried for the word, and if it is not found, then the parser defaults to a set of backup rules. If the dictionary is sorted alphabetically, a particular word could be found in log(n) probes using a binary search. Other than the overhead of packaging a 300k dictionary with every distribution, it would be fairly efficient.

For the sound output, I pieced together 47 pre-recorded phonemes, (using my computer's microphone). To get a voice that doesn't sound like a disorientated alien from mars, many more phonemes would be needed. I read somewhere that a good commercial system uses upwards of 1,600. Commercial programs also use blending techniques so that the phenomes flow together better.


MidiSlam [exe][src]: Uses your system MIDI device, (in your sound card), to play specified notes. You can vary pitch, note, instrument, etc...

This program is not very exciting at the moment. It's just a beta that lets you pick an output device and send a MIDI note to it. I'm writing a wrapper class for the functions in the Windows winmm.h library. I actually want to figure out how to capture MIDI input, but it's easier to send output, so I thought I'd try that first. Once I figured out the byte format that the midi device takes, it has been easy going. This is the first step in capturing input from a musical keyboard and using those events to do things like turn lights on/off etc... (see future updates for cm11aZapper below for details).

System Compatibility: You'll need a sound card with MIDI capabilities, (most computers have this), and Win95/98/2000. I have no idea if it works on any machines other than mine. I can get it to send output to my SBlive sound card using the "Microsoft GS Wavetable SW Synth" device, and to my CASIO CT-650 keyboard using the "SBLive! MIDI UART" device.


Cm11aZapper [exe][src][dll]: January 16, 2001.This program is a small utility that can be used to select one or more lights/appliances and then turn them all off or all on with the click of one button.

Version 1.01 is a taskbar application. You will need a CM11A controller that plugs into the back of your computer, a RF receiver, and at least one X10 switch or appliance module. All of these can be found at www.x10.com or www.smarthome.com for less than 25 bucks total and they can be set up in minutes. You'll also need a free com port and Windows 95 or higher. One thing handy about X10 is that it can also be controlled by the MouseRemote mentioned below in the "Max10 Artist-Title Popup Patch". There are many more powerful programs out there like HomeSeer and ActiveHome's suite, but this one works great for simple tests to see if everything is working correctly before you go install and configure a gigantic Behemoth program.

Compatibility: cm11aZapper was written using the MFCs, and I tested it in win2K. If anyone out there has win95, or win98, or NT4 and a CM11A, I'd appreciate it if you could let me know if there are any bugs.

Undocumented Features: Sometimes when the com port is opened, it throttles the CPU to the max. I'm not sure why it does it, but I'm looking into it. Any ideas?

Future Updates: I was thinking of adding all the fancy dimming and timer functions, but that has already been done by tons of different programs, and it would be repetitive work where I wouldn't learn many new concepts. Perhaps I'll add additional house codes other than just "A". If I do add onto it, however, I would like to try integrating the Microsoft Agent technologies into the project to allow for voice recognition. I've been reading about it in the MSDN library and it sounds like it would be fun to turn lights on and off just by saying "computer, turn lights off". Another idea I had was to capture midi input so that you could hit different keys on a musical keyboard and it would turn on various lights in the house, (although i don't really see why that would be useful for anything -- except for maybe a DJ).


Mandelbrot Generator [exe][src]: Version 1.06. For those of you who don't know what this baby does, it generates a fractal, which is a mathematical formula translated into a visual pattern. This particular equation is called the "Mandelbrot Set".

What's New: This release added the feature of saving movies as .avi files, (mpg, divx, whatever formats your system has installed on it). The movie feature is still a little buggy, has the problem of speeding up the farther you zoom, and the picture is slightly off-center. I still think it's cool though, because I've never seen a fractal program that could output movies. There are a couple of other handy additions listed in whatsnew.txt.

System Requirements: It runs in Win98 and Win2k for sure. I'm not sure about Win95. The color schemes will appear slightly different between the two operating systems because of the way the graphic drivers handle pixel coloring.

Features I would like to add:

If you wish to learn more about how the Mandelbrot Set is generated with a computer program, you can read my tutorial, which will tell you what you need to know to get started. Any suggestions, comments, questions, && even lighthearted flames would be appreciated. Be sure to check out some example images, && see a picture of the 3ft x 4ft poster homegrown with this program. Unfortunately the image quality for the examples is less than optimal, since, due to bandwidth && disk quota, I had to reduce the size of most images to 640xSomething and the jpg compression takes its toll. Try generating one that is the same width as your desktop, save it as a bitmap, and set it as your wallpaper!

Just so you know... this was the second MFC program I ever wrote, so there are a few beginner mistakes in the code.


Game of Life [exe][src]: The game of life is an old algorithm that produces an interesting animated display.

My first MFC Program! The game gives a set of rules to each creature, (pixel), on the screen. If the creature has only a few neighbors, it doesn't have enough peers/family to sustain it, so it dies. If it has too many neighbors, it gets over crowded && dies as well. If it has the right amount it will live && even reproduce. The grid && point classes were originally created by bad-ass coder Erik Carlsten and I for a school assignment. This MFC version has a function to randomly place a specified number creatures on the playing field && then set them in motion for a specified number of generations. By varying these settings, some interesting patterns appear. The workspace/resources for visual studio 6 are available on request. The rendering routine is located within the CChildView::OnFileRefresh() function in ChildView.cpp.


Visual Inventory [src]: A windows MFC program for keeping track of product inventory. Since it was created for a CS 470 project, it's still very beta, but it does do a few SQL queries and such via DAO. It's not the most exciting program on earth, but it was a great learning experience. My team members were Ryan Woodham, Todd Goman, and Brian Zwagerman. The teacher for the class was Jim Steele. Visual Studio 6 only.


Gotcha [exe][src]: October 6, 2002. This program is for submitting a web form to a website via HTTP. It's a complete re-write of the old WFA program, so it's a lot more powerful. I don't have much documentation for it, so if you have any questions on how to use it, drop me a line. I have a couple of pre-made Scripts and Lists. Eventually I hope to put in some simple web-page parsing that will automatically find fields and add their name/value pairs for you, so all you have to do is create the rules.


LaunchExtract [exe][src][lib]: There are tons of streaming videos at the Yahoo Launch website (http://launch.yahoo.com/musicvideos/default.asp). Last time I checked there were 8627 music videos (62.74 gigs). It can be hard to get the URLs if you want to save the wmf/asf files to disk, so this program provides an easy way to get the URLs so that you can use a streaming program to download them -- examples: HiDownload, Streambox Ripper, ASF Recorder, GetASFStream, HiNetRecorder, StreamDown, VODRecorder, WiseCroft Ripper, Windows Media Ripper (WMR), etc... . The best program to use by far is FlashGet because it allows you to import the list of URLS directly and it reliably downloads the files at high speeds without errors.

Sometimes asf/wmv stream rippers encounter errors during download, resulting in corrupt wmv/asf files. There is an included utility to scan wmv/asf files and list the defective ones -- but with FlashGet, you probably won't need it.



PSControl [exe][src][txt]: March 23, 2004. For people who forget their passwords, this is a small utility that will use a dictionary list of passwords to attempt a brute force connection to a remote resource using Windows Networking (WNet). The text link is a dictionary file, or you can use your own.


PolTest [exe][src][lib][dev]: A simple program to demonstrate the use of the CPololu class for controlling servos using the Pololu USB servo controller.


Daq [exe][src][dll][lib][dev]: A program to demonstrate the use of the CPMD class to control and acquire data from a Measurement and Computing PMD-1208FS (a USB based data acquisition module with analog and digital IO). I haven't tested the class with the PMD-1208LS or other products from the same company, but I bet it would work with some of them. The interface isn't really useful right now... but the CPMD C++ class is quite useful and easy to use.