The configuration file is a .config file with an XML structure. There is one .config file per haptic folder.
It is used to link external (Chroma) commands with haptics events. The file is loaded when the Load command is executed and allows the Synesthesia project to understand game related commands (Play/Stop).
Configuration File – General Structure
{
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Synesthesia.GameConfiguration",
"description": "List links between external commands and haptic events",
"type": "object",
"properties": {
"ExternalCommands": {
"description": "List of links between external commands and haptic events",
"type": "array",
"items": {
"type": "object",
"$ref": "Synesthesia.ExternalCommand.schema.json"
}
}
}
}
External Command – Substructure
{
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Synesthesia.ExternalCommand",
"description": "a link between an external command and haptic events",
"type": "object",
"properties": {
"External_Command_ID": {
"description": "External command ID that will trigger the following haptic events",
"type": "string"
},
"Haptic_Events": {
"description": "List of haptic events to triggers",
"type": "array",
"items": {
"type": "object",
"$ref": "Synesthesia.HapticEvent.schema.json"
}
}
"Interrupts_Commands": {
"description": "List commands to trigger, must match existing External_Command_ID",
"OneOf": [
{
"type": "enum",
"enum": ["All"]
},
{
"type": "array",
"items": {"type": "string"}
}
]
}
}
}
Haptic Event – Substructure
{
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Synesthesia.HapticEvent",
"description": "a link between an external command and haptic events",
"type": "object",
"properties": {
"Haptic_Effect": {
"description": "Name of the haptic effect to play. Should be the same as the related .haps file",
"type": "string"
},
"Mixing": {
"description": "Mixing strategy used for this event. Override will stop all haptic events on the given targets before playing.",
"type": "string",
"enum": ["Override", "Merge"],
"default" : "Override"
},
"Loop": {
"description": "Number of times the effect must be played. Use a negative value or “infinity” for an infinity loop.",
"type": "integer" (or "infinity")
"default" : 1
},
"Targeting": {
"description": "List of targets to deploy the effect",
"type": "array",
"items": {
"type": "object",
"$ref": "Synesthesia.Targeting.schema.json"
}
}
}
}
If “Interrupts_Commands” is not present, no commands will be stopped.
If “Interrupts_Commands” is present, is an array, and has at list of values, all values in the array will be stopped (equivalent to “stop;[Value]” for each value in the array)
If “Interrupts_Commands” is present and is equal to “All”, all haptic will be stopped (equivalent to “stop;”)
Resulting behaviour (in a Synesthesia generated haptic.config file based on listening for commands).
[EventName]_ON ->Set the “Loop” argument to “infinity” and the “Mixing” one to “Merge” on the default haptic effect
[EventName]_OFF -> Does not add the default haptic effect and had “[EventName]” into the “InteruptCommands” array.
[EventName]_MERGE -> Set the “Mixing” argument to “Merge”
Per default (without any suffix, set the “Mixing” argument to “Override”
Targeting – Substructure
Targeting a group will play an effect on all devices labelled in the given groups. Please acknowledge that some groups are a combination of multiple ones and will activate all subgroups (i.e. Leg will activate Upper_leg and Lower_leg)
{
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Synesthesia.Targeting",
"description": "",
"type": "object",
"properties": {
"Target": {
"description": "body parts targeted by the effect",
"type": "string"
"enum": [details below],
},
"Spatialization": {
"description": "spatialization of the effect",
"type": "string",
"enum": ["Right", "Left", "Global"],
"default" : "Global"
},
"Gain": {
"description": "Normalized gain on this effect, from 0 (0%) to 1 (100%)",
"type": "number",
"minimum": 0,
"default": 1
}
}
}
}
Targeting Data Complete List
Targeting a group will play an effect on all devices labelled in the given groups. Please acknowledge that some groups are a combination of multiple ones and will activate all subgroups (i.e. Leg will activate Upper_leg and Lower_leg)
All,
Top,
Down,
Arm,
Head,
Chest,
Waist,
Leg,
Upper_arm,
Lower_arm,
Hand,
Skull,
Neck,
Upper_leg,
Lower_leg,
Foot,
Palm,
Finger,
Sole,
Toe,
Thumb,
Index,
Middle,
Ring,
Pinky,
Hallux,
Index_toe,
Middle_toe,
Ring_toe,
Pinky_toe,
First,
Second,
Third