BKData is a general container for audio frames. It is used to hold waveform phases and sample frames. Its content can be loaded from WAVE files or raw audio data.

A data object can be attached to multiple tracks.

Attributes

BK_SAMPLE_PITCH

Sets the object's pitch.

This attribute is used to tune the sample. It should be tuned to BK_C_4 to represent the correct note.

When a sample is attached to a track, the data object's BK_SAMPLE_PITCH attribute overwrites the one of the track, so this attribute has to be set before.

// Tune sample
BKSetAttr (& data, BK_SAMPLE_PITCH, -0.257 * BK_FINT20_UNIT);
BK_NUM_FRAMES (read-only)

The number of frames per channel.

BKInt numFrames;

// Get number of frames
BKGetAttr (& data, BK_NUM_FRAMES, & numFrames);
BK_NUM_CHANNELS (read-only)

The number of channel.

BKInt numChannels;

// Get number of channels
BKGetAttr (& data, BK_NUM_CHANNELS, & numChannels);