## BtWavelevel

BtWavelevel — a single part of a BtWave item

## Functions

#define | BT_WAVELEVEL_DEFAULT_ROOT_NOTE
BtWavelevel * | bt_wavelevel_new ()

## Properties

gpointer | data | Read / Write
gulong | length | Read / Write
gulong | loop-end | Read / Write
gulong | loop-start | Read / Write
gulong | rate | Read / Write
GstBtNote | root-note | Read / Write / Construct
BtSong * | song | Read / Write / Construct Only
BtWave * | wave | Read / Write / Construct Only

## Types and Values

struct | BtWavelevel

## Object Hierarchy

        GObject
        ╰── BtWavelevel

## Implemented Interfaces

BtWavelevel implements BtPersistence.

## Includes

    #include <libbtcore/core.h>

## Description

BtWavelevel contain the digital audio data of a BtWave to be used for a certain key-range.

## Functions

### BT_WAVELEVEL_DEFAULT_ROOT_NOTE

    #define BT_WAVELEVEL_DEFAULT_ROOT_NOTE (1+(4*16))

Default base-note for a wavelevel (c-3).

### bt_wavelevel_new ()

    BtWavelevel *
    bt_wavelevel_new (const BtSong * const song,
                      const BtWave * const wave,
                      const GstBtNote root_note,
                      const gulong length,
                      const gulong loop_start,
                      const gulong loop_end,
                      const gulong rate,
                      gconstpointer sample);

Create a new instance

#### Parameters

song | the song the new instance belongs to |
wave | the wave the new wavelevel belongs to |
root_note | the keyboard note this sample is related |
length | the number of samples |
loop_start | the start of the loop |
loop_end | the end of the loop |
rate | the sampling rate |
sample | the sample data |

#### Returns

the new instance or `NULL` in case of an error.

[transfer full]

## Types and Values

### struct BtWavelevel

    struct BtWavelevel;

A tone level for a BtWave. In most cases a BtWave has only one BtWavelevel.

## Property Details

### The `“data”` property

      “data”                     gpointer

the sample data.

Flags: Read / Write

### The `“length”` property

      “length”                   gulong

length of the sample.

Flags: Read / Write

Allowed values: <= G_MAXINT64

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

      “loop-end”                 gulong

end of the sample loop.

Flags: Read / Write

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

      “loop-start”               gulong

start of the sample loop.

Flags: Read / Write

### The `“rate”` property

      “rate”                     gulong

sampling rate of the sample.

Flags: Read / Write

### The `“root-note”` property

      “root-note”                GstBtNote

the base note associated with the sample.

Flags: Read / Write / Construct

Default value: NONE

### The `“song”` property

      “song”                     BtSong *

Set song object, the wavelevel belongs to.

Flags: Read / Write / Construct Only

### The `“wave”` property

      “wave”                     BtWave *

Set wave object, the wavelevel belongs to.

Flags: Read / Write / Construct Only