AgsSynthGenerator

AgsSynthGenerator — generate wave-form

Stability Level

Stable, unless otherwise indicated

Functions

#define AGS_SYNTH_GENERATOR_GET_OBJ_MUTEX()
GRecMutex * ags_synth_generator_get_obj_mutex ()
guint ags_synth_generator_get_samplerate ()
void ags_synth_generator_set_samplerate ()
guint ags_synth_generator_get_buffer_size ()
void ags_synth_generator_set_buffer_size ()
guint ags_synth_generator_get_format ()
void ags_synth_generator_set_format ()
gdouble ags_synth_generator_get_delay ()
void ags_synth_generator_set_delay ()
guint ags_synth_generator_get_frame_count ()
void ags_synth_generator_set_frame_count ()
guint ags_synth_generator_get_loop_start ()
void ags_synth_generator_set_loop_start ()
guint ags_synth_generator_get_loop_end ()
void ags_synth_generator_set_loop_end ()
gboolean ags_synth_generator_get_do_lfo ()
void ags_synth_generator_set_do_lfo ()
guint ags_synth_generator_get_oscillator ()
void ags_synth_generator_set_oscillator ()
gdouble ags_synth_generator_get_frequency ()
void ags_synth_generator_set_frequency ()
gdouble ags_synth_generator_get_phase ()
void ags_synth_generator_set_phase ()
gdouble ags_synth_generator_get_volume ()
void ags_synth_generator_set_volume ()
gdouble ags_synth_generator_get_lfo_depth ()
void ags_synth_generator_set_lfo_depth ()
gdouble ags_synth_generator_get_tuning ()
void ags_synth_generator_set_tuning ()
gboolean ags_synth_generator_get_do_fm_synth ()
void ags_synth_generator_set_do_fm_synth ()
guint ags_synth_generator_get_fm_lfo_oscillator ()
void ags_synth_generator_set_fm_lfo_oscillator ()
gdouble ags_synth_generator_get_fm_lfo_frequency ()
void ags_synth_generator_set_fm_lfo_frequency ()
gdouble ags_synth_generator_get_fm_lfo_depth ()
void ags_synth_generator_set_fm_lfo_depth ()
gdouble ags_synth_generator_get_fm_tuning ()
void ags_synth_generator_set_fm_tuning ()
AgsTimestamp * ags_synth_generator_get_timestamp ()
void ags_synth_generator_set_timestamp ()
void ags_synth_generator_compute ()
AgsSynthGenerator * ags_synth_generator_new ()

Types and Values

Includes

#include <ags/file/ags_synth_generator.h>

Description

The AgsSynthGenerator generates wave-forms with oscillators.

Functions

AGS_SYNTH_GENERATOR_GET_OBJ_MUTEX()

#define AGS_SYNTH_GENERATOR_GET_OBJ_MUTEX(obj) (&(((AgsSynthGenerator *) obj)->obj_mutex))

ags_synth_generator_get_obj_mutex ()

GRecMutex *
ags_synth_generator_get_obj_mutex (AgsSynthGenerator *synth_generator);

Get object mutex.

Parameters

synth_generator

the AgsSynthGenerator

 

Returns

the GRecMutex to lock synth_generator

Since: 3.1.0


ags_synth_generator_get_samplerate ()

guint
ags_synth_generator_get_samplerate (AgsSynthGenerator *synth_generator);

Gets samplerate.

Parameters

synth_generator

the AgsSynthGenerator

 

Returns

the samplerate

Since: 3.1.0


ags_synth_generator_set_samplerate ()

void
ags_synth_generator_set_samplerate (AgsSynthGenerator *synth_generator,
                                    guint samplerate);

Set samplerate.

Parameters

synth_generator

the AgsSynthGenerator

 

samplerate

the samplerate

 

Since: 3.0.0


ags_synth_generator_get_buffer_size ()

guint
ags_synth_generator_get_buffer_size (AgsSynthGenerator *synth_generator);

Gets buffer size.

Parameters

synth_generator

the AgsSynthGenerator

 

Returns

the buffer size

Since: 3.1.0


ags_synth_generator_set_buffer_size ()

void
ags_synth_generator_set_buffer_size (AgsSynthGenerator *synth_generator,
                                     guint buffer_size);

Set buffer size.

Parameters

synth_generator

the AgsSynthGenerator

 

buffer_size

the buffer size

 

Since: 3.0.0


ags_synth_generator_get_format ()

guint
ags_synth_generator_get_format (AgsSynthGenerator *synth_generator);

Gets format.

Parameters

synth_generator

the AgsSynthGenerator

 

Returns

the format

Since: 3.1.0


ags_synth_generator_set_format ()

