Skip to main content

Sample

The Sample class represents an audio sample loaded in Kontakt.

class Sample
info

This class cannot be instantiated directly. Instances are returned by load_sample or by querying a sample from an existing zone.

Properties​

num_channels​

num_channels: Int { get }

The number of channels in the audio sample.


num_frames​

num_frames: Int { get }

The number of frames (samples per channel) in the audio sample.


path​

path: Path { get }

The file path of the audio sample as a path.Path.


sample_rate​

sample_rate: Int { get }

The sample rate of the audio sample in Hz.

Methods​

to_string​

to_string() -> (String)

Returns a string representation of the sample.