AgsMidiBuilder

AgsMidiBuilder — MIDI buidler

Functions

Properties

gpointer file Read / Write

Signals

Types and Values

Object Hierarchy

    GObject
    ╰── AgsMidiBuilder

Includes

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

Description

The AgsMidiBuilder lets you create MIDI files using its builder functions.

Functions

ags_midi_builder_midi_putc ()

void
ags_midi_builder_midi_putc (AgsMidiBuilder *midi_builder,
                            int c);


ags_midi_builder_on_error ()

void
ags_midi_builder_on_error (AgsMidiBuilder *midi_builder,
                           GError **error);

Triggered as an error occurs.

Parameters

midi_builder

the AgsMidiBuilder

 

error

the error

 

Since: 0.7.3


ags_midi_builder_append_header ()

void
ags_midi_builder_append_header (AgsMidiBuilder *midi_builder,
                                guint offset,
                                guint format,
                                guint track_count,
                                guint division,
                                guint times,
                                guint bpm,
                                guint clicks);

Appends MIDI header to midi_builder .

Parameters

midi_builder

the AgsMidiBuilder

 

offset

start delta-time

 

format

either 0, 1 or 2.

 

track_count

the number of tracks

 

division

timing division

 

times

pulse per quarter note

 

bpm

beats per minute

 

clicks

timing clicks

 

Since: 0.7.3


ags_midi_builder_append_track ()

void
ags_midi_builder_append_track (AgsMidiBuilder *midi_builder,
                               gchar *track_name);

Append a track called track_name to midi_builder .

Parameters

midi_builder

the AgsMidiBuilder

 

track_name

the track name

 

Since: 0.7.3


ags_midi_builder_append_key_on ()

void
ags_midi_builder_append_key_on (AgsMidiBuilder *midi_builder,
                                guint delta_time,
                                guint audio_channel,
                                guint note,
                                guint velocity);

Append key-on for note to midi_builder with key dynamics velocity , at delta_time .

Parameters

midi_builder

the AgsMidiBuilder

 

delta_time

delta-time

 

audio_channel

the audio channel

 

note

the note to play from 0 to 128

 

velocity

key dynamics

 

Since: 0.7.3


ags_midi_builder_append_key_off ()

void
ags_midi_builder_append_key_off (AgsMidiBuilder *midi_builder,
                                 guint delta_time,
                                 guint audio_channel,
                                 guint note,
                                 guint velocity);

Append key-off for note to midi_builder with key dynamics velocity , at delta_time .

Parameters

midi_builder

the AgsMidiBuilder

 

delta_time

delta-time

 

audio_channel

the audio channel

 

note

the note to play from 0 to 128

 

velocity

key dynamics

 

Since: 0.7.3


ags_midi_builder_append_key_pressure ()

void
ags_midi_builder_append_key_pressure (AgsMidiBuilder *midi_builder,
                                      guint delta_time,
                                      guint audio_channel,
                                      guint note,
                                      guint pressure);

Append key-pressure for note to midi_builder with key dynamics pressure , at delta_time .

Parameters

midi_builder

the AgsMidiBuilder

 

delta_time

delta-time

 

audio_channel

the audio channel

 

note

the note to play from 0 to 128

 

pressure

key dynamics

 

Since: 0.7.3


ags_midi_builder_append_change_parameter ()

void
ags_midi_builder_append_change_parameter
                               (AgsMidiBuilder *midi_builder,
                                guint delta_time,
                                guint channel,
                                guint control,
                                guint value);

Appends change parameter.

Parameters

midi_builder

the AgsMidiBuilder

 

delta_time

the delta time

 

channel

the channel

 

control

the control

 

value

the value

 

Since: 0.7.3


ags_midi_builder_append_change_pitch_bend ()

void
ags_midi_builder_append_change_pitch_bend
                               (AgsMidiBuilder *midi_builder,
                                guint delta_time,
                                guint channel,
                                guint pitch,
                                guint transmitter);

Change pitch bend.

Parameters

midi_builder

