11-37
StudioWare
You can display the actual value of an alias in almost any format, by
using a text widget. To do so, you create a string for the Label Þeld of the
text widget that contains some special characters, as listed in the
following table:
The format strings are similar to those deÞned in the C computer
language. Here are a few examples, given an alias value of 23:
Tutorial—Creating a Panel
In this section, we will create a panel from scratch in order to illustrate
the process. The sample panel will control three speciÞc parameters
found on any General MIDI deviceÑvolume, modulation, and sustainÑ
and add a few other widgets to display their values. To demonstrate how
this panel works, you will need to have at least one track of MIDI data
assigned to a General MIDI-compliant device in the Track view of the
current song.
Special characters... How they are used...
%d These characters are replaced by the value, displayed
in decimal form.
%x These characters are replaced by the value, displayed
in hexadecimal form.
%04d These characters are replaced by the value, displayed
in decimal form, with exactly four digits displayed. The
0 indicates that the following number 4 is the desired
number of digits.
Label... Display...
%d 23
Volume = %d Volume = 23
Device ID = 0x%02x Device ID =0x17 (this is hexadecimal)
I have %05d widgets! I have 00023 widgets!