Programmable Audio VisualizerDany Qumsiyeh, Mike SpindelNovember 6, 2005AbstractThis project is a programmable audio visualizer that can displaysynchronized graphics on multiple displays. It is capable of executinga user-specified program each frame that can contain mathematicalfunctions as well as configur ation commands for a set of special pur-pose graphics rendering hardware. The implementation is composedof three parts: a frontend audio processing module, a specialized mi-croprocessor, and an output display module. The frontend processormaintains a 1s audio samp le FIFO and executes an FFT and beat-detection algorithm. This data is then available to th e the graphicsprocessor, which executes a user-defined program to render the vi-sualization to a framebuffer. The output module maps parts of theframebuffer to appropriate external displays.Contents1 Description 11.1 Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.3 Processor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.4 Effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Module Descriptions 32.1 Pre-processing Block . . . . . . . . . . . . . . . . . . . . . . . 32.2 Display Block . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.3 Processor Block . . . . . . . . . . . . . . . . . . . . . . . . . . 62.4 Effects Module . . . . . . . . . . . . . . . . . . . . . . . . . . 73 Division of Labor 8List of Figures1 Example pseudo-code. . . . . . . . . . . . . . . . . . . . . . . 22 Preprocessing Block Diagram . . . . . . . . . . . . . . . . . . 33 Display Block Diagram . . . . . . . . . . . . . . . . . . . . . . 34 Processor Block Diagram . . . . . . . . . . . . . . . . . . . . . 45 Effects Module Diagram . . . . . . . . . . . . . . . . . . . . . 5i1 Descript i on1.1 DisplayThe system is designed to support multiple synchronized displays. This willbe done by having the effects engine operate on a single, large, virtual buffer.Displays are then mapped onto sections of this buffer with positions thatreflect their relative physical locations. Even with a single display, havinga larger virtual buffer hides edge effects and allows patterns to emerge fromoff-screen.1.2 MemoryThe system will maintain two large virtual buffers in one or more SRAMchips. While the display modules read from one buffer, the engine writes tothe other, and the mapping switches when a frame is completed. The map-ping from global coordinates to the DRAMs is handled by a memorymanagermodule. This module provides read ports (in the pixel coordinate system)for each display module, and both read and write ports for the effects mod-ule. To meet SRAM port limitations, restrictions can be enforced such hashaving displays not share a single SRAM module.1.3 ProcessorEffects are created by a processor which loops through instructions in BRAM.Example code that could be compiled is shown in figure 1. The processor canexecute the usual arithmetic commands, along with a simple “if” that canskip a certain number of instructions. The special commands “convolve” and“generate”, however, run long operations on the buffers in memory, duringwhich pc is halted. Predefined registers supply the parameters for thesecommands.1.4 EffectsThe system will be able t o apply a variety of programmable effects to thebuffer for every frame. In general, a convolution can be applied, and anynumber of generators used, which can overlay patterns and waveforms on thescreen. A number of motion effects (such as rotate, translate, and zoom) can1Figure 1: Example pseudo-code.//initializeif (resetbutton) skip 1rANGLE <= 0//configure motion effectsreg(motion1type) <= (rotate)reg(motion1param1) <= rANGLEreg(motion2type) <= (translate)reg(motion1param1) <= rXreg(motion1param2) <= rY//specify convolution filterreg(convolve00) <= 1reg(convolve01) <= 2...//do the convolutionconvolve//configure parallel generatorsreg(gen1type) <= (waveform)reg(gen1param1) <= rSIZEreg(gen2type) <= (scope)//run generatorsgenerate//configure generators againreg(gen1type) <= (circle)reg(gen2type) <= (disabled)//run new generatorsgenerate//vary parametersrANGLE <= rANGLE + 1 //spinr1 <= (rX < rY)if (r1) skip 1r3 <= r1 * r2//etc2modify the convolution and generators, with the limitation of the numberof motion module instances. The 2D convolution filter is small, but fullyspecified by user registers, and can implement effects such as blur or edge-detect.A C 9 7 S a m p l e F I F OF F TB e a t D e t e c t i o nF F T B R A Mn e w _ f r a m eb e a tt o g e n e r a t o r sFigure 2: Preprocessing Block Diagramx v g a d i s p l a ys c r e e n x , yc o l o rMe m o r yMa n a g e rx v g a d i s p l a ys c r e e n x , yc o l o rg l o b a l x , yc o l o r S R AMS R AMFigure 3: Display Block Diagram2 Module Descrip t i ons2.1 Pre-proc essing Blockac97 sound module provides samples at regular intervals.3P CI n c r e m e n tfl i pI n s t r u c ti onM e mor yT im eLo g icC on t ro lLo g icT im e rs t a r tvalu edon eR eg is t e r Fi leW AA , BE f f e c t sA L UA S E Lb eatb utt onsA L U F NW Dtom e mor y m a n age rparamsF FTB R A MP CS E LW E R FA L U F Nc _ e n a bleg_ e n a bleA S E LA Binc _resetinc _valin c _ r e s e tin c _valZZS a mp leF I F OFigure 4: Processor Block Diagram4T i m eL o g i cT i m e r Pi x e lF S Me n a b l es ta rtd o n eva l u em e m o r y w r iteT r a nsl atex , yM oti o nM oti o nve cve cGe n e r ato rGe n e r ato rB l e n dCo nvo lveF S MM u lt …
View Full Document