void
ags_synth_generator_set_format (AgsSynthGenerator *synth_generator,
                                guint format);

Set format.

Parameters

synth_generator

the AgsSynthGenerator

 

format

the format

 

Since: 3.0.0


ags_synth_generator_get_delay ()

gdouble
ags_synth_generator_get_delay (AgsSynthGenerator *synth_generator);

Gets delay.

Parameters

synth_generator

the AgsSynthGenerator

 

Returns

the delay

Since: 3.1.0


ags_synth_generator_set_delay ()

void
ags_synth_generator_set_delay (AgsSynthGenerator *synth_generator,
                               gdouble delay);

Sets delay.

Parameters

synth_generator

the AgsSynthGenerator

 

delay

the delay

 

Since: 3.1.0


ags_synth_generator_get_frame_count ()

guint
ags_synth_generator_get_frame_count (AgsSynthGenerator *synth_generator);

Gets frame count.

Parameters

synth_generator

the AgsSynthGenerator

 

Returns

the frame count

Since: 3.1.0


ags_synth_generator_set_frame_count ()

void
ags_synth_generator_set_frame_count (AgsSynthGenerator *synth_generator,
                                     guint frame_count);

Sets frame count.

Parameters

synth_generator

the AgsSynthGenerator

 

frame_count

the frame count

 

Since: 3.1.0


ags_synth_generator_get_loop_start ()

guint
ags_synth_generator_get_loop_start (AgsSynthGenerator *synth_generator);

Gets loop start.

Parameters

synth_generator

the AgsSynthGenerator

 

Returns

the loop start

Since: 3.1.0


ags_synth_generator_set_loop_start ()

void
ags_synth_generator_set_loop_start (AgsSynthGenerator *synth_generator,
                                    guint loop_start);

Sets loop start.

Parameters

synth_generator

the AgsSynthGenerator

 

loop_start

the loop start

 

Since: 3.1.0


ags_synth_generator_get_loop_end ()

guint
ags_synth_generator_get_loop_end (AgsSynthGenerator *synth_generator);

Gets loop end.

Parameters

synth_generator

the AgsSynthGenerator

 

Returns

the loop end

Since: 3.1.0


ags_synth_generator_set_loop_end ()

void
ags_synth_generator_set_loop_end (AgsSynthGenerator *synth_generator,
                                  guint loop_end);

Sets loop end.

Parameters

synth_generator

the AgsSynthGenerator

 

loop_end

the loop end

 

Since: 3.1.0


ags_synth_generator_get_do_lfo ()

gboolean
ags_synth_generator_get_do_lfo (AgsSynthGenerator *synth_generator);

Gets do lfo.

Parameters

synth_generator

the AgsSynthGenerator

 

Returns

the do lfo

Since: 3.1.0


ags_synth_generator_set_do_lfo ()

void
ags_synth_generator_set_do_lfo (AgsSynthGenerator *synth_generator,
                                gboolean do_lfo);

Sets do lfo.

Parameters

synth_generator

the AgsSynthGenerator

 

do_lfo

the do lfo

 

Since: 3.1.0


ags_synth_generator_get_oscillator ()

guint
ags_synth_generator_get_oscillator (AgsSynthGenerator *synth_generator);

Gets oscillator.

Parameters

synth_generator

the AgsSynthGenerator

 

Returns

the oscillator

Since: 3.1.0


ags_synth_generator_set_oscillator ()

void
ags_synth_generator_set_oscillator (AgsSynthGenerator *synth_generator,
                                    guint oscillator);

Sets oscillator.

Parameters

synth_generator

the AgsSynthGenerator

 

oscillator

the oscillator

 

Since: 3.1.0


ags_synth_generator_get_frequency ()

gdouble
ags_synth_generator_get_frequency (AgsSynthGenerator *synth_generator);

Gets frequency.

Parameters

synth_generator

the AgsSynthGenerator

 

Returns

the frequency

Since: 3.1.0


ags_synth_generator_set_frequency ()

void
ags_synth_generator_set_frequency (AgsSynthGenerator *synth_generator,
                                   gdouble frequency);

Sets frequency.

Parameters

synth_generator

the AgsSynthGenerator

 

frequency

the frequency

 

Since: 3.1.0


ags_synth_generator_get_phase ()

gdouble
ags_synth_generator_get_phase (AgsSynthGenerator *synth_generator);

Gets phase.

Parameters

synth_generator

the AgsSynthGenerator

 

Returns

the phase

Since: 3.1.0


ags_synth_generator_set_phase ()

void
ags_synth_generator_set_phase (AgsSynthGenerator *synth_generator,
                               gdouble phase);

Sets phase.

Parameters

synth_generator

the AgsSynthGenerator

 

phase

