CUETrigger

A base singleton class to handle a trigger coming from the CUEEngine.

#import <CUEEngine.h>

Instance Methods

(instancetype) - initWithJsonString:
 Initialize CUETrigger by a json string.

Class Methods

(NSString *) + modeAsString:
 A trigger mode represented as NSString .
(NSString *) + formatFullData:
 Full representation of a trigger as NSString .
(NSString *) + formatPartialData:
 Partial representation of a trigger as NSString .

Properties

int generation
 Engine generation. Can be 1 or 2 only.
CUEEngineMode mode
 A mode of a detected trigger.
double latencyMs
 Time in milliseconds since start of the CUE message decoding process.
double noise
 Log (base 10) of the median background noise level.
double power
 Log (base 10) of the median channel strength and noise level.
NSString * rawIndices
 The "symbol string" or "indices" of the detected trigger (e.g., "1.2.3").
NSArray< NSNumber * > * rawCalibrations
 It will be deprecated soon.
NSArray< NSArray< NSNumber * > * > * rawTrigger
 It will be deprecated soon.
NSString * winnerIndices
 The same as CUETrigger.rawIndices.
long long triggerAsNumber
 Representing a trigger indeces as a number.
NSString * rawJsonString
 A json string representing the trigger.
NSString * message
 A received message of a data trigger.
NSDictionary * payload
 Payload associated with indices.

formatFullData:

+ (NSString *) formatFullData: (CUETrigger *)  trigger

Full representation of a trigger as NSString .

formatPartialData:

+ (NSString *) formatPartialData: (CUETrigger *)  trigger

Partial representation of a trigger as NSString .

initWithJsonString:

- (instancetype) initWithJsonString: (NSString *)  jsonString

Initialize CUETrigger with a JSON string.

modeAsString:

+ (NSString *) modeAsString: (CUEEngineMode mode

A trigger mode represented as NSString .

Property Documentation

generation

- (int) generation readwriteatomic

Engine generation. Can be 1 or 2 only.

latencyMs

- (double) latencyMs readwriteatomic

Time in milliseconds since start of the CUE message decoding process.

message

- (NSString*) message readwriteatomicassign

A received message of a data trigger.

See also
CUEEngineModeData

mode

- (CUEEngineMode) mode readwriteatomic

A mode of a detected trigger.

See also
CUEEngineMode

noise

- (double) noise readwriteatomic

Log (base 10) of the median background noise level.

payload

- (NSDictionary*) payload readwriteatomic

Payload associated with indices.

See also
rawIndices

power

- (double) power readwriteatomic

Log (base 10) of the median channel strength and noise level.

rawCalibrations

- (NSArray<NSNumber *>*) rawCalibrations readwriteatomicassign

Deprecated

rawIndices

- (NSString*) rawIndices readwriteatomic

The "symbol string" or "indices" of the detected trigger (e.g., "1.2.3").

Within a trigger audio signal, raw-indices are represented by 3 symbols separated by a . character. E.g. "42.21.43", "1.2.34", etc., where each symbol is an integer between 0 and 461.

Within a multi_trigger audio signal, raw-indices are represented by 3*l symbols separated by a '.' character. Where l is a number of multi-trigger carrier frequencies. E.g. "42.21.43.21.34.12" (2 carriers), "1.2.34.5.6.7.32.33.21" (3 carriers), etc.. Each symbol is an integer between 0 and 461.

See also
CUEEngineModeTrigger
CUEEngineModeMultiTrigger

rawJsonString

- (NSString*) rawJsonString readwriteatomic

A JSON string representing the trigger.

rawTrigger

- (NSArray<NSArray<NSNumber *>*>*) rawTrigger readwriteatomicassign

Deprecated

triggerAsNumber

- (long long) triggerAsNumber readwriteatomic

Representing trigger indices as a number.

You can convert a trigger or multi_trigger back and forth to an integer. Number range is from 0 to 462**(3*l) - 1 and can not exceed 64 bit signed integer value, where l is a number for carrier frequencies (l is always 1 for an ordinary trigger and can be more then 1 for a multi_trigger).

Note
Please send multi_trigger as number only in a range from 0.0.0... to 0.2.461.461.461.461.461.461.461 .

winnerIndices

- (NSString*) winnerIndices readwriteatomic

The same as CUETrigger.rawIndices.