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 ()
AgsSoundcardFormat 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 ()
AgsComplex * ags_synth_generator_get_sync_point ()
void ags_synth_generator_set_sync_point ()
guint ags_synth_generator_get_sync_point_count ()
void ags_synth_generator_set_sync_point_count ()
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 ()

Properties

guint attack Read / Write
guint buffer-size Read / Write
double delay Read / Write
gboolean do-fm-synth Read / Write
gboolean do-lfo Read / Write
double fm-lfo-depth Read / Write
double fm-lfo-frequency Read / Write
guint fm-lfo-oscillator Read / Write
double fm-tuning Read / Write
guint format Read / Write
guint frame-count Read / Write
double frequency Read / Write
double lfo-depth Read / Write
guint loop-end Read / Write
guint loop-start Read / Write
guint oscillator Read / Write
double phase Read / Write
guint samplerate Read / Write
GObject * timestamp Read / Write
double tuning Read / Write
double volume Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── AgsFunction
        ╰── AgsSynthGenerator

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 ()

AgsSoundcardFormat
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,
                                AgsSoundcardFormat 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_sync_point ()

AgsComplex *
ags_synth_generator_get_sync_point (AgsSynthGenerator *synth_generator);

Get sync points of synth_generator .

Parameters

synth_generator

the AgsSynthGenerator

 

Returns

the sync point as a AgsComplex array.

[transfer full]

Since: 4.4.2


ags_synth_generator_set_sync_point ()

void
ags_synth_generator_set_sync_point (AgsSynthGenerator *synth_generator,
                                    gint position,
                                    AgsComplex *value);

Set value as sync point at position of synth_generator .

Parameters

synth_generator

the AgsSynthGenerator

 

position

the position to set

 

value

the AgsComplex value to set

 

Since: 4.4.2


ags_synth_generator_get_sync_point_count ()

guint
ags_synth_generator_get_sync_point_count
                               (AgsSynthGenerator *synth_generator);

Get sync point count of synth_generator .

Parameters

synth_generator

the AgsSynthGenerator

 

Since: 4.4.2


ags_synth_generator_set_sync_point_count ()

void
ags_synth_generator_set_sync_point_count
                               (AgsSynthGenerator *synth_generator,
                                guint sync_point_count);

Set sync point count and realloc sync points of synth_generator .

Parameters

synth_generator

the AgsSynthGenerator

 

sync_point_count

the sync point count

 

Since: 4.4.2


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_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)

Property Details

The “attack” property

  “attack”                   guint

The attack to be used.

Owner: AgsSynthGenerator

Flags: Read / Write

Default value: 0

Since: 3.0.0


The “buffer-size” property

  “buffer-size”              guint

The buffer size to be used.

Owner: AgsSynthGenerator

Flags: Read / Write

Default value: 1024

Since: 3.0.0


The “delay” property

  “delay”                    double

The delay to be used.

Owner: AgsSynthGenerator

Flags: Read / Write

Allowed values: [0,65535]

Default value: 0

Since: 3.0.0


The “do-fm-synth” property

  “do-fm-synth”              gboolean

If TRUE compute FM synth, otherwise not.

Owner: AgsSynthGenerator

Flags: Read / Write

Default value: FALSE

Since: 3.0.0


The “do-lfo” property

  “do-lfo”                   gboolean

If TRUE compute LFO amplification, otherwise not.

Owner: AgsSynthGenerator

Flags: Read / Write

Default value: FALSE

Since: 3.0.0


The “fm-lfo-depth” property

  “fm-lfo-depth”             double

The fm LFO depth to be used.

Owner: AgsSynthGenerator

Flags: Read / Write

Allowed values: [0,1]

Default value: 1

Since: 3.0.0


The “fm-lfo-frequency” property

  “fm-lfo-frequency”         double

The fm LFO frequency to be used.

Owner: AgsSynthGenerator

Flags: Read / Write

Allowed values: [0.001,27.5]

Default value: 6

Since: 3.0.0


The “fm-lfo-oscillator” property

  “fm-lfo-oscillator”        guint

The frame count to be used.

Owner: AgsSynthGenerator

Flags: Read / Write

Default value: 0

Since: 3.0.0


The “fm-tuning” property

  “fm-tuning”                double

The fm tuning to be used.

Owner: AgsSynthGenerator

Flags: Read / Write

Allowed values: [0,1200]

Default value: 0

Since: 3.0.0


The “format” property

  “format”                   guint

The format to be used.

Owner: AgsSynthGenerator

Flags: Read / Write

Default value: 16

Since: 3.0.0


The “frame-count” property

  “frame-count”              guint

The frame count to be used.

Owner: AgsSynthGenerator

Flags: Read / Write

Default value: 0

Since: 3.0.0


The “frequency” property

  “frequency”                double

The frequency to be used.

Owner: AgsSynthGenerator

Flags: Read / Write

Allowed values: [0,65535]

Default value: 440

Since: 3.0.0


The “lfo-depth” property

  “lfo-depth”                double

The LFO depth to be used.

Owner: AgsSynthGenerator

Flags: Read / Write

Allowed values: [0,1]

Default value: 1

Since: 3.0.0


The “loop-end” property

  “loop-end”                 guint

The loop end to be used.

Owner: AgsSynthGenerator

Flags: Read / Write

Default value: 0

Since: 3.0.0


The “loop-start” property

  “loop-start”               guint

The loop start to be used.

Owner: AgsSynthGenerator

Flags: Read / Write

Default value: 0

Since: 3.0.0


The “oscillator” property

  “oscillator”               guint

The oscillator to be used.

Owner: AgsSynthGenerator

Flags: Read / Write

Default value: 0

Since: 3.0.0


The “phase” property

  “phase”                    double

The phase to be used.

Owner: AgsSynthGenerator

Flags: Read / Write

Allowed values: [0,65535]

Default value: 0

Since: 3.0.0


The “samplerate” property

  “samplerate”               guint

The samplerate to be used.

Owner: AgsSynthGenerator

Flags: Read / Write

Default value: 48000

Since: 3.0.0


The “timestamp” property

  “timestamp”                GObject *

The assigned timestamp.

Owner: AgsSynthGenerator

Flags: Read / Write

Since: 3.0.0


The “tuning” property

  “tuning”                   double

The tuning to be used.

Owner: AgsSynthGenerator

Flags: Read / Write

Allowed values: [0,1200]

Default value: 0

Since: 3.0.0


The “volume” property

  “volume”                   double

The volume to be used.

Owner: AgsSynthGenerator

Flags: Read / Write

Allowed values: [0,2]

Default value: 1

Since: 3.0.0