The <lyric> element

Parent element: <note>

The <lyric> element represents text underlays for lyrics. Two <text> elements that are not separated by an <elision> element are part of the same syllable, but may have different text formatting. A second <syllabic> element is not allowed unless preceded by an <elision> element.

If not otherwise specified:

  • The justify value is center.
  • The placement value is below.
  • The valign value is baseline.
  • The halign value matches the justify value.

The print-object attribute can override a <note>'s print-lyric attribute in cases where only some lyrics on a note are printed, as when lyrics for later verses are printed in a block of text rather than with each note.

https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/lyric/

Hierarchy

  • Lyric

Implements

Constructors

Properties

attributes: LyricAttributes
contents: LyricContents
schema: {
    attributes: {
        color: {
            type: "optional";
            value: {
                pattern: RegExp;
                type: "regex";
                zero: "#000000";
            };
        };
        default-x: {
            label: "default-x";
            type: "label";
            value: {
                type: "optional";
                value: {
                    max: number;
                    min: number;
                    type: "float";
                };
            };
        };
        default-y: {
            label: "default-y";
            type: "label";
            value: {
                type: "optional";
                value: {
                    max: number;
                    min: number;
                    type: "float";
                };
            };
        };
        id: {
            type: "optional";
            value: {
                pattern: RegExp;
                type: "regex";
                zero: "_";
            };
        };
        justify: {
            type: "optional";
            value: {
                choices: readonly ["left", "center", "right"];
                type: "choices";
            };
        };
        name: {
            type: "optional";
            value: {
                type: "string";
            };
        };
        number: {
            type: "optional";
            value: {
                type: "string";
            };
        };
        placement: {
            type: "optional";
            value: {
                choices: readonly ["above", "below"];
                type: "choices";
            };
        };
        print-object: {
            type: "optional";
            value: {
                choices: readonly ["yes", "no"];
                type: "choices";
            };
        };
        relative-x: {
            label: "relative-x";
            type: "label";
            value: {
                type: "optional";
                value: {
                    max: number;
                    min: number;
                    type: "float";
                };
            };
        };
        relative-y: {
            label: "relative-y";
            type: "label";
            value: {
                type: "optional";
                value: {
                    max: number;
                    min: number;
                    type: "float";
                };
            };
        };
        time-only: {
            type: "optional";
            value: {
                pattern: RegExp;
                type: "regex";
                zero: "1";
            };
        };
    };
    contents: readonly [{
        label: "value";
        type: "label";
        value: {
            choices: readonly [{
                label: "intelligible";
                type: "label";
                value: readonly [{
                    type: "optional";
                    value: typeof Syllabic;
                }, {
                    type: "required";
                    value: typeof Text;
                }, {
                    type: "zeroOrMore";
                    value: readonly [{
                        type: "optional";
                        value: readonly [{
                            type: "required";
                            value: typeof Elision;
                        }, {
                            type: "optional";
                            value: typeof Syllabic;
                        }];
                    }, {
                        type: "required";
                        value: typeof Text;
                    }];
                }, {
                    type: "optional";
                    value: typeof Extend;
                }];
            }, typeof Extend, typeof Laughing, typeof Humming];
            type: "choices";
        };
    }, {
        type: "optional";
        value: typeof EndLine;
    }, {
        type: "optional";
        value: typeof EndParagraph;
    }, {
        type: "optional";
        value: typeof Footnote;
    }, {
        type: "optional";
        value: typeof Level;
    }];
    name: "lyric";
} = Lyric.schema

