---
tag: m0300
title: Play Tone
brief: Play a single tone, buzz, or beep.
author: thinkyhead

requires: SPEAKER
group: lcd

codes: [ M300 ]

notes:
  - Requires `SPEAKER` to play tones (not just beeps).
  - In Marlin 1.0.2, playing tones block the command queue. Marlin 1.1.0 uses a tone queue and background tone player to keep the command buffer from being blocked by playing tones.

parameters:
  -
    tag: P
    optional: true
    description: Duration (1ms)
    values:
      -
        tag: ms
        type: int
  -
    tag: S
    optional: true
    description: Frequency (260Hz)
    values:
      -
        tag: Hz
        type: int

examples:
  -
    pre: Play a tune.
    code: |
      M300 S440 P200
      M300 S660 P250
      M300 S880 P300

---

Add a tone to the tone queue.
