Multitone is currently in beta test. Use at your own risk!

Supported variables

Variables can be inserted into any expression at any point by enclosing them in { } characters
Example 1: Sample Rate is {recordSampleRate} Hz

Example 2: Sample Rate is {recordSampleRate} Hz and {playSampleRate} Hz

Multiple variables can be inserted into the same result. If two channel measurements are made, all variables can be used with number 1 or 2 added at the end to refer to the same variable results in that specific channel. All variables without the appended channel number will automatically reflect the value for the channel in which the results are displayed.

Example: THD in {channel2} is {thd2}dB
Calculations can be used combining multiple variables (see Supported Operators and Math functions below).
Example: THD measured in {channel} is {(10^(thd/20))*100:G}%

Formatting can be applied to displayed variables by putting optional ':' character after the variable or expression, and then adding the desired format.
Numeric variables are displayed, by default, with all whole digits, and one decimal fraction. To add additional decimal points, use a format of this form: {thd:0.0000000} for example. To display the number in scientific notation, use {tdn:G}. Many other formatting options are available.

Here's the list of variables available for display or to be used in a calculation. All numeric variables that can be, are expressed in dB. You can convert them to other desired units by adding a calcluation.


VariableDescription
levelPeak level of the recorded signal (dB)
levelRMSRMS level of the recorded signal (dB)
dcDC level of the rcorded sisgnal (dB)
gainPlay Gain setting during recording (dB)
tdnMeasured TD+N total distortion + noise(dB)
thdMeasured THD total harmonic distortion (dB)
imdMeasured IMD intermodulation distortion (dB)
snrMesaured SNR signal-to-noise ratio (dB)
noiseMeasured noise level (dB)
sfdrMeasured SFDR spurious free dynamic range (dB)
sfdrFreqFrequency where SFDR was measured (Hz)
enobMeasured ENOB effective number of bits
freqH1Frequency of the fundamental component (Hz)
amplH1Amplitude of the fundamental component (dB)
testSignalName of the test signal used to measure (text)
tonesNumber of individual sinewave tones in the test signal
crestCrest Factor of the test signal
fftSizeFFT size used for analysis
windowFFT window used for analysis (text)
fromFreqLowest measured frequency (Hz)
toFreqHighest measured frequency (Hz)
averagesNumber of averages collected
overlapAverage Overlap (%)
playSampleRateOutput sample rate (Hz)
recordSampleRateInput sample rate (Hz)
ResultLabelText label assigned to this measurement in history
channelChannel label used for this result (text)
channelNumberChannel 0 or 1 used for this result
channelsInChannels selector for ADC
channelsOutChannels selector for DAC
driverInAudio driver used for input
driverOutAudio driver used for output
resultTitleFFT size used for analysis


Supported operators, constants and functions

Supported Operators

OperatorDescription
+Additive operator / Unary plus / Concatenate string / Datetime addition
&Concatenate string
Subtraction operator / Unary minus / Datetime subtraction
*Multiplication operator, can be omitted in front of an open bracket
/Division operator
%Remainder operator (Modulo)
^Power operator

Supported conditional statements

Conditional statementDescription
IF(logical_condition, value_if_true, value_if_false)Example:
IF(2>1,"Pass","Fail")
SWITCH(expression, val1,result1, [val2,result2], …, [default])Example:
SWITCH(3+2,5,"Apple",7,"Mango",3,"Good","N/A")

Supported logical and math functions

