|
|
Digital Dancer Source CodeHere you can find the source code used in our Engineering Open House project, Digital Dancer. Code ranges from well-commented to not at all. Currently, some is in TI320C31 assembler, while other parts are in Windows/SDL C. Expect to see some 8052 assembly as well later. Note that the source code given isn't enough to run the projects right now. Full archives of support files will be included as the project matures. Current SDL-based Game codeWe're using Visual Studio 6 and the SDL libraries to produce a nice frontend for the game. The code for the frontend is intended to be a useful project for learning the SDL libraries. The Visual Studio Project may require some modifications since we put our include files in a strange place.
Beat Detection CodeThe beat detection code uses a simple algorithm. Incoming music is sampled at about 4KHz, then run through a bank of six band pass filters, which are currently implemented as FIR filters. Each band is full-wave rectified and envelope-detected using a low pass filter, also FIR. Next, the bands are decimated by a factor of 128. Finally, all six channels are compared to thresholds, and considered beats if they go above the threshold. Note that this final step is dependent on the volume of the signal. Future versions will use an alternate method. The filter kernel files are not online at this time. Host Control CodeThe beat detection algorithm on the DSP has very little intelligence, mostly due to the fact that the DSP only has 1.8K of useable RAM on the evaluation board. A simple Windows-based application interprets the beats to try to determine a base tempo. It uses the freely available Simple DirectMedia Layer (SDL) library to provide a raw framebuffer for all the nice graphics. To use the parallel port code on Windows NT/2000/XP, you may need a utility to allow raw port I/O. The "UserPort" utility does this nicely.
Links of Interest: |
|
|
12/11/01 by Joel Jordan |