On Thu, Jul 3, 2008 at 3:15 PM, Johannes Sixt <[EMAIL PROTECTED]> wrote: > On Donnerstag, 3. Juli 2008, percy tiglao wrote: >> I've got an early version that is working a lot better than the old >> spectrometer already, so I thought I should submit the attached patch. > > Thanks, but "working a lot better" is not enough justification. Please > describe *why* your patch is an improvement and *why* I (or any other > developer) should take the time to apply your patch, test it out, and commit > it. In your description assume that the reader is not familiar with the > spectogram plugin. > > -- Hannes >
Sure, I'll keep this in mind in the future. Here are a list of my changes thusfar (in approx. order of importance): 1. Before, the spectrogram's color was entirely based off of the power of the waveform. IE: louder sounds would result in a larger color value. I changed it so that the spectrogram would instead have the color's brightness is based on the power of the waveform. This difference is enormous visually, as before it was possible that two similar sounds on the spectrogram would result in vastly different brightnesses (0xffff00 vs 0xffffff have a brightness difference of 33%, while only differing by 0.002%). Similarly, the old spectrogram would have values that were close in brightness, but vastly different in actual loudness. For example, 0x00ffff vs 0xffff00 have equal brightness, but a 99.7% loudness difference. Granted, these two values have different hues... but brightness is far more distinctive. 2. I added the "STEP" define statement, which is a compile-time constant that controls the zoom of the spectrogram. For my purposes, a "STEP" of 8 was sufficient (that is, 8x zoom compared to the old spectrogram). Of course, I added the zoom functionality as well. 3. The spectrogram now sweeps from left to right, instead of comming in from the right. I removed the need of a "copy_area" call... so I assume it is a little more efficient. (note: the STEP addition would make the spectrogram much less efficient) 4. The "Level" FPot goes down to -100 now, because -40 wasn't low enough for my purposes. 5. Two cosmetic changes. There are more labels to the left side of the spectrometer labeling the frequencies, and the background colors change every full sweep. ---- The first three changes are easily noticed in the following screenshots. Both of these images are spectrograms of the first 10 seconds of "Welcome to the Black Parade" by My Chemical Romance. Before patch: http://img111.imageshack.us/my.php?image=spectrogram1xg5.png After patch: http://img118.imageshack.us/my.php?image=spectrogram2jt7.png The old spectrometer in my eyes was simply unusable. The zoom was set so that 10 whole seconds was crammed into about 30 pixels... I couldn't see anything. Further, there is so much noise that it is difficult to see exactly where the piano notes start (as if the zoom didn't make it hard enough already). In fact, due to problems 1 and 2, the third piano note is practically invisible. Well, there is a white spot 3 pixels tall and 1 pixel wide there if you know where to look, but it is hard to see. This note is clearly visible at the 2330 Hz mark in the "after patch" screenshot. Changes 4 and 5 are more or less cosmetic or minor. -- Percival _______________________________________________ Cinelerra mailing list [email protected] https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra
