Skip to content

MusicLayer ​

Inherits: Resource

A layer (a stem) of a part of a Dynamic Music: an extra file that plays in sync with the part, on top of it, and fades in and out with the intensity (drums that come in when a fight starts). It must be as long as the part and have the same tempo. See docs: Audio > Dynamic Music.

Properties ​

Stringname""
Stringpath""
floatvolume_db0.0
floatfrom_intensity0.5

Methods ​

Stringdescribe()
PackedStringArrayvalidate()

Property descriptions ​

String name = "" ​

The name of the layer, as the editor lists it ("Drums", "Brass")

String path = "" ​

The layer's file (an audio file of the library, Ogg or MP3, as long as the part)

float volume_db = 0.0 ​

How loud the layer is when it plays (dB)

float from_intensity = 0.5 ​

The layer plays when the intensity (0 to 1) is at least this; below it the layer fades out. 0 = always

Method descriptions ​

String describe() ​

The title of the layer in the editor

PackedStringArray validate() ​

The warnings of this layer