Contents



Getting Started (Cont'd)

Next
 

Building Custom Controls

Sub-controls provide the building blocks for making many types of controls. The new prefab controls in SynthEdit's Insert-Controls menu provide excellent examples of how to put things together. In this section, we'll take a look at a few of them to get some clues for making our own.

We'll start with the Switch. It appears like this when inserted in a panel view:

Its structure is very simple:

In fact, except for the Text Entry2 and the IO Mod, it's the same as our earlier Moog knob example.

The Text Entry2's Text pin must be connected to something for the entered text to be retained. The Patch Mem - Float conveniently provides a Name pin to facilitate using a Text Entry2 as a label.

The 2-frame image used for the Bitmap Image sub-control looks like this: 
Its corresponding text file contains the following:

type animated
orientation vert
frame_size 25, 26

padding 5, 2, 5, 3
mouse_response stepped

In a way, building a custom control using sub-controls is just like building a tiny SynthEdit project. You design the functionality in the structure view, and the appearance in the panel view.

Here, the switch's panel view has been unlocked to change the position and text of the Text Entry2.

 

 

Next, let's take a quick look at the Knob control. We used one of its bitmaps to make a very simple voltage control knob in our earlier example. Now we'll see how that has been put together with other sub-controls to produce a realistic looking control.
 

The basics of the structure should be looking familiar by now: a Bitmap Image's Animation Position is being converted to a voltage using a Patch Mem - Float and a Float to Volts. Note that the Animation Position of the reflective knob center Bitmap Image is also connected to the Patch Mem - Float. Note too that the Tinted Bitmap Image with the scale isn't connected to anything. It just needs to be in the container.

All 3 images that comprise the knob have been arranged concentrically on the panel view to create the finished effect:


 


We'll finish this section with a look at the Bender control prefab.


 

 


The only thing new here is the Spring module. This causes the image, and its value, to return to the center position when you let go of the wheel with the mouse.

The Animation Position is set to the Spring's Reset Value when Mouse Down becomes FALSE.

 

top

Next