the phase

 

Since: 3.1.0


ags_synth_generator_get_volume ()

gdouble
ags_synth_generator_get_volume (AgsSynthGenerator *synth_generator);

Gets volume.

Parameters

synth_generator

the AgsSynthGenerator

 

Returns

the volume

Since: 3.1.0


ags_synth_generator_set_volume ()

void
ags_synth_generator_set_volume (AgsSynthGenerator *synth_generator,
                                gdouble volume);

Sets volume.

Parameters

synth_generator

the AgsSynthGenerator

 

volume

the volume

 

Since: 3.1.0


ags_synth_generator_get_lfo_depth ()

gdouble
ags_synth_generator_get_lfo_depth (AgsSynthGenerator *synth_generator);

Gets LFO depth.

Parameters

synth_generator

the AgsSynthGenerator

 

Returns

the LFO depth

Since: 3.1.0


ags_synth_generator_set_lfo_depth ()

void
ags_synth_generator_set_lfo_depth (AgsSynthGenerator *synth_generator,
                                   gdouble lfo_depth);

Sets LFO depth.

Parameters

synth_generator

the AgsSynthGenerator

 

lfo_depth

the LFO depth

 

Since: 3.1.0


ags_synth_generator_get_tuning ()

gdouble
ags_synth_generator_get_tuning (AgsSynthGenerator *synth_generator);

Gets tuning.

Parameters

synth_generator

the AgsSynthGenerator

 

Returns

the tuning

Since: 3.1.0


ags_synth_generator_set_tuning ()

void
ags_synth_generator_set_tuning (AgsSynthGenerator *synth_generator,
                                gdouble tuning);

Sets tuning.

Parameters

synth_generator

the AgsSynthGenerator

 

tuning

the tuning

 

Since: 3.1.0


ags_synth_generator_get_do_fm_synth ()

gboolean
ags_synth_generator_get_do_fm_synth (AgsSynthGenerator *synth_generator);

Gets do FM synth.

Parameters

synth_generator

the AgsSynthGenerator

 

Returns

the do FM synth

Since: 3.1.0


ags_synth_generator_set_do_fm_synth ()

void
ags_synth_generator_set_do_fm_synth (AgsSynthGenerator *synth_generator,
                                     gboolean do_fm_synth);

Sets do FM synth.

Parameters

synth_generator

the AgsSynthGenerator

 

do_fm_synth

the do FM synth

 

Since: 3.1.0


ags_synth_generator_get_fm_lfo_oscillator ()

guint
ags_synth_generator_get_fm_lfo_oscillator
                               (AgsSynthGenerator *synth_generator);

Gets FM LFO oscillator.

Parameters

synth_generator

the AgsSynthGenerator

 

Returns

the FM LFO oscillator

Since: 3.1.0


ags_synth_generator_set_fm_lfo_oscillator ()

void
ags_synth_generator_set_fm_lfo_oscillator
                               (AgsSynthGenerator *synth_generator,
                                guint fm_lfo_oscillator);

Sets FM LFO oscillator.

Parameters

synth_generator

the AgsSynthGenerator

 

fm_lfo_oscillator

the FM LFO oscillator

 

Since: 3.1.0


ags_synth_generator_get_fm_lfo_frequency ()

gdouble
ags_synth_generator_get_fm_lfo_frequency
                               (AgsSynthGenerator *synth_generator);

Gets FM LFO frequency.

Parameters

synth_generator

the AgsSynthGenerator

 

Returns

the FM LFO frequency

Since: 3.1.0


ags_synth_generator_set_fm_lfo_frequency ()

void
ags_synth_generator_set_fm_lfo_frequency
                               (AgsSynthGenerator *synth_generator,
                                gdouble fm_lfo_frequency);

Sets FM LFO frequency.

Parameters

synth_generator

the AgsSynthGenerator

 

fm_lfo_frequency

the FM LFO frequency

 

Since: 3.1.0


ags_synth_generator_get_fm_lfo_depth ()

gdouble
ags_synth_generator_get_fm_lfo_depth (AgsSynthGenerator *synth_generator);

Gets FM LFO depth.

Parameters

synth_generator

the AgsSynthGenerator

 

Returns

the FM LFO depth

Since: 3.1.0


ags_synth_generator_set_fm_lfo_depth ()

void
ags_synth_generator_set_fm_lfo_depth (AgsSynthGenerator *synth_generator,
                                      gdouble fm_lfo_depth);

Sets FM LFO depth.

Parameters

synth_generator

the AgsSynthGenerator

 

fm_lfo_depth

the FM LFO depth

 

Since: 3.1.0


ags_synth_generator_get_fm_tuning ()

gdouble
ags_synth_generator_get_fm_tuning (AgsSynthGenerator *synth_generator);

