Contents



Going Beyond the Basics (cont'd)

Next
 

Text Output and Formatting (cont'd)

Using Dynamic Text Display Attributes

Within the standard SynthEdit sub-controls, text output is handled by the Text Entry2 module. It provides some flexibility in selection of fonts and type sizes, as mentioned earlier in the Making Simple Connections section, by allowing a choice from 7 type styles that you define in your skin's global.txt file. These styles can have a transparent background, or you can specify a background-color. The module can be set to Read-Only Mode, and can support multiline text entry and display.

If you want even more flexibility, you can use the DH_TextIO module. Background and text colors can be set and changed on the fly to any RGB values. (There is no transparent background option, however.)

The font and font size can also be selected and changed at any time, from a variety of 11 fonts that are commonly found on Windows machines, and 13 font sizes, ranging from 8 pt to 72 pt. If the selected font is not found on the user's machine, a generic font from the same major font family (Swiss, Decorative, Modern, Roman, or Script) is substituted.

Text can be made Read-Only, and also Non-Selectable.
 

The module features Text I/O pins on both right and left sides for convenience; both are identical.

Several options exist for setting and/or changing the text and background colors. A DH_ColorPicker module can be used to display a standard Windows color selection dialog. If you just want to set the colors once and for all, this is a handy way to make your selection visually. The DH_TextIO will remember the last colors you set it to, so you could just use the DH_ColorPicker as a utility to set the colors, and then delete it. On the other hand, if you'd like to give the users the option to select their own colors, you can include the DH_ColorPickers, along with open buttons.

.

 

Another option is to use a DH_TextToRGB module to set the colors. It will convert red, green, and blue values in text form (0 - 255 each) to a composite RGB integer value. Actually, I don't know why I didn't make it Float to RGB -- probably should add that one. Anyway, one way of using it is to provide continuous controls for the red, green, and blue components:


 


 

 

 

 

 

The structure of one of the above containers is shown on the right.

 


Yet another possibility is to have the text and/or background RGB values change based on something happening in your synth or effect, like having a level reading turn red if it goes over 0 dB.

top

Next