@minecraft/server
    Preparing search index...

    Interface SoundDefinitionFilterBeta

    Criteria used to narrow a set of sound definitions. Each field is optional and applies its constraint only when defined; a definition must satisfy every defined field to pass.

    interface SoundDefinitionFilter {
        artists?: string[];
        genres?: string[];
        maxDuration?: number;
        minDuration?: number;
        moods?: string[];
        tags?: Record<string, string[]>;
        titles?: string[];
    }
    Index

    Properties

    artists?: string[]

    Artist names to match against the definition's music_info.artist. Comparison is case-insensitive. When defined as a non-empty array, a definition passes only when its declared artist matches one of the supplied values. When undefined, no constraint on artist is applied.

    genres?: string[]

    Genres to match against the definition's music_info.genres. Comparison is case-insensitive. When defined as a non-empty array, a definition passes only when at least one of its declared genres matches one of the supplied values. When undefined, no constraint on genres is applied.

    maxDuration?: number

    Upper bound in seconds, inclusive. When defined, definitions with a longer duration and definitions without a declared duration are excluded. When undefined, no upper bound is applied.

    minDuration?: number

    Lower bound in seconds, inclusive. When defined, definitions with a shorter duration and definitions without a declared duration are excluded. When undefined, no lower bound is applied.

    moods?: string[]

    Moods to match against the definition's music_info.moods. Comparison is case-insensitive. When defined as a non-empty array, a definition passes only when at least one of its declared moods matches one of the supplied values. When undefined, no constraint on moods is applied.

    tags?: Record<string, string[]>

    Tag constraints to match against the definition's tags. Comparisons of tag names and values are case-insensitive. When defined as a non-empty record, a definition passes only when, for each entry with a non-empty value array, the tag name is present on the definition with at least one matching value. When undefined, no constraint on tags is applied.

    titles?: string[]

    Titles to match against the definition's music_info.title. Comparison is case-insensitive. When defined as a non-empty array, a definition passes only when its declared title matches one of the supplied values. When undefined, no constraint on title is applied.