Gets FM tuning.

Parameters

synth_generator

the AgsSynthGenerator

 

Returns

the FM tuning

Since: 3.1.0


ags_synth_generator_set_fm_tuning ()

void
ags_synth_generator_set_fm_tuning (AgsSynthGenerator *synth_generator,
                                   gdouble fm_tuning);

Sets FM tuning.

Parameters

synth_generator

the AgsSynthGenerator

 

fm_tuning

the FM tuning

 

Since: 3.1.0


ags_synth_generator_get_timestamp ()

AgsTimestamp *
ags_synth_generator_get_timestamp (AgsSynthGenerator *synth_generator);

Get timestamp.

Parameters

synth_generator

the AgsSynthGenerator

 

Returns

the AgsTimestamp.

[transfer full]

Since: 3.1.0


ags_synth_generator_set_timestamp ()

void
ags_synth_generator_set_timestamp (AgsSynthGenerator *synth_generator,
                                   AgsTimestamp *timestamp);

Set timestamp.

Parameters

synth_generator

the AgsSynthGenerator

 

timestamp

the AgsTimestamp

 

Since: 3.1.0


ags_synth_generator_compute ()

void
ags_synth_generator_compute (AgsSynthGenerator *synth_generator,
                             GObject *audio_signal,
                             gdouble note);

Compute synth for note .

Parameters

synth_generator

the AgsSynthGenerator

 

audio_signal

the AgsAudioSignal

 

note

the note to compute

 

Since: 3.0.0


ags_synth_generator_new ()

AgsSynthGenerator *
ags_synth_generator_new ();

Creates an AgsSynthGenerator

Returns

a new AgsSynthGenerator

Since: 3.0.0

Types and Values

AGS_SYNTH_GENERATOR_DEFAULT_SAMPLERATE

#define AGS_SYNTH_GENERATOR_DEFAULT_SAMPLERATE ((guint) AGS_SOUNDCARD_DEFAULT_SAMPLERATE)

AGS_SYNTH_GENERATOR_DEFAULT_BUFFER_SIZE

#define AGS_SYNTH_GENERATOR_DEFAULT_BUFFER_SIZE (AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE)

AGS_SYNTH_GENERATOR_DEFAULT_FORMAT

#define AGS_SYNTH_GENERATOR_DEFAULT_FORMAT (AGS_SOUNDCARD_DEFAULT_FORMAT)

AGS_SYNTH_GENERATOR_DEFAULT_OSCILLATOR

#define AGS_SYNTH_GENERATOR_DEFAULT_OSCILLATOR (AGS_SYNTH_GENERATOR_OSCILLATOR_SIN)

AGS_SYNTH_GENERATOR_DEFAULT_FREQUENCY

#define AGS_SYNTH_GENERATOR_DEFAULT_FREQUENCY (440.0)

AGS_SYNTH_GENERATOR_DEFAULT_PHASE

#define AGS_SYNTH_GENERATOR_DEFAULT_PHASE (0.0)

AGS_SYNTH_GENERATOR_DEFAULT_VOLUME

#define AGS_SYNTH_GENERATOR_DEFAULT_VOLUME (1.0)

AGS_SYNTH_GENERATOR_DEFAULT_LFO_DEPTH

#define AGS_SYNTH_GENERATOR_DEFAULT_LFO_DEPTH (1.0)

AGS_SYNTH_GENERATOR_DEFAULT_TUNING

#define AGS_SYNTH_GENERATOR_DEFAULT_TUNING (0.0)

AGS_SYNTH_GENERATOR_DEFAULT_FM_LFO_FREQUENCY

#define AGS_SYNTH_GENERATOR_DEFAULT_FM_LFO_FREQUENCY (6.0)

AGS_SYNTH_GENERATOR_DEFAULT_FM_LFO_DEPTH

#define AGS_SYNTH_GENERATOR_DEFAULT_FM_LFO_DEPTH (1.0)

AGS_SYNTH_GENERATOR_DEFAULT_FM_TUNING

#define AGS_SYNTH_GENERATOR_DEFAULT_FM_TUNING (0.0)

enum AgsSynthGeneratorOscillator

Enum values to specify oscillator.

Members

AGS_SYNTH_GENERATOR_OSCILLATOR_SIN

sinus

 

AGS_SYNTH_GENERATOR_OSCILLATOR_SAWTOOTH

sawtooth

 

AGS_SYNTH_GENERATOR_OSCILLATOR_TRIANGLE

triangle

 

AGS_SYNTH_GENERATOR_OSCILLATOR_SQUARE

square

 

AGS_SYNTH_GENERATOR_OSCILLATOR_IMPULSE

impulse