AgsSFZSynthUtil

AgsSFZSynthUtil — SFZ synth util

Stability Level

Stable, unless otherwise indicated

Functions

Types and Values

Object Hierarchy

    GBoxed
    ╰── AgsSFZSynthUtil

Includes

#include <ags/audio/ags_sfz_synth_util.h>

Description

Utility functions to compute SFZ synths.

Functions

ags_sfz_synth_util_copy_s8 ()

void
ags_sfz_synth_util_copy_s8 (gint8 *buffer,
                            guint buffer_size,
                            AgsSFZSample *sfz_sample,
                            gdouble note,
                            gdouble volume,
                            guint samplerate,
                            guint offset,
                            guint n_frames,
                            guint loop_mode,
                            gint loop_start,
                            gint loop_end);

ags_sfz_synth_util_copy_s8 is deprecated and should not be used in newly-written code.

Generate SFZ wave.

Parameters

buffer

the audio buffer

 

buffer_size

the audio buffer size

 

sfz_sample

the AgsSFZSample

 

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

void
ags_sfz_synth_util_copy_s16 (gint16 *buffer,
                             guint buffer_size,
                             AgsSFZSample *sfz_sample,
                             gdouble note,
                             gdouble volume,
                             guint samplerate,
                             guint offset,
                             guint n_frames,
                             guint loop_mode,
                             gint loop_start,
                             gint loop_end);

ags_sfz_synth_util_copy_s16 is deprecated and should not be used in newly-written code.

Generate SFZ wave.

Parameters

buffer

the audio buffer

 

buffer_size

the audio buffer size

 

sfz_sample

the AgsSFZSample

 

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

void
ags_sfz_synth_util_copy_s24 (gint32 *buffer,
                             guint buffer_size,
                             AgsSFZSample *sfz_sample,
                             gdouble note,
                             gdouble volume,
                             guint samplerate,
                             guint offset,
                             guint n_frames,
                             guint loop_mode,
                             gint loop_start,
                             gint loop_end);

ags_sfz_synth_util_copy_s24 is deprecated and should not be used in newly-written code.

Generate SFZ wave.

Parameters

buffer

the audio buffer

 

buffer_size

the audio buffer size

 

sfz_sample

the AgsSFZSample

 

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

void
ags_sfz_synth_util_copy_s32 (gint32 *buffer,
                             guint buffer_size,
                             AgsSFZSample *sfz_sample,
                             gdouble note,
                             gdouble volume,
                             guint samplerate,
                             guint offset,
                             guint n_frames,
                             guint loop_mode,
                             gint loop_start,
                             gint loop_end);

ags_sfz_synth_util_copy_s32 is deprecated and should not be used in newly-written code.

Generate SFZ wave.

Parameters

buffer

the audio buffer

 

buffer_size

the audio buffer size

 

sfz_sample

the AgsSFZSample

 

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

void
ags_sfz_synth_util_copy_s64 (gint64 *buffer,
                             guint buffer_size,
                             AgsSFZSample *sfz_sample,
                             gdouble note,
                             gdouble volume,
                             guint samplerate,
                             guint offset,
                             guint n_frames,
                             guint loop_mode,
                             gint loop_start,
                             gint loop_end);

ags_sfz_synth_util_copy_s64 is deprecated and should not be used in newly-written code.

Generate SFZ wave.

Parameters

buffer

the audio buffer

 

buffer_size

the audio buffer size

 

sfz_sample

the AgsSFZSample

 

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

void
ags_sfz_synth_util_copy_float (gfloat *buffer,
                               guint buffer_size,
                               AgsSFZSample *sfz_sample,
                               gdouble note,
                               gdouble volume,
                               guint samplerate,
                               guint offset,
                               guint n_frames,
                               guint loop_mode,
                               gint loop_start,
                               gint loop_end);

ags_sfz_synth_util_copy_float is deprecated and should not be used in newly-written code.

Generate SFZ wave.

Parameters

buffer

the audio buffer

 

buffer_size

the audio buffer size

 

sfz_sample

the AgsSFZSample

 

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

void
ags_sfz_synth_util_copy_double (gdouble *buffer,
                                guint buffer_size,
                                AgsSFZSample *sfz_sample,
                                gdouble note,
                                gdouble volume,
                                guint samplerate,
                                guint offset,
                                guint n_frames,
                                guint loop_mode,
                                gint loop_start,
                                gint loop_end);

ags_sfz_synth_util_copy_double is deprecated and should not be used in newly-written code.

Generate SFZ wave.

Parameters

buffer

the audio buffer

 

buffer_size

the audio buffer size

 

sfz_sample

the AgsSFZSample

 

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

void
ags_sfz_synth_util_copy_complex (AgsComplex *buffer,
                                 guint buffer_size,
                                 AgsSFZSample *sfz_sample,
                                 gdouble note,
                                 gdouble volume,
                                 guint samplerate,
                                 guint offset,
                                 guint n_frames,
                                 guint loop_mode,
                                 gint loop_start,
                                 gint loop_end);

ags_sfz_synth_util_copy_complex is deprecated and should not be used in newly-written code.

Generate SFZ wave.

Parameters

buffer

the audio buffer

 

buffer_size

the audio buffer size

 

sfz_sample

the AgsSFZSample

 

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

void
ags_sfz_synth_util_copy (void *buffer,
                         guint buffer_size,
                         AgsSFZSample *sfz_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);

ags_sfz_synth_util_copy is deprecated and should not be used in newly-written code.

Generate Soundfont2 wave.

Parameters

buffer

the audio buffer

 

buffer_size

the buffer size

 

sfz_sample

the AgsSFZSample

 

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


ags_sfz_synth_util_get_type ()

GType
ags_sfz_synth_util_get_type (void);

Types and Values

enum AgsSFZSynthUtilLoopMode

Enum values to specify loop mode.

Members

AGS_SFZ_SYNTH_UTIL_LOOP_NONE

loop none

 

AGS_SFZ_SYNTH_UTIL_LOOP_STANDARD

loop standard

 

AGS_SFZ_SYNTH_UTIL_LOOP_RELEASE

loop release

 

AGS_SFZ_SYNTH_UTIL_LOOP_PINGPONG

loop pingpong

 

AGS_TYPE_SFZ_SYNTH_UTIL

#define AGS_TYPE_SFZ_SYNTH_UTIL         (ags_sfz_synth_util_get_type())

struct AgsSFZSynthUtil

struct AgsSFZSynthUtil {
  AgsSFZSample *sfz_sample;

  gpointer source;
  guint source_stride;

  gpointer sample_buffer;
  gpointer im_buffer;

  guint buffer_length;
  guint format;
  guint samplerate;

  gdouble note;

  gdouble volume;

  guint frame_count;
  guint offset;

  guint loop_mode;

  guint loop_start;
  guint loop_end;

  AgsGenericPitchUtil *generic_pitch_util;
};