Difference between revisions of "Disco Board Project"
|Line 54:||Line 54:|
Revision as of 23:21, 8 December 2008
To bring back the funk.
The intent of the Disco Board Project is to construct a device that will synchronize the flashing of lights with peaks in certain frequency ranges in a waveform; namely, components of the beat in songs. This will be accomplished using a real-time processing component of MATLAB coupled to a series of relay switches. The MATLAB component (specifically, the audio processing toolkit in SimuLink) will read input from a computer port (most likely a microphone in or line in). It will apply a series of bandpass filters to the input data; the frequency ranges that are "passed" will be chosen such that they encapsulate the relevant parts of the input. In the case of a song, these would be frequency ranges corresponding to the kick drum, snare drum and hi-hat. The output of the bandpass filters will then be evaluated as an absolute value (giving the magnitude of the signal) and then smoothed with a low-pass filter. An IF statement will then determine if the magnitude of the signal has exceeded a prescribed value; when it does, the program will send a signal to a relay and a light will flash. If all components work as described above, the user should be able to notice a clear correlation between the beats of their song and the flash-pattern of the lights, and will have some pretty bitchin' lighting for their next party.
(Put block diagram here, as well as (eventually) scanned copies of notes)
4 - 120v AC Relays - available from Ed Jaoudi
4 - Female 120v AC sockets, grounded, surface-mountable
4 - 470Ω resistors
4 - 2v LEDs
1 - Terminal block, 16- to 22-ga. wire
1 - Male 120v AC extension cord, grounded
Contingent on method of interface between computer and relays:
- Method of interface - must be able to accept data from USB or serial, send 3.7 to 32v DC
- Appropriate wiring to connect interface to relays
Week of 11/17: Preliminary Planning
Week of 11/24: Have basic skeleton of program completed
- Audio input set up
- Bandpass & lowpass filters understood & configured
- Preliminary testing - non-real time, use signal generator if necessary
Week of 12/1: Convert to Real-time Processing, Construct Relay Board
- Figure out method of running Relay Board
Weekend of 12/6: Test & debug until day of presentation
The Disco Board Project successfully completed its intended goals, managing to read an audio input, extract the beats from the song, display the beat pulses as flashing lights and generally bring back the funk.
Currently, the Simulink model DLP.mdl reads audio at roughly 11,000 samples per second, passes it through 4 separate channels each containing a bandpass filter, an absolute value evaluator, a lowpass filter and an IF logic gate, and outputs the resulting Boolean values to a PC's printer port. Within this model, the coefficients of the bandpass filter (in this case, created with a discrete transfer function block)and the value that the audio signal is compared to at the IF gate are taken from the MATLAB workspace, and are generated in a GUI written by the excellent Mr. Taylor Chen. Once the data has left the printer port, it is sent to a series of relays; these take the small voltage (+5vDC) given by the printer port and use that to turn on and off a 120vAC circuit. A total of four separate devices can be independently run with the current configuration; more than enough for most musical applications.
The Disco Board Project does have a number of shortcomings, which fall largely into 2 categories; inherent shortcomings and time-created shortcomings. The inherent shortcomings are mostly focused around the inherent inaccuracy of the Disco Board Project's waveform analysis method and input method. Audio decomposition is a hugely complex problem which has yet to be satisfactoraly solved; using bandpass filters to extract components of a song is an extremely primitive way of doing this. The bandpass filter does not listen for single instruments but general frequency ranges; as most instruments span almost the entire frequency spectrum, looking at a specific frequency range makes it very difficult to isolate spikes in a single instrument's amplitude.