the AgsMidiBuilder

 

delta_time

the delta time

 

channel

the channel

 

pitch

the pitch

 

transmitter

the transmitter

 

Since: 0.7.3


ags_midi_builder_append_change_program ()

void
ags_midi_builder_append_change_program
                               (AgsMidiBuilder *midi_builder,
                                guint delta_time,
                                guint channel,
                                guint program);

Appends change program.

Parameters

midi_builder

the AgsMidiBuilder

 

delta_time

the delta time

 

channel

the channel

 

program

the program

 

Since: 0.7.3


ags_midi_builder_append_change_pressure ()

void
ags_midi_builder_append_change_pressure
                               (AgsMidiBuilder *midi_builder,
                                guint delta_time,
                                guint channel,
                                guint pressure);

Appends change pressure.

Parameters

midi_builder

the AgsMidiBuilder

 

delta_time

the delta time

 

channel

the channel

 

pressure

the pressure

 

Since: 0.7.3


ags_midi_builder_append_sysex ()

void
ags_midi_builder_append_sysex (AgsMidiBuilder *midi_builder,
                               guint delta_time,
                               unsigned char *sysex_data,
                               guint length);

Appends sysex data.

Parameters

midi_builder

the AgsMidiBuilder

 

delta_time

the delta time

 

sysex_data

the sysex data

 

length

length

 

Since: 0.7.3


ags_midi_builder_append_quarter_frame ()

void
ags_midi_builder_append_quarter_frame (AgsMidiBuilder *midi_builder,
                                       guint delta_time,
                                       guint message_type,
                                       guint values);

Appends quarter frame.

Parameters

midi_builder

the AgsMidiBuilder

 

delta_time

the delta time

 

message_type

the message type

 

values

values

 

Since: 0.7.3


ags_midi_builder_append_song_position ()

void
ags_midi_builder_append_song_position (AgsMidiBuilder *midi_builder,
                                       guint delta_time,
                                       guint song_position);

Appends song position.

Parameters

midi_builder

the AgsMidiBuilder

 

delta_time

the delta time

 

song_position

the song position

 

Since: 0.7.3


ags_midi_builder_append_song_select ()

void
ags_midi_builder_append_song_select (AgsMidiBuilder *midi_builder,
                                     guint delta_time,
                                     guint song_select);

Appends song select.

Parameters

midi_builder

the AgsMidiBuilder

 

delta_time

the delta time

 

song_select

the song select

 

Since: 0.7.3


ags_midi_builder_append_tune_request ()

void
ags_midi_builder_append_tune_request (AgsMidiBuilder *midi_builder,
                                      guint delta_time);

Appends tune request.

Parameters

midi_builder

the AgsMidiBuilder

 

delta_time

the delta time

 

Since: 0.7.3


ags_midi_builder_append_sequence_number ()

void
ags_midi_builder_append_sequence_number
                               (AgsMidiBuilder *midi_builder,
                                guint delta_time,
                                guint sequence);

Appends sequence number.

Parameters

midi_builder

the AgsMidiBuilder

 

delta_time

the delta time

 

sequence

the sequence number

 

Since: 0.7.3


ags_midi_builder_append_smtpe ()

void
ags_midi_builder_append_smtpe (AgsMidiBuilder *midi_builder,
                               guint delta_time,
                               guint hr,
                               guint mn,
                               guint se,
                               guint fr,
                               guint ff);

Appends smtpe.

Parameters

midi_builder

the AgsMidiBuilder

 

delta_time

the delta time

 

hr

hours

 

mn

minutes

 

se

seconds

 

fr

fraction

 

ff

fraction functio

 

Since: 0.7.3


ags_midi_builder_append_tempo ()

void
ags_midi_builder_append_tempo (AgsMidiBuilder *midi_builder,
                               guint delta_time,
                               guint tempo);

Appends tempo.

Parameters

midi_builder

the AgsMidiBuilder

 

delta_time

the delta time

 

tempo

the tempo

 

Since: 0.7.3


ags_midi_builder_append_time_signature ()

