The <sound> element

Parent elements: <direction>, <measure> (partwise), <part> (timewise)

The <sound> element contains general playback parameters. They can stand alone within a part/measure, or be a component element within a direction.

Instrument changes, MIDI devices, MIDI instruments, and playback techniques are changed using the <instrument-change>, <midi-device>, <midi-instrument>, and <play> elements. When there are multiple instances of these elements, they should be grouped together by instrument using the id attribute values.

The <offset> element is used to indicate that the sound takes place offset from the current score position. If the <sound> element is a child of a <direction> element, the sound <offset> element overrides the direction <offset> element if both elements are present. Note that the offset reflects the intended musical position for the change in sound. It should not be used to compensate for latency issues in particular hardware configurations.

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

Hierarchy

  • Sound

Implements

Constructors

Properties

attributes: SoundAttributes
contents: SoundContents
schema: {
    attributes: {
        coda: {
            type: "optional";
            value: {
                type: "string";
            };
        };
        dacapo: {
            type: "optional";
            value: {
                choices: readonly ["yes", "no"];
                type: "choices";
            };
        };
        dalsegno: {
            type: "optional";
            value: {
                type: "string";
            };
        };
        damper-pedal: {
            type: "optional";
            value: {
                choices: readonly ["no", "yes", 0, 1];
                type: "choices";
            };
        };
        divisions: {
            type: "optional";
            value: {
                max: number;
                min: number;
                type: "float";
            };
        };
        dynamics: {
            type: "optional";
            value: {
                max: number;
                min: 0;
                type: "float";
            };
        };
        elevation: {
            type: "optional";
            value: {
                max: 180;
                min: -180;
                type: "float";
            };
        };
        fine: {
            type: "optional";
            value: {
                type: "string";
            };
        };
        forward-repeat: {
            type: "optional";
            value: {
                choices: readonly ["yes", "no"];
                type: "choices";
            };
        };
        id: {
            type: "optional";
            value: {
                pattern: RegExp;
                type: "regex";
                zero: "_";
            };
        };
        pan: {
            type: "optional";
            value: {
                max: 180;
                min: -180;
                type: "float";
            };
        };
        pizzicato: {
            type: "optional";
            value: {
                choices: readonly ["yes", "no"];
                type: "choices";
            };
        };
        segno: {
            type: "optional";
            value: {
                type: "string";
            };
        };
        soft-pedal: {
            type: "optional";
            value: {
                choices: readonly ["no", "yes", 0, 1];
                type: "choices";
            };
        };
        sostenuto-pedal: {
            type: "optional";
            value: {
                choices: readonly ["no", "yes", 0, 1];
                type: "choices";
            };
        };
        tempo: {
            type: "optional";
            value: {
                max: number;
                min: 0;
                type: "float";
            };
        };
        time-only: {
            type: "optional";
            value: {
                pattern: RegExp;
                type: "regex";
                zero: "1";
            };
        };
        tocoda: {
            type: "optional";
            value: {
                type: "string";
            };
        };
    };
    contents: readonly [{
        label: "playbacks";
        type: "label";
        value: {
            type: "zeroOrMore";
            value: readonly [{
                type: "optional";
                value: typeof InstrumentChange;
            }, {
                type: "optional";
                value: typeof MidiDevice;
            }, {
                type: "optional";
                value: typeof MidiInstrument;
            }, {
                type: "optional";
                value: typeof Play;
            }];
        };
    }, {
        type: "optional";
        value: typeof Swing;
    }, {
        type: "optional";
        value: typeof Offset;
    }];
    name: "sound";
} = Sound.schema

