AgsSF2Util

AgsSF2Util — SF2 synth util

Stability Level

Stable, unless otherwise indicated

Functions

Types and Values

struct AgsSF2

Includes

#include <ags/audio/ags_sf2_util.h>

Description

Utility functions to compute SF2 synths.

Functions

AGS_SF2()

#define AGS_SF2(ptr)              ((AgsSF2 *)(ptr))

ags_sf2_get_note ()

gdouble
ags_sf2_get_note (AgsSF2 *sf2);

Get note.

Parameters

sf2

the AgsSF2

 

Returns

the note

Since: 3.9.1


ags_sf2_set_note ()

void
ags_sf2_set_note (AgsSF2 *sf2,
                  gdouble note);

Set note.

Parameters

sf2

the AgsSF2

 

note

the note

 

Since: 3.9.1


ags_sf2_get_volume ()

gdouble
ags_sf2_get_volume (AgsSF2 *sf2);

Get volume.

Parameters

sf2

the AgsSF2

 

Returns

the volume

Since: 3.9.1


ags_sf2_set_volume ()

void
ags_sf2_set_volume (AgsSF2 *sf2,
                    gdouble volume);

Set volume.

Parameters

sf2

the AgsSF2

 

volume

the volume

 

Since: 3.9.1


ags_sf2_get_samplerate ()

guint
ags_sf2_get_samplerate (AgsSF2 *sf2);

Get samplerate.

Parameters

sf2

the AgsSF2

 

Returns

the samplerate

Since: 3.9.1


ags_sf2_set_samplerate ()

void
ags_sf2_set_samplerate (AgsSF2 *sf2,
                        guint samplerate);

Set samplerate.

Parameters

sf2

the AgsSF2

 

samplerate

the samplerate

 

Since: 3.9.1


ags_sf2_get_offset ()

guint
ags_sf2_get_offset (AgsSF2 *sf2);

Get offset.

Parameters

sf2

the AgsSF2

 

Returns

the offset

Since: 3.9.1


ags_sf2_set_offset ()

void
ags_sf2_set_offset (AgsSF2 *sf2,
                    guint offset);

Set offset.

Parameters

sf2

the AgsSF2

 

offset

the offset

 

Since: 3.9.1


ags_sf2_get_n_frames ()

guint
ags_sf2_get_n_frames (AgsSF2 *sf2);

Get n-frames.

Parameters

sf2

the AgsSF2

 

Returns

the n-frames

Since: 3.9.1


ags_sf2_set_n_frames ()

void
ags_sf2_set_n_frames (AgsSF2 *sf2,
                      guint n_frames);

Set n-frames.

Parameters

sf2

the AgsSF2

 

n_frames

the n-frames

 

Since: 3.9.1


ags_sf2_get_loop_mode ()

guint
ags_sf2_get_loop_mode (AgsSF2 *sf2);

Get loop mode.

Parameters

sf2

the AgsSF2

 

Returns

the loop mode

Since: 3.9.1


ags_sf2_set_loop_mode ()

void
ags_sf2_set_loop_mode (AgsSF2 *sf2,
                       guint loop_mode);

Set loop mode.

Parameters

sf2

the AgsSF2

 

loop_mode

the loop mode

 

Since: 3.9.1


ags_sf2_get_loop_start ()

guint
ags_sf2_get_loop_start (AgsSF2 *sf2);

Get loop start.

Parameters

sf2

the AgsSF2

 

Returns

the loop start

Since: 3.9.1


ags_sf2_set_loop_start ()

void
ags_sf2_set_loop_start (AgsSF2 *sf2,
                        guint loop_start);

Set loop start.

Parameters

sf2

the AgsSF2

 

loop_start

the loop start

 

Since: 3.9.1


ags_sf2_get_loop_end ()

guint
ags_sf2_get_loop_end (AgsSF2 *sf2);

Get loop end.

Parameters

sf2

the AgsSF2

 

Returns

the loop end

Since: 3.9.1


ags_sf2_set_loop_end ()

void
ags_sf2_set_loop_end (AgsSF2 *sf2,
                      guint loop_end);

Set loop end.

Parameters

sf2

the AgsSF2

 

loop_end

the loop end

 

Since: 3.9.1


ags_sf2_get_generic_pitch ()

gpointer
ags_sf2_get_generic_pitch (AgsSF2 *sf2);

Get generic pitch.

Parameters

sf2

the AgsSF2

 

Returns

the generic pitch

Since: 3.9.1


ags_sf2_set_generic_pitch ()

void
ags_sf2_set_generic_pitch (AgsSF2 *sf2,
                           gpointer generic_pitch);

Set generic pitch.

Parameters

sf2

the AgsSF2

 

generic_pitch

the generic pitch

 

Since: 3.9.1


ags_sf2_get_user_data ()

gpointer
ags_sf2_get_user_data (AgsSF2 *sf2);

Get user data.

