## GstBtOscSynth

GstBtOscSynth — synthetic waveform oscillator

## Functions

GstBtOscSynth * | gstbt_osc_synth_new ()
void | gstbt_osc_synth_trigger ()
void | gstbt_osc_synth_process ()

## Properties

gdouble | frequency | Write
gint | sample-rate | Read / Write
gdouble | volume | Write
GstBtOscSynthWave | wave | Read / Write

## Types and Values

enum | GstBtOscSynthWave
enum | GstBtOscSynthNoiseWave
enum | GstBtOscSynthTonalWave
struct | GstBtOscSynth

## Object Hierarchy

        GEnum
        ├── GstBtOscSynthNoiseWave
        ├── GstBtOscSynthTonalWave
        ╰── GstBtOscSynthWave
        GObject
        ╰── GInitiallyUnowned
            ╰── GstObject
                ╰── GstBtOscSynth

## Includes

    #include <libgstbuzztrax/osc-synth.h>

## Description

An audio generator producing classic oscillator waveforms.

One can attach GstControlSources to some of the patameters to modulate them.

### Waveforms

## Functions

### gstbt_osc_synth_new ()

    GstBtOscSynth *
    gstbt_osc_synth_new (void);

Create a new instance

#### Returns

the new instance

### gstbt_osc_synth_trigger ()

    void
    gstbt_osc_synth_trigger (GstBtOscSynth *self);

Reset oscillator state. Typically called for new notes.

#### Parameters

self | the oscillator |

### gstbt_osc_synth_process ()

    void
    gstbt_osc_synth_process (GstBtOscSynth *self,
                             guint size,
                             gint16 *data);

Generate `size` samples of audio and store them into `data` .

#### Parameters

self | the oscillator |
size | number of sample to generate |
data | buffer to hold the audio |

## Types and Values

### enum GstBtOscSynthWave

Oscillator wave forms.

#### Members

GSTBT_OSC_SYNTH_WAVE_SINE | sine wave |
GSTBT_OSC_SYNTH_WAVE_SQUARE | square wave |
GSTBT_OSC_SYNTH_WAVE_SAW | saw wave |
GSTBT_OSC_SYNTH_WAVE_TRIANGLE | triangle wave |
GSTBT_OSC_SYNTH_WAVE_SILENCE | silence |
GSTBT_OSC_SYNTH_WAVE_WHITE_NOISE | white noise |
GSTBT_OSC_SYNTH_WAVE_PINK_NOISE | pink noise |
GSTBT_OSC_SYNTH_WAVE_GAUSSIAN_WHITE_NOISE | white (zero mean) Gaussian noise; volume sets the standard deviation of the noise in units of the range of values of the sample type, e.g. volume=0.1 produces noise with a standard deviation of 0.1*32767=3277 with 16-bit integer samples, or 0.1*1.0=0.1 with floating-point samples. |
GSTBT_OSC_SYNTH_WAVE_RED_NOISE | red (brownian) noise |
GSTBT_OSC_SYNTH_WAVE_BLUE_NOISE | spectraly inverted pink noise |
GSTBT_OSC_SYNTH_WAVE_VIOLET_NOISE | spectraly inverted red (brownian) noise |
GSTBT_OSC_SYNTH_WAVE_S_AND_H | sample and hold. Create an random value and hold it for a time specified by “frequency”. |
GSTBT_OSC_SYNTH_WAVE_COUNT | number of waves, this can change with new releases |

### enum GstBtOscSynthNoiseWave

Noise oscillator wave forms from GstBtOscSynthWave.

#### Members

GSTBT_OSC_SYNTH_WAVE_SILENCE | silence |
GSTBT_OSC_SYNTH_WAVE_WHITE_NOISE | white noise |
GSTBT_OSC_SYNTH_WAVE_PINK_NOISE | pink noise |
GSTBT_OSC_SYNTH_WAVE_GAUSSIAN_WHITE_NOISE | white (zero mean) Gaussian noise; volume sets the standard deviation of the noise in units of the range of values of the sample type, e.g. volume=0.1 produces noise with a standard deviation of 0.1*32767=3277 with 16-bit integer samples, or 0.1*1.0=0.1 with floating-point samples. |
GSTBT_OSC_SYNTH_WAVE_RED_NOISE | red (brownian) noise |
GSTBT_OSC_SYNTH_WAVE_BLUE_NOISE | spectraly inverted pink noise |
GSTBT_OSC_SYNTH_WAVE_VIOLET_NOISE | spectraly inverted red (brownian) noise |

### enum GstBtOscSynthTonalWave

Tonal oscillator wave forms from GstBtOscSynthWave.

#### Members

GSTBT_OSC_SYNTH_WAVE_SILENCE | silence |
GSTBT_OSC_SYNTH_WAVE_SINE | sine wave |
GSTBT_OSC_SYNTH_WAVE_SQUARE | square wave |
GSTBT_OSC_SYNTH_WAVE_SAW | saw wave |
GSTBT_OSC_SYNTH_WAVE_TRIANGLE | triangle wave |
GSTBT_OSC_SYNTH_WAVE_S_AND_H | sample and hold. Create an random value and hold it for a time specified by “frequency”. |

### struct GstBtOscSynth

    struct GstBtOscSynth;

Class instance data.

## Property Details

### The `“frequency”` property

      “frequency”                gdouble

Frequency of tone.

Flags: Write

Allowed values: >= 0

Default value: 0

### The `“sample-rate”` property

      “sample-rate”              gint

Sampling rate.

Flags: Read / Write

Allowed values: >= 1

Default value: 44100

### The `“volume”` property

      “volume”                   gdouble

Volume of tone.

Flags: Write

Allowed values: [0,1]

Default value: 0

### The `“wave”` property

      “wave”                     GstBtOscSynthWave

Oscillator waveform.

Flags: Read / Write

Default value: Sine