Type declaration

  • Readonly attributes: {
        coda: {
            type: "optional";
            value: {
                type: "string";
            };
        };
        dacapo: {
            type: "optional";
            value: {
                choices: readonly ["yes", "no"];
                type: "choices";
            };
        };
        dalsegno: {
            type: "optional";
            value: {
                type: "string";
            };
        };
        damper-pedal: {
            type: "optional";
            value: {
                choices: readonly ["no", "yes", 0, 1];
                type: "choices";
            };
        };
        divisions: {
            type: "optional";
            value: {
                max: number;
                min: number;
                type: "float";
            };
        };
        dynamics: {
            type: "optional";
            value: {
                max: number;
                min: 0;
                type: "float";
            };
        };
        elevation: {
            type: "optional";
            value: {
                max: 180;
                min: -180;
                type: "float";
            };
        };
        fine: {
            type: "optional";
            value: {
                type: "string";
            };
        };
        forward-repeat: {
            type: "optional";
            value: {
                choices: readonly ["yes", "no"];
                type: "choices";
            };
        };
        id: {
            type: "optional";
            value: {
                pattern: RegExp;
                type: "regex";
                zero: "_";
            };
        };
        pan: {
            type: "optional";
            value: {
                max: 180;
                min: -180;
                type: "float";
            };
        };
        pizzicato: {
            type: "optional";
            value: {
                choices: readonly ["yes", "no"];
                type: "choices";
            };
        };
        segno: {
            type: "optional";
            value: {
                type: "string";
            };
        };
        soft-pedal: {
            type: "optional";
            value: {
                choices: readonly ["no", "yes", 0, 1];
                type: "choices";
            };
        };
        sostenuto-pedal: {
            type: "optional";
            value: {
                choices: readonly ["no", "yes", 0, 1];
                type: "choices";
            };
        };
        tempo: {
            type: "optional";
            value: {
                max: number;
                min: 0;
                type: "float";
            };
        };
        time-only: {
            type: "optional";
            value: {
                pattern: RegExp;
                type: "regex";
                zero: "1";
            };
        };
        tocoda: {
            type: "optional";
            value: {
                type: "string";
            };
        };
    }
    • Readonly coda: {
          type: "optional";
          value: {
              type: "string";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            type: "string";
        }
        • Readonly type: "string"
    • Readonly dacapo: {
          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 dalsegno: {
          type: "optional";
          value: {
              type: "string";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            type: "string";
        }
        • Readonly type: "string"
    • Readonly damper-pedal: {
          type: "optional";
          value: {
              choices: readonly ["no", "yes", 0, 1];
              type: "choices";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            choices: readonly ["no", "yes", 0, 1];
            type: "choices";
        }
        • Readonly choices: readonly ["no", "yes", 0, 1]
        • Readonly type: "choices"
    • Readonly divisions: {
          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 dynamics: {
          type: "optional";
          value: {
              max: number;
              min: 0;
              type: "float";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            max: number;
            min: 0;
            type: "float";
        }
        • Readonly max: number
        • Readonly min: 0
        • Readonly type: "float"
    • Readonly elevation: {
          type: "optional";
          value: {
              max: 180;
              min: -180;
              type: "float";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            max: 180;
            min: -180;
            type: "float";
        }
        • Readonly max: 180
        • Readonly min: -180
        • Readonly type: "float"
    • Readonly fine: {
          type: "optional";
          value: {
              type: "string";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            type: "string";
        }
        • Readonly type: "string"
    • Readonly forward-repeat: {
          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 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 pan: {
          type: "optional";
          value: {
              max: 180;
              min: -180;
              type: "float";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            max: 180;
            min: -180;
            type: "float";
        }
        • Readonly max: 180
        • Readonly min: -180
        • Readonly type: "float"
    • Readonly pizzicato: {
          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 segno: {
          type: "optional";
          value: {
              type: "string";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            type: "string";
        }
        • Readonly type: "string"
    • Readonly soft-pedal: {
          type: "optional";
          value: {
              choices: readonly ["no", "yes", 0, 1];
              type: "choices";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            choices: readonly ["no", "yes", 0, 1];
            type: "choices";
        }
        • Readonly choices: readonly ["no", "yes", 0, 1]
        • Readonly type: "choices"
    • Readonly sostenuto-pedal: {
          type: "optional";
          value: {
              choices: readonly ["no", "yes", 0, 1];
              type: "choices";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            choices: readonly ["no", "yes", 0, 1];
            type: "choices";
        }
        • Readonly choices: readonly ["no", "yes", 0, 1]
        • Readonly type: "choices"
    • Readonly tempo: {
          type: "optional";
          value: {
              max: number;
              min: 0;
              type: "float";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            max: number;
            min: 0;
            type: "float";
        }
        • Readonly max: number
        • Readonly min: 0
        • 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 tocoda: {
          type: "optional";
          value: {
              type: "string";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            type: "string";
        }
        • Readonly type: "string"
  • Readonly contents: readonly [{
        label: "playbacks";
        type: "label";
        value: {
            type: "zeroOrMore";
            value: readonly [{
                type: "optional";
                value: typeof InstrumentChange;
            }, {
                type: "optional";
                value: typeof MidiDevice;
            }, {
                type: "optional";
                value: typeof MidiInstrument;
            }, {
                type: "optional";
                value: typeof Play;
            }];
        };
    }, {
        type: "optional";
        value: typeof Swing;
    }, {
        type: "optional";
        value: typeof Offset;
    }]
  • Readonly name: "sound"
schema: {
    attributes: {
        coda: {
            type: "optional";
            value: {
                type: "string";
            };
        };
        dacapo: {
            type: "optional";
            value: {
                choices: readonly ["yes", "no"];
                type: "choices";
            };
        };
        dalsegno: {
            type: "optional";
            value: {
                type: "string";
            };
        };
        damper-pedal: {
            type: "optional";
            value: {
                choices: readonly ["no", "yes", 0, 1];
                type: "choices";
            };
        };
        divisions: {
            type: "optional";
            value: {
                max: number;
                min: number;
                type: "float";
            };
        };
        dynamics: {
            type: "optional";
            value: {
                max: number;
                min: 0;
                type: "float";
            };
        };
        elevation: {
            type: "optional";
            value: {
                max: 180;
                min: -180;
                type: "float";
            };
        };
        fine: {
            type: "optional";
            value: {
                type: "string";
            };
        };
        forward-repeat: {
            type: "optional";
            value: {
                choices: readonly ["yes", "no"];
                type: "choices";
            };
        };
        id: {
            type: "optional";
            value: {
                pattern: RegExp;
                type: "regex";
                zero: "_";
            };
        };
        pan: {
            type: "optional";
            value: {
                max: 180;
                min: -180;
                type: "float";
            };
        };
        pizzicato: {
            type: "optional";
            value: {
                choices: readonly ["yes", "no"];
                type: "choices";
            };
        };
        segno: {
            type: "optional";
            value: {
                type: "string";
            };
        };
        soft-pedal: {
            type: "optional";
            value: {
                choices: readonly ["no", "yes", 0, 1];
                type: "choices";
            };
        };
        sostenuto-pedal: {
            type: "optional";
            value: {
                choices: readonly ["no", "yes", 0, 1];
                type: "choices";
            };
        };
        tempo: {
            type: "optional";
            value: {
                max: number;
                min: 0;
                type: "float";
            };
        };
        time-only: {
            type: "optional";
            value: {
                pattern: RegExp;
                type: "regex";
                zero: "1";
            };
        };
        tocoda: {
            type: "optional";
            value: {
                type: "string";
            };
        };
    };
    contents: readonly [{
        label: "playbacks";
        type: "label";
        value: {
            type: "zeroOrMore";
            value: readonly [{
                type: "optional";
                value: typeof InstrumentChange;
            }, {
                type: "optional";
                value: typeof MidiDevice;
            }, {
                type: "optional";
                value: typeof MidiInstrument;
            }, {
                type: "optional";
                value: typeof Play;
            }];
        };
    }, {
        type: "optional";
        value: typeof Swing;
    }, {
        type: "optional";
        value: typeof Offset;
    }];
    name: "sound";
} = ...

Type declaration

  • Readonly attributes: {
        coda: {
            type: "optional";
            value: {
                type: "string";
            };
        };
        dacapo: {
            type: "optional";
            value: {
                choices: readonly ["yes", "no"];
                type: "choices";
            };
        };
        dalsegno: {
            type: "optional";
            value: {
                type: "string";
            };
        };
        damper-pedal: {
            type: "optional";
            value: {
                choices: readonly ["no", "yes", 0, 1];
                type: "choices";
            };
        };
        divisions: {
            type: "optional";
            value: {
                max: number;
                min: number;
                type: "float";
            };
        };
        dynamics: {
            type: "optional";
            value: {
                max: number;
                min: 0;
                type: "float";
            };
        };
        elevation: {
            type: "optional";
            value: {
                max: 180;
                min: -180;
                type: "float";
            };
        };
        fine: {
            type: "optional";
            value: {
                type: "string";
            };
        };
        forward-repeat: {
            type: "optional";
            value: {
                choices: readonly ["yes", "no"];
                type: "choices";
            };
        };
        id: {
            type: "optional";
            value: {
                pattern: RegExp;
                type: "regex";
                zero: "_";
            };
        };
        pan: {
            type: "optional";
            value: {
                max: 180;
                min: -180;
                type: "float";
            };
        };
        pizzicato: {
            type: "optional";
            value: {
                choices: readonly ["yes", "no"];
                type: "choices";
            };
        };
        segno: {
            type: "optional";
            value: {
                type: "string";
            };
        };
        soft-pedal: {
            type: "optional";
            value: {
                choices: readonly ["no", "yes", 0, 1];
                type: "choices";
            };
        };
        sostenuto-pedal: {
            type: "optional";
            value: {
                choices: readonly ["no", "yes", 0, 1];
                type: "choices";
            };
        };
        tempo: {
            type: "optional";
            value: {
                max: number;
                min: 0;
                type: "float";
            };
        };
        time-only: {
            type: "optional";
            value: {
                pattern: RegExp;
                type: "regex";
                zero: "1";
            };
        };
        tocoda: {
            type: "optional";
            value: {
                type: "string";
            };
        };
    }
    • Readonly coda: {
          type: "optional";
          value: {
              type: "string";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            type: "string";
        }
        • Readonly type: "string"
    • Readonly dacapo: {
          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 dalsegno: {
          type: "optional";
          value: {
              type: "string";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            type: "string";
        }
        • Readonly type: "string"
    • Readonly damper-pedal: {
          type: "optional";
          value: {
              choices: readonly ["no", "yes", 0, 1];
              type: "choices";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            choices: readonly ["no", "yes", 0, 1];
            type: "choices";
        }
        • Readonly choices: readonly ["no", "yes", 0, 1]
        • Readonly type: "choices"
    • Readonly divisions: {
          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 dynamics: {
          type: "optional";
          value: {
              max: number;
              min: 0;
              type: "float";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            max: number;
            min: 0;
            type: "float";
        }
        • Readonly max: number
        • Readonly min: 0
        • Readonly type: "float"
    • Readonly elevation: {
          type: "optional";
          value: {
              max: 180;
              min: -180;
              type: "float";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            max: 180;
            min: -180;
            type: "float";
        }
        • Readonly max: 180
        • Readonly min: -180
        • Readonly type: "float"
    • Readonly fine: {
          type: "optional";
          value: {
              type: "string";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            type: "string";
        }
        • Readonly type: "string"
    • Readonly forward-repeat: {
          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 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 pan: {
          type: "optional";
          value: {
              max: 180;
              min: -180;
              type: "float";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            max: 180;
            min: -180;
            type: "float";
        }
        • Readonly max: 180
        • Readonly min: -180
        • Readonly type: "float"
    • Readonly pizzicato: {
          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 segno: {
          type: "optional";
          value: {
              type: "string";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            type: "string";
        }
        • Readonly type: "string"
    • Readonly soft-pedal: {
          type: "optional";
          value: {
              choices: readonly ["no", "yes", 0, 1];
              type: "choices";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            choices: readonly ["no", "yes", 0, 1];
            type: "choices";
        }
        • Readonly choices: readonly ["no", "yes", 0, 1]
        • Readonly type: "choices"
    • Readonly sostenuto-pedal: {
          type: "optional";
          value: {
              choices: readonly ["no", "yes", 0, 1];
              type: "choices";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            choices: readonly ["no", "yes", 0, 1];
            type: "choices";
        }
        • Readonly choices: readonly ["no", "yes", 0, 1]
        • Readonly type: "choices"
    • Readonly tempo: {
          type: "optional";
          value: {
              max: number;
              min: 0;
              type: "float";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            max: number;
            min: 0;
            type: "float";
        }
        • Readonly max: number
        • Readonly min: 0
        • 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 tocoda: {
          type: "optional";
          value: {
              type: "string";
          };
      }
      • Readonly type: "optional"
      • Readonly value: {
            type: "string";
        }
        • Readonly type: "string"
  • Readonly contents: readonly [{
        label: "playbacks";
        type: "label";
        value: {
            type: "zeroOrMore";
            value: readonly [{
                type: "optional";
                value: typeof InstrumentChange;
            }, {
                type: "optional";
                value: typeof MidiDevice;
            }, {
                type: "optional";
                value: typeof MidiInstrument;
            }, {
                type: "optional";
                value: typeof Play;
            }];
        };
    }, {
        type: "optional";
        value: typeof Swing;
    }, {
        type: "optional";
        value: typeof Offset;
    }]
  • Readonly name: "sound"

Methods

Generated using TypeDoc