AgsSF2SynthUtil

AgsSF2SynthUtil — frequency modulation synth util

Functions

Types and Values

Includes

#include <ags/audio/ags_sf2_synth_util.h>

Description

Utility functions to compute SF2 synths.

Functions

ags_sf2_synth_util_midi_locale_find_sample_near_midi_key ()

AgsIpatchSample *
ags_sf2_synth_util_midi_locale_find_sample_near_midi_key
                               (AgsIpatch *ipatch,
                                gint bank,
                                gint program,
                                gint midi_key,
                                gchar **preset,
                                gchar **instrument,
                                gchar **sample);

Find sample near MIDI key.

Parameters

ipatch

the AgsIpatch

 

bank

the bank

 

program

the program

 

midi_key

the MIDI key

 

preset

the preset.

[out]

instrument

the instrument.

[out]

sample

the sample.

[out]

Since: 3.4.0


ags_sf2_synth_util_copy_s8 ()

void
ags_sf2_synth_util_copy_s8 (gint8 *buffer,
                            guint buffer_size,
                            AgsIpatchSample *ipatch_sample,
                            gdouble note,
                            gdouble volume,
                            guint samplerate,
                            guint offset,
                            guint n_frames,
                            guint loop_mode,
                            gint loop_start,
                            gint loop_end);

Generate Soundfont2 wave.

Parameters

buffer

the audio buffer

 

buffer_size

the audio buffer size

 

ipatch_sample

the AgsIpatchSample

 

note

the note

 

volume

the volume of the sin wave

 

samplerate

the samplerate

 

offset

start frame

 

n_frames

generate n frames

 

loop_mode

the loop mode

 

loop_start

loop start

 

loop_end

loop end

 

Since: 3.4.0


ags_sf2_synth_util_copy_s16 ()

void
ags_sf2_synth_util_copy_s16 (gint16 *buffer,
                             guint buffer_size,
                             AgsIpatchSample *ipatch_sample,
                             gdouble note,
                             gdouble volume,
                             guint samplerate,
                             guint offset,
                             guint n_frames,
                             guint loop_mode,
                             gint loop_start,
                             gint loop_end);

Generate Soundfont2 wave.

Parameters

buffer

the audio buffer

 

buffer_size

the audio buffer size

 

ipatch_sample

the AgsIpatchSample

 

note

the note

 

volume

the volume of the sin wave

 

samplerate

the samplerate

 

offset

start frame

 

n_frames

generate n frames

 

loop_mode

the loop mode

 

loop_start

loop start

 

loop_end

loop end

 

Since: 3.4.0


ags_sf2_synth_util_copy_s24 ()

void
ags_sf2_synth_util_copy_s24 (gint32 *buffer,
                             guint buffer_size,
                             AgsIpatchSample *ipatch_sample,
                             gdouble note,
                             gdouble volume,
                             guint samplerate,
                             guint offset,
                             guint n_frames,
                             guint loop_mode,
                             gint loop_start,
                             gint loop_end);

Generate Soundfont2 wave.

Parameters

buffer

the audio buffer

 

buffer_size

the audio buffer size

 

ipatch_sample

the AgsIpatchSample

 

note

the note

 

volume

the volume of the sin wave

 

samplerate

the samplerate

 

offset

start frame

 

n_frames

generate n frames

 

loop_mode

the loop mode

 

loop_start

loop start

 

loop_end

loop end

 

Since: 3.4.0


ags_sf2_synth_util_copy_s32 ()

void
ags_sf2_synth_util_copy_s32 (gint32 *buffer,
                             guint buffer_size,
                             AgsIpatchSample *ipatch_sample,
                             gdouble note,
                             gdouble volume,
                             guint samplerate,
                             guint offset,
                             guint n_frames,
                             guint loop_mode,
                             gint loop_start,
                             gint loop_end);

Generate Soundfont2 wave.

Parameters

buffer

the audio buffer

 

buffer_size

the audio buffer size

 

ipatch_sample

the AgsIpatchSample

 

note

the note

 

volume

the volume of the sin wave

 

samplerate

the samplerate

 

offset

start frame

 

n_frames

generate n frames

 

loop_mode

the loop mode

 

loop_start

loop start

 

loop_end

loop end

 

Since: 3.4.0


ags_sf2_synth_util_copy_s64 ()