Parameters

sf2

the AgsSF2

 

Returns

the user data

Since: 3.9.1


ags_sf2_set_user_data ()

void
ags_sf2_set_user_data (AgsSF2 *sf2,
                       gpointer user_data);

Set user data.

Parameters

sf2

the AgsSF2

 

user_data

the user data

 

Since: 3.9.1


ags_sf2_util_copy_s8 ()

void
ags_sf2_util_copy_s8 (AgsSF2 *sf2,
                      gint8 *buffer,
                      guint buffer_size,
                      AgsIpatchSample *ipatch_sample);

Generate Soundfont2 wave.

Parameters

sf2

the AgsSF2

 

buffer

the audio buffer

 

buffer_size

the audio buffer length

 

ipatch_sample

the AgsIpatchSample

 

Since: 3.9.0


ags_sf2_util_copy_s16 ()

void
ags_sf2_util_copy_s16 (AgsSF2 *sf2,
                       gint16 *buffer,
                       guint buffer_size,
                       AgsIpatchSample *ipatch_sample);

Generate Soundfont2 wave.

Parameters

sf2

the AgsSF2

 

buffer

the audio buffer

 

buffer_size

the audio buffer length

 

ipatch_sample

the AgsIpatchSample

 

Since: 3.9.0


ags_sf2_util_copy_s24 ()

void
ags_sf2_util_copy_s24 (AgsSF2 *sf2,
                       gint32 *buffer,
                       guint buffer_size,
                       AgsIpatchSample *ipatch_sample);

Generate Soundfont2 wave.

Parameters

sf2

the AgsSF2

 

buffer

the audio buffer

 

buffer_size

the audio buffer length

 

ipatch_sample

the AgsIpatchSample

 

Since: 3.9.0


ags_sf2_util_copy_s32 ()

void
ags_sf2_util_copy_s32 (AgsSF2 *sf2,
                       gint32 *buffer,
                       guint buffer_size,
                       AgsIpatchSample *ipatch_sample);

Generate Soundfont2 wave.

Parameters

sf2

the AgsSF2

 

buffer

the audio buffer

 

buffer_size

the audio buffer length

 

ipatch_sample

the AgsIpatchSample

 

Since: 3.9.0


ags_sf2_util_copy_s64 ()

void
ags_sf2_util_copy_s64 (AgsSF2 *sf2,
                       gint64 *buffer,
                       guint buffer_size,
                       AgsIpatchSample *ipatch_sample);

Generate Soundfont2 wave.

Parameters

sf2

the AgsSF2

 

buffer

the audio buffer

 

buffer_size

the audio buffer length

 

ipatch_sample

the AgsIpatchSample

 

Since: 3.9.0


ags_sf2_util_copy_float ()

void
ags_sf2_util_copy_float (AgsSF2 *sf2,
                         gfloat *buffer,
                         guint buffer_size,
                         AgsIpatchSample *ipatch_sample);

Generate Soundfont2 wave.

Parameters

sf2

the AgsSF2

 

buffer

the audio buffer

 

buffer_size

the audio buffer length

 

ipatch_sample

the AgsIpatchSample

 

Since: 3.9.0


ags_sf2_util_copy_double ()

void
ags_sf2_util_copy_double (AgsSF2 *sf2,
                          gdouble *buffer,
                          guint buffer_size,
                          AgsIpatchSample *ipatch_sample);

Generate Soundfont2 wave.

Parameters

sf2

the AgsSF2

 

buffer

the audio buffer

 

buffer_size

the audio buffer length

 

ipatch_sample

the AgsIpatchSample

 

Since: 3.9.0


ags_sf2_util_copy_complex ()

void
ags_sf2_util_copy_complex (AgsSF2 *sf2,
                           AgsComplex *buffer,
                           guint buffer_size,
                           AgsIpatchSample *ipatch_sample);

Generate Soundfont2 wave.

Parameters

sf2

the AgsSF2

 

buffer

the audio buffer

 

buffer_size

the audio buffer length

 

ipatch_sample

the AgsIpatchSample

 

Since: 3.9.0


ags_sf2_util_copy ()

void
ags_sf2_util_copy (AgsSF2 *sf2,
                   void *buffer,
                   guint buffer_size,
                   AgsIpatchSample *ipatch_sample,
                   guint audio_buffer_util_format);

Generate Soundfont2 wave.

Parameters

sf2

the AgsSF2

 

buffer

the audio buffer

 

buffer_size

the audio buffer length

 

ipatch_sample

the AgsIpatchSample

 

audio_buffer_util_format

the audio data format

 

Since: 3.9.0

Types and Values

struct AgsSF2

struct AgsSF2 {
  gdouble note;

  gdouble volume;

  guint samplerate;

  guint offset;
  guint n_frames;

  guint loop_mode;

  gint loop_start;
  gint loop_end;

  gpointer generic_pitch;

  gpointer user_data;
};