PEDAL POINT source code release and instructions (2)

xiaoxiao2021-03-06  51

This article is a spanzhang original, its blog address is: http://blog.9cbs.net/spanzhang. Quote or repost, please indicate the source, thank you! ! Pedal Point is a source opening software based on DirectDraw developed by VC6. The following will be explained below. I. The overall process of the system is mainly included in the system initialization phase: 1. Initialize the random number generator; 2. Initialize DirectDraw; 3, generate a icon source object; 4, initialize all diffusion algorithms; 5, initialize for synchronization Mutex; 6, initialize the recording object and start recording. After the normal initialization work is completed, the program enters the primary loop: 1, waiting for MUTEX; 2, process user input; 3, fuzzy picture, spread, update the icon, draw the map source; 4, update the palette; 5, effect Gradient; 6, rendering the screen; 7, print the necessary text description; 8, release MUTEX. When the user requested the exit program, the program jumped from the primary loop and destroyed all the assigned object space. Second, the main objects in the relevant concept system include: 1, a PEDALPOINT object, equivalent to the application object, but it is not responsible for the overall process of the program. 2, a recording object, it is an instance of class WaveRecorder. 3, a DirectDRAW object instance. 4, a palette object, responsible for generating the soft colors. 5, many of the icon source objects, which are responsible for drawing a white line based on the smoothed signal generated at the time. 6, many diffusion objects, which are responsible for spreading the lines generated by the map source and producing dynamic. However, this is less than once in this. The only role of the icon source object is to draw white lines based on the recorded signal, which is called the source because they are the root of all pictures. These white lines are blurred and proliferated, that is, the effect we see. The role of the diffusion object is to exercise the point on the screen, it is worth noting that this movement is not the original pixel point Move to a target pixel point and the original pixel point is not, but the original pixel point COPY to the target pixel point . Such blur and diffusion are carried out in two buffers, respectively, before buffering and backup buffers. Third, some of the main technical issues encountered during the development of technical problems include: 1. Color gravity Pedal Point is 256 colors of palette, I use more 256 colors of palettes to divide a lot of colors. Segment, and the last color is always black. For example, use three colors: Every time you update the palette, you will make a tiny adjustment for all color nodes. This picture will look more gentle, and there is no eye-catching color. Since the final node (black node) is adjusted to 0, it is always black. 2, the smooth sound signal of the sound is sampled after sampling, it needs to do low-pass filtering. This filtering operation will have a decisive effect on the smoothing of the icon. Here, when I am filtering, I first get a mean and then low-pass filtering data minus such a mean. Since this, the data has been very smooth, and the most important thing is that its both ends are on 0 levels. 3, the drawing source is useless because the source is drawn on the front buffer. I have to write some pain points, the function of the line, and the function of the waveform drawing curve. There is no technical problem here, it is tired. At this point, the principle and structure of the Pedal Point are basically introduced. Since I express the limited ability, I hope that everyone can see the fog in the cloud. The next few sections will be released all source code.

转载请注明原文地址:https://www.9cbs.com/read-56517.html

New Post(0)