AgsInput

AgsInput — Input of AgsAudio

Functions

Properties

AgsFileLink * file-link Read / Write
AgsSynthGenerator * synth-generator Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── AgsChannel
        ╰── AgsInput

Implemented Interfaces

AgsInput implements AgsConnectable.

Includes

#include <ags/audio/ags_input.h>

Description

AgsInput represents an input channel of AgsAudio.

Functions

ags_input_open_file ()

gboolean
ags_input_open_file (AgsInput *input,
                     gchar *filename,
                     gchar *preset,
                     gchar *instrument,
                     gchar *sample,
                     guint audio_channel);

Open filename and assign audio_channel 's data as AGS_AUDIO_SIGNAL_TEMPLATE audio signal to input 's own recycling.

Parameters

input

the AgsInput

 

filename

the filename as string

 

preset

the preset to open

 

instrument

the instrument to open

 

sample

the sample to open

 

audio_channel

the audio channel to read

 

Returns

TRUE if open was successful, else FALSE

Since: 1.0.0


ags_input_apply_synth ()

gboolean
ags_input_apply_synth (AgsInput *input,
                       guint oscillator,
                       gdouble frequency,
                       gdouble phase,
                       gdouble volume,
                       guint n_frames);

Apply synth using specified parameters to input.

Parameters

input

the AgsInput

 

oscillator

the oscillator to use

 

frequency

the frequency to use

 

phase

the phase to use

 

volume

the volume to use

 

n_frames

compute n_frames count of frames

 

Returns

TRUE if successful applied, else FALSE

Since: 1.0.0


ags_input_apply_synth_extended ()

gboolean
ags_input_apply_synth_extended (AgsInput *input,
                                guint oscillator,
                                gdouble frequency,
                                gdouble phase,
                                gdouble volume,
                                guint n_frames,
                                guint attack,
                                gdouble base_note,
                                AgsComplex *sync_start,
                                AgsComplex *sync_end,
                                guint compute_flags);

Apply synth using specified parameters to input.

Parameters

input

the AgsInput

 

oscillator

the oscillator to use

 

frequency

the frequency to use

 

phase

the phase to use

 

volume

the volume to use

 

n_frames

compute n_frames count of frames

 

attack

the attack to use

 

base_note

the base note to ramp up from

 

sync_start

safe to be NULL

 

sync_end

safe to be NULL

 

compute_flags

the flags to use to compute the synth

 

Returns

TRUE if successful applied, else FALSE

Since: 1.0.0


ags_input_is_active ()

gboolean
ags_input_is_active (AgsInput *input,
                     GObject *recycling_context);

Check if input is active and needs processing.

Parameters

input

the AgsInput

 

recycling_context

the AgsRecyclingContext to check

 

Returns

TRUE if has a need to be processed, else FALSE

Since: 1.0.0


ags_input_next_active ()

AgsInput *
ags_input_next_active (AgsInput *input,
                       GObject *recycling_context);

Find next AgsInput needed to be processed.

Parameters

input

the AgsInput

 

recycling_context

the AgsRecyclingContext to check

 

Returns

next active AgsInput, else NULL if non available

Since: 1.0.0


ags_input_new ()

AgsInput *
ags_input_new (GObject *audio);

Creates a AgsInput, linking tree to audio .

Parameters

audio

the AgsAudio

 

Returns

a new AgsInput

Since: 1.0.0


AGS_INPUT()

#define AGS_INPUT(obj)                (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_INPUT, AgsInput))

AGS_INPUT_CLASS()

#define AGS_INPUT_CLASS(class)        (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_INPUT, AgsInputClass))

AGS_INPUT_GET_CLASS()

#define AGS_INPUT_GET_CLASS(obj)      (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_INPUT, AgsInputClass))

AGS_IS_INPUT()

#define AGS_IS_INPUT(obj)             (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_INPUT))

ags_input_get_type ()

GType
ags_input_get_type ();

Types and Values

AGS_INPUT_SYNTH_BASE_NOTE

#define AGS_INPUT_SYNTH_BASE_NOTE (-48.0)

AGS_TYPE_INPUT

#define AGS_TYPE_INPUT                (ags_input_get_type())

struct AgsInput

struct AgsInput;

struct AgsInputClass

struct AgsInputClass {
  AgsChannelClass channel;
};

Property Details

The “file-link” property

  “file-link”                AgsFileLink *

The file containing audio data.

Flags: Read / Write

Since: 1.0.0


The “synth-generator” property

  “synth-generator”          AgsSynthGenerator *

An optional synth generator that might be used.

Flags: Read / Write

Since: 1.0.0.7