summaryrefslogtreecommitdiff
path: root/vendor/vstsdk2.4/doc/html/vstparamstruct.html
blob: eb0630af82cccefa896049c0e943476787b1666b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>VST SDK 2.4: VST Parameters Structure</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.7 -->
<div class="tabs">
  <ul>
    <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li><a href="annotated.html"><span>Classes</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="dirs.html"><span>Directories</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul></div>
<h1><a class="anchor" name="vstparamstruct">VST Parameters Structure</a></h1><h2>Introduction</h2>

<p>
In general, VST Plug-Ins present a flat, unsorted list of parameters to the host application, and finally to the user.
The VST Parameters Structure XML definition provides an easy way to structure parameters of existing VST Plug-Ins hierarchically, without having to recompile the Plug-In binary.
</p>

<p>
<u>Windows</u>:<br>
<br>
The host application searches for a <b>.vstxml</b> file next to the Plug-In DLL (e.g. if your Plug-In is in '...\Vstplugins\MyEffect.dll' the corresponding XML file must be named '...\Vstplugins\MyEffect.vstxml').
Alternatively, the Parameter Structure XML can be embedded in the DLL as a resource (resource type <b>VSTXML</b>, resource identifier <b>1</b>).
Please note that an external .vstxml file always overrides the embedded resource!
</p>

<p>
<u>Mac OS X</u>:<br>
<br>
The .vstxml file is in the Resources Folder of the bundle and its name is constructed from the CFBundleName.
</p>

<p class="subhead">Example:</p>

<table cellpadding="0" cellspacing="0" border="1">
<tr>
   <td class="md">
<pre>
&lt;<b>VSTPluginProperties</b>&gt;
	&lt;<b>VSTParametersStructure</b>&gt;
		<font color=#989898>&lt;!-- Value Types: --&gt;</font>
		&lt;<a href="#ValueType">ValueType</a> name="<font color=#980000>SwitchOnOff</font>"&gt;
			&lt;<a href="#Entry">Entry</a> name="Off" value="[0, 0.5["/&gt;
			&lt;<a href="#Entry">Entry</a> name="On"  value="[0.5, 1]"/&gt;
		&lt;/ValueType&gt;
	
		<font color=#989898>&lt;!-- Templates: --&gt;</font>
		&lt;<a href="#Template">Template</a> name="<font color=#0000FF>Channel</font>"&gt;
			&lt;<a href="#Param">Param</a> name="Bypass" shortName="Byp." type="<font color=#980000>SwitchOnOff</font>" id="<font color=#009800>offset</font>+1"/>
			...
		&lt;/Template&gt;
	
		<font color=#989898>&lt;!-- Global: --&gt;</font>
		&lt;<a href="#Param">Param</a> name="Volume" shortName="Vol." label="dB" id="0"/&gt;
	
		&lt;<a href="#Group">Group</a> name="Channel 1" template="<font color=#0000FF>Channel</font>" values="<font color=#009800>offset</font>=10"/&gt;
		&lt;<a href="#Group">Group</a> name="Channel 2" template="<font color=#0000FF>Channel</font>" values="<font color=#009800>offset</font>=20"/&gt;
		...
	&lt;/<b>VSTParametersStructure</b>&gt;
&lt;/<b>VSTPluginProperties</b>&gt;</pre>
   </td>
</tr>
</table>

<p>
The following tags are used to describe a parameter structure:
</p>

<p>
<table border=0>
	<tr>
		<td width=150>VSTPluginProperties</td>
		<td>optional root tag</td>
	</tr>
	<tr>
		<td width=150>VSTParametersStructure</td>
		<td>parameters structure tag</td>
	</tr>
	<tr>
		<td><a href="#Param">Param</a></td>
		<td>describes a single parameter with name, label, id etc.</td>
	</tr>
	<tr>
		<td><a href="#Group">Group</a></td>
		<td>encloses a group of parameters, can be nested</td>
	</tr>
	<tr>
		<td><a href="#Template">Template</a></td>
		<td>defines a parameter group, can be "instanciated" multiple times</td>
	</tr>
	<tr>
		<td><a href="#ValueType">ValueType</a></td>
		<td>definition of an internal value type, contains a list of <a href="#Entry">Entry</a> tags</td>
	</tr>
	<tr>
		<td><a href="#Entry">Entry</a></td>
		<td>describes a single state of a <a href="#ValueType">ValueType</a></td>
	</tr>
</table>
</p>

<p class="subhead">Advanced topics:</p>