void
ags_midi_builder_append_time_signature
                               (AgsMidiBuilder *midi_builder,
                                guint delta_time,
                                guint nn,
                                guint dd,
                                guint cc,
                                guint bb);

Appends time signature.

Parameters

midi_builder

the AgsMidiBuilder

 

delta_time

the delta time

 

nn

numerator

 

dd

denominator

 

cc

ticks per metronome click

 

bb

32nd per quarter note

 

Since: 0.7.3


ags_midi_builder_append_key_signature ()

void
ags_midi_builder_append_key_signature (AgsMidiBuilder *midi_builder,
                                       guint delta_time,
                                       guint sf,
                                       guint mi);

Appends key signature.

Parameters

midi_builder

the AgsMidiBuilder

 

delta_time

the delta time

 

sf

key

 

mi

mode

 

Since: 0.7.3


ags_midi_builder_append_sequencer_meta_event ()

void
ags_midi_builder_append_sequencer_meta_event
                               (AgsMidiBuilder *midi_builder,
                                guint delta_time,
                                guint len,
                                guint id,
                                guint data);

Appends sequencer meta event.

Parameters

midi_builder

the AgsMidiBuilder

 

delta_time

the delta time

 

len

the length

 

id

the id

 

data

the data

 

Since: 0.7.3


ags_midi_builder_append_text_event ()

void
ags_midi_builder_append_text_event (AgsMidiBuilder *midi_builder,
                                    guint delta_time,
                                    gchar *text,
                                    guint length);

Appends text event.

Parameters

midi_builder

the AgsMidiBuilder

 

delta_time

the delta time

 

text

the string

 

length

the string length

 

Since: 0.7.3


ags_midi_builder_append_xml_node ()

void
ags_midi_builder_append_xml_node (AgsMidiBuilder *midi_builder,
                                  xmlNode *node);

Append from XML node node .

Parameters

midi_builder

the AgsMidiBuilder

 

node

the xmlNode

 

Since: 0.7.3


ags_midi_builder_from_xml_doc ()

void
ags_midi_builder_from_xml_doc (AgsMidiBuilder *midi_builder,
                               xmlDoc *doc);

Builds from XML document doc .

Parameters

midi_builder

the AgsMidiBuilder

 

doc

the xmlDocument

 

Since: 0.7.3


ags_midi_builder_build ()

void
ags_midi_builder_build (AgsMidiBuilder *midi_builder);

Build the MIDI data.

Parameters

midi_builder

the AgsMidiBuilder

 

Since: 0.7.3


ags_midi_builder_new ()

AgsMidiBuilder *
ags_midi_builder_new (FILE *file);

Creates a new AgsMidiBuilder

Parameters

file

the FILE handle

 

Returns

an AgsMidiBuilder

Since: 0.7.0

Types and Values

AgsMidiBuilderHeader

typedef struct _AgsMidiBuilderHeader AgsMidiBuilderHeader;


AgsMidiBuilderTrack

typedef struct _AgsMidiBuilderTrack AgsMidiBuilderTrack;

Property Details

The “file” property

  “file”                     gpointer

The file stream to parse.

Flags: Read / Write

Since: 0.7.0

Signal Details

The “append-header” signal

void
user_function (AgsMidiBuilder *midi_builder,
               guint           offset,
               guint           format,
               guint           track_count,
               guint           division,
               guint           times,
               guint           bpm,
               guint           clicks,
               gpointer        user_data)

Flags: Run Last

Since: 0.7.0


The “append-track” signal

void
user_function (AgsMidiBuilder *midi_builder,
               gchar          *track_name,
               gpointer        user_data)

Flags: Run Last

Since: 0.7.0


The “change-channel-pressure” signal

void
user_function (AgsMidiBuilder *midi_builder,
               guint           channel,
               guint           pressure,
               gpointer        user_data)

Flags: Run Last

Since: 0.7.0


The “change-parameter” signal

void
user_function (AgsMidiBuilder *midi_builder,
               guint           delta_time,
               guint           channel,
               guint           control,
               guint           value,
               gpointer        user_data)

