GstBtOscSynth

GstBtOscSynth — synthetic waveform oscillator

Functions

Properties

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

Types and Values

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

Sine wave Square wave Saw wave Triangle wave Silence White noise Pink noise White Gaussian noise Red (brownian) noise Blue noise Violet noise Sample &amp; Hold Spikes Sample &amp; Glide

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 a random value and hold it for a time specified by “frequency”.

 

GSTBT_OSC_SYNTH_WAVE_SPIKES

spikes. Create a random level spikes at a rate specified by “frequency”.

 

GSTBT_OSC_SYNTH_WAVE_S_AND_G

sample and glide. Create an random values and blend between them over 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”.

 

GSTBT_OSC_SYNTH_WAVE_SPIKES

spikes. Create a random level spikes at a rate specified by “frequency”.

 

GSTBT_OSC_SYNTH_WAVE_S_AND_G

sample and glide. Create an random values and blend between them over a time specified by “frequency”.

 

struct GstBtOscSynth

struct GstBtOscSynth;

Class instance data.

Property Details

The “frequency” property

  “frequency”                gdouble

Frequency of tone.

Owner: GstBtOscSynth

Flags: Write

Allowed values: >= 0

Default value: 0


The “sample-rate” property

  “sample-rate”              gint

Sampling rate.

Owner: GstBtOscSynth

Flags: Read / Write

Allowed values: >= 1

Default value: 44100


The “volume” property

  “volume”                   gdouble

Volume of tone.

Owner: GstBtOscSynth

Flags: Write

Allowed values: [0,1]

Default value: 0


The “wave” property

  “wave”                     GstBtOscSynthWave

Oscillator waveform.

Owner: GstBtOscSynth

Flags: Read / Write

Default value: Sine