Skip to main content

load_sample

Loads an audio sample from the given file path and returns it as a kontakt.Sample. If a sample with this path is already loaded, it will return the existing sample.

fun load_sample(_ path: Path) -> (Sample?)

Parameters

_ path: Path

The file path.Path of the audio sample to load.

Returns

Sample?

The loaded kontakt.Sample.

info

A nil value is returned if the sample cannot be loaded.