The <ui> element ====================== The `` element is how you specify a user interface for your instrument. Each **dspreset** should have at most one `` element. There are several important attributes: - **`coverArt`** (optional): A relative or absolutely path to a cover art image to use. After the first time this library is opened, this will get displayed on the "My Libraries" tab. - **`bgImage`** (optional): A relative or absolutely path to a background image to use. - **`bgColor`** (required): An eight digit hex value indicating the background color to be used for the background of the UI. This color will be drawn underneath any background image specified by `bgimage`. - **`width`** (required): The width of your user interface. Recommended value: 812. - **`height`** (required): The height of your user interface. Recommended value: 375. Example: ```xml ``` ## The <tab> element The `` element lives underneath the `` element. Every `` must have at most one `` element. Attributes: - **`name`** (optional): An optional name to be associated with this tab. This is currently not displayed anywhere. ## The <button> element The ` ``` ### The <state> element In order for your button to work, it must contain at least one `` elements. Attributes: | Attribute | Required | Description | |:-----------------|:-------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------| | **`name`** | (required for `text` buttons) | The text to display on a text button when this state is active | | **`mainImage`** | (required for `image` buttons) | For `image` buttons only. The path of the main image to display for this button when the button is in the current state. | | **`hoverImage`** | (optional) | For `image` buttons only. The path of the image to display when the user hovers their mouse over this button when the button is in the current state. | | **`clickImage`** | (optional) | For `image` buttons only. The path of the image to display when the user clicks down on this button when the button is in the current state. | In order to have your ` ``` As you can see, this example uses a button to switch between two groups. You'll note the liberal use of the `fixed_value` translation mode above. This means that when any of these options are selected, a fixed predetermined value is used for the value of that binding. ## The <image> element The `` element allows you to place a static image into your user interface. It lives underneath the `` element. Attributes: - **`x`** (required): The `x` position of your image where (0,0) is the top-left corner - **`y`** (required): The `y` position of your image where (0,0) is the top-left corner - **`width`** (required): The width in pixels of the image component - **`height`** (required): The height in pixels of the image component - **`path`** (required): The relative path of the image file to show in this component - **`aspectRatioMode`** (required): Whether or not the engine should preserve the aspect ratio of the image. Note: regardless of these settings, you still need to specify a width and height for your image element. Valid values: `preserve`, `stretch`. Default value is `preserve`. - **`opacity`** (optional): The opacity of the image. This is a floating point value between 0 and 1. Default: 1 - **`visible`** (optional): This controls whether or not this image is visible. There are two valid values: `true` (default), `false`. - **`tooltip`** (optional): A tool tip to display when the user hovers over this image. ## The <multiFrameImage> element The `` element allows you to play a sequence of images as an animation. The expectation is that all the frames of the animation will be loaded in a single image, arranged in a strip – either horizontal or vertical. This is the same format as is used by the custom knobs above. It lives underneath the `` element. Attributes: - **`x`** (required): The `x` position of your image where (0,0) is the top-left corner - **`y`** (required): The `y` position of your image where (0,0) is the top-left corner - **`width`** (required): The width in pixels of the image component - **`height`** (required): The height in pixels of the image component - **`path`** (required): The relative path of the image file to show in this component - **`numFrames`** (required): The number of frames in the animation - **`frameRate`** (required): The frame rate of the animation in frames per second. The maximum supported frame rate is 24 frames per second. - **`opacity`** (optional): The opacity of the animation. This is a floating point value between 0 and 1. Default: 1 - **`sourceFormat`** (required): The orientation of the frames within the image strip. Valid values: `horizontal_image_strip`, `vertical_image_strip`. - **`playbackMode`** (optional): The direction in which the animation should play. Valid values: `forward_loop`, `forward_once`, `reverse_loop`, `reverse_once`, `ping_pong_loop` (forth and back), and `stopped`. Default value is `forward_loop`. - **`visible`** (optional): This controls whether or not this image is visible. There are two valid values: `true` (default), `false`. - **`tags`** (optional): A comma-separated list of tags to be associated with this image. These can be used in conjunction with any binding that takes a `controlIndex` (instead of the `controlIndex`) - **`tooltip`** (optional): A tool tip to display when the user hovers over this image. Example: ```xml ``` ## The <label> element The `