libswami Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
SwamiWavetbl; IpatchVBank * swami_wavetbl_get_virtual_bank (SwamiWavetbl *wavetbl
); void swami_wavetbl_set_active_item_locale (SwamiWavetbl *wavetbl
,int bank
,int program
); void swami_wavetbl_get_active_item_locale (SwamiWavetbl *wavetbl
,int *bank
,int *program
); gboolean swami_wavetbl_open (SwamiWavetbl *wavetbl
,GError **err
); void swami_wavetbl_close (SwamiWavetbl *wavetbl
); SwamiControlMidi * swami_wavetbl_get_control (SwamiWavetbl *wavetbl
,int index
); gboolean swami_wavetbl_load_patch (SwamiWavetbl *wavetbl
,IpatchItem *patch
,GError **err
); gboolean swami_wavetbl_load_active_item (SwamiWavetbl *wavetbl
,IpatchItem *item
,GError **err
); gboolean swami_wavetbl_check_update_item (SwamiWavetbl *wavetbl
,IpatchItem *item
,GParamSpec *prop
); void swami_wavetbl_update_item (SwamiWavetbl *wavetbl
,IpatchItem *item
);
"active" gboolean : Read "active-bank" gint : Read / Write "active-program" gint : Read / Write "vbank" IpatchVBank* : Read
IpatchVBank * swami_wavetbl_get_virtual_bank (SwamiWavetbl *wavetbl
);
Retrieve the IpatchVBank object from a Wavetable instance. This bank is the main synthesis object for the Wavetable instance, which is used for mapping instruments to MIDI bank:program locales.
|
Swami Wavetable object |
Returns : |
The virtual bank of the Wavetable instance with a reference count added for the caller. |
void swami_wavetbl_set_active_item_locale (SwamiWavetbl *wavetbl
,int bank
,int program
);
Sets the MIDI bank and program numbers (MIDI locale) of the active item. The active item is the currently focused item in the user interface, which doesn't necessarily have its own locale bank and program.
MT-NOTE: This function ensures bank and program number are set atomically,
which is not assured if using the standard
routine.
g_object_set()
|
Swami wave table object |
|
MIDI bank number of active item |
|
MIDI program number of active item |
void swami_wavetbl_get_active_item_locale (SwamiWavetbl *wavetbl
,int *bank
,int *program
);
Gets the MIDI bank and program numbers (MIDI locale) of the active
item. See swami_wavetbl_set_active_item_locale()
for more info.
gboolean swami_wavetbl_open (SwamiWavetbl *wavetbl
,GError **err
);
Open Wavetbl driver.
void swami_wavetbl_close (SwamiWavetbl *wavetbl
);
Close driver, has no effect if already closed. Emits the "active" signal.
|
Swami Wavetable object |
SwamiControlMidi * swami_wavetbl_get_control (SwamiWavetbl *wavetbl
,int index
);
Get a MIDI control from a wavetable object. Calls the wavetable's
"get_control" method. A control index
is used to support multiple
controls (for example if the wavetable device supports more than 16
MIDI channels).
|
Swami Wavetable object |
|
Control index |
Returns : |
New MIDI control object linked to wavetbl or NULL if no
control with the given index . The returned control's reference count
has been incremented and is owned by the caller, remember to unref it
when finished.
|
gboolean swami_wavetbl_load_patch (SwamiWavetbl *wavetbl
,IpatchItem *patch
,GError **err
);
Load a patch into a wavetable object.
gboolean swami_wavetbl_load_active_item (SwamiWavetbl *wavetbl
,IpatchItem *item
,GError **err
);
Load an item as the active program item.
gboolean swami_wavetbl_check_update_item (SwamiWavetbl *wavetbl
,IpatchItem *item
,GParamSpec *prop
);
Checks if a given item
needs to be updated if the property prop
has
changed.
|
Swami Wavetable object |
|
Patch item to check if an update is needed |
|
GParamSpec of property that has changed |
Returns : |
TRUE if item should be updated, FALSE otherwise (prop is not
a synthesis property or item is not currently loaded in wavetbl ).
|
void swami_wavetbl_update_item (SwamiWavetbl *wavetbl
,IpatchItem *item
);
Refresh a given item
object's synthesis cache. This should be called after
a change affecting synthesis output occurs to item
, which can be tested
with swami_wavetbl_check_update_item()
.
|
Swami Wavetable object |
|
Patch item to force update on |
"active-bank"
property"active-bank" gint : Read / Write
Active (focused) MIDI bank number.
Allowed values: [0,128]
Default value: 127
"active-program"
property"active-program" gint : Read / Write
Active (focused) MIDI program number.
Allowed values: [0,127]
Default value: 127
"active"
signalvoid user_function (SwamiWavetbl *swamiwavetbl, gboolean arg1, gpointer user_data) : Run First