Skip to main content

Zone

The Zone class represents a zone in a Kontakt instrument.

class Zone
info

This class cannot be instantiated directly. Instances are returned by methods such as Group.add_zone, Instrument.zone, and ZoneList.at.

Properties

id

id: Int { get }

The unique identifier of the zone. It can be passed to KSP for persistence and resolved back to a Zone via Instrument.zone.


group

group: Group { get }

The Group this zone belongs to.


is_destroyable

is_destroyable: Bool { get }

Whether the zone can be destroyed via destroy. Only zones created by the script are destroyable; pre-existing zones and zones owned by KSP are not.


sample

sample: Sample? { get }

The audio kontakt.Sample assigned to this zone, or nil if the zone has no sample.

Methods

destroy

destroy() -> ()

Destroys this zone, removing it from the instrument. Destroying an already destroyed zone is a no-op. Throws an error if the zone is not destroyable (see is_destroyable).


to_string

to_string() -> (String)

Returns a string representation of the zone.