AgsMidiBufferUtil

AgsMidiBufferUtil — MIDI buffer util

Functions

Includes

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

Description

Utility functions for MIDI buffers.

Functions

ags_midi_buffer_util_get_varlength_size ()

guint
ags_midi_buffer_util_get_varlength_size
                               (glong varlength);

Retrieve the size needed to store the variable length.

Parameters

varlength

the variable length

 

Returns

the size needed to be allocated

Since: 0.7.2


ags_midi_buffer_util_put_varlength ()

void
ags_midi_buffer_util_put_varlength (unsigned char *buffer,
                                    glong varlength);

Put the variable lenght value to buffer .

Parameters

buffer

the character buffer

 

varlength

the value to put

 

Since: 0.7.2


ags_midi_buffer_util_get_varlength ()

guint
ags_midi_buffer_util_get_varlength (unsigned char *buffer,
                                    glong *varlength);

Get the variable lenght value from buffer .

Parameters

buffer

the character buffer

 

varlength

the return location

 

Returns

the number of bytes read.

Since: 0.7.4


ags_midi_buffer_util_put_key_on ()

void
ags_midi_buffer_util_put_key_on (unsigned char *buffer,
                                 glong delta_time,
                                 glong channel,
                                 glong key,
                                 glong velocity);

Puts the given values to buffer with appropriate channel message.

Parameters

buffer

the character buffer

 

delta_time

timing information

 

channel

valid channels from 0-15

 

key

valid keys to play 0-128

 

velocity

the key dynamics

 

Since: 0.7.2


ags_midi_buffer_util_get_key_on ()

guint
ags_midi_buffer_util_get_key_on (unsigned char *buffer,
                                 glong *delta_time,
                                 glong *channel,
                                 glong *key,
                                 glong *velocity);

Get the key-on message from buffer .

Parameters

buffer

the character buffer

 

delta_time

the return location of timing information

 

channel

the return location of channel

 

key

the return location of key

 

velocity

the return location of velocity

 

Returns

the number of bytes read.

Since: 0.7.4


ags_midi_buffer_util_put_key_off ()

void
ags_midi_buffer_util_put_key_off (unsigned char *buffer,
                                  glong delta_time,
                                  glong channel,
                                  glong key,
                                  glong velocity);

Puts the given values to buffer with appropriate channel message.

Parameters

buffer

the character buffer

 

delta_time

timing information

 

channel

valid channels from 0-15

 

key

valid keys to play 0-128

 

velocity

the key dynamics

 

Since: 0.7.2


ags_midi_buffer_util_get_key_off ()

guint
ags_midi_buffer_util_get_key_off (unsigned char *buffer,
                                  glong *delta_time,
                                  glong *channel,
                                  glong *key,
                                  glong *velocity);

Get the key-off message from buffer .

Parameters

buffer

the character buffer

 

delta_time

the return location of timing information

 

channel

the return location of channel

 

key

the return location of key

 

velocity

the return location of velocity

 

Returns

the number of bytes read.

Since: 0.7.4


ags_midi_buffer_util_put_key_pressure ()

void
ags_midi_buffer_util_put_key_pressure (unsigned char *buffer,
                                       glong delta_time,
                                       glong channel,
                                       glong key,
                                       glong pressure);

Puts the given values to buffer with appropriate channel message.

Parameters

buffer

the character buffer

 

delta_time

timing information

 

channel

valid channels from 0-15

 

key

valid keys to play 0-128

 

pressure

the key dynamics

 

Since: 0.7.2


ags_midi_buffer_util_get_key_pressure ()

guint
ags_midi_buffer_util_get_key_pressure (unsigned char *buffer,
                                       glong *delta_time,
                                       glong *channel,
                                       glong *key,
                                       glong *pressure);

Get the key-pressure message from buffer .

Parameters

buffer

the character buffer

 

delta_time

the return location of timing information

 

channel

the return location of channel

 

key

the return location of key

 

pressure

the return location of pressure

 

Returns

the number of bytes read.

Since: 0.7.4

Types and Values