Data Manipulation Modules.
These modules change the value of a GUI variable. They may or may
not also convert the value from one GUI data type to another.
dB to Animation.
This is a module of limited use except in the SynthEdit VU Meter prefab. (“Unfortunately the ‘dB to animation’ module is specific to the SynthEdit VU Meter image, which is copied off real VU Meters and is not any kind of ‘nice’ formula. It can’t be used on meters with a different scale.” Jeff McClintock.)
Float Function.
These modules provide a generic conversion function. Both audio processing and GUI versions are provided.
The supported functions are shown below:
*, /, +, -, ^, sin, cos, tan, asin, acos, atan, sinh, cosh, tanh , exp, log, log10, sqrt, floor, ceil, abs, hypot, deg, rad, sgn, min, max. This list applies to both the DSP and GUI modules.
DSP/Audio Float Function
Left Hand Side Plugs:
-> A:- (Floating Point) Input value
-> Formula: B=:- (Text) Function applied to the signal flow from B to A for example B= A*2
Right Hand Side Plugs:
-> B:- (Floating point) Output Value
The audio version (as usual) sends data in just one direction.
For example to double the amplitude of a ‘float’ signal, open the properties screen, enter the formula – A * 2.
GUI Float Function:
The GUI function module is similar except it works in both directions, so you have two formulae Usually Formula B will be the inverse of Formula A. For example if you wanted a text entry to display a knob’s value as ranging from 1-100, you could enter formula B=A*100, so it follows that Formula B should be the inverse which is B=A/100
Left Hand Side Plugs:
-> A:- (Floating Point) Input value
-> Formula: A=:- (Text) Function applied to signal flow from A to B
-> Formula: B=:- (Text) Function applied to signal flow from B to A
Note: If either the A or B function is left as an empty string or the value 0, signal flow from that pin will be disabled.
Right Hand Side Plugs:
<- B:- (Floating point) Output Value
An example of using these modules is shown below in the SynthEdit VU Meter prefab. We take the Audio input, and feed it into the Volts to Float module where the signal level is converted to floating point at a rate optimised for DSP, which will also give a suitable response time for the meter to be useful (Conversion rate = 60hZ), and the type of response is dB VU to suit a VU meter readout.
The next step is to use a PatchMemory Float Out3 to convert the data from Audio/DSP to GUI, and to take the value output (not the Animation Position output) and feed it via the Float Function with these values for the Formulae:
Using these modules.
Formula A= B-18
Formula B= A+18
From here the data is sent via the dB to Animation module to convert the data to fit the scale used for the VU meter, this is where we finally use Animation Position to move the “meter” to the position that matches the Audio input on the VU “scale”.
The actual meter we see on the panel uses two Image2 modules. The top one which displays the meter needle is connected to the Animation Position data, and the lower Image has no connections as it’s just the meter scale.
Data Type Conversion Modules
These modules convert from one data type to another, without affecting the value.
I’m not including the BLOB datatype converters as this is a rather specialist data format which is used for Audio analysis etc.
Bool to Float: Converts a Boolean input to a Floating Point value. For example: False =0, True =10
Bool to Int: Converts a Boolean input to an Integer output. False = 0, True = 1
Bool to Text: Converts a Boolean Input to the equivalent Text string. False = False, True = True.
Float to Bool: =<0 = False, >0 =True
Float to Double: Converts ordinary 32bit floating Point values to 64bit Floating Point values (Double Precision)
Float to Integer: converts the Floating Point input to the nearest whole number. For example a Floating Point value of 3.4 would output Integer 3, and a Floating Point value of 3.6 would result in an Integer output of 4.
Float to Text: Converts a Floating point value to a numeric Text string, so 3.1415962 will display these numbers in a text box. The number of digits after the decimal point is set by the Decimal Places plug so with Decimal Places set to 3 the input value will be truncated 3.141.
Int to Bool: Converts an Integer input to an Boolean output. 0 = False, 1= True.
Int to Float: Converts an Integer value to a Floating Point value (The starting point being Integer the result will obviously be a whole number).
Int to Text: Converts an Integer value to a numeric Text string.
Leave a Reply