{"uid":"cap_rHM6584OeX2QaZxAOhm0R","slug":"music-production-calc-song-length-calculator-6cdc8e9d","name":"Music Production Calc – Song Length Calculator","description":"Song length in seconds and m:ss from bars, BPM and time signature, plus bars or BPM needed for a target length.","url":"https://music-production-calc.x402tookit.com/song-length?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["bars","bpm"],"properties":{"bpm":{"type":"number","description":"Tempo in BPM, 20 to 400"},"bars":{"type":"number","description":"Number of bars (partial bars allowed)"},"bpmUnit":{"type":"string","description":"quarter (default): BPM counts quarter notes; beat: BPM counts the denominator note (6/8 at 120 = 120 eighths a minute)"},"beatUnit":{"type":"integer","description":"Time signature denominator: 1, 2, 4, 8 or 16 (default 4)"},"beatsPerBar":{"type":"integer","description":"Time signature numerator (default 4)"},"targetSeconds":{"type":"number","description":"A target length in seconds, to get bars needed and the BPM that fits your bars"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"bpm":{"type":["null","number"]},"asOf":{"type":["null","string"]},"bars":{"type":["null","number"]},"clock":{"type":["null","string"]},"source":{"type":["null","string"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"bpmCounts":{"type":["null","string"]},"barSeconds":{"type":["null","number"]},"disclaimer":{"type":["null","string"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"totalBeats":{"type":["null","number"]},"totalSeconds":{"type":["null","number"]},"barsPerMinute":{"type":["null","number"]},"timeSignature":{"type":["null","string"]},"secondsPerCountedBeat":{"type":["null","number"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_YkTOj0Fj0Y9Q1DoZxwNcl","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Calculates song length in seconds and M:SS from bars, BPM, and time signature, and optionally computes the bars needed or BPM required to hit a target duration.","exampleAgentPrompt":"How long is a song that's 96 bars at 128 BPM with a 4/4 time signature? Also tell me what BPM I'd need to make those 96 bars land exactly at 3 minutes 30 seconds.","exampleUseCases":[{"title":"DJ set segment timing","prompt":"I have a track section that's 64 bars at 174 BPM in 4/4 — how long is that in minutes and seconds?"},{"title":"Fit track to broadcast slot","prompt":"I need my song to be exactly 3 minutes 30 seconds. It's 128 bars in 4/4 — what BPM do I need to hit that target?"},{"title":"6/8 waltz duration check","prompt":"How long is 48 bars at 120 BPM in a 6/8 time signature, where the BPM counts eighth notes instead of quarter notes?"}],"resultDescription":"Returns total song duration in seconds and M:SS clock format, along with derived values like bars per minute, seconds per bar, total beats, and seconds per counted beat. When a targetSeconds value is provided, also returns the number of bars needed and the BPM that would make the given bar count fit exactly into the target duration.","failureModes":["Missing required 'bars' or 'bpm' parameters returns a validation error","BPM outside the 20–400 range may be rejected or produce implausible results","Invalid beatUnit (not 1, 2, 4, 8, or 16) causes a schema error","Invalid bpmUnit string causes an error","Payment not included or insufficient results in HTTP 402 Payment Required"],"whenToPreferThis":"Choose this endpoint when you need precise musical timing calculations — converting bars and tempo to wall-clock duration, or reverse-engineering the BPM or bar count to hit a specific length. It natively handles non-standard time signatures and BPM counting modes (quarter vs. denominator note), making it more accurate than generic calculators for compound meters like 6/8 or odd time signatures.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-02T06:33:09.616Z","isFirstParty":false,"canonicalSlug":"music-production-calc-song-length-calculator-6cdc8e9d"}