taglib-ts
    Preparing search index...

    Class ModTag

    Tag implementation for tracker module formats (MOD, S3M, XM, IT).

    Only title, comment, and trackerName are supported. Comment is typically built from instrument/sample names joined by newlines.

    Hierarchy (View Summary)

    Index

    Constructors

    Accessors

    • get album(): string

      Album name. An empty string indicates the field is not set.

      Returns string

    • set album(_value: string): void

      Album name. An empty string indicates the field is not set.

      Parameters

      • _value: string

      Returns void

    • get artist(): string

      Primary artist or performer. An empty string indicates the field is not set.

      Returns string

    • set artist(_value: string): void

      Primary artist or performer. An empty string indicates the field is not set.

      Parameters

      • _value: string

      Returns void

    • get comment(): string

      Free-form comment. An empty string indicates the field is not set.

      Returns string

    • set comment(value: string): void

      Free-form comment. An empty string indicates the field is not set.

      Parameters

      • value: string

      Returns void

    • get genre(): string

      Genre string (may be an ID3v1 genre name or a custom string). An empty string indicates the field is not set.

      Returns string

    • set genre(_value: string): void

      Genre string (may be an ID3v1 genre name or a custom string). An empty string indicates the field is not set.

      Parameters

      • _value: string

      Returns void

    • get isEmpty(): boolean

      True when every field is empty / zero.

      Returns boolean

    • get title(): string

      Track title. An empty string indicates the field is not set.

      Returns string

    • set title(value: string): void

      Track title. An empty string indicates the field is not set.

      Parameters

      • value: string

      Returns void

    • get track(): number

      Track number within the album. Returns 0 if not set.

      Returns number

    • set track(_value: number): void

      Track number within the album. Returns 0 if not set.

      Parameters

      • _value: number

      Returns void

    • get trackerName(): string

      Returns string

    • set trackerName(value: string): void

      Parameters

      • value: string

      Returns void

    • get year(): number

      Release year. Returns 0 if not set.

      Returns number

    • set year(_value: number): void

      Release year. Returns 0 if not set.

      Parameters

      • _value: number

      Returns void

    Methods

    • Return all complex property values for the given key.

      Parameters

      • _key: string

        The property key (e.g. "PICTURE").

      Returns VariantMap[]

      An array of VariantMap objects, or an empty array if the key is not present.

    • Return the keys of all complex (non-string) properties stored in this tag. Complex properties include embedded pictures and similar structured data.

      Returns string[]

      An array of property key strings, or an empty array if none.

    • Remove properties that are not supported by this tag format. The default implementation is a no-op; subclasses may override.

      Parameters

      • _properties: string[]

        Keys of the properties to remove.

      Returns void

    • Set complex property values for the given key, replacing any existing values.

      Parameters

      • _key: string

        The property key (e.g. "PICTURE").

      • _value: VariantMap[]

        The new values to store.

      Returns boolean

      true if the property was stored, false if the format does not support complex properties.

    • Copy tag fields from source to target. When overwrite is false, only empty fields in the target are filled in.

      Parameters

      • source: Tag

        The tag to copy values from.

      • target: Tag

        The tag to copy values into.

      • overwrite: boolean

        When true, all fields in target are overwritten; when false, only unset fields are populated.

      Returns void

    • Join an array of tag values with " / ".

      Parameters

      • values: string[]

        The string values to join.

      Returns string

      A single string with values separated by " / ".