{
  "title": "Music key detector",
  "human_url": "https://happytails.ai/en/media-tools/music-key-detector/",
  "agent_url": "https://happytails.ai/agents/en/media-tools/music-key-detector/",
  "language": "en",
  "markdown_url": "https://happytails.ai/en/media-tools/music-key-detector.md",
  "content": "Music key detector\nEstimate the key of a song or recording, with the closest alternatives and a pitch class profile, so you can confirm it by ear.\nHow to use Music key detector\nChoose one audio file from your device.\nSet a start and end time if the key changes or you only want one section.\nRun the estimate and read the most likely key and the next choices.\nPlay the tonic scale on an instrument to check the result, then download the JSON report and the ranking CSV.\nHow can we improve this tool?\nReport a problem or share an idea.\nPlease leave out private information. Your message and the tool name go to our team via PostHog.\nUseful next steps\nBeat grid editor\nAudio spectrogram viewer\nChange audio speed\nHow the estimate works\nThe tool measures how much energy falls on each of the 12 pitch classes between about 65 Hz and 2,100 Hz, using 170 millisecond frames. It then correlates that profile with the 24 major and minor key profiles of Krumhansl and Kessler (Cognitive Foundations of Musical Pitch, 1990) and ranks the keys by correlation.\nReading the result\nThe result is an estimate. Relative keys such as C major and A minor share the same notes, so they often rank close together; the lead over the next key shows how clear the choice was. Music that modulates, uses modes or has strong drums can mislead the estimate. Check by ear before you rely on it.\nWhat is not included\nKey changes are not tracked over time. Choose a start and end time to test one section. Tuning that is far from A = 440 Hz shifts energy between pitch classes and lowers the confidence.",
  "content_format": "text/plain",
  "visibility": "public",
  "links": [
    {
      "name": "Beat grid editor",
      "url": "https://happytails.ai/en/media-tools/beat-grid-editor/"
    },
    {
      "name": "Audio spectrogram viewer",
      "url": "https://happytails.ai/en/media-tools/audio-spectrogram-viewer/"
    },
    {
      "name": "Change audio speed",
      "url": "https://happytails.ai/en/media-tools/change-audio-speed/"
    }
  ],
  "tool": {
    "id": "music-key-detector",
    "category": "media-tools",
    "built": true,
    "requirements": "One file up to 256 MiB, 10 minutes, 8 channels and 60 million samples, at 8,000 to 192,000 Hz. The range must lie inside the recording and contain at least one 170 millisecond frame. WAV is read directly with every channel and sample intact. MP3, M4A, AAC, FLAC, OGG, Opus and WebM are decoded by your browser and resampled to 48 kHz first, so decoding support depends on the browser. Files are decoded and measured on your device and are never uploaded. Downloads: JSON report with the key, correlation, lead over the next key, pitch class profile and full ranking, and a CSV of all 24 keys.",
    "implementation": {
      "fields": [
        {
          "key": "start",
          "label": "Start (seconds)",
          "value": "0",
          "type": "number",
          "min": 0,
          "max": 600,
          "step": 0.001
        },
        {
          "key": "end",
          "label": "End (seconds, 0 for the end of the file)",
          "value": "0",
          "type": "number",
          "min": 0,
          "max": 600,
          "step": 0.001
        }
      ],
      "registrationFamily": "audio-pcm-measurement",
      "presentation": "metrics",
      "files": true,
      "input": false,
      "accept": ".wav,.mp3,.m4a,.aac,.flac,.ogg,.oga,.opus,.webm,audio/*",
      "maxFileBytes": 268435456,
      "inputErrorCode": "AUDIO_PCM_MEASUREMENT_TOO_LONG",
      "multiple": false,
      "note": "Runs locally in your browser. Estimates the key of one recording up to 10 minutes and 256 MiB; the result is an estimate to check by ear.",
      "experience": {
        "automatic": false,
        "single": false,
        "inputMaxLength": 1000000,
        "inputMode": "text",
        "label": "Audio file",
        "placeholder": "Choose a WAV, MP3, M4A, FLAC or OGG file",
        "help": "The key is estimated in your browser; check it by ear. Up to 1,000,000 characters. Review the settings before running.",
        "action": null
      },
      "mode": "explicit",
      "interactive": false
    },
    "execution": "Browser interface",
    "api": null,
    "browser_agent": {
      "supported": true,
      "name": "run_current_tool",
      "discovery": "WebMCP on the human page in a supporting browser",
      "verification": "See audit/API-AUDIT.md; availability is not verification"
    }
  },
  "markdown": "# Music key detector\n\n- Human page: https://happytails.ai/en/media-tools/music-key-detector/\n- Markdown: https://happytails.ai/en/media-tools/music-key-detector.md\n- Structured JSON: https://happytails.ai/agents/en/media-tools/music-key-detector/index.json\n- Visibility: public\n\n## Tool capabilities\n\n| Property | Value |\n| --- | --- |\n| Tool ID | `music-key-detector` |\n| Category | media-tools |\n| Implementation | Registered implementation. Registration alone is not a production-quality guarantee. |\n| Browser execution | Use the visible action or interactive controls. |\n| Browser processing | Browser; see tool notes for network behavior. |\n| HTTP API | Not callable through HTTP. |\n| Browser-agent interface | run_current_tool |\n\n### Implementation notes\n\nRuns locally in your browser. Estimates the key of one recording up to 10 minutes and 256 MiB; the result is an estimate to check by ear.\n\n### Inputs and settings\n\nNo free-text input is required. Use the file inputs and/or settings below.\n\nAccepted browser files: `.wav,.mp3,.m4a,.aac,.flac,.ogg,.oga,.opus,.webm,audio/*`. Choose one file.\n\nBrowser file-input limit: 268435456 bytes in total. HTTP limits can differ.\n\n| Setting | Meaning | Control type | Default | Constraints |\n| --- | --- | --- | --- | --- |\n| `start` | Start (seconds) | number | \"0\" | min=0 max=600 step=0.001 |\n| `end` | End (seconds, 0 for the end of the file) | number | \"0\" | min=0 max=600 step=0.001 |\n\n### Browser-agent workflow\n\n1. Open the human page in a browser that supports WebMCP.\n2. Discover the interface exposed by that page; use its actual schema.\n3. Select files on the page first when the tool requires files.\n4. Call `run_current_tool` with valid input and settings.\n5. Inspect the returned result or error and the displayed output. Retrieve files from the displayed download links.\n\nCalls do not automatically copy or download results. Browser permissions still apply. Interface availability alone is not proof of successful execution.\n\n### Planning specification\n\nOne file up to 256 MiB, 10 minutes, 8 channels and 60 million samples, at 8,000 to 192,000 Hz. The range must lie inside the recording and contain at least one 170 millisecond frame. WAV is read directly with every channel and sample intact. MP3, M4A, AAC, FLAC, OGG, Opus and WebM are decoded by your browser and resampled to 48 kHz first, so decoding support depends on the browser. Files are decoded and measured on your device and are never uploaded. Downloads: JSON report with the key, correlation, lead over the next key, pitch class profile and full ranking, and a CSV of all 24 keys.\n\nThis describes intended requirements. Use the implementation notes, interface schema and observed output to determine current support.\n\n### Complete machine-readable capability record\n\n```json\n{\n  \"id\": \"music-key-detector\",\n  \"category\": \"media-tools\",\n  \"built\": true,\n  \"requirements\": \"One file up to 256 MiB, 10 minutes, 8 channels and 60 million samples, at 8,000 to 192,000 Hz. The range must lie inside the recording and contain at least one 170 millisecond frame. WAV is read directly with every channel and sample intact. MP3, M4A, AAC, FLAC, OGG, Opus and WebM are decoded by your browser and resampled to 48 kHz first, so decoding support depends on the browser. Files are decoded and measured on your device and are never uploaded. Downloads: JSON report with the key, correlation, lead over the next key, pitch class profile and full ranking, and a CSV of all 24 keys.\",\n  \"implementation\": {\n    \"fields\": [\n      {\n        \"key\": \"start\",\n        \"label\": \"Start (seconds)\",\n        \"value\": \"0\",\n        \"type\": \"number\",\n        \"min\": 0,\n        \"max\": 600,\n        \"step\": 0.001\n      },\n      {\n        \"key\": \"end\",\n        \"label\": \"End (seconds, 0 for the end of the file)\",\n        \"value\": \"0\",\n        \"type\": \"number\",\n        \"min\": 0,\n        \"max\": 600,\n        \"step\": 0.001\n      }\n    ],\n    \"registrationFamily\": \"audio-pcm-measurement\",\n    \"presentation\": \"metrics\",\n    \"files\": true,\n    \"input\": false,\n    \"accept\": \".wav,.mp3,.m4a,.aac,.flac,.ogg,.oga,.opus,.webm,audio/*\",\n    \"maxFileBytes\": 268435456,\n    \"inputErrorCode\": \"AUDIO_PCM_MEASUREMENT_TOO_LONG\",\n    \"multiple\": false,\n    \"note\": \"Runs locally in your browser. Estimates the key of one recording up to 10 minutes and 256 MiB; the result is an estimate to check by ear.\",\n    \"experience\": {\n      \"automatic\": false,\n      \"single\": false,\n      \"inputMaxLength\": 1000000,\n      \"inputMode\": \"text\",\n      \"label\": \"Audio file\",\n      \"placeholder\": \"Choose a WAV, MP3, M4A, FLAC or OGG file\",\n      \"help\": \"The key is estimated in your browser; check it by ear. Up to 1,000,000 characters. Review the settings before running.\",\n      \"action\": null\n    },\n    \"mode\": \"explicit\",\n    \"interactive\": false\n  },\n  \"execution\": \"Browser interface\",\n  \"api\": null,\n  \"browser_agent\": {\n    \"supported\": true,\n    \"name\": \"run_current_tool\",\n    \"discovery\": \"WebMCP on the human page in a supporting browser\",\n    \"verification\": \"See audit/API-AUDIT.md; availability is not verification\"\n  }\n}\n```\n\n## Page guide\n\nEstimate the key of a song or recording, with the closest alternatives and a pitch class profile, so you can confirm it by ear.\n\n### How to use Music key detector\n\n1. Choose one audio file from your device.\n2. Set a start and end time if the key changes or you only want one section.\n3. Run the estimate and read the most likely key and the next choices.\n4. Play the tonic scale on an instrument to check the result, then download the JSON report and the ranking CSV.\n\nHow can we improve this tool?\n\nReport a problem or share an idea.\n\nPlease leave out private information. Your message and the tool name go to our team via PostHog.\n\n## Useful next steps\n\n- [Beat grid editor](https://happytails.ai/en/media-tools/beat-grid-editor/) ([Markdown](https://happytails.ai/en/media-tools/beat-grid-editor.md))\n\n- [Audio spectrogram viewer](https://happytails.ai/en/media-tools/audio-spectrogram-viewer/) ([Markdown](https://happytails.ai/en/media-tools/audio-spectrogram-viewer.md))\n\n- [Change audio speed](https://happytails.ai/en/media-tools/change-audio-speed/) ([Markdown](https://happytails.ai/en/media-tools/change-audio-speed.md))\n\n## How the estimate works\n\nThe tool measures how much energy falls on each of the 12 pitch classes between about 65 Hz and 2,100 Hz, using 170 millisecond frames. It then correlates that profile with the 24 major and minor key profiles of Krumhansl and Kessler (Cognitive Foundations of Musical Pitch, 1990) and ranks the keys by correlation.\n\n### Reading the result\n\nThe result is an estimate. Relative keys such as C major and A minor share the same notes, so they often rank close together; the lead over the next key shows how clear the choice was. Music that modulates, uses modes or has strong drums can mislead the estimate. Check by ear before you rely on it.\n\n### What is not included\n\nKey changes are not tracked over time. Choose a start and end time to test one section. Tuning that is far from A = 440 Hz shifts energy between pitch classes and lowers the confidence.\n"
}