BtWavelevel

BtWavelevel — a single part of a BtWave item

Synopsis

#include <libbtcore/core.h>

#define             BT_WAVELEVEL_DEFAULT_ROOT_NOTE
struct              BtWavelevel;
BtWavelevel *       bt_wavelevel_new                    (const BtSong * const song,
                                                         const BtWave * const wave,
                                                         const guchar root_note,
                                                         const gulong length,
                                                         const glong loop_start,
                                                         const glong loop_end,
                                                         const gulong rate,
                                                         gconstpointer sample);

Object Hierarchy

  GObject
   +----BtWavelevel

Implemented Interfaces

BtWavelevel implements

Properties

  "data"                     gpointer              : Read / Write / Construct
  "length"                   gulong                : Read / Write / Construct
  "loop-end"                 glong                 : Read / Write / Construct
  "loop-start"               glong                 : Read / Write / Construct
  "rate"                     gulong                : Read / Write / Construct
  "root-note"                guchar                : Read / Write / Construct
  "song"                     BtSong*               : Read / Write / Construct Only
  "wave"                     BtWave*               : Read / Write / Construct Only

Description

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

Details

BT_WAVELEVEL_DEFAULT_ROOT_NOTE

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

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


struct BtWavelevel

struct BtWavelevel;

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


bt_wavelevel_new ()

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

Create a new instance

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

Property Details

The "data" property

  "data"                     gpointer              : Read / Write / Construct

the sample data.


The "length" property

  "length"                   gulong                : Read / Write / Construct

length of the sample.

Allowed values: <= G_MAXLONG


The "loop-end" property

  "loop-end"                 glong                 : Read / Write / Construct

end of the sample loop.

Allowed values: >= -1

Default value: -1


The "loop-start" property

  "loop-start"               glong                 : Read / Write / Construct

start of the sample loop.

Allowed values: >= -1

Default value: -1


The "rate" property

  "rate"                     gulong                : Read / Write / Construct

sampling rate of the sample.


The "root-note" property

  "root-note"                guchar                : Read / Write / Construct

the base note associated with the sample.

Default value: 0


The "song" property

  "song"                     BtSong*               : Read / Write / Construct Only

Set song object, the wavelevel belongs to.


The "wave" property

  "wave"                     BtWave*               : Read / Write / Construct Only

Set wave object, the wavelevel belongs to.