Type declaration

  • Readonly attributes: {
        color: {
            type: "optional";
            value: {
                pattern: RegExp;
                type: "regex";
                zero: "#000000";
            };
        };
        default-x: {
            label: "default-x";
            type: "label";
            value: {
                type: "optional";
                value: {
                    max: number;
                    min: number;
                    type: "float";
                };
            };
        };
        default-y: {
            label: "default-y";
            type: "label";
            value: {
                type: "optional";
                value: {
                    max: number;
                    min: number;
                    type: "float";
                };
            };
        };
        id: {
            type: "optional";
            value: {
                pattern: RegExp;
                type: "regex";
                zero: "_";
            };
        };
        justify: {
            type: "optional";
            value: {
                choices: readonly ["left", "center", "right"];
                type: "choices";
            };
        };
        name: {
            type: "optional";
            value: {
                type: "string";
            };
        };
        number: {
            type: "optional";
            value: {
                type: "string";
            };
        };
        placement: {
            type: "optional";
            value: {
                choices: readonly ["above", "below"];
                type: "choices";
            };
        };
        print-object: {
            type: "optional";
            value: {
                choices: readonly ["yes", "no"];
                type: "choices";
            };
        };
        relative-x: {
            label: "relative-x";
            type: "label";
            value: {
                type: "optional";
                value: {
                    max: number;
                    min: number;
                    type: "float";
                };
            };
        };
        relative-y: {
            label: "relative-y";
            type: "label";
            value: {
                type: "optional";
                value: {
                    max: number;
                    min: number;
                    type: "float";
                };
            };
        };
        time-only: {
            type: "optional";
            value: {
                pattern: RegExp;
                type: "regex";
                zero: "1";
            };
        };
    }
    • Readonly color: {
          type: "optional";
          value: {
              pattern: RegExp;
              type: "regex";
              zero: "#000000";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            pattern: RegExp;
            type: "regex";
            zero: "#000000";
        }
        • Readonly pattern: RegExp
        • Readonly type: "regex"
        • Readonly zero: "#000000"
    • Readonly default-x: {
          label: "default-x";
          type: "label";
          value: {
              type: "optional";
              value: {
                  max: number;
                  min: number;
                  type: "float";
              };
          };
      }
      • Readonly label: "default-x"
      • Readonly type: "label"
      • Readonly value: {
            type: "optional";
            value: {
                max: number;
                min: number;
                type: "float";
            };
        }
        • Readonly type: "optional"
        • Readonly value: {
              max: number;
              min: number;
              type: "float";
          }
          • Readonly max: number
          • Readonly min: number
          • Readonly type: "float"
    • Readonly default-y: {
          label: "default-y";
          type: "label";
          value: {
              type: "optional";
              value: {
                  max: number;
                  min: number;
                  type: "float";
              };
          };
      }
      • Readonly label: "default-y"
      • Readonly type: "label"
      • Readonly value: {
            type: "optional";
            value: {
                max: number;
                min: number;
                type: "float";
            };
        }
        • Readonly type: "optional"
        • Readonly value: {
              max: number;
              min: number;
              type: "float";
          }
          • Readonly max: number
          • Readonly min: number
          • Readonly type: "float"
    • Readonly id: {
          type: "optional";
          value: {
              pattern: RegExp;
              type: "regex";
              zero: "_";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            pattern: RegExp;
            type: "regex";
            zero: "_";
        }
        • Readonly pattern: RegExp
        • Readonly type: "regex"
        • Readonly zero: "_"
    • Readonly justify: {
          type: "optional";
          value: {
              choices: readonly ["left", "center", "right"];
              type: "choices";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            choices: readonly ["left", "center", "right"];
            type: "choices";
        }
        • Readonly choices: readonly ["left", "center", "right"]
        • Readonly type: "choices"
    • Readonly name: {
          type: "optional";
          value: {
              type: "string";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            type: "string";
        }
        • Readonly type: "string"
    • Readonly number: {
          type: "optional";
          value: {
              type: "string";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            type: "string";
        }
        • Readonly type: "string"
    • Readonly placement: {
          type: "optional";
          value: {
              choices: readonly ["above", "below"];
              type: "choices";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            choices: readonly ["above", "below"];
            type: "choices";
        }
        • Readonly choices: readonly ["above", "below"]
        • Readonly type: "choices"
    • Readonly print-object: {
          type: "optional";
          value: {
              choices: readonly ["yes", "no"];
              type: "choices";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            choices: readonly ["yes", "no"];
            type: "choices";
        }
        • Readonly choices: readonly ["yes", "no"]
        • Readonly type: "choices"
    • Readonly relative-x: {
          label: "relative-x";
          type: "label";
          value: {
              type: "optional";
              value: {
                  max: number;
                  min: number;
                  type: "float";
              };
          };
      }
      • Readonly label: "relative-x"
      • Readonly type: "label"
      • Readonly value: {
            type: "optional";
            value: {
                max: number;
                min: number;
                type: "float";
            };
        }
        • Readonly type: "optional"
        • Readonly value: {
              max: number;
              min: number;
              type: "float";
          }
          • Readonly max: number
          • Readonly min: number
          • Readonly type: "float"
    • Readonly relative-y: {
          label: "relative-y";
          type: "label";
          value: {
              type: "optional";
              value: {
                  max: number;
                  min: number;
                  type: "float";
              };
          };
      }
      • Readonly label: "relative-y"
      • Readonly type: "label"
      • Readonly value: {
            type: "optional";
            value: {
                max: number;
                min: number;
                type: "float";
            };
        }
        • Readonly type: "optional"
        • Readonly value: {
              max: number;
              min: number;
              type: "float";
          }
          • Readonly max: number
          • Readonly min: number
          • Readonly type: "float"
    • Readonly time-only: {
          type: "optional";
          value: {
              pattern: RegExp;
              type: "regex";
              zero: "1";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            pattern: RegExp;
            type: "regex";
            zero: "1";
        }
        • Readonly pattern: RegExp
        • Readonly type: "regex"
        • Readonly zero: "1"
  • Readonly contents: readonly [{
        label: "value";
        type: "label";
        value: {
            choices: readonly [{
                label: "intelligible";
                type: "label";
                value: readonly [{
                    type: "optional";
                    value: typeof Syllabic;
                }, {
                    type: "required";
                    value: typeof Text;
                }, {
                    type: "zeroOrMore";
                    value: readonly [{
                        type: "optional";
                        value: readonly [{
                            type: "required";
                            value: typeof Elision;
                        }, {
                            type: "optional";
                            value: typeof Syllabic;
                        }];
                    }, {
                        type: "required";
                        value: typeof Text;
                    }];
                }, {
                    type: "optional";
                    value: typeof Extend;
                }];
            }, typeof Extend, typeof Laughing, typeof Humming];
            type: "choices";
        };
    }, {
        type: "optional";
        value: typeof EndLine;
    }, {
        type: "optional";
        value: typeof EndParagraph;
    }, {
        type: "optional";
        value: typeof Footnote;
    }, {
        type: "optional";
        value: typeof Level;
    }]
  • Readonly name: "lyric"
schema: {
    attributes: {
        color: {
            type: "optional";
            value: {
                pattern: RegExp;
                type: "regex";
                zero: "#000000";
            };
        };
        default-x: {
            label: "default-x";
            type: "label";
            value: {
                type: "optional";
                value: {
                    max: number;
                    min: number;
                    type: "float";
                };
            };
        };
        default-y: {
            label: "default-y";
            type: "label";
            value: {
                type: "optional";
                value: {
                    max: number;
                    min: number;
                    type: "float";
                };
            };
        };
        id: {
            type: "optional";
            value: {
                pattern: RegExp;
                type: "regex";
                zero: "_";
            };
        };
        justify: {
            type: "optional";
            value: {
                choices: readonly ["left", "center", "right"];
                type: "choices";
            };
        };
        name: {
            type: "optional";
            value: {
                type: "string";
            };
        };
        number: {
            type: "optional";
            value: {
                type: "string";
            };
        };
        placement: {
            type: "optional";
            value: {
                choices: readonly ["above", "below"];
                type: "choices";
            };
        };
        print-object: {
            type: "optional";
            value: {
                choices: readonly ["yes", "no"];
                type: "choices";
            };
        };
        relative-x: {
            label: "relative-x";
            type: "label";
            value: {
                type: "optional";
                value: {
                    max: number;
                    min: number;
                    type: "float";
                };
            };
        };
        relative-y: {
            label: "relative-y";
            type: "label";
            value: {
                type: "optional";
                value: {
                    max: number;
                    min: number;
                    type: "float";
                };
            };
        };
        time-only: {
            type: "optional";
            value: {
                pattern: RegExp;
                type: "regex";
                zero: "1";
            };
        };
    };
    contents: readonly [{
        label: "value";
        type: "label";
        value: {
            choices: readonly [{
                label: "intelligible";
                type: "label";
                value: readonly [{
                    type: "optional";
                    value: typeof Syllabic;
                }, {
                    type: "required";
                    value: typeof Text;
                }, {
                    type: "zeroOrMore";
                    value: readonly [{
                        type: "optional";
                        value: readonly [{
                            type: "required";
                            value: typeof Elision;
                        }, {
                            type: "optional";
                            value: typeof Syllabic;
                        }];
                    }, {
                        type: "required";
                        value: typeof Text;
                    }];
                }, {
                    type: "optional";
                    value: typeof Extend;
                }];
            }, typeof Extend, typeof Laughing, typeof Humming];
            type: "choices";
        };
    }, {
        type: "optional";
        value: typeof EndLine;
    }, {
        type: "optional";
        value: typeof EndParagraph;
    }, {
        type: "optional";
        value: typeof Footnote;
    }, {
        type: "optional";
        value: typeof Level;
    }];
    name: "lyric";
} = ...

Type declaration

  • Readonly attributes: {
        color: {
            type: "optional";
            value: {
                pattern: RegExp;
                type: "regex";
                zero: "#000000";
            };
        };
        default-x: {
            label: "default-x";
            type: "label";
            value: {
                type: "optional";
                value: {
                    max: number;
                    min: number;
                    type: "float";
                };
            };
        };
        default-y: {
            label: "default-y";
            type: "label";
            value: {
                type: "optional";
                value: {
                    max: number;
                    min: number;
                    type: "float";
                };
            };
        };
        id: {
            type: "optional";
            value: {
                pattern: RegExp;
                type: "regex";
                zero: "_";
            };
        };
        justify: {
            type: "optional";
            value: {
                choices: readonly ["left", "center", "right"];
                type: "choices";
            };
        };
        name: {
            type: "optional";
            value: {
                type: "string";
            };
        };
        number: {
            type: "optional";
            value: {
                type: "string";
            };
        };
        placement: {
            type: "optional";
            value: {
                choices: readonly ["above", "below"];
                type: "choices";
            };
        };
        print-object: {
            type: "optional";
            value: {
                choices: readonly ["yes", "no"];
                type: "choices";
            };
        };
        relative-x: {
            label: "relative-x";
            type: "label";
            value: {
                type: "optional";
                value: {
                    max: number;
                    min: number;
                    type: "float";
                };
            };
        };
        relative-y: {
            label: "relative-y";
            type: "label";
            value: {
                type: "optional";
                value: {
                    max: number;
                    min: number;
                    type: "float";
                };
            };
        };
        time-only: {
            type: "optional";
            value: {
                pattern: RegExp;
                type: "regex";
                zero: "1";
            };
        };
    }
    • Readonly color: {
          type: "optional";
          value: {
              pattern: RegExp;
              type: "regex";
              zero: "#000000";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            pattern: RegExp;
            type: "regex";
            zero: "#000000";
        }
        • Readonly pattern: RegExp
        • Readonly type: "regex"
        • Readonly zero: "#000000"
    • Readonly default-x: {
          label: "default-x";
          type: "label";
          value: {
              type: "optional";
              value: {
                  max: number;
                  min: number;
                  type: "float";
              };
          };
      }
      • Readonly label: "default-x"
      • Readonly type: "label"
      • Readonly value: {
            type: "optional";
            value: {
                max: number;
                min: number;
                type: "float";
            };
        }
        • Readonly type: "optional"
        • Readonly value: {
              max: number;
              min: number;
              type: "float";
          }
          • Readonly max: number
          • Readonly min: number
          • Readonly type: "float"
    • Readonly default-y: {
          label: "default-y";
          type: "label";
          value: {
              type: "optional";
              value: {
                  max: number;
                  min: number;
                  type: "float";
              };
          };
      }
      • Readonly label: "default-y"
      • Readonly type: "label"
      • Readonly value: {
            type: "optional";
            value: {
                max: number;
                min: number;
                type: "float";
            };
        }
        • Readonly type: "optional"
        • Readonly value: {
              max: number;
              min: number;
              type: "float";
          }
          • Readonly max: number
          • Readonly min: number
          • Readonly type: "float"
    • Readonly id: {
          type: "optional";
          value: {
              pattern: RegExp;
              type: "regex";
              zero: "_";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            pattern: RegExp;
            type: "regex";
            zero: "_";
        }
        • Readonly pattern: RegExp
        • Readonly type: "regex"
        • Readonly zero: "_"
    • Readonly justify: {
          type: "optional";
          value: {
              choices: readonly ["left", "center", "right"];
              type: "choices";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            choices: readonly ["left", "center", "right"];
            type: "choices";
        }
        • Readonly choices: readonly ["left", "center", "right"]
        • Readonly type: "choices"
    • Readonly name: {
          type: "optional";
          value: {
              type: "string";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            type: "string";
        }
        • Readonly type: "string"
    • Readonly number: {
          type: "optional";
          value: {
              type: "string";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            type: "string";
        }
        • Readonly type: "string"
    • Readonly placement: {
          type: "optional";
          value: {
              choices: readonly ["above", "below"];
              type: "choices";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            choices: readonly ["above", "below"];
            type: "choices";
        }
        • Readonly choices: readonly ["above", "below"]
        • Readonly type: "choices"
    • Readonly print-object: {
          type: "optional";
          value: {
              choices: readonly ["yes", "no"];
              type: "choices";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            choices: readonly ["yes", "no"];
            type: "choices";
        }
        • Readonly choices: readonly ["yes", "no"]
        • Readonly type: "choices"
    • Readonly relative-x: {
          label: "relative-x";
          type: "label";
          value: {
              type: "optional";
              value: {
                  max: number;
                  min: number;
                  type: "float";
              };
          };
      }
      • Readonly label: "relative-x"
      • Readonly type: "label"
      • Readonly value: {
            type: "optional";
            value: {
                max: number;
                min: number;
                type: "float";
            };
        }
        • Readonly type: "optional"
        • Readonly value: {
              max: number;
              min: number;
              type: "float";
          }
          • Readonly max: number
          • Readonly min: number
          • Readonly type: "float"
    • Readonly relative-y: {
          label: "relative-y";
          type: "label";
          value: {
              type: "optional";
              value: {
                  max: number;
                  min: number;
                  type: "float";
              };
          };
      }
      • Readonly label: "relative-y"
      • Readonly type: "label"
      • Readonly value: {
            type: "optional";
            value: {
                max: number;
                min: number;
                type: "float";
            };
        }
        • Readonly type: "optional"
        • Readonly value: {
              max: number;
              min: number;
              type: "float";
          }
          • Readonly max: number
          • Readonly min: number
          • Readonly type: "float"
    • Readonly time-only: {
          type: "optional";
          value: {
              pattern: RegExp;
              type: "regex";
              zero: "1";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            pattern: RegExp;
            type: "regex";
            zero: "1";
        }
        • Readonly pattern: RegExp
        • Readonly type: "regex"
        • Readonly zero: "1"
  • Readonly contents: readonly [{
        label: "value";
        type: "label";
        value: {
            choices: readonly [{
                label: "intelligible";
                type: "label";
                value: readonly [{
                    type: "optional";
                    value: typeof Syllabic;
                }, {
                    type: "required";
                    value: typeof Text;
                }, {
                    type: "zeroOrMore";
                    value: readonly [{
                        type: "optional";
                        value: readonly [{
                            type: "required";
                            value: typeof Elision;
                        }, {
                            type: "optional";
                            value: typeof Syllabic;
                        }];
                    }, {
                        type: "required";
                        value: typeof Text;
                    }];
                }, {
                    type: "optional";
                    value: typeof Extend;
                }];
            }, typeof Extend, typeof Laughing, typeof Humming];
            type: "choices";
        };
    }, {
        type: "optional";
        value: typeof EndLine;
    }, {
        type: "optional";
        value: typeof EndParagraph;
    }, {
        type: "optional";
        value: typeof Footnote;
    }, {
        type: "optional";
        value: typeof Level;
    }]
  • Readonly name: "lyric"

Methods

Generated using TypeDoc