BtWaveformViewer: Buzztrax Bt-Edit Reference Manual

## BtWaveformViewer BtWaveformViewer — the waveform viewer widget |

## Functions

GtkWidget * | bt_waveform_viewer_new ()
void | bt_waveform_viewer_set_wave ()

## Properties

gint64 | loop-end | Read / Write
gint64 | loop-start | Read / Write
gint64 | playback-cursor | Write

## Types and Values

struct | BtWaveformViewer

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── BtWaveformViewer

## Implemented Interfaces

BtWaveformViewer implements AtkImplementorIface and GtkBuildable.

## Includes

    #include "bt-edit.h"

## Description

Provides an viewer for audio waveforms. It can handle multi-channel waveforms, show loop-markers and a playback cursor.

## Functions

### bt_waveform_viewer_new ()

    GtkWidget *
    bt_waveform_viewer_new (void);

Create a new waveform viewer widget. Use `bt_waveform_viewer_set_wave()` to pass wave data.

#### Returns

the widget

### bt_waveform_viewer_set_wave ()

    void
    bt_waveform_viewer_set_wave (BtWaveformViewer *self,
                                 gint16 *data,
                                 gint channels,
                                 gint length);

Set wave data to show in the widget.

#### Parameters

self | the widget |
data | memory block of samples (interleaved for channels>1) |
channels | number channels |
length | number samples per channel |

## Types and Values

### struct BtWaveformViewer

    struct BtWaveformViewer;

waveform view widget

## Property Details

### The `“loop-end”` property

      “loop-end”                 gint64

First sample after the loop or -1 if there is no loop.

Flags: Read / Write

Allowed values: >= -1

Default value: -1

### The `“loop-start”` property

      “loop-start”               gint64

First sample of the loop or -1 if there is no loop.

Flags: Read / Write

Allowed values: >= -1

Default value: -1

### The `“playback-cursor”` property

      “playback-cursor”          gint64

Current playback position within a waveform or -1 if sample is not played.

Flags: Write

Allowed values: >= -1

Default value: -1

## See Also

BtWave, BtMainPageWaves