Flags: Run Last

Since: 0.7.0


The “change-pitch-bend” signal

void
user_function (AgsMidiBuilder *midi_builder,
               guint           delta_time,
               guint           channel,
               guint           pitch,
               guint           transmitter,
               gpointer        user_data)

Flags: Run Last

Since: 0.7.0


The “change-program” signal

void
user_function (AgsMidiBuilder *midi_builder,
               guint           channel,
               guint           program,
               gpointer        user_data)

Flags: Run Last

Since: 0.7.0


The “key-off” signal

void
user_function (AgsMidiBuilder *midi_builder,
               guint           delta_time,
               guint           audio_channel,
               guint           note,
               guint           velocity,
               gpointer        user_data)

Flags: Run Last

Since: 0.7.0


The “key-on” signal

void
user_function (AgsMidiBuilder *midi_builder,
               guint           delta_time,
               guint           audio_channel,
               guint           note,
               guint           velocity,
               gpointer        user_data)

Flags: Run Last

Since: 0.7.0


The “key-pressure” signal

void
user_function (AgsMidiBuilder *midi_builder,
               guint           delta_time,
               guint           audio_channel,
               guint           note,
               guint           pressure,
               gpointer        user_data)

Flags: Run Last

Since: 0.7.0


The “key-signature” signal

void
user_function (AgsMidiBuilder *midi_builder,
               guint           delta_time,
               guint           sf,
               gboolean        mi,
               gpointer        user_data)

Flags: Run Last

Since: 0.7.0


The “on-error” signal

void
user_function (AgsMidiBuilder *midi_builder,
               gpointer        error,
               gpointer        user_data)

Flags: Run Last

Since: 0.7.0


The “quarter-frame” signal

void
user_function (AgsMidiBuilder *midi_builder,
               guint           delta_time,
               guint           message_type,
               guint           values,
               gpointer        user_data)

Flags: Run Last

Since: 0.7.0


The “sequence-number” signal

void
user_function (AgsMidiBuilder *midi_builder,
               guint           sequence,
               gpointer        user_data)

Flags: Run Last

Since: 0.7.0


The “sequencer-meta-event” signal

void
user_function (AgsMidiBuilder *midi_builder,
               guint           len,
               guint           id,
               guint           data,
               gpointer        user_data)

Flags: Run Last

Since: 0.7.0


The “smtpe” signal

void
user_function (AgsMidiBuilder *midi_builder,
               guint           hr,
               guint           mn,
               guint           se,
               guint           fr,
               guint           ff,
               gpointer        user_data)

Flags: Run Last

Since: 0.7.0


The “song-position” signal

void
user_function (AgsMidiBuilder *midi_builder,
               guint           song_position,
               gpointer        user_data)

Flags: Run Last

Since: 0.7.0


The “song-select” signal

void
user_function (AgsMidiBuilder *midi_builder,
               guint           song_select,
               gpointer        user_data)

Flags: Run Last

Since: 0.7.0


The “sysex” signal

void
user_function (AgsMidiBuilder *midi_builder,
               gpointer        sysex_data,
               guint           length,
               gpointer        user_data)

Flags: Run Last

Since: 0.7.0


The “tempo” signal

void
user_function (AgsMidiBuilder *midi_builder,
               guint           tempo,
               gpointer        user_data)

Flags: Run Last

Since: 0.7.0


The “text-event” signal

void
user_function (AgsMidiBuilder *midi_builder,
               guint           text,
               guint           length,
               gpointer        user_data)

Flags: Run Last

Since: 0.7.0


The “time-signature” signal

void
user_function (AgsMidiBuilder *midi_builder,
               guint           delta_time,
               guint           nn,
               guint           dd,
               guint           cc,
               guint           bb,
               gpointer        user_data)

Flags: Run Last

Since: 0.7.0


The “tune-request” signal

void
user_function (AgsMidiBuilder *midi_builder,
               gpointer        user_data)

Flags: Run Last

Since: 0.7.0