libswami Reference Manual | ||||
---|---|---|---|---|
Top | Description |
GType * swami_util_get_child_types (GType type
,guint *n_types
); GValue * swami_util_new_value (void
); void swami_util_free_value (GValue *value
); void swami_util_midi_note_to_str (int note
,char *str
); int swami_util_midi_str_to_note (const char *str
);
GType * swami_util_get_child_types (GType type
,guint *n_types
);
Recursively get all child types of a type
.
|
Type to get all children from |
|
Location to store count of types or NULL to ignore
|
Returns : |
Newly allocated and 0 terminated array of types |
GValue * swami_util_new_value (void
);
Allocate a new GValue using a GMemChunk.
Returns : |
New uninitialized (zero) GValue |
void swami_util_free_value (GValue *value
);
Free a GValue that was allocated with swami_util_new_value()
.
|
GValue created from swami_util_new_value() .
|
void swami_util_midi_note_to_str (int note
,char *str
);
|
MIDI note number (0-127) |
|
Buffer to store string to (at least 5 bytes in length) |
int swami_util_midi_str_to_note (const char *str
);
Parse a string in the form "[A-Ga-g][b#]n" or "0"-"127" as a MIDI note. Where 'n' is the octave number between -2 and 8. '#' is used to indicate "sharp". 'b' means "flat". Examples: "C3" is middle C (note 60), "F-2" is note 5, "Db-2" is the same as "C-2" (note 0). Any chars following a valid MIDI note string are ignored.
|
String to parse as a MIDI note |
Returns : |
The MIDI note # or -1 on error (str is malformed). |