Comparisonics API

home
about us
articles
audio editor
comparisonics api
FindSounds.com
FindSounds for Android
FindSounds Mobile
FindSounds Palette
sound matching
waveform display
CS_get_color( ) 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 RGB 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.

© 2016 Comparisonics Corporation