Function*Description
AND(logical1, [logical2], …)Determine if all conditions are TRUE
OR(logical1, [logical2], …)Determine if any conditions in a test are TRUE
NOT(logical)To confirm one value is not equal to another
XOR(logical1, [logical2], …)Exclusive OR function
SUM(number1, [number2],…)Return sum of numbers supplied
AVERAGE(number1, [number2],…)Return average of numbers supplied
MIN(number1, [number2],…)Return the smallest value from the numbers supplied
MAX(number1, [number2],…)Return the biggest value from the numbers supplied
MOD(number, divisor)Get remainder of two given numbers after division operator.
ROUND(number, num_digits)Returns the rounded approximation of given number using half-even rounding mode
( you can change to another rounding mode)
FLOOR(number, significance)Rounds a given number towards zero to the nearest multiple of a specified significance
CEILING(number, significance)Rounds a given number away from zero, to the nearest multiple of a given number
POWER(number, power)Returns the result of a number raised to a given power
RAND()Produces a random number between 0 and 1
SIN(number)Returns the trigonometric sine of the angle given in radians
SINH(number)Returns the hyperbolic sine of a number
ASIN(number)Returns the arc sine of an angle, in the range of -pi/2 through pi/2
COS(number)Returns the trigonometric cos of the angle given in radians
COSH(number)Returns the hyperbolic cos of a number
ACOS(number)Returns the arc cosine of an angle, in the range of 0.0 through pi
TAN(number)Returns the tangent of the angle given in radians
TANH(number)Returns the hyperbolic tangent of a number
ATAN(number)Returns the arc tangent of an angle given in radians
ATAN2(x_number, y_number)Returns the arctangent from x- and y-coordinates
COT(number)Returns the cotangent of an angle given in radians.
COTH(number)Returns the hyperbolic cotangent of a number
SQRT(number)Returns the correctly rounded positive square root of given number
LN(number)Returns the natural logarithm (base e) of given number
LOG10(number)Returns the logarithm (base 10) of given number
EXP(number)Returns e raised to the power of given number
ABS(number)Returns the absolute value of given number
FACT(number)Returns the factorial of a given number
SEC(number)Returns the secant of an angle given in radians
CSC(number)Returns the cosecant of an angle given in radians
PI()Return value of Pi
RADIANS(degrees)Convert degrees to radians
DEGREES(radians)Convert radians to degrees
INT(number)Returns the Integer value of given number

Supported Constants

ConstantDescription
eThe value of e
PIThe value of PI
TRUEThe boolean true value
FALSEThe boolean false value
NULLThe null value

Supported text functions

FunctionDescription
LEFT(text, num_chars)Extracts a given number of characters from the left side of a supplied text string
RIGHT(text, num_chars)Extracts a given number of characters from the right side of a supplied text string
MID(text, start_num, num_chars)Extracts a given number of characters from the middle of a supplied text string
REVERSE(text)Reverse a string
ISNUMBER(text)Check if a value is a number
LOWER(text)Converts all letters in the specified string to lowercase
UPPER(text)Converts all letters in the specified string to uppercase
PROPER(text)Capitalizes words given text string
TRIM(text)Removes extra spaces from text
LEN(text)Returns the length of a stringtext
TEXT(value, [format_text])Convert a numeric value into a text string. You can use the TEXT function to embed formatted numbers inside text
Example:
TEXT(123) -> 123
TEXT(123) -> 123
TEXT(DATEVALUE("2021-01-23"),"dd-MM-yyyy") -> 23-01-2021
TEXT(DATEVALUE("2021-01-23"),"dd-MM-yyyy") -> 23-01-2021
TEXT(2.61,"hh:mm") -> 14:38
TEXT(2.61,"hh:mm") -> 14:38
TEXT(2.61,"[hh]") -> 62
TEXT(2.61,"[hh]") -> 62
TEXT(2.61,"hh-mm-ss") -> 14-38-24
TEXT(2.61,"hh-mm-ss") -> 14-38-24
TEXT(DATEVALUE("2021-01-03")-DATEVALUE("2021-01-01"),"[h]") -> 48
TEXT(DATEVALUE("2021-01-03")-DATEVALUE("2021-01-01"),"[h]") -> 48
TEXT(TIME(12,00,00)-TIME(10,30,10),"hh hours and mm minutes and ss seconds") -> "01 hours and 29 minutes and 50 seconds"
TEXT(TIME(12,00,00)-TIME(10,30,10),"hh hours and mm minutes and ss seconds") -> "01 hours and 29 minutes and 50 seconds"
REPLACE(old_text, start_num, num_chars, new_text)Replaces characters specified by location in a given text string with another text string
SUBSTITUTE(text, old_text, new_text)Replaces a set of characters with another
FIND(find_text, within_text, [start_num])Returns the location of a substring in a string (case sensitive)
SEARCH(find_text, within_text, [start_num])Returns the location of a substring in a string (case insensitive)
CONCAT(text1, text2, text3,…)Combines the text from multiple strings
ISBLANK(text)Returns TRUE when a given string is null or empty, otherwise return FALSE
REPT(text, repeat_time)Repeats characters a given number of times
CHAR(char_code)Return character from ascii code
CODE(char)Returns a ascii code of a character
VALUE(text)Convert numbers stored as text to numbers

Tags: