Anatomy of a preset file

Presets for a Jamoma module are saved as an XML formatted file that can then be opened in any regular text editor. As an example, we can open the presets file for jmod.degrade~ which can be found in the module’s folder. Once opened, it should be similar to what is displayed below (Note that the syntax coloring may be different or nonexistent, depending on your text editor settings).

<?xml version='1.0' encoding='iso-8859-1' standalone='yes' ?>
<jamoma version='0.4'
	xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
	xsi:schemaLocation='http://jamoma.org/ file:jamoma.xsd'>
	<preset number='1' name='default'>
		<item name='audio/bypass' type='boolean'>0</item>
		<item name='audio/gain' type='decimal'>0.000000</item>
		<item name='audio/meters/freeze' type='boolean'>0</item>
		<item name='audio/mix' type='decimal'>100.000000</item>
		<item name='audio/mute' type='boolean'>1</item>
		<item name='bitdepth' type='integer'>24</item>
		<item name='samplerateRatio' type='decimal'>1.000000</item>
	</preset>
	<preset number='2' name='crunchy'>
		<item name='audio/bypass' type='boolean'>0</item>
		<item name='audio/gain' type='integer'>0</item>
		<item name='audio/meters/freeze' type='boolean'>0</item>
		<item name='audio/mix' type='decimal'>0.000000</item>
		<item name='audio/mute' type='boolean'>0</item>
		<item name='bitdepth' type='integer'>5</item>
		<item name='samplerateRatio' type='decimal'>0.050000</item>
	</preset>
</jamoma>

A preset is defined by a set of items surrounded by an opening [xml] <preset> tag containing a number and a name for the preset ([xml] number='1' name='default') and a closing [xml]</preset> tag. Each parameter is defined by an [xml] <item> tag containing the name of the jcom.parameter in your module and its type ([xml] name='samplerateRatio' type='decimal'), followed by its value (1.00) and a closing [xml] <item> tag. Thus, the first preset for jmod.degrade~ looks like this:

<preset number='1' name='default'>
	<item name='samplerateRatio' type='decimal'>1.000000</item>
	<item name='bitdepth' type='integer'>24</item>
	<item name='audio/mute' type='boolean'>1</item>
	<item name='audio/mix' type='decimal'>100.000000</item>
	<item name='audio/meters/freeze' type='boolean'>0</item>
	<item name='audio/gain' type='decimal'>0.000000</item>
	<item name='audio/bypass' type='boolean'>0</item>
</preset>

comments powered by Disqus