MusicLogicGraph

Overview

This page describes the functionality and usage of the MusicLogicGraph.

The Music Logic Graph data and presets are stored in Libs/MusicLogic/musiclogic.xml

The graph itself describes in a simple and visual manner how music behaves, if the Music Logic is activated.

MusicLogic Graph Use

Multiple music logic presets can be created and edited. In Flow Graph, the presets can be selected to define which music logic should be used. The graph system selects and traverses through the nodes, which fits bests the input criteria.

Double-click in the graph view to add a new node, or right-click and use the context menu. Nodes can be renamed (F2 or right-click) and should match the moods in the themes which should use be controlled by the music logic. Hold Shift and drag a spline from one node to another to connect them.

The conditions to switch between moods are defined in the links. Select a link to change the conditions in the link properties on the right side of the music logic graph window. It’s possible to create multiple conditions per link, which will act as AND conditions. To create an OR condition, add multiple links between 2 nodes.

Stingers can be played by adding a playlist node and link it to a mood node. The conditions when a stinger should play are defined in their links, the same way as mood switches.

Playlists can be edited in this file: Libs/MusicLogic/playlists.xml

To notify the music system that a stinger has been played, add an Event node, select a suitable event in the properties and connect it to the playlist node.

Properties

Mood Node Properties

PropertyDescription
NameName of the mood. Needs to match mood names in the music.xml

Playlist Node Properties

PropertyDescription
NameName of the playlist. Needs to match names in the playlists.xml

Event Node Properties

PropertyDescription

Name

Name of the event that will get send. Defined in the musiclogicinputs.xml
PropertyDescription
InputThe input, defined in the musiclogicinputs.xml
ValueThe value which is used for the operation to determine when a mood switch can happen.
OperationDefines to what the value will be compared.
TimeMinThe min time of how long the condition has to be true in order to allow a mood switch.
TimeMaxThe max time of how long the condition has to be true in order to allow a mood switch.

If TimeMin and TimeMax have different values set, the music system will randomly choose a time between both values.

To remove a condition, select <NONE> as input.