void
ags_sf2_synth_util_copy_s64 (gint64 *buffer,
                             guint buffer_size,
                             AgsIpatchSample *ipatch_sample,
                             gdouble note,
                             gdouble volume,
                             guint samplerate,
                             guint offset,
                             guint n_frames,
                             guint loop_mode,
                             gint loop_start,
                             gint loop_end);

Generate Soundfont2 wave.

Parameters

buffer

the audio buffer

 

buffer_size

the audio buffer size

 

ipatch_sample

the AgsIpatchSample

 

note

the note

 

volume

the volume of the sin wave

 

samplerate

the samplerate

 

offset

start frame

 

n_frames

generate n frames

 

loop_mode

the loop mode

 

loop_start

loop start

 

loop_end

loop end

 

Since: 3.4.0


ags_sf2_synth_util_copy_float ()

void
ags_sf2_synth_util_copy_float (gfloat *buffer,
                               guint buffer_size,
                               AgsIpatchSample *ipatch_sample,
                               gdouble note,
                               gdouble volume,
                               guint samplerate,
                               guint offset,
                               guint n_frames,
                               guint loop_mode,
                               gint loop_start,
                               gint loop_end);

Generate Soundfont2 wave.

Parameters

buffer

the audio buffer

 

buffer_size

the audio buffer size

 

ipatch_sample

the AgsIpatchSample

 

note

the note

 

volume

the volume of the sin wave

 

samplerate

the samplerate

 

offset

start frame

 

n_frames

generate n frames

 

loop_mode

the loop mode

 

loop_start

loop start

 

loop_end

loop end

 

Since: 3.4.0


ags_sf2_synth_util_copy_double ()

void
ags_sf2_synth_util_copy_double (gdouble *buffer,
                                guint buffer_size,
                                AgsIpatchSample *ipatch_sample,
                                gdouble note,
                                gdouble volume,
                                guint samplerate,
                                guint offset,
                                guint n_frames,
                                guint loop_mode,
                                gint loop_start,
                                gint loop_end);

Generate Soundfont2 wave.

Parameters

buffer

the audio buffer

 

buffer_size

the audio buffer size

 

ipatch_sample

the AgsIpatchSample

 

note

the note

 

volume

the volume of the sin wave

 

samplerate

the samplerate

 

offset

start frame

 

n_frames

generate n frames

 

loop_mode

the loop mode

 

loop_start

loop start

 

loop_end

loop end

 

Since: 3.4.0


ags_sf2_synth_util_copy_complex ()

void
ags_sf2_synth_util_copy_complex (AgsComplex *buffer,
                                 guint buffer_size,
                                 AgsIpatchSample *ipatch_sample,
                                 gdouble note,
                                 gdouble volume,
                                 guint samplerate,
                                 guint offset,
                                 guint n_frames,
                                 guint loop_mode,
                                 gint loop_start,
                                 gint loop_end);

Generate Soundfont2 wave.

Parameters

buffer

the audio buffer

 

buffer_size

the audio buffer size

 

ipatch_sample

the AgsIpatchSample

 

note

the note

 

volume

the volume of the sin wave

 

samplerate

the samplerate

 

offset

start frame

 

n_frames

generate n frames

 

loop_mode

the loop mode

 

loop_start

loop start

 

loop_end

loop end

 

Since: 3.4.0


ags_sf2_synth_util_copy ()

void
ags_sf2_synth_util_copy (void *buffer,
                         guint buffer_size,
                         AgsIpatchSample *ipatch_sample,
                         gdouble note,
                         gdouble volume,
                         guint samplerate,
                         guint audio_buffer_util_format,
                         guint offset,
                         guint n_frames,
                         guint loop_mode,
                         gint loop_start,
                         gint loop_end);

Generate Soundfont2 wave.

Parameters

buffer

the audio buffer

 

buffer_size

the buffer size

 

ipatch_sample

the AgsIpatchSample

 

note

the note

 

volume

the volume of the sin wave

 

samplerate

the samplerate

 

audio_buffer_util_format

the audio data format

 

offset

start frame

 

n_frames

generate n frames

 

loop_mode

the loop mode

 

loop_start

the loop start

 

loop_end

the loop end

 

Since: 3.4.0

Types and Values

enum AgsSF2SynthUtilLoopMode

Members

AGS_SF2_SYNTH_UTIL_LOOP_NONE

   

AGS_SF2_SYNTH_UTIL_LOOP_STANDARD

   

AGS_SF2_SYNTH_UTIL_LOOP_RELEASE

   

AGS_SF2_SYNTH_UTIL_LOOP_PINGPONG