AgsMidiUtil

AgsMidiUtil — MIDI util

Functions

Includes

#include <ags/audio/midi/ags_midi_util.h>

Description

Utility functions for MIDI.

Functions

ags_midi_util_envelope_to_velocity ()

glong
ags_midi_util_envelope_to_velocity (AgsComplex *attack,
                                    AgsComplex *decay,
                                    AgsComplex *sustain,
                                    AgsComplex *release,
                                    AgsComplex *ratio,
                                    guint samplerate,
                                    guint start_frame,
                                    guint end_frame);

Envelope to velocity.

Parameters

attack

attack

 

decay

decay

 

sustain

sustain

 

release

release

 

ratio

ratio

 

samplerate

samplerate

 

start_frame

start frame

 

end_frame

end frame

 

Returns

the velocity

Since: 0.7.2


ags_midi_util_velocity_to_envelope ()

void
ags_midi_util_velocity_to_envelope (glong delta_time,
                                    gboolean is_release,
                                    AgsComplex **attack,
                                    AgsComplex **decay,
                                    AgsComplex **sustain,
                                    AgsComplex **release,
                                    AgsComplex **ratio,
                                    guint *samplerate,
                                    guint *start_frame,
                                    guint *end_frame);

Velocity to envelope.

Parameters

delta_time

delta time

 

is_release

is release

 

attack

attack

 

decay

decay

 

sustain

sustain

 

release

release

 

ratio

ratio

 

samplerate

samplerate

 

start_frame

start frame

 

end_frame

end frame

 

Since: 0.7.2


ags_midi_util_envelope_to_pressure ()

glong
ags_midi_util_envelope_to_pressure (AgsComplex *attack,
                                    AgsComplex *decay,
                                    AgsComplex *sustain,
                                    AgsComplex *release,
                                    AgsComplex *ratio,
                                    guint samplerate,
                                    guint start_frame,
                                    guint end_frame);

Envelope to pressure.

Parameters

attack

attack

 

decay

decay

 

sustain

sustain

 

release

release

 

ratio

ratio

 

samplerate

samplerate

 

start_frame

start frame

 

end_frame

end frame

 

Returns

the pressure

Since: 0.7.2


ags_midi_util_pressure_to_envelope ()

void
ags_midi_util_pressure_to_envelope (glong delta_time,
                                    gboolean is_sustain,
                                    AgsComplex **attack,
                                    AgsComplex **decay,
                                    AgsComplex **sustain,
                                    AgsComplex **release,
                                    AgsComplex **ratio,
                                    guint *samplerate,
                                    guint *start_frame,
                                    guint *end_frame);

Pressure to envelope.

Parameters

delta_time

delta time

 

is_sustain

is sustain

 

attack

attack

 

decay

decay

 

sustain

sustain

 

release

release

 

ratio

ratio

 

samplerate

samplerate

 

start_frame

start frame

 

end_frame

end frame

 

Since: 0.7.2


ags_midi_util_delta_time_to_offset ()

guint
ags_midi_util_delta_time_to_offset (glong delta_time,
                                    gdouble bpm,
                                    gdouble delay_factor,
                                    gdouble *delay,
                                    guint *attack);

Delta time to offset

Parameters

delta_time

delta time

 

bpm

bpm

 

delay_factor

delay factor

 

delay

delay

 

attack

attack

 

Returns

the offset

Since: 0.7.2


ags_midi_util_offset_to_delta_time ()

glong
ags_midi_util_offset_to_delta_time (guint x,
                                    gdouble bpm,
                                    gdouble delay_factor);

Offset to delta time

Parameters

x

offset

 

bpm

bpm

 

delay_factor

delay factor

 

Returns

the delta time

Since: 0.7.2

Types and Values