CS_get_color

The CS_get_color function derives a color from a signature.

void CS_get_color(
  const CS_Signature sig,  /* signature array */
  CS_RGB_Color color        /* color array */
);

Parameters
sig
Identifies an array containing a signature that was obtained through a call of CS_get_signature.
color
Identifies a three-byte array into which this function will store a color represented by an RGB triple. The first byte of the array will receive the Red component, the second byte will receive the Green component, and the third byte will receive the Blue component. The value of each component ranges from 0 to 255. When each component is assigned a value of 0, the color is interpreted as black, whereas if each component equals 255, the color is white.

Remarks

This function performs a mapping from the sonic universe to the color space. In rough terms, high-pitched sounds receive more Red component, low-pitched sounds are mapped to dark colors, mid-range sounds tend to be shades of Green or Blue, and noisy sounds (such as idealized white noise) are assigned shades of gray. An invalid signature is mapped to black.

The color obtained from this function is useful for display purposes, especially for coloring an audio waveform display.

This function has no effect if the color parameter is NULL.


 Home   Overview   Technologies   Applications   Sound Gallery   FindSounds.com   FindSounds Palette   About Us   Contact Us 

© 2008 Comparisonics Corporation