<ul>
	<li><a href="#RelativeAddressing">Relative Parameter Addressing</a>
	<li><a href="#Examples">Example</a>
</ul>


<hr noshade size="4">

<h2>XML Definitions Reference</h2>

<a name="Param"></a>
<h2>Param</h2>

<table cellpadding="0" cellspacing="0" border="0">
<tr>
   <td class="md">
		<div class="xmltag">
		&lt;<span class="tagname">Param</span> <span class="mandatory">id</span>="..." name="..."
						label="..." shortName="..." type="..." numberOfStates="..." defaultValue="..."/&gt;
		</div>
	</td>
</tr>
</table>

<p>
Describes a Plug-In parameter.
</p>

<p class="subhead">Attributes:</p>

<p>
<table border=0 cellspacing=6>
	<tr>
		<td width=150 valign=top>
			id
		</td>
		<td>
			corresponds to zero-based index in flat parameter list.<br>
			can either be an integer constant (e.g. "100") or an expression which evaluates
			to an integer (e.g. "offset + 1").
			See <a href="#RelativeAddressing">Relative Parameter Addressing</a> for details.
		</td>
	</tr>
	<tr>
		<td valign=top>
			name
		</td>
		<td>
			parameter name visible to the user (e.g. "Volume").
		</td>
	</tr>
	<tr>
		<td valign=top>
			label
		</td>
		<td>
			parameter label visible in generic editor or on remote control (e.g. "dB")
		</td>
	</tr>
	<tr>
		<td valign=top>
			shortName
		</td>
		<td>
			short parameter name, displayed on remote controls.<br>
			can be a list of several names of different lengths, separated by colons
			(e.g. "OSC Frequ., OSCFrq., Frq"). The host application selects best fitting string
			for current remote displays.
		</td>
	</tr>
	<tr>
		<td valign=top>
			type
		</td>
		<td>
			user defined (see <a href="#ValueType">ValueType</a>)
			or predefined value type. Default type is a linear fader between 0.0 and 1.0<br>
			<br>
			<u>Predefined types</u>:<br>
			- switch : parameter toggles between 0 and 1
		</td>
	</tr>
	<tr>
		<td valign=top>
			numberOfStates
		</td>
		<td>
			defines how many states this parameter can have:<br>
			<br>
			<small>
			state N = [N / numberOfStates, (N + 1) / numberOfStates[<br>
			state N = (long)(value * numberOfStates)
			</small>
		</td>
	</tr>
	<tr>
		<td valign=top>
			defaultValue
		</td>
		<td>
			default value normalized between [0.0, 1.0]
		</td>
	</tr>
</table>
</p>

<p class="subhead">Remarks:</p>

<p>
Most VST Plug-Ins already provide parameter attributes like name, label, etc. and support string conversion.
The XML description always <u>overwrites</u> Plug-In -provided attributes!
Everything not described in XML is taken from the Plug-In at runtime.
</p>

<hr noshade size="4">

<a name="Group"></a>
<h3>Group</h3>

<table cellpadding="0" cellspacing="0" border="0">
<tr>
   <td class="md">
		<div class="xmltag">
		&lt;<span class="tagname">Group</span> <span class="mandatory">name</span>="..." template="..." values="..."/&gt;
		</div>
	</td>
</tr>
</table>

<p>
Groups are used to create hierarchical parameter structures. A &lt;Group&gt; either contains &lt;<a href="#Param">Param</a>&gt; tags directly,
or is defined by a <a href="#Template">Template</a>.
</p>

<p class="subhead">Attributes:</p>

<p>
<table border=0 cellspacing=6>
	<tr>
		<td width=150 valign=top>
			name
		</td>
		<td>
			group name visible to the user (e.g. "Channel 1", "LFO Section",...)
		</td>
	</tr>
	<tr>
		<td valign=top>
			template
		</td>
		<td>
			Name of <a href="#Template">template</a> defining this group (optional).
		</td>
	</tr>
	<tr>
		<td valign=top>
			values
		</td>
		<td>
			List of arguments passed to the template
			(see <a href="#RelativeAddressing">Relative Parameter Addressing</a> for details).<br>
			<br>
			Each arguments consists of a name and an integer value (e.g. "offset=100").
			Multiple arguments are separated by semicolons, whitespaces are ignored
			(e.g. "offset1=100; offset2=100").
		</td>
	</tr>
</table>
</p>

<hr noshade size="4">

<a name="Template"></a>
<h3>Template</h3>

<table cellpadding="0" cellspacing="0" border="0">
<tr>
   <td class="md">
		<div class="xmltag">
		&lt;<span class="tagname">Template</span> <span class="mandatory">name</span>="..."/&gt;
		</div>
	</td>
</tr>
</table>

<p>
Assume a Plug-In with 16 channels, each consisting of an identical set of parameters. You only have to
describe a channel once as a template and create 16 "instances" using the  &lt;Group&gt; tag.
If each channel contains let's say 20 parameters, which appear continuously in the flat parameter list,
they can be addressed using an offset value instead of absolute indices
(see <a href="#RelativeAddressing">Relative Parameter Addressing</a> for details).
</p>

<p class="subhead">Attributes:</p>

<p>
<table border=0 cellspacing=6>
	<tr>
		<td width=150 valign=top>
			name
		</td>
		<td>
			internal template name, referred to by <a href="#Group">groups</a>.
		</td>
	</tr>
</table>
</p>

<hr noshade size="4">

<a name="ValueType"></a>
<h3>ValueType</h3>

<table cellpadding="0" cellspacing="0" border="0">
<tr>
   <td class="md">
		<div class="xmltag">
		&lt;<span class="tagname">ValueType</span> <span class="mandatory">name</span>="..." label="..."/&gt;
		</div>
	</td>
</tr>
</table>

<p>
Defines an internal value type by a list of &lt;<a href="#Entry">Entry</a>&gt; tags.
</p>

<p class="subhead">Attributes:</p>

<p>
<table border=0 cellspacing=6>
	<tr>
		<td width=150 valign=top>
			name
		</td>
		<td>
			internal value type name, referred to by <a href="#Param">parameters</a>.
		</td>
	</tr>
	<tr>
		<td valign=top>
			label
		</td>
		<td>
			value label (e.g. "dB")
		</td>
	</tr>
</table>
</p>

<p class="subhead">Remarks:</p>

<p>
The <i>label</i> attribute is used as parameter label if the <i>label</i> field of a &lt;<a href="#Param">Param</a>&gt;
tag using this value type is empty.
</p>

<hr noshade size="4">

<a name="Entry"></a>
<h3>Entry</h3>

<table cellpadding="0" cellspacing="0" border="0">
<tr>
   <td class="md">
		<div class="xmltag">
		&lt;<span class="tagname">Entry</span> <span class="mandatory">name</span>="..." value="..."/&gt;
		</div>
	</td>
</tr>
</table>

<p>
Each entry in a &lt;<a href="#ValueType">ValueType</a>&gt; list provides a string representation for
a certain parameter state. A simple example would be a toggle parameter with two
states named "On" and "Off". The string "Off" should be displayed if the normalized parameter value is between
0.0 and 0.5 (exclusively), and "On" if it is &gt;= 0.5 and &lt;= 1.0.
</p>

<p class="subhead">Attributes:</p>

<p>
<table border=0 cellspacing=6>
	<tr>
		<td width=150 valign=top>
			name
		</td>
		<td>
			name of parameter state, displayed to the user (e.g. "On", "Off", "Sine", "Square",...)
		</td>
	</tr>
	<tr>
		<td valign=top>
			value
		</td>
		<td>
			optional: describes the parameter range this state corresponds to,
			using the mathematical range definition [a, b].<br>
			<br>
			Exclusive range:<br>
			&nbsp;&nbsp;&nbsp;&nbsp;e.g. "[0.0,0.5[" -> if value &gt;= 0.0 and &lt; 0.5<br>
			<br>
			Inclusive range:<br>
			&nbsp;&nbsp;&nbsp;&nbsp;e.g. "[0.5,1.0]" -> if value &gt;= 0.5 and &lt;= 1.0
		</td>
	</tr>
</table>
</p>

<p class="subhead">Remarks:</p>

<p>
The value range is optional. If not specified, the limits of a state are calculated based on the total number of entries
in the value type:<br>
<br>
a = index / total<br>
b = (index + 1) / total;<br>
</p>

<hr noshade size="4">

<a name="RelativeAddressing"></a>
<h2>Relative Parameter Addressing</h2>

<p>
Relative parameter addressing is used to describe parameter IDs inside <a href="#Template">templates</a>.
Instead of assigning a parameter index directly, an expression - mostly consisting of a "base address" variable and
a constant offset value - can be used. The variable is passed to the template each time it is "instanciated" as a
<a href="#Group">group</a>.
</p>

<p class="subhead">Example:</p>

<p>
<table border=0>
<tr>
	<td valign=top>
		<div align=center>Parameter list:</div>

		<pre>
...

11: Volume CH1
...

21: Volume CH2
...

31: Volume CH3
...
		</pre>
	</td>
	<td valign=top>
		<div align=center>XML code:</div><br>

		<table cellpadding="0" cellspacing="0" border="1">
		<tr>
		   <td class="md">
<pre>
&lt;<b>Template</b> name="Channel"&gt;
	&lt;<b>Param</b> name="Volume" id="<font color=#009800>offset</font>+1"/&gt;
&lt;/<b>Template</b>&gt;

&lt;<b>Group</b> name="CH 1" template="Channel" values="<font color=#009800>offset</font>=10"/&gt;
&lt;<b>Group</b> name="CH 2" template="Channel" values="<font color=#009800>offset</font>=20"/&gt;
&lt;<b>Group</b> name="CH 3" template="Channel" values="<font color=#009800>offset</font>=30"/&gt;
</pre>
		</td>
	</tr>
	</table>


	</td>
</tr>
</table>
</p>

<hr noshade size="4">

<a name="Examples"></a>
<h2>Example</h2>

<table cellpadding="0" cellspacing="0" border="1">
<tr>
	<td class="md">
<pre>
&lt;!-- =========================================================== --&gt;
&lt;!-- XML definition of VST parameters for Dynamics Plug-In====== --&gt;
&lt;!-- Draft 0.1================================================== --&gt;
&lt;!-- Date: 14.11.2005=========================================== --&gt;
&lt;!-- =========================================================== --&gt;

&lt;VSTPluginProperties&gt;
	
	&lt;VSTParametersStructure&gt;
		&lt;!--  Create Global Params================================== --&gt;
		&lt;Param name="Routing" shortName="Rout"                id="13"/&gt;

		&lt;!--  Create AutoGate Group================================= --&gt; 
		&lt;Group name="AutoGate"&gt;
			&lt;Param name="On"                 type="<font color=#009800>switch</font>"       id="0"/&gt;
			&lt;Param name="Thresh"   shortName="ThrHo" label="dB"  id="3"/&gt;
			&lt;Param name="Attack"   shortName="Att"   label="ms"  id="4"/&gt;
			&lt;Param name="Hold"                       label="ms"  id="5"/&gt;
			&lt;Param name="Release"  shortName="Rel"   label="ms"  id="6"/&gt;
			&lt;Param name="Auto"                                   id="7"/&gt;
			&lt;Param name="Mode"                                   id="9"/&gt;
			&lt;Param name="Calib"                                  id="10"/&gt;
			&lt;Param name="LowFreq"  shortName="LoFrq" label="Hz"  id="11"/&gt;
			&lt;Param name="HighFreq" shortName="HiFrq" label="Hz"  id="12"/&gt;
		&lt;/Group&gt;

		&lt;!--  Create Compressor Group======================================= --&gt; 
		&lt;Group name="Compressor"&gt;
			&lt;Param name="On"           type="<font color=#009800>switch</font>"           id="1"/&gt;
			&lt;Param name="Thresh"  shortName="ThrHo" label="dB" id="14"/&gt;
			&lt;Param name="Ratio"                                id="15"/&gt;
			&lt;Param name="Attack"  shortName="Att"  label="ms"  id="16"/&gt;
			&lt;Param name="Release" shortName="Rel"  label="ms"  id="17"/&gt;
			&lt;Param name="MakeUp"  shortName="MkUp" label="dB"  id="18"/&gt;
			&lt;Param name="Auto"                                 id="19"/&gt;
			&lt;Param name="RMS"                                  id="20"/&gt;
		&lt;/Group&gt;

		&lt;!--  Create Limiter Group======================================= --&gt; 
		&lt;Group name="Limiter"&gt;
			&lt;Param name="On"                type="<font color=#009800>switch</font>"       id="2"/&gt;
			&lt;Param name="Thresh"  shortName="ThrHo"  label="dB" id="21"/&gt;
			&lt;Param name="Release" shortName="Rel"    label="ms" id="22"/&gt;
			&lt;Param name="Auto"                                  id="23"/&gt;
		&lt;/Group&gt;

	&lt;/VSTParametersStructure&gt;
&lt;/VSTPluginProperties&gt;

</pre>
	</td>
</tr>
</table>
 <html>

<head>
	<title>Empty</title>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
	<meta name="Author" content="mario">
</head>

<body>

<br/>
<hr width="100%" size="2" align="left" />
<div align=left>
Copyright �2006 <a href="http://www.steinberg.net" target="_blank"><u>Steinberg Media Technologies</u></a>.
All Rights Reserved.
</div>
</body>

</html>