Skip to main content

Waveform

The Waveform component displays a Sample.

component Waveform

Example

import { Waveform } from audio_components
import { load_sample, library_path } from kontakt

var sample_path = library_path.appending("Samples").appending("my_sample.wav")

export var main = Waveform(sample: load_sample(sample_path)!)

Constructor

constructor(sample: Sample, channel: Int = 0, range: VisibleRange? = nil, color: Color = 0xFF000000)
sample: Sample

The sample to display.

See Sample

channel: Int = 0

The channel of the sample to display.

range: VisibleRange? = nil

The range of samples to display. If set to nil, the entire sample is displayed.

See VisibleRange

color: Color = 0xFF000000

The fill color.

Layout Behavior

Fills the available area.