{"openapi":"3.1.0","info":{"title":"chipvoice","version":"0.1.0","description":"Write music for the sound chips of the old machines as four lines of text, get back a link and an MP3. Five machines: the NES's 2A03, the Game Boy's APU, the Mega Drive's YM2612 with its PSG the SNES's S-DSP and the C64's SID, each emulated at the clock level; what has been verified against reference emulators, test ROMs or physical recordings is on each chip's conformance sheet under https://github.com/gwendall/chipvoice/blob/main/docs/chips/","license":{"name":"MIT AND LGPL-2.1-or-later"}},"servers":[{"url":"https://chipvoice.dev"}],"paths":{"/api/v1/capabilities":{"get":{"operationId":"getProjectCapabilities","summary":"Discover generated machine voices, instruments and project schema","tags":["projects"],"responses":{"200":{"description":"Current generated capabilities","content":{"application/json":{"schema":{"type":"object","required":["version","engineVersion","contentHash","targets","projectSchema"],"properties":{"version":{"const":1},"engineVersion":{"type":"string"},"contentHash":{"type":"string"},"semantics":{"type":"object"},"projectSchemaVersion":{"const":1},"projectSchema":{"type":"object"},"targets":{"type":"array","items":{"type":"object","required":["id","voices","voiceConflicts","melodicPalette"],"properties":{"id":{"type":"string"},"system":{"type":"string"},"voices":{"type":"array","items":{"type":"object"}},"voiceConflicts":{"type":"array","items":{"type":"array","items":{"type":"string"}}},"melodicPalette":{"type":"array","items":{"type":"object"}},"percussionVoices":{"type":"array","items":{"type":"string"}},"excludedPerformanceVoices":{"type":"array","items":{"type":"string"}}}}}}}}}}},"description":"Public, database-independent build catalogue. Discover targets dynamically; inspect resource conflicts, eligible voices and substitutions before composing."}},"/api/v1/validate":{"post":{"operationId":"validateProject","summary":"Validate a complete project without saving","tags":["projects"],"responses":{"200":{"description":"Valid","content":{"application/json":{"schema":{"type":"object","required":["ok","issues"],"properties":{"ok":{"type":"boolean"},"issues":{"type":"array","items":{"type":"object","required":["path","code","message","level"],"properties":{"path":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"},"level":{"enum":["error","warning"]}}}}}}}}},"400":{"description":"Malformed request or cursor"},"413":{"description":"Body exceeds 4 MB"},"422":{"description":"Invalid project","content":{"application/json":{"schema":{"type":"object","required":["ok","issues"],"properties":{"ok":{"type":"boolean"},"issues":{"type":"array","items":{"type":"object","required":["path","code","message","level"],"properties":{"path":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"},"level":{"enum":["error","warning"]}}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"enum":[1]},"title":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","minLength":0,"maxLength":2000},"author":{"type":"string","minLength":0,"maxLength":80},"licence":{"enum":["reserved","CC0-1.0","CC-BY-4.0"]},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":24},"minItems":0,"maxItems":8},"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["score"]},"score":{"type":"object","properties":{"id":{"type":"string","minLength":0,"maxLength":120},"bpm":{"type":"number","minimum":40,"maximum":300},"stepsPerBeat":{"enum":[4,12]},"patterns":{"type":"array","items":{"type":"object","properties":{"bass":{"type":"string","minLength":0,"maxLength":4096},"lead":{"type":"string","minLength":0,"maxLength":4096},"chord":{"type":"string","minLength":0,"maxLength":4096},"perc":{"type":"string","minLength":0,"maxLength":4096},"chordShape":{"type":"array","items":{"type":"array","items":{"type":"integer","minimum":-127,"maximum":127},"minItems":1,"maxItems":32},"minItems":1,"maxItems":256}},"required":["bass","lead","chord","perc","chordShape"],"additionalProperties":false},"minItems":1,"maxItems":64},"order":{"type":"array","items":{"type":"integer","minimum":0,"maximum":63},"minItems":1,"maxItems":256},"gain":{"type":"number","minimum":0,"maximum":1},"chip":{"type":"string","enum":["2a03","dmg","md","snes","c64"]},"intent":{"type":"object","properties":{"lead":{"type":"string","enum":["soft","bright","round"]},"chord":{"type":"string","enum":["plucked","held"]},"bass":{"type":"string","enum":["round","hollow","bright"]},"perc":{"type":"string","enum":["tight","soft"]}},"required":[],"additionalProperties":false}},"required":["bpm","patterns","order"],"additionalProperties":false}},"required":["kind","score"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["performance"]},"performance":{"type":"object","properties":{"version":{"enum":[1]},"title":{"type":"string","minLength":0,"maxLength":240},"ticksPerBeat":{"type":"integer","minimum":1,"maximum":9007199254740991},"endTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"loopStartTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"tempos":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"microsecondsPerBeat":{"type":"integer","minimum":1,"maximum":16777215}},"required":["tick","microsecondsPerBeat"],"additionalProperties":false},"minItems":1,"maxItems":100000},"parts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"name":{"type":"string","minLength":0,"maxLength":240},"role":{"type":"string","enum":["lead","chord","bass","perc"]},"priority":{"type":"number","minimum":-100000,"maximum":100000},"program":{"type":"integer","minimum":0,"maximum":127},"muted":{"type":"boolean"},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"endTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"pitch":{"type":"number","minimum":0,"maximum":127},"velocity":{"type":"integer","minimum":1,"maximum":127},"program":{"type":"integer","minimum":0,"maximum":127},"drum":{"type":"integer","minimum":0,"maximum":127},"expression":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"pitch":{"type":"number","minimum":-96,"maximum":96},"gain":{"type":"number","minimum":0,"maximum":1},"duty":{"type":"integer","minimum":0,"maximum":3},"noisePeriod":{"type":"integer","minimum":0,"maximum":15}},"required":["tick"],"additionalProperties":false},"minItems":0,"maxItems":200000}},"required":["id","tick","endTick","pitch","velocity"],"additionalProperties":false},"minItems":0,"maxItems":100000},"origin":{"type":"object","properties":{"chip":{"type":"string","minLength":0,"maxLength":64},"voice":{"type":"string","minLength":0,"maxLength":64}},"required":["chip","voice"],"additionalProperties":false},"mix":{"type":"object","properties":{"gainDb":{"type":"number","minimum":-96,"maximum":12},"importance":{"type":"number","minimum":0,"maximum":1}},"required":[],"additionalProperties":false},"roleInference":{"type":"object","properties":{"confidence":{"type":"string","enum":["high","medium","low"]},"reason":{"type":"string","enum":["channel","name","program","polyphony","register","monophony","override"]}},"required":["confidence","reason"],"additionalProperties":false},"instruments":{"type":"object","additionalProperties":{"type":"object","properties":{"volume":{"type":"array","items":{"type":"number","minimum":0,"maximum":15},"minItems":1,"maxItems":4096},"duty":{"oneOf":[{"type":"integer","minimum":0,"maximum":3},{"type":"array","items":{"type":"integer","minimum":0,"maximum":3},"minItems":1,"maxItems":4096}]},"arp":{"type":"array","items":{"type":"number","minimum":-127,"maximum":127},"minItems":0,"maxItems":4096},"pitch":{"type":"array","items":{"type":"number","minimum":-65535,"maximum":65535},"minItems":0,"maxItems":4096},"slide":{"type":"number","minimum":-96,"maximum":96},"sustain":{"type":"boolean"},"arpLoop":{"type":"boolean"},"noiseMode":{"type":"boolean"},"vibrato":{"type":"object","properties":{"depth":{"type":"number","minimum":0,"maximum":96},"rate":{"type":"number","minimum":0.001,"maximum":100000},"delay":{"type":"number","minimum":0,"maximum":100000}},"required":["depth","rate"],"additionalProperties":false},"waveform":{"oneOf":[{"type":"string","enum":["pulse","triangle","sawtooth","noise"]},{"type":"array","items":{"type":"string","enum":["pulse","triangle","sawtooth","noise"]},"minItems":1,"maxItems":4096}]},"wave":{"type":"array","items":{"type":"integer","minimum":0,"maximum":15},"minItems":32,"maxItems":32},"fm":{"type":"object","properties":{"algorithm":{"type":"integer","minimum":0,"maximum":7},"feedback":{"type":"integer","minimum":0,"maximum":7},"ops":{"type":"array","items":{"type":"object","properties":{"dt":{"type":"integer","minimum":0,"maximum":7},"mul":{"type":"integer","minimum":0,"maximum":15},"tl":{"type":"integer","minimum":0,"maximum":127},"ks":{"type":"integer","minimum":0,"maximum":3},"ar":{"type":"integer","minimum":0,"maximum":31},"dr":{"type":"integer","minimum":0,"maximum":31},"sr":{"type":"integer","minimum":0,"maximum":31},"sl":{"type":"integer","minimum":0,"maximum":15},"rr":{"type":"integer","minimum":0,"maximum":15},"am":{"type":"boolean"}},"required":["dt","mul","tl","ks","ar","dr","sr","sl","rr"],"additionalProperties":false},"minItems":4,"maxItems":4},"ams":{"type":"integer","minimum":0,"maximum":3},"pms":{"type":"integer","minimum":0,"maximum":7}},"required":["algorithm","feedback","ops"],"additionalProperties":false},"sample":{"type":"string","minLength":1,"maxLength":80}},"required":["volume"],"additionalProperties":false}},"portableTimbres":{"type":"object","additionalProperties":{"type":"object","properties":{"sourceSignature":{"type":"string","minLength":1,"maxLength":8192},"pitchOffset":{"type":"number","minimum":-48,"maximum":48},"program":{"type":"integer","minimum":0,"maximum":127},"envelope":{"type":"array","items":{"type":"number","minimum":0,"maximum":1},"minItems":1,"maxItems":120},"rms":{"type":"number","minimum":0,"maximum":100},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["sourceSignature","pitchOffset","program","envelope","rms","confidence"],"additionalProperties":false}}},"required":["id","name","role","priority","notes"],"additionalProperties":false},"minItems":0,"maxItems":256},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["midi","native"]},"name":{"type":"string","minLength":0,"maxLength":240},"sha256":{"type":"string","minLength":0,"maxLength":64},"url":{"type":"string","minLength":0,"maxLength":2048},"description":{"type":"string","minLength":0,"maxLength":4096}},"required":["kind","name"],"additionalProperties":false},"notices":{"type":"array","items":{"type":"string","minLength":0,"maxLength":4096},"minItems":0,"maxItems":1024},"midi":{"type":"object","properties":{"format":{"type":"integer","minimum":0,"maximum":1},"events":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"track":{"type":"integer","minimum":0,"maximum":65535},"order":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"integer","minimum":0,"maximum":255},"data":{"type":"array","items":{"type":"integer","minimum":0,"maximum":255},"minItems":0,"maxItems":65536}},"required":["tick","track","order","status","data"],"additionalProperties":false},"minItems":0,"maxItems":200000}},"required":["format","events"],"additionalProperties":false}},"required":["version","title","ticksPerBeat","endTick","tempos","parts","notices"],"additionalProperties":false}},"required":["kind","performance"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["native"]},"plan":{"type":"object","properties":{"chip":{"type":"string","enum":["2a03","dmg","md","snes","c64"]},"musicStartCycle":{"type":"integer","minimum":0,"maximum":9007199254740991},"seconds":{"type":"number","minimum":0.000001,"maximum":600},"loopStartSeconds":{"type":"number","minimum":0,"maximum":600},"events":{"type":"array","items":{"type":"object","properties":{"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"addr":{"type":"integer","minimum":0,"maximum":16777215},"value":{"type":"integer","minimum":0,"maximum":255}},"required":["at","addr","value"],"additionalProperties":false},"minItems":0,"maxItems":2000000},"memory":{"type":"array","items":{"type":"object","properties":{"address":{"type":"integer","minimum":0,"maximum":16777215},"bytes":{"type":"array","items":{"type":"integer","minimum":0,"maximum":255},"minItems":0,"maxItems":8388608}},"required":["address","bytes"],"additionalProperties":false},"minItems":0,"maxItems":256},"notes":{"type":"array","items":{"type":"object","properties":{"part":{"type":"string","minLength":0,"maxLength":120},"id":{"type":"string","minLength":0,"maxLength":120},"voice":{"type":"string","minLength":0,"maxLength":120},"pitch":{"type":"number","minimum":0,"maximum":127},"at":{"type":"number","minimum":0,"maximum":600},"until":{"type":"number","minimum":0,"maximum":600}},"required":["part","id","voice","pitch","at","until"],"additionalProperties":false},"minItems":0,"maxItems":100000},"losses":{"type":"array","items":{"type":"object","properties":{"part":{"type":"string","minLength":0,"maxLength":120},"note":{"type":"string","minLength":0,"maxLength":120},"kind":{"type":"string","minLength":0,"maxLength":120},"detail":{"type":"string","minLength":0,"maxLength":4096}},"required":["part","kind","detail"],"additionalProperties":false},"minItems":0,"maxItems":200000},"silentNotes":{"type":"array","items":{"type":"object","properties":{"part":{"type":"string","minLength":0,"maxLength":120},"id":{"type":"string","minLength":0,"maxLength":120}},"required":["part","id"],"additionalProperties":false},"minItems":0,"maxItems":100000},"mix":{"type":"object","properties":{"version":{"enum":[1]},"calibratedNotes":{"type":"integer","minimum":0,"maximum":9007199254740991},"fallbackNotes":{"type":"integer","minimum":0,"maximum":9007199254740991},"diagnostics":{"type":"array","items":{"type":"object","properties":{"part":{"type":"string","minLength":0,"maxLength":120},"kind":{"type":"string","minLength":0,"maxLength":120},"detail":{"type":"string","minLength":0,"maxLength":4096}},"required":["part","kind","detail"],"additionalProperties":false},"minItems":0,"maxItems":200000}},"required":["version","calibratedNotes","fallbackNotes","diagnostics"],"additionalProperties":false}},"required":["chip","seconds","loopStartSeconds","events","memory","notes","losses"],"additionalProperties":false},"performance":{"type":"object","properties":{"version":{"enum":[1]},"title":{"type":"string","minLength":0,"maxLength":240},"ticksPerBeat":{"type":"integer","minimum":1,"maximum":9007199254740991},"endTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"loopStartTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"tempos":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"microsecondsPerBeat":{"type":"integer","minimum":1,"maximum":16777215}},"required":["tick","microsecondsPerBeat"],"additionalProperties":false},"minItems":1,"maxItems":100000},"parts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"name":{"type":"string","minLength":0,"maxLength":240},"role":{"type":"string","enum":["lead","chord","bass","perc"]},"priority":{"type":"number","minimum":-100000,"maximum":100000},"program":{"type":"integer","minimum":0,"maximum":127},"muted":{"type":"boolean"},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"endTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"pitch":{"type":"number","minimum":0,"maximum":127},"velocity":{"type":"integer","minimum":1,"maximum":127},"program":{"type":"integer","minimum":0,"maximum":127},"drum":{"type":"integer","minimum":0,"maximum":127},"expression":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"pitch":{"type":"number","minimum":-96,"maximum":96},"gain":{"type":"number","minimum":0,"maximum":1},"duty":{"type":"integer","minimum":0,"maximum":3},"noisePeriod":{"type":"integer","minimum":0,"maximum":15}},"required":["tick"],"additionalProperties":false},"minItems":0,"maxItems":200000}},"required":["id","tick","endTick","pitch","velocity"],"additionalProperties":false},"minItems":0,"maxItems":100000},"origin":{"type":"object","properties":{"chip":{"type":"string","minLength":0,"maxLength":64},"voice":{"type":"string","minLength":0,"maxLength":64}},"required":["chip","voice"],"additionalProperties":false},"mix":{"type":"object","properties":{"gainDb":{"type":"number","minimum":-96,"maximum":12},"importance":{"type":"number","minimum":0,"maximum":1}},"required":[],"additionalProperties":false},"roleInference":{"type":"object","properties":{"confidence":{"type":"string","enum":["high","medium","low"]},"reason":{"type":"string","enum":["channel","name","program","polyphony","register","monophony","override"]}},"required":["confidence","reason"],"additionalProperties":false},"instruments":{"type":"object","additionalProperties":{"type":"object","properties":{"volume":{"type":"array","items":{"type":"number","minimum":0,"maximum":15},"minItems":1,"maxItems":4096},"duty":{"oneOf":[{"type":"integer","minimum":0,"maximum":3},{"type":"array","items":{"type":"integer","minimum":0,"maximum":3},"minItems":1,"maxItems":4096}]},"arp":{"type":"array","items":{"type":"number","minimum":-127,"maximum":127},"minItems":0,"maxItems":4096},"pitch":{"type":"array","items":{"type":"number","minimum":-65535,"maximum":65535},"minItems":0,"maxItems":4096},"slide":{"type":"number","minimum":-96,"maximum":96},"sustain":{"type":"boolean"},"arpLoop":{"type":"boolean"},"noiseMode":{"type":"boolean"},"vibrato":{"type":"object","properties":{"depth":{"type":"number","minimum":0,"maximum":96},"rate":{"type":"number","minimum":0.001,"maximum":100000},"delay":{"type":"number","minimum":0,"maximum":100000}},"required":["depth","rate"],"additionalProperties":false},"waveform":{"oneOf":[{"type":"string","enum":["pulse","triangle","sawtooth","noise"]},{"type":"array","items":{"type":"string","enum":["pulse","triangle","sawtooth","noise"]},"minItems":1,"maxItems":4096}]},"wave":{"type":"array","items":{"type":"integer","minimum":0,"maximum":15},"minItems":32,"maxItems":32},"fm":{"type":"object","properties":{"algorithm":{"type":"integer","minimum":0,"maximum":7},"feedback":{"type":"integer","minimum":0,"maximum":7},"ops":{"type":"array","items":{"type":"object","properties":{"dt":{"type":"integer","minimum":0,"maximum":7},"mul":{"type":"integer","minimum":0,"maximum":15},"tl":{"type":"integer","minimum":0,"maximum":127},"ks":{"type":"integer","minimum":0,"maximum":3},"ar":{"type":"integer","minimum":0,"maximum":31},"dr":{"type":"integer","minimum":0,"maximum":31},"sr":{"type":"integer","minimum":0,"maximum":31},"sl":{"type":"integer","minimum":0,"maximum":15},"rr":{"type":"integer","minimum":0,"maximum":15},"am":{"type":"boolean"}},"required":["dt","mul","tl","ks","ar","dr","sr","sl","rr"],"additionalProperties":false},"minItems":4,"maxItems":4},"ams":{"type":"integer","minimum":0,"maximum":3},"pms":{"type":"integer","minimum":0,"maximum":7}},"required":["algorithm","feedback","ops"],"additionalProperties":false},"sample":{"type":"string","minLength":1,"maxLength":80}},"required":["volume"],"additionalProperties":false}},"portableTimbres":{"type":"object","additionalProperties":{"type":"object","properties":{"sourceSignature":{"type":"string","minLength":1,"maxLength":8192},"pitchOffset":{"type":"number","minimum":-48,"maximum":48},"program":{"type":"integer","minimum":0,"maximum":127},"envelope":{"type":"array","items":{"type":"number","minimum":0,"maximum":1},"minItems":1,"maxItems":120},"rms":{"type":"number","minimum":0,"maximum":100},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["sourceSignature","pitchOffset","program","envelope","rms","confidence"],"additionalProperties":false}}},"required":["id","name","role","priority","notes"],"additionalProperties":false},"minItems":0,"maxItems":256},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["midi","native"]},"name":{"type":"string","minLength":0,"maxLength":240},"sha256":{"type":"string","minLength":0,"maxLength":64},"url":{"type":"string","minLength":0,"maxLength":2048},"description":{"type":"string","minLength":0,"maxLength":4096}},"required":["kind","name"],"additionalProperties":false},"notices":{"type":"array","items":{"type":"string","minLength":0,"maxLength":4096},"minItems":0,"maxItems":1024},"midi":{"type":"object","properties":{"format":{"type":"integer","minimum":0,"maximum":1},"events":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"track":{"type":"integer","minimum":0,"maximum":65535},"order":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"integer","minimum":0,"maximum":255},"data":{"type":"array","items":{"type":"integer","minimum":0,"maximum":255},"minItems":0,"maxItems":65536}},"required":["tick","track","order","status","data"],"additionalProperties":false},"minItems":0,"maxItems":200000}},"required":["format","events"],"additionalProperties":false}},"required":["version","title","ticksPerBeat","endTick","tempos","parts","notices"],"additionalProperties":false}},"required":["kind","plan","performance"],"additionalProperties":false}]},"settings":{"type":"object","properties":{"chip":{"type":"string","enum":["2a03","dmg","md","snes","c64"]},"tempoScale":{"type":"number","minimum":0.1,"maximum":10},"transpose":{"type":"number","minimum":-48,"maximum":48},"gain":{"type":"number","minimum":0,"maximum":1},"mix":{"type":"string","enum":["auto","authored"]},"allowLoss":{"type":"boolean"}},"required":["chip"],"additionalProperties":false},"generator":{"type":"object","properties":{"language":{"type":"string","enum":["javascript"]},"code":{"type":"string","minLength":1,"maxLength":64000},"seed":{"type":"integer","minimum":0,"maximum":4294967295}},"required":["language","code","seed"],"additionalProperties":false}},"required":["version","title","source","settings"],"additionalProperties":false}}}}}},"/api/v1/projects":{"get":{"operationId":"listProjects","summary":"Search public active publications","tags":["projects"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["items","cursor"],"properties":{"items":{"type":"array","items":{"type":"object","required":["id","parentId","rootId","title","chip","tags","visibility","createdAt","contentHash","profile","favourites","favourited","owned"],"properties":{"id":{"type":"string"},"title":{"type":"string"},"chip":{"enum":["2a03","dmg","md","snes","c64"]},"tags":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"integer","description":"Unix milliseconds"},"favourites":{"type":"integer"},"favourited":{"type":"boolean"},"owned":{"type":"boolean"},"renditions":{"type":"array","items":{"type":"object","required":["id","kind","status","engine"],"properties":{"id":{"type":"string"},"kind":{"enum":["preview","full"]},"status":{"type":"string"},"engine":{"type":"string"}}}},"parentId":{"type":["string","null"]},"rootId":{"type":"string"},"project":{"type":"object","properties":{"version":{"enum":[1]},"title":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","minLength":0,"maxLength":2000},"author":{"type":"string","minLength":0,"maxLength":80},"licence":{"enum":["reserved","CC0-1.0","CC-BY-4.0"]},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":24},"minItems":0,"maxItems":8},"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["score"]},"score":{"type":"object","properties":{"id":{"type":"string","minLength":0,"maxLength":120},"bpm":{"type":"number","minimum":40,"maximum":300},"stepsPerBeat":{"enum":[4,12]},"patterns":{"type":"array","items":{"type":"object","properties":{"bass":{"type":"string","minLength":0,"maxLength":4096},"lead":{"type":"string","minLength":0,"maxLength":4096},"chord":{"type":"string","minLength":0,"maxLength":4096},"perc":{"type":"string","minLength":0,"maxLength":4096},"chordShape":{"type":"array","items":{"type":"array","items":{"type":"integer","minimum":-127,"maximum":127},"minItems":1,"maxItems":32},"minItems":1,"maxItems":256}},"required":["bass","lead","chord","perc","chordShape"],"additionalProperties":false},"minItems":1,"maxItems":64},"order":{"type":"array","items":{"type":"integer","minimum":0,"maximum":63},"minItems":1,"maxItems":256},"gain":{"type":"number","minimum":0,"maximum":1},"chip":{"type":"string","enum":["2a03","dmg","md","snes","c64"]},"intent":{"type":"object","properties":{"lead":{"type":"string","enum":["soft","bright","round"]},"chord":{"type":"string","enum":["plucked","held"]},"bass":{"type":"string","enum":["round","hollow","bright"]},"perc":{"type":"string","enum":["tight","soft"]}},"required":[],"additionalProperties":false}},"required":["bpm","patterns","order"],"additionalProperties":false}},"required":["kind","score"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["performance"]},"performance":{"type":"object","properties":{"version":{"enum":[1]},"title":{"type":"string","minLength":0,"maxLength":240},"ticksPerBeat":{"type":"integer","minimum":1,"maximum":9007199254740991},"endTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"loopStartTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"tempos":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"microsecondsPerBeat":{"type":"integer","minimum":1,"maximum":16777215}},"required":["tick","microsecondsPerBeat"],"additionalProperties":false},"minItems":1,"maxItems":100000},"parts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"name":{"type":"string","minLength":0,"maxLength":240},"role":{"type":"string","enum":["lead","chord","bass","perc"]},"priority":{"type":"number","minimum":-100000,"maximum":100000},"program":{"type":"integer","minimum":0,"maximum":127},"muted":{"type":"boolean"},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"endTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"pitch":{"type":"number","minimum":0,"maximum":127},"velocity":{"type":"integer","minimum":1,"maximum":127},"program":{"type":"integer","minimum":0,"maximum":127},"drum":{"type":"integer","minimum":0,"maximum":127},"expression":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"pitch":{"type":"number","minimum":-96,"maximum":96},"gain":{"type":"number","minimum":0,"maximum":1},"duty":{"type":"integer","minimum":0,"maximum":3},"noisePeriod":{"type":"integer","minimum":0,"maximum":15}},"required":["tick"],"additionalProperties":false},"minItems":0,"maxItems":200000}},"required":["id","tick","endTick","pitch","velocity"],"additionalProperties":false},"minItems":0,"maxItems":100000},"origin":{"type":"object","properties":{"chip":{"type":"string","minLength":0,"maxLength":64},"voice":{"type":"string","minLength":0,"maxLength":64}},"required":["chip","voice"],"additionalProperties":false},"mix":{"type":"object","properties":{"gainDb":{"type":"number","minimum":-96,"maximum":12},"importance":{"type":"number","minimum":0,"maximum":1}},"required":[],"additionalProperties":false},"roleInference":{"type":"object","properties":{"confidence":{"type":"string","enum":["high","medium","low"]},"reason":{"type":"string","enum":["channel","name","program","polyphony","register","monophony","override"]}},"required":["confidence","reason"],"additionalProperties":false},"instruments":{"type":"object","additionalProperties":{"type":"object","properties":{"volume":{"type":"array","items":{"type":"number","minimum":0,"maximum":15},"minItems":1,"maxItems":4096},"duty":{"oneOf":[{"type":"integer","minimum":0,"maximum":3},{"type":"array","items":{"type":"integer","minimum":0,"maximum":3},"minItems":1,"maxItems":4096}]},"arp":{"type":"array","items":{"type":"number","minimum":-127,"maximum":127},"minItems":0,"maxItems":4096},"pitch":{"type":"array","items":{"type":"number","minimum":-65535,"maximum":65535},"minItems":0,"maxItems":4096},"slide":{"type":"number","minimum":-96,"maximum":96},"sustain":{"type":"boolean"},"arpLoop":{"type":"boolean"},"noiseMode":{"type":"boolean"},"vibrato":{"type":"object","properties":{"depth":{"type":"number","minimum":0,"maximum":96},"rate":{"type":"number","minimum":0.001,"maximum":100000},"delay":{"type":"number","minimum":0,"maximum":100000}},"required":["depth","rate"],"additionalProperties":false},"waveform":{"oneOf":[{"type":"string","enum":["pulse","triangle","sawtooth","noise"]},{"type":"array","items":{"type":"string","enum":["pulse","triangle","sawtooth","noise"]},"minItems":1,"maxItems":4096}]},"wave":{"type":"array","items":{"type":"integer","minimum":0,"maximum":15},"minItems":32,"maxItems":32},"fm":{"type":"object","properties":{"algorithm":{"type":"integer","minimum":0,"maximum":7},"feedback":{"type":"integer","minimum":0,"maximum":7},"ops":{"type":"array","items":{"type":"object","properties":{"dt":{"type":"integer","minimum":0,"maximum":7},"mul":{"type":"integer","minimum":0,"maximum":15},"tl":{"type":"integer","minimum":0,"maximum":127},"ks":{"type":"integer","minimum":0,"maximum":3},"ar":{"type":"integer","minimum":0,"maximum":31},"dr":{"type":"integer","minimum":0,"maximum":31},"sr":{"type":"integer","minimum":0,"maximum":31},"sl":{"type":"integer","minimum":0,"maximum":15},"rr":{"type":"integer","minimum":0,"maximum":15},"am":{"type":"boolean"}},"required":["dt","mul","tl","ks","ar","dr","sr","sl","rr"],"additionalProperties":false},"minItems":4,"maxItems":4},"ams":{"type":"integer","minimum":0,"maximum":3},"pms":{"type":"integer","minimum":0,"maximum":7}},"required":["algorithm","feedback","ops"],"additionalProperties":false},"sample":{"type":"string","minLength":1,"maxLength":80}},"required":["volume"],"additionalProperties":false}},"portableTimbres":{"type":"object","additionalProperties":{"type":"object","properties":{"sourceSignature":{"type":"string","minLength":1,"maxLength":8192},"pitchOffset":{"type":"number","minimum":-48,"maximum":48},"program":{"type":"integer","minimum":0,"maximum":127},"envelope":{"type":"array","items":{"type":"number","minimum":0,"maximum":1},"minItems":1,"maxItems":120},"rms":{"type":"number","minimum":0,"maximum":100},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["sourceSignature","pitchOffset","program","envelope","rms","confidence"],"additionalProperties":false}}},"required":["id","name","role","priority","notes"],"additionalProperties":false},"minItems":0,"maxItems":256},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["midi","native"]},"name":{"type":"string","minLength":0,"maxLength":240},"sha256":{"type":"string","minLength":0,"maxLength":64},"url":{"type":"string","minLength":0,"maxLength":2048},"description":{"type":"string","minLength":0,"maxLength":4096}},"required":["kind","name"],"additionalProperties":false},"notices":{"type":"array","items":{"type":"string","minLength":0,"maxLength":4096},"minItems":0,"maxItems":1024},"midi":{"type":"object","properties":{"format":{"type":"integer","minimum":0,"maximum":1},"events":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"track":{"type":"integer","minimum":0,"maximum":65535},"order":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"integer","minimum":0,"maximum":255},"data":{"type":"array","items":{"type":"integer","minimum":0,"maximum":255},"minItems":0,"maxItems":65536}},"required":["tick","track","order","status","data"],"additionalProperties":false},"minItems":0,"maxItems":200000}},"required":["format","events"],"additionalProperties":false}},"required":["version","title","ticksPerBeat","endTick","tempos","parts","notices"],"additionalProperties":false}},"required":["kind","performance"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["native"]},"plan":{"type":"object","properties":{"chip":{"type":"string","enum":["2a03","dmg","md","snes","c64"]},"musicStartCycle":{"type":"integer","minimum":0,"maximum":9007199254740991},"seconds":{"type":"number","minimum":0.000001,"maximum":600},"loopStartSeconds":{"type":"number","minimum":0,"maximum":600},"events":{"type":"array","items":{"type":"object","properties":{"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"addr":{"type":"integer","minimum":0,"maximum":16777215},"value":{"type":"integer","minimum":0,"maximum":255}},"required":["at","addr","value"],"additionalProperties":false},"minItems":0,"maxItems":2000000},"memory":{"type":"array","items":{"type":"object","properties":{"address":{"type":"integer","minimum":0,"maximum":16777215},"bytes":{"type":"array","items":{"type":"integer","minimum":0,"maximum":255},"minItems":0,"maxItems":8388608}},"required":["address","bytes"],"additionalProperties":false},"minItems":0,"maxItems":256},"notes":{"type":"array","items":{"type":"object","properties":{"part":{"type":"string","minLength":0,"maxLength":120},"id":{"type":"string","minLength":0,"maxLength":120},"voice":{"type":"string","minLength":0,"maxLength":120},"pitch":{"type":"number","minimum":0,"maximum":127},"at":{"type":"number","minimum":0,"maximum":600},"until":{"type":"number","minimum":0,"maximum":600}},"required":["part","id","voice","pitch","at","until"],"additionalProperties":false},"minItems":0,"maxItems":100000},"losses":{"type":"array","items":{"type":"object","properties":{"part":{"type":"string","minLength":0,"maxLength":120},"note":{"type":"string","minLength":0,"maxLength":120},"kind":{"type":"string","minLength":0,"maxLength":120},"detail":{"type":"string","minLength":0,"maxLength":4096}},"required":["part","kind","detail"],"additionalProperties":false},"minItems":0,"maxItems":200000},"silentNotes":{"type":"array","items":{"type":"object","properties":{"part":{"type":"string","minLength":0,"maxLength":120},"id":{"type":"string","minLength":0,"maxLength":120}},"required":["part","id"],"additionalProperties":false},"minItems":0,"maxItems":100000},"mix":{"type":"object","properties":{"version":{"enum":[1]},"calibratedNotes":{"type":"integer","minimum":0,"maximum":9007199254740991},"fallbackNotes":{"type":"integer","minimum":0,"maximum":9007199254740991},"diagnostics":{"type":"array","items":{"type":"object","properties":{"part":{"type":"string","minLength":0,"maxLength":120},"kind":{"type":"string","minLength":0,"maxLength":120},"detail":{"type":"string","minLength":0,"maxLength":4096}},"required":["part","kind","detail"],"additionalProperties":false},"minItems":0,"maxItems":200000}},"required":["version","calibratedNotes","fallbackNotes","diagnostics"],"additionalProperties":false}},"required":["chip","seconds","loopStartSeconds","events","memory","notes","losses"],"additionalProperties":false},"performance":{"type":"object","properties":{"version":{"enum":[1]},"title":{"type":"string","minLength":0,"maxLength":240},"ticksPerBeat":{"type":"integer","minimum":1,"maximum":9007199254740991},"endTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"loopStartTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"tempos":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"microsecondsPerBeat":{"type":"integer","minimum":1,"maximum":16777215}},"required":["tick","microsecondsPerBeat"],"additionalProperties":false},"minItems":1,"maxItems":100000},"parts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"name":{"type":"string","minLength":0,"maxLength":240},"role":{"type":"string","enum":["lead","chord","bass","perc"]},"priority":{"type":"number","minimum":-100000,"maximum":100000},"program":{"type":"integer","minimum":0,"maximum":127},"muted":{"type":"boolean"},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"endTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"pitch":{"type":"number","minimum":0,"maximum":127},"velocity":{"type":"integer","minimum":1,"maximum":127},"program":{"type":"integer","minimum":0,"maximum":127},"drum":{"type":"integer","minimum":0,"maximum":127},"expression":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"pitch":{"type":"number","minimum":-96,"maximum":96},"gain":{"type":"number","minimum":0,"maximum":1},"duty":{"type":"integer","minimum":0,"maximum":3},"noisePeriod":{"type":"integer","minimum":0,"maximum":15}},"required":["tick"],"additionalProperties":false},"minItems":0,"maxItems":200000}},"required":["id","tick","endTick","pitch","velocity"],"additionalProperties":false},"minItems":0,"maxItems":100000},"origin":{"type":"object","properties":{"chip":{"type":"string","minLength":0,"maxLength":64},"voice":{"type":"string","minLength":0,"maxLength":64}},"required":["chip","voice"],"additionalProperties":false},"mix":{"type":"object","properties":{"gainDb":{"type":"number","minimum":-96,"maximum":12},"importance":{"type":"number","minimum":0,"maximum":1}},"required":[],"additionalProperties":false},"roleInference":{"type":"object","properties":{"confidence":{"type":"string","enum":["high","medium","low"]},"reason":{"type":"string","enum":["channel","name","program","polyphony","register","monophony","override"]}},"required":["confidence","reason"],"additionalProperties":false},"instruments":{"type":"object","additionalProperties":{"type":"object","properties":{"volume":{"type":"array","items":{"type":"number","minimum":0,"maximum":15},"minItems":1,"maxItems":4096},"duty":{"oneOf":[{"type":"integer","minimum":0,"maximum":3},{"type":"array","items":{"type":"integer","minimum":0,"maximum":3},"minItems":1,"maxItems":4096}]},"arp":{"type":"array","items":{"type":"number","minimum":-127,"maximum":127},"minItems":0,"maxItems":4096},"pitch":{"type":"array","items":{"type":"number","minimum":-65535,"maximum":65535},"minItems":0,"maxItems":4096},"slide":{"type":"number","minimum":-96,"maximum":96},"sustain":{"type":"boolean"},"arpLoop":{"type":"boolean"},"noiseMode":{"type":"boolean"},"vibrato":{"type":"object","properties":{"depth":{"type":"number","minimum":0,"maximum":96},"rate":{"type":"number","minimum":0.001,"maximum":100000},"delay":{"type":"number","minimum":0,"maximum":100000}},"required":["depth","rate"],"additionalProperties":false},"waveform":{"oneOf":[{"type":"string","enum":["pulse","triangle","sawtooth","noise"]},{"type":"array","items":{"type":"string","enum":["pulse","triangle","sawtooth","noise"]},"minItems":1,"maxItems":4096}]},"wave":{"type":"array","items":{"type":"integer","minimum":0,"maximum":15},"minItems":32,"maxItems":32},"fm":{"type":"object","properties":{"algorithm":{"type":"integer","minimum":0,"maximum":7},"feedback":{"type":"integer","minimum":0,"maximum":7},"ops":{"type":"array","items":{"type":"object","properties":{"dt":{"type":"integer","minimum":0,"maximum":7},"mul":{"type":"integer","minimum":0,"maximum":15},"tl":{"type":"integer","minimum":0,"maximum":127},"ks":{"type":"integer","minimum":0,"maximum":3},"ar":{"type":"integer","minimum":0,"maximum":31},"dr":{"type":"integer","minimum":0,"maximum":31},"sr":{"type":"integer","minimum":0,"maximum":31},"sl":{"type":"integer","minimum":0,"maximum":15},"rr":{"type":"integer","minimum":0,"maximum":15},"am":{"type":"boolean"}},"required":["dt","mul","tl","ks","ar","dr","sr","sl","rr"],"additionalProperties":false},"minItems":4,"maxItems":4},"ams":{"type":"integer","minimum":0,"maximum":3},"pms":{"type":"integer","minimum":0,"maximum":7}},"required":["algorithm","feedback","ops"],"additionalProperties":false},"sample":{"type":"string","minLength":1,"maxLength":80}},"required":["volume"],"additionalProperties":false}},"portableTimbres":{"type":"object","additionalProperties":{"type":"object","properties":{"sourceSignature":{"type":"string","minLength":1,"maxLength":8192},"pitchOffset":{"type":"number","minimum":-48,"maximum":48},"program":{"type":"integer","minimum":0,"maximum":127},"envelope":{"type":"array","items":{"type":"number","minimum":0,"maximum":1},"minItems":1,"maxItems":120},"rms":{"type":"number","minimum":0,"maximum":100},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["sourceSignature","pitchOffset","program","envelope","rms","confidence"],"additionalProperties":false}}},"required":["id","name","role","priority","notes"],"additionalProperties":false},"minItems":0,"maxItems":256},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["midi","native"]},"name":{"type":"string","minLength":0,"maxLength":240},"sha256":{"type":"string","minLength":0,"maxLength":64},"url":{"type":"string","minLength":0,"maxLength":2048},"description":{"type":"string","minLength":0,"maxLength":4096}},"required":["kind","name"],"additionalProperties":false},"notices":{"type":"array","items":{"type":"string","minLength":0,"maxLength":4096},"minItems":0,"maxItems":1024},"midi":{"type":"object","properties":{"format":{"type":"integer","minimum":0,"maximum":1},"events":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"track":{"type":"integer","minimum":0,"maximum":65535},"order":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"integer","minimum":0,"maximum":255},"data":{"type":"array","items":{"type":"integer","minimum":0,"maximum":255},"minItems":0,"maxItems":65536}},"required":["tick","track","order","status","data"],"additionalProperties":false},"minItems":0,"maxItems":200000}},"required":["format","events"],"additionalProperties":false}},"required":["version","title","ticksPerBeat","endTick","tempos","parts","notices"],"additionalProperties":false}},"required":["kind","plan","performance"],"additionalProperties":false}]},"settings":{"type":"object","properties":{"chip":{"type":"string","enum":["2a03","dmg","md","snes","c64"]},"tempoScale":{"type":"number","minimum":0.1,"maximum":10},"transpose":{"type":"number","minimum":-48,"maximum":48},"gain":{"type":"number","minimum":0,"maximum":1},"mix":{"type":"string","enum":["auto","authored"]},"allowLoss":{"type":"boolean"}},"required":["chip"],"additionalProperties":false},"generator":{"type":"object","properties":{"language":{"type":"string","enum":["javascript"]},"code":{"type":"string","minLength":1,"maxLength":64000},"seed":{"type":"integer","minimum":0,"maximum":4294967295}},"required":["language","code","seed"],"additionalProperties":false}},"required":["version","title","source","settings"],"additionalProperties":false},"visibility":{"enum":["public","unlisted","private"]},"contentHash":{"type":"string"},"profile":{"type":"object","properties":{"id":{"type":"string"},"handle":{"type":["string","null"]},"displayName":{"type":"string"},"bio":{"type":"string"}}}},"additionalProperties":true}},"cursor":{"type":["string","null"]}}}}}},"400":{"description":"Malformed request or cursor"},"401":{"description":"Sign in required"},"404":{"description":"Not found or inaccessible"},"409":{"description":"Conflicting request key, handle or audio state"},"413":{"description":"Body exceeds 4 MB"},"422":{"description":"Invalid data; issues include path/code/message/level"},"429":{"description":"Shared account rate limit; Retry-After"},"503":{"description":"Publication service unavailable"}},"parameters":[{"name":"q","in":"query","schema":{"type":"string"},"description":"Optional filter or pagination cursor"},{"name":"chip","in":"query","schema":{"type":"string"},"description":"Optional filter or pagination cursor"},{"name":"tag","in":"query","schema":{"type":"string"},"description":"Optional filter or pagination cursor"},{"name":"handle","in":"query","schema":{"type":"string"},"description":"Optional filter or pagination cursor"},{"name":"sort","in":"query","schema":{"type":"string"},"description":"recent or popular (last seven days)"},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Optional filter or pagination cursor"},{"name":"mine","in":"query","schema":{"type":"string"},"description":"1 enables this account-only filter"},{"name":"favourites","in":"query","schema":{"type":"string"},"description":"1 enables this account-only filter"}]},"post":{"operationId":"publishProject","summary":"Publish an immutable project revision","tags":["projects"],"responses":{"201":{"description":"Published or identical retry","content":{"application/json":{"schema":{"type":"object","required":["id","parentId","rootId","title","chip","tags","visibility","createdAt","contentHash","profile","favourites","favourited","owned"],"properties":{"id":{"type":"string"},"title":{"type":"string"},"chip":{"enum":["2a03","dmg","md","snes","c64"]},"tags":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"integer","description":"Unix milliseconds"},"favourites":{"type":"integer"},"favourited":{"type":"boolean"},"owned":{"type":"boolean"},"renditions":{"type":"array","items":{"type":"object","required":["id","kind","status","engine"],"properties":{"id":{"type":"string"},"kind":{"enum":["preview","full"]},"status":{"type":"string"},"engine":{"type":"string"}}}},"parentId":{"type":["string","null"]},"rootId":{"type":"string"},"project":{"type":"object","properties":{"version":{"enum":[1]},"title":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","minLength":0,"maxLength":2000},"author":{"type":"string","minLength":0,"maxLength":80},"licence":{"enum":["reserved","CC0-1.0","CC-BY-4.0"]},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":24},"minItems":0,"maxItems":8},"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["score"]},"score":{"type":"object","properties":{"id":{"type":"string","minLength":0,"maxLength":120},"bpm":{"type":"number","minimum":40,"maximum":300},"stepsPerBeat":{"enum":[4,12]},"patterns":{"type":"array","items":{"type":"object","properties":{"bass":{"type":"string","minLength":0,"maxLength":4096},"lead":{"type":"string","minLength":0,"maxLength":4096},"chord":{"type":"string","minLength":0,"maxLength":4096},"perc":{"type":"string","minLength":0,"maxLength":4096},"chordShape":{"type":"array","items":{"type":"array","items":{"type":"integer","minimum":-127,"maximum":127},"minItems":1,"maxItems":32},"minItems":1,"maxItems":256}},"required":["bass","lead","chord","perc","chordShape"],"additionalProperties":false},"minItems":1,"maxItems":64},"order":{"type":"array","items":{"type":"integer","minimum":0,"maximum":63},"minItems":1,"maxItems":256},"gain":{"type":"number","minimum":0,"maximum":1},"chip":{"type":"string","enum":["2a03","dmg","md","snes","c64"]},"intent":{"type":"object","properties":{"lead":{"type":"string","enum":["soft","bright","round"]},"chord":{"type":"string","enum":["plucked","held"]},"bass":{"type":"string","enum":["round","hollow","bright"]},"perc":{"type":"string","enum":["tight","soft"]}},"required":[],"additionalProperties":false}},"required":["bpm","patterns","order"],"additionalProperties":false}},"required":["kind","score"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["performance"]},"performance":{"type":"object","properties":{"version":{"enum":[1]},"title":{"type":"string","minLength":0,"maxLength":240},"ticksPerBeat":{"type":"integer","minimum":1,"maximum":9007199254740991},"endTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"loopStartTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"tempos":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"microsecondsPerBeat":{"type":"integer","minimum":1,"maximum":16777215}},"required":["tick","microsecondsPerBeat"],"additionalProperties":false},"minItems":1,"maxItems":100000},"parts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"name":{"type":"string","minLength":0,"maxLength":240},"role":{"type":"string","enum":["lead","chord","bass","perc"]},"priority":{"type":"number","minimum":-100000,"maximum":100000},"program":{"type":"integer","minimum":0,"maximum":127},"muted":{"type":"boolean"},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"endTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"pitch":{"type":"number","minimum":0,"maximum":127},"velocity":{"type":"integer","minimum":1,"maximum":127},"program":{"type":"integer","minimum":0,"maximum":127},"drum":{"type":"integer","minimum":0,"maximum":127},"expression":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"pitch":{"type":"number","minimum":-96,"maximum":96},"gain":{"type":"number","minimum":0,"maximum":1},"duty":{"type":"integer","minimum":0,"maximum":3},"noisePeriod":{"type":"integer","minimum":0,"maximum":15}},"required":["tick"],"additionalProperties":false},"minItems":0,"maxItems":200000}},"required":["id","tick","endTick","pitch","velocity"],"additionalProperties":false},"minItems":0,"maxItems":100000},"origin":{"type":"object","properties":{"chip":{"type":"string","minLength":0,"maxLength":64},"voice":{"type":"string","minLength":0,"maxLength":64}},"required":["chip","voice"],"additionalProperties":false},"mix":{"type":"object","properties":{"gainDb":{"type":"number","minimum":-96,"maximum":12},"importance":{"type":"number","minimum":0,"maximum":1}},"required":[],"additionalProperties":false},"roleInference":{"type":"object","properties":{"confidence":{"type":"string","enum":["high","medium","low"]},"reason":{"type":"string","enum":["channel","name","program","polyphony","register","monophony","override"]}},"required":["confidence","reason"],"additionalProperties":false},"instruments":{"type":"object","additionalProperties":{"type":"object","properties":{"volume":{"type":"array","items":{"type":"number","minimum":0,"maximum":15},"minItems":1,"maxItems":4096},"duty":{"oneOf":[{"type":"integer","minimum":0,"maximum":3},{"type":"array","items":{"type":"integer","minimum":0,"maximum":3},"minItems":1,"maxItems":4096}]},"arp":{"type":"array","items":{"type":"number","minimum":-127,"maximum":127},"minItems":0,"maxItems":4096},"pitch":{"type":"array","items":{"type":"number","minimum":-65535,"maximum":65535},"minItems":0,"maxItems":4096},"slide":{"type":"number","minimum":-96,"maximum":96},"sustain":{"type":"boolean"},"arpLoop":{"type":"boolean"},"noiseMode":{"type":"boolean"},"vibrato":{"type":"object","properties":{"depth":{"type":"number","minimum":0,"maximum":96},"rate":{"type":"number","minimum":0.001,"maximum":100000},"delay":{"type":"number","minimum":0,"maximum":100000}},"required":["depth","rate"],"additionalProperties":false},"waveform":{"oneOf":[{"type":"string","enum":["pulse","triangle","sawtooth","noise"]},{"type":"array","items":{"type":"string","enum":["pulse","triangle","sawtooth","noise"]},"minItems":1,"maxItems":4096}]},"wave":{"type":"array","items":{"type":"integer","minimum":0,"maximum":15},"minItems":32,"maxItems":32},"fm":{"type":"object","properties":{"algorithm":{"type":"integer","minimum":0,"maximum":7},"feedback":{"type":"integer","minimum":0,"maximum":7},"ops":{"type":"array","items":{"type":"object","properties":{"dt":{"type":"integer","minimum":0,"maximum":7},"mul":{"type":"integer","minimum":0,"maximum":15},"tl":{"type":"integer","minimum":0,"maximum":127},"ks":{"type":"integer","minimum":0,"maximum":3},"ar":{"type":"integer","minimum":0,"maximum":31},"dr":{"type":"integer","minimum":0,"maximum":31},"sr":{"type":"integer","minimum":0,"maximum":31},"sl":{"type":"integer","minimum":0,"maximum":15},"rr":{"type":"integer","minimum":0,"maximum":15},"am":{"type":"boolean"}},"required":["dt","mul","tl","ks","ar","dr","sr","sl","rr"],"additionalProperties":false},"minItems":4,"maxItems":4},"ams":{"type":"integer","minimum":0,"maximum":3},"pms":{"type":"integer","minimum":0,"maximum":7}},"required":["algorithm","feedback","ops"],"additionalProperties":false},"sample":{"type":"string","minLength":1,"maxLength":80}},"required":["volume"],"additionalProperties":false}},"portableTimbres":{"type":"object","additionalProperties":{"type":"object","properties":{"sourceSignature":{"type":"string","minLength":1,"maxLength":8192},"pitchOffset":{"type":"number","minimum":-48,"maximum":48},"program":{"type":"integer","minimum":0,"maximum":127},"envelope":{"type":"array","items":{"type":"number","minimum":0,"maximum":1},"minItems":1,"maxItems":120},"rms":{"type":"number","minimum":0,"maximum":100},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["sourceSignature","pitchOffset","program","envelope","rms","confidence"],"additionalProperties":false}}},"required":["id","name","role","priority","notes"],"additionalProperties":false},"minItems":0,"maxItems":256},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["midi","native"]},"name":{"type":"string","minLength":0,"maxLength":240},"sha256":{"type":"string","minLength":0,"maxLength":64},"url":{"type":"string","minLength":0,"maxLength":2048},"description":{"type":"string","minLength":0,"maxLength":4096}},"required":["kind","name"],"additionalProperties":false},"notices":{"type":"array","items":{"type":"string","minLength":0,"maxLength":4096},"minItems":0,"maxItems":1024},"midi":{"type":"object","properties":{"format":{"type":"integer","minimum":0,"maximum":1},"events":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"track":{"type":"integer","minimum":0,"maximum":65535},"order":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"integer","minimum":0,"maximum":255},"data":{"type":"array","items":{"type":"integer","minimum":0,"maximum":255},"minItems":0,"maxItems":65536}},"required":["tick","track","order","status","data"],"additionalProperties":false},"minItems":0,"maxItems":200000}},"required":["format","events"],"additionalProperties":false}},"required":["version","title","ticksPerBeat","endTick","tempos","parts","notices"],"additionalProperties":false}},"required":["kind","performance"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["native"]},"plan":{"type":"object","properties":{"chip":{"type":"string","enum":["2a03","dmg","md","snes","c64"]},"musicStartCycle":{"type":"integer","minimum":0,"maximum":9007199254740991},"seconds":{"type":"number","minimum":0.000001,"maximum":600},"loopStartSeconds":{"type":"number","minimum":0,"maximum":600},"events":{"type":"array","items":{"type":"object","properties":{"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"addr":{"type":"integer","minimum":0,"maximum":16777215},"value":{"type":"integer","minimum":0,"maximum":255}},"required":["at","addr","value"],"additionalProperties":false},"minItems":0,"maxItems":2000000},"memory":{"type":"array","items":{"type":"object","properties":{"address":{"type":"integer","minimum":0,"maximum":16777215},"bytes":{"type":"array","items":{"type":"integer","minimum":0,"maximum":255},"minItems":0,"maxItems":8388608}},"required":["address","bytes"],"additionalProperties":false},"minItems":0,"maxItems":256},"notes":{"type":"array","items":{"type":"object","properties":{"part":{"type":"string","minLength":0,"maxLength":120},"id":{"type":"string","minLength":0,"maxLength":120},"voice":{"type":"string","minLength":0,"maxLength":120},"pitch":{"type":"number","minimum":0,"maximum":127},"at":{"type":"number","minimum":0,"maximum":600},"until":{"type":"number","minimum":0,"maximum":600}},"required":["part","id","voice","pitch","at","until"],"additionalProperties":false},"minItems":0,"maxItems":100000},"losses":{"type":"array","items":{"type":"object","properties":{"part":{"type":"string","minLength":0,"maxLength":120},"note":{"type":"string","minLength":0,"maxLength":120},"kind":{"type":"string","minLength":0,"maxLength":120},"detail":{"type":"string","minLength":0,"maxLength":4096}},"required":["part","kind","detail"],"additionalProperties":false},"minItems":0,"maxItems":200000},"silentNotes":{"type":"array","items":{"type":"object","properties":{"part":{"type":"string","minLength":0,"maxLength":120},"id":{"type":"string","minLength":0,"maxLength":120}},"required":["part","id"],"additionalProperties":false},"minItems":0,"maxItems":100000},"mix":{"type":"object","properties":{"version":{"enum":[1]},"calibratedNotes":{"type":"integer","minimum":0,"maximum":9007199254740991},"fallbackNotes":{"type":"integer","minimum":0,"maximum":9007199254740991},"diagnostics":{"type":"array","items":{"type":"object","properties":{"part":{"type":"string","minLength":0,"maxLength":120},"kind":{"type":"string","minLength":0,"maxLength":120},"detail":{"type":"string","minLength":0,"maxLength":4096}},"required":["part","kind","detail"],"additionalProperties":false},"minItems":0,"maxItems":200000}},"required":["version","calibratedNotes","fallbackNotes","diagnostics"],"additionalProperties":false}},"required":["chip","seconds","loopStartSeconds","events","memory","notes","losses"],"additionalProperties":false},"performance":{"type":"object","properties":{"version":{"enum":[1]},"title":{"type":"string","minLength":0,"maxLength":240},"ticksPerBeat":{"type":"integer","minimum":1,"maximum":9007199254740991},"endTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"loopStartTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"tempos":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"microsecondsPerBeat":{"type":"integer","minimum":1,"maximum":16777215}},"required":["tick","microsecondsPerBeat"],"additionalProperties":false},"minItems":1,"maxItems":100000},"parts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"name":{"type":"string","minLength":0,"maxLength":240},"role":{"type":"string","enum":["lead","chord","bass","perc"]},"priority":{"type":"number","minimum":-100000,"maximum":100000},"program":{"type":"integer","minimum":0,"maximum":127},"muted":{"type":"boolean"},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"endTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"pitch":{"type":"number","minimum":0,"maximum":127},"velocity":{"type":"integer","minimum":1,"maximum":127},"program":{"type":"integer","minimum":0,"maximum":127},"drum":{"type":"integer","minimum":0,"maximum":127},"expression":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"pitch":{"type":"number","minimum":-96,"maximum":96},"gain":{"type":"number","minimum":0,"maximum":1},"duty":{"type":"integer","minimum":0,"maximum":3},"noisePeriod":{"type":"integer","minimum":0,"maximum":15}},"required":["tick"],"additionalProperties":false},"minItems":0,"maxItems":200000}},"required":["id","tick","endTick","pitch","velocity"],"additionalProperties":false},"minItems":0,"maxItems":100000},"origin":{"type":"object","properties":{"chip":{"type":"string","minLength":0,"maxLength":64},"voice":{"type":"string","minLength":0,"maxLength":64}},"required":["chip","voice"],"additionalProperties":false},"mix":{"type":"object","properties":{"gainDb":{"type":"number","minimum":-96,"maximum":12},"importance":{"type":"number","minimum":0,"maximum":1}},"required":[],"additionalProperties":false},"roleInference":{"type":"object","properties":{"confidence":{"type":"string","enum":["high","medium","low"]},"reason":{"type":"string","enum":["channel","name","program","polyphony","register","monophony","override"]}},"required":["confidence","reason"],"additionalProperties":false},"instruments":{"type":"object","additionalProperties":{"type":"object","properties":{"volume":{"type":"array","items":{"type":"number","minimum":0,"maximum":15},"minItems":1,"maxItems":4096},"duty":{"oneOf":[{"type":"integer","minimum":0,"maximum":3},{"type":"array","items":{"type":"integer","minimum":0,"maximum":3},"minItems":1,"maxItems":4096}]},"arp":{"type":"array","items":{"type":"number","minimum":-127,"maximum":127},"minItems":0,"maxItems":4096},"pitch":{"type":"array","items":{"type":"number","minimum":-65535,"maximum":65535},"minItems":0,"maxItems":4096},"slide":{"type":"number","minimum":-96,"maximum":96},"sustain":{"type":"boolean"},"arpLoop":{"type":"boolean"},"noiseMode":{"type":"boolean"},"vibrato":{"type":"object","properties":{"depth":{"type":"number","minimum":0,"maximum":96},"rate":{"type":"number","minimum":0.001,"maximum":100000},"delay":{"type":"number","minimum":0,"maximum":100000}},"required":["depth","rate"],"additionalProperties":false},"waveform":{"oneOf":[{"type":"string","enum":["pulse","triangle","sawtooth","noise"]},{"type":"array","items":{"type":"string","enum":["pulse","triangle","sawtooth","noise"]},"minItems":1,"maxItems":4096}]},"wave":{"type":"array","items":{"type":"integer","minimum":0,"maximum":15},"minItems":32,"maxItems":32},"fm":{"type":"object","properties":{"algorithm":{"type":"integer","minimum":0,"maximum":7},"feedback":{"type":"integer","minimum":0,"maximum":7},"ops":{"type":"array","items":{"type":"object","properties":{"dt":{"type":"integer","minimum":0,"maximum":7},"mul":{"type":"integer","minimum":0,"maximum":15},"tl":{"type":"integer","minimum":0,"maximum":127},"ks":{"type":"integer","minimum":0,"maximum":3},"ar":{"type":"integer","minimum":0,"maximum":31},"dr":{"type":"integer","minimum":0,"maximum":31},"sr":{"type":"integer","minimum":0,"maximum":31},"sl":{"type":"integer","minimum":0,"maximum":15},"rr":{"type":"integer","minimum":0,"maximum":15},"am":{"type":"boolean"}},"required":["dt","mul","tl","ks","ar","dr","sr","sl","rr"],"additionalProperties":false},"minItems":4,"maxItems":4},"ams":{"type":"integer","minimum":0,"maximum":3},"pms":{"type":"integer","minimum":0,"maximum":7}},"required":["algorithm","feedback","ops"],"additionalProperties":false},"sample":{"type":"string","minLength":1,"maxLength":80}},"required":["volume"],"additionalProperties":false}},"portableTimbres":{"type":"object","additionalProperties":{"type":"object","properties":{"sourceSignature":{"type":"string","minLength":1,"maxLength":8192},"pitchOffset":{"type":"number","minimum":-48,"maximum":48},"program":{"type":"integer","minimum":0,"maximum":127},"envelope":{"type":"array","items":{"type":"number","minimum":0,"maximum":1},"minItems":1,"maxItems":120},"rms":{"type":"number","minimum":0,"maximum":100},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["sourceSignature","pitchOffset","program","envelope","rms","confidence"],"additionalProperties":false}}},"required":["id","name","role","priority","notes"],"additionalProperties":false},"minItems":0,"maxItems":256},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["midi","native"]},"name":{"type":"string","minLength":0,"maxLength":240},"sha256":{"type":"string","minLength":0,"maxLength":64},"url":{"type":"string","minLength":0,"maxLength":2048},"description":{"type":"string","minLength":0,"maxLength":4096}},"required":["kind","name"],"additionalProperties":false},"notices":{"type":"array","items":{"type":"string","minLength":0,"maxLength":4096},"minItems":0,"maxItems":1024},"midi":{"type":"object","properties":{"format":{"type":"integer","minimum":0,"maximum":1},"events":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"track":{"type":"integer","minimum":0,"maximum":65535},"order":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"integer","minimum":0,"maximum":255},"data":{"type":"array","items":{"type":"integer","minimum":0,"maximum":255},"minItems":0,"maxItems":65536}},"required":["tick","track","order","status","data"],"additionalProperties":false},"minItems":0,"maxItems":200000}},"required":["format","events"],"additionalProperties":false}},"required":["version","title","ticksPerBeat","endTick","tempos","parts","notices"],"additionalProperties":false}},"required":["kind","plan","performance"],"additionalProperties":false}]},"settings":{"type":"object","properties":{"chip":{"type":"string","enum":["2a03","dmg","md","snes","c64"]},"tempoScale":{"type":"number","minimum":0.1,"maximum":10},"transpose":{"type":"number","minimum":-48,"maximum":48},"gain":{"type":"number","minimum":0,"maximum":1},"mix":{"type":"string","enum":["auto","authored"]},"allowLoss":{"type":"boolean"}},"required":["chip"],"additionalProperties":false},"generator":{"type":"object","properties":{"language":{"type":"string","enum":["javascript"]},"code":{"type":"string","minLength":1,"maxLength":64000},"seed":{"type":"integer","minimum":0,"maximum":4294967295}},"required":["language","code","seed"],"additionalProperties":false}},"required":["version","title","source","settings"],"additionalProperties":false},"visibility":{"enum":["public","unlisted","private"]},"contentHash":{"type":"string"},"profile":{"type":"object","properties":{"id":{"type":"string"},"handle":{"type":["string","null"]},"displayName":{"type":"string"},"bio":{"type":"string"}}}},"additionalProperties":true}}}},"400":{"description":"Malformed request or cursor"},"401":{"description":"Sign in required"},"404":{"description":"Not found or inaccessible"},"409":{"description":"Conflicting request key, handle or audio state"},"413":{"description":"Body exceeds 4 MB"},"422":{"description":"Invalid data; issues include path/code/message/level"},"429":{"description":"Shared account rate limit; Retry-After"},"503":{"description":"Publication service unavailable"}},"security":[{"bearerAuth":[]},{"browserSession":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["project"],"additionalProperties":false,"properties":{"project":{"type":"object","properties":{"version":{"enum":[1]},"title":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","minLength":0,"maxLength":2000},"author":{"type":"string","minLength":0,"maxLength":80},"licence":{"enum":["reserved","CC0-1.0","CC-BY-4.0"]},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":24},"minItems":0,"maxItems":8},"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["score"]},"score":{"type":"object","properties":{"id":{"type":"string","minLength":0,"maxLength":120},"bpm":{"type":"number","minimum":40,"maximum":300},"stepsPerBeat":{"enum":[4,12]},"patterns":{"type":"array","items":{"type":"object","properties":{"bass":{"type":"string","minLength":0,"maxLength":4096},"lead":{"type":"string","minLength":0,"maxLength":4096},"chord":{"type":"string","minLength":0,"maxLength":4096},"perc":{"type":"string","minLength":0,"maxLength":4096},"chordShape":{"type":"array","items":{"type":"array","items":{"type":"integer","minimum":-127,"maximum":127},"minItems":1,"maxItems":32},"minItems":1,"maxItems":256}},"required":["bass","lead","chord","perc","chordShape"],"additionalProperties":false},"minItems":1,"maxItems":64},"order":{"type":"array","items":{"type":"integer","minimum":0,"maximum":63},"minItems":1,"maxItems":256},"gain":{"type":"number","minimum":0,"maximum":1},"chip":{"type":"string","enum":["2a03","dmg","md","snes","c64"]},"intent":{"type":"object","properties":{"lead":{"type":"string","enum":["soft","bright","round"]},"chord":{"type":"string","enum":["plucked","held"]},"bass":{"type":"string","enum":["round","hollow","bright"]},"perc":{"type":"string","enum":["tight","soft"]}},"required":[],"additionalProperties":false}},"required":["bpm","patterns","order"],"additionalProperties":false}},"required":["kind","score"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["performance"]},"performance":{"type":"object","properties":{"version":{"enum":[1]},"title":{"type":"string","minLength":0,"maxLength":240},"ticksPerBeat":{"type":"integer","minimum":1,"maximum":9007199254740991},"endTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"loopStartTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"tempos":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"microsecondsPerBeat":{"type":"integer","minimum":1,"maximum":16777215}},"required":["tick","microsecondsPerBeat"],"additionalProperties":false},"minItems":1,"maxItems":100000},"parts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"name":{"type":"string","minLength":0,"maxLength":240},"role":{"type":"string","enum":["lead","chord","bass","perc"]},"priority":{"type":"number","minimum":-100000,"maximum":100000},"program":{"type":"integer","minimum":0,"maximum":127},"muted":{"type":"boolean"},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"endTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"pitch":{"type":"number","minimum":0,"maximum":127},"velocity":{"type":"integer","minimum":1,"maximum":127},"program":{"type":"integer","minimum":0,"maximum":127},"drum":{"type":"integer","minimum":0,"maximum":127},"expression":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"pitch":{"type":"number","minimum":-96,"maximum":96},"gain":{"type":"number","minimum":0,"maximum":1},"duty":{"type":"integer","minimum":0,"maximum":3},"noisePeriod":{"type":"integer","minimum":0,"maximum":15}},"required":["tick"],"additionalProperties":false},"minItems":0,"maxItems":200000}},"required":["id","tick","endTick","pitch","velocity"],"additionalProperties":false},"minItems":0,"maxItems":100000},"origin":{"type":"object","properties":{"chip":{"type":"string","minLength":0,"maxLength":64},"voice":{"type":"string","minLength":0,"maxLength":64}},"required":["chip","voice"],"additionalProperties":false},"mix":{"type":"object","properties":{"gainDb":{"type":"number","minimum":-96,"maximum":12},"importance":{"type":"number","minimum":0,"maximum":1}},"required":[],"additionalProperties":false},"roleInference":{"type":"object","properties":{"confidence":{"type":"string","enum":["high","medium","low"]},"reason":{"type":"string","enum":["channel","name","program","polyphony","register","monophony","override"]}},"required":["confidence","reason"],"additionalProperties":false},"instruments":{"type":"object","additionalProperties":{"type":"object","properties":{"volume":{"type":"array","items":{"type":"number","minimum":0,"maximum":15},"minItems":1,"maxItems":4096},"duty":{"oneOf":[{"type":"integer","minimum":0,"maximum":3},{"type":"array","items":{"type":"integer","minimum":0,"maximum":3},"minItems":1,"maxItems":4096}]},"arp":{"type":"array","items":{"type":"number","minimum":-127,"maximum":127},"minItems":0,"maxItems":4096},"pitch":{"type":"array","items":{"type":"number","minimum":-65535,"maximum":65535},"minItems":0,"maxItems":4096},"slide":{"type":"number","minimum":-96,"maximum":96},"sustain":{"type":"boolean"},"arpLoop":{"type":"boolean"},"noiseMode":{"type":"boolean"},"vibrato":{"type":"object","properties":{"depth":{"type":"number","minimum":0,"maximum":96},"rate":{"type":"number","minimum":0.001,"maximum":100000},"delay":{"type":"number","minimum":0,"maximum":100000}},"required":["depth","rate"],"additionalProperties":false},"waveform":{"oneOf":[{"type":"string","enum":["pulse","triangle","sawtooth","noise"]},{"type":"array","items":{"type":"string","enum":["pulse","triangle","sawtooth","noise"]},"minItems":1,"maxItems":4096}]},"wave":{"type":"array","items":{"type":"integer","minimum":0,"maximum":15},"minItems":32,"maxItems":32},"fm":{"type":"object","properties":{"algorithm":{"type":"integer","minimum":0,"maximum":7},"feedback":{"type":"integer","minimum":0,"maximum":7},"ops":{"type":"array","items":{"type":"object","properties":{"dt":{"type":"integer","minimum":0,"maximum":7},"mul":{"type":"integer","minimum":0,"maximum":15},"tl":{"type":"integer","minimum":0,"maximum":127},"ks":{"type":"integer","minimum":0,"maximum":3},"ar":{"type":"integer","minimum":0,"maximum":31},"dr":{"type":"integer","minimum":0,"maximum":31},"sr":{"type":"integer","minimum":0,"maximum":31},"sl":{"type":"integer","minimum":0,"maximum":15},"rr":{"type":"integer","minimum":0,"maximum":15},"am":{"type":"boolean"}},"required":["dt","mul","tl","ks","ar","dr","sr","sl","rr"],"additionalProperties":false},"minItems":4,"maxItems":4},"ams":{"type":"integer","minimum":0,"maximum":3},"pms":{"type":"integer","minimum":0,"maximum":7}},"required":["algorithm","feedback","ops"],"additionalProperties":false},"sample":{"type":"string","minLength":1,"maxLength":80}},"required":["volume"],"additionalProperties":false}},"portableTimbres":{"type":"object","additionalProperties":{"type":"object","properties":{"sourceSignature":{"type":"string","minLength":1,"maxLength":8192},"pitchOffset":{"type":"number","minimum":-48,"maximum":48},"program":{"type":"integer","minimum":0,"maximum":127},"envelope":{"type":"array","items":{"type":"number","minimum":0,"maximum":1},"minItems":1,"maxItems":120},"rms":{"type":"number","minimum":0,"maximum":100},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["sourceSignature","pitchOffset","program","envelope","rms","confidence"],"additionalProperties":false}}},"required":["id","name","role","priority","notes"],"additionalProperties":false},"minItems":0,"maxItems":256},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["midi","native"]},"name":{"type":"string","minLength":0,"maxLength":240},"sha256":{"type":"string","minLength":0,"maxLength":64},"url":{"type":"string","minLength":0,"maxLength":2048},"description":{"type":"string","minLength":0,"maxLength":4096}},"required":["kind","name"],"additionalProperties":false},"notices":{"type":"array","items":{"type":"string","minLength":0,"maxLength":4096},"minItems":0,"maxItems":1024},"midi":{"type":"object","properties":{"format":{"type":"integer","minimum":0,"maximum":1},"events":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"track":{"type":"integer","minimum":0,"maximum":65535},"order":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"integer","minimum":0,"maximum":255},"data":{"type":"array","items":{"type":"integer","minimum":0,"maximum":255},"minItems":0,"maxItems":65536}},"required":["tick","track","order","status","data"],"additionalProperties":false},"minItems":0,"maxItems":200000}},"required":["format","events"],"additionalProperties":false}},"required":["version","title","ticksPerBeat","endTick","tempos","parts","notices"],"additionalProperties":false}},"required":["kind","performance"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["native"]},"plan":{"type":"object","properties":{"chip":{"type":"string","enum":["2a03","dmg","md","snes","c64"]},"musicStartCycle":{"type":"integer","minimum":0,"maximum":9007199254740991},"seconds":{"type":"number","minimum":0.000001,"maximum":600},"loopStartSeconds":{"type":"number","minimum":0,"maximum":600},"events":{"type":"array","items":{"type":"object","properties":{"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"addr":{"type":"integer","minimum":0,"maximum":16777215},"value":{"type":"integer","minimum":0,"maximum":255}},"required":["at","addr","value"],"additionalProperties":false},"minItems":0,"maxItems":2000000},"memory":{"type":"array","items":{"type":"object","properties":{"address":{"type":"integer","minimum":0,"maximum":16777215},"bytes":{"type":"array","items":{"type":"integer","minimum":0,"maximum":255},"minItems":0,"maxItems":8388608}},"required":["address","bytes"],"additionalProperties":false},"minItems":0,"maxItems":256},"notes":{"type":"array","items":{"type":"object","properties":{"part":{"type":"string","minLength":0,"maxLength":120},"id":{"type":"string","minLength":0,"maxLength":120},"voice":{"type":"string","minLength":0,"maxLength":120},"pitch":{"type":"number","minimum":0,"maximum":127},"at":{"type":"number","minimum":0,"maximum":600},"until":{"type":"number","minimum":0,"maximum":600}},"required":["part","id","voice","pitch","at","until"],"additionalProperties":false},"minItems":0,"maxItems":100000},"losses":{"type":"array","items":{"type":"object","properties":{"part":{"type":"string","minLength":0,"maxLength":120},"note":{"type":"string","minLength":0,"maxLength":120},"kind":{"type":"string","minLength":0,"maxLength":120},"detail":{"type":"string","minLength":0,"maxLength":4096}},"required":["part","kind","detail"],"additionalProperties":false},"minItems":0,"maxItems":200000},"silentNotes":{"type":"array","items":{"type":"object","properties":{"part":{"type":"string","minLength":0,"maxLength":120},"id":{"type":"string","minLength":0,"maxLength":120}},"required":["part","id"],"additionalProperties":false},"minItems":0,"maxItems":100000},"mix":{"type":"object","properties":{"version":{"enum":[1]},"calibratedNotes":{"type":"integer","minimum":0,"maximum":9007199254740991},"fallbackNotes":{"type":"integer","minimum":0,"maximum":9007199254740991},"diagnostics":{"type":"array","items":{"type":"object","properties":{"part":{"type":"string","minLength":0,"maxLength":120},"kind":{"type":"string","minLength":0,"maxLength":120},"detail":{"type":"string","minLength":0,"maxLength":4096}},"required":["part","kind","detail"],"additionalProperties":false},"minItems":0,"maxItems":200000}},"required":["version","calibratedNotes","fallbackNotes","diagnostics"],"additionalProperties":false}},"required":["chip","seconds","loopStartSeconds","events","memory","notes","losses"],"additionalProperties":false},"performance":{"type":"object","properties":{"version":{"enum":[1]},"title":{"type":"string","minLength":0,"maxLength":240},"ticksPerBeat":{"type":"integer","minimum":1,"maximum":9007199254740991},"endTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"loopStartTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"tempos":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"microsecondsPerBeat":{"type":"integer","minimum":1,"maximum":16777215}},"required":["tick","microsecondsPerBeat"],"additionalProperties":false},"minItems":1,"maxItems":100000},"parts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"name":{"type":"string","minLength":0,"maxLength":240},"role":{"type":"string","enum":["lead","chord","bass","perc"]},"priority":{"type":"number","minimum":-100000,"maximum":100000},"program":{"type":"integer","minimum":0,"maximum":127},"muted":{"type":"boolean"},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"endTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"pitch":{"type":"number","minimum":0,"maximum":127},"velocity":{"type":"integer","minimum":1,"maximum":127},"program":{"type":"integer","minimum":0,"maximum":127},"drum":{"type":"integer","minimum":0,"maximum":127},"expression":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"pitch":{"type":"number","minimum":-96,"maximum":96},"gain":{"type":"number","minimum":0,"maximum":1},"duty":{"type":"integer","minimum":0,"maximum":3},"noisePeriod":{"type":"integer","minimum":0,"maximum":15}},"required":["tick"],"additionalProperties":false},"minItems":0,"maxItems":200000}},"required":["id","tick","endTick","pitch","velocity"],"additionalProperties":false},"minItems":0,"maxItems":100000},"origin":{"type":"object","properties":{"chip":{"type":"string","minLength":0,"maxLength":64},"voice":{"type":"string","minLength":0,"maxLength":64}},"required":["chip","voice"],"additionalProperties":false},"mix":{"type":"object","properties":{"gainDb":{"type":"number","minimum":-96,"maximum":12},"importance":{"type":"number","minimum":0,"maximum":1}},"required":[],"additionalProperties":false},"roleInference":{"type":"object","properties":{"confidence":{"type":"string","enum":["high","medium","low"]},"reason":{"type":"string","enum":["channel","name","program","polyphony","register","monophony","override"]}},"required":["confidence","reason"],"additionalProperties":false},"instruments":{"type":"object","additionalProperties":{"type":"object","properties":{"volume":{"type":"array","items":{"type":"number","minimum":0,"maximum":15},"minItems":1,"maxItems":4096},"duty":{"oneOf":[{"type":"integer","minimum":0,"maximum":3},{"type":"array","items":{"type":"integer","minimum":0,"maximum":3},"minItems":1,"maxItems":4096}]},"arp":{"type":"array","items":{"type":"number","minimum":-127,"maximum":127},"minItems":0,"maxItems":4096},"pitch":{"type":"array","items":{"type":"number","minimum":-65535,"maximum":65535},"minItems":0,"maxItems":4096},"slide":{"type":"number","minimum":-96,"maximum":96},"sustain":{"type":"boolean"},"arpLoop":{"type":"boolean"},"noiseMode":{"type":"boolean"},"vibrato":{"type":"object","properties":{"depth":{"type":"number","minimum":0,"maximum":96},"rate":{"type":"number","minimum":0.001,"maximum":100000},"delay":{"type":"number","minimum":0,"maximum":100000}},"required":["depth","rate"],"additionalProperties":false},"waveform":{"oneOf":[{"type":"string","enum":["pulse","triangle","sawtooth","noise"]},{"type":"array","items":{"type":"string","enum":["pulse","triangle","sawtooth","noise"]},"minItems":1,"maxItems":4096}]},"wave":{"type":"array","items":{"type":"integer","minimum":0,"maximum":15},"minItems":32,"maxItems":32},"fm":{"type":"object","properties":{"algorithm":{"type":"integer","minimum":0,"maximum":7},"feedback":{"type":"integer","minimum":0,"maximum":7},"ops":{"type":"array","items":{"type":"object","properties":{"dt":{"type":"integer","minimum":0,"maximum":7},"mul":{"type":"integer","minimum":0,"maximum":15},"tl":{"type":"integer","minimum":0,"maximum":127},"ks":{"type":"integer","minimum":0,"maximum":3},"ar":{"type":"integer","minimum":0,"maximum":31},"dr":{"type":"integer","minimum":0,"maximum":31},"sr":{"type":"integer","minimum":0,"maximum":31},"sl":{"type":"integer","minimum":0,"maximum":15},"rr":{"type":"integer","minimum":0,"maximum":15},"am":{"type":"boolean"}},"required":["dt","mul","tl","ks","ar","dr","sr","sl","rr"],"additionalProperties":false},"minItems":4,"maxItems":4},"ams":{"type":"integer","minimum":0,"maximum":3},"pms":{"type":"integer","minimum":0,"maximum":7}},"required":["algorithm","feedback","ops"],"additionalProperties":false},"sample":{"type":"string","minLength":1,"maxLength":80}},"required":["volume"],"additionalProperties":false}},"portableTimbres":{"type":"object","additionalProperties":{"type":"object","properties":{"sourceSignature":{"type":"string","minLength":1,"maxLength":8192},"pitchOffset":{"type":"number","minimum":-48,"maximum":48},"program":{"type":"integer","minimum":0,"maximum":127},"envelope":{"type":"array","items":{"type":"number","minimum":0,"maximum":1},"minItems":1,"maxItems":120},"rms":{"type":"number","minimum":0,"maximum":100},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["sourceSignature","pitchOffset","program","envelope","rms","confidence"],"additionalProperties":false}}},"required":["id","name","role","priority","notes"],"additionalProperties":false},"minItems":0,"maxItems":256},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["midi","native"]},"name":{"type":"string","minLength":0,"maxLength":240},"sha256":{"type":"string","minLength":0,"maxLength":64},"url":{"type":"string","minLength":0,"maxLength":2048},"description":{"type":"string","minLength":0,"maxLength":4096}},"required":["kind","name"],"additionalProperties":false},"notices":{"type":"array","items":{"type":"string","minLength":0,"maxLength":4096},"minItems":0,"maxItems":1024},"midi":{"type":"object","properties":{"format":{"type":"integer","minimum":0,"maximum":1},"events":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"track":{"type":"integer","minimum":0,"maximum":65535},"order":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"integer","minimum":0,"maximum":255},"data":{"type":"array","items":{"type":"integer","minimum":0,"maximum":255},"minItems":0,"maxItems":65536}},"required":["tick","track","order","status","data"],"additionalProperties":false},"minItems":0,"maxItems":200000}},"required":["format","events"],"additionalProperties":false}},"required":["version","title","ticksPerBeat","endTick","tempos","parts","notices"],"additionalProperties":false}},"required":["kind","plan","performance"],"additionalProperties":false}]},"settings":{"type":"object","properties":{"chip":{"type":"string","enum":["2a03","dmg","md","snes","c64"]},"tempoScale":{"type":"number","minimum":0.1,"maximum":10},"transpose":{"type":"number","minimum":-48,"maximum":48},"gain":{"type":"number","minimum":0,"maximum":1},"mix":{"type":"string","enum":["auto","authored"]},"allowLoss":{"type":"boolean"}},"required":["chip"],"additionalProperties":false},"generator":{"type":"object","properties":{"language":{"type":"string","enum":["javascript"]},"code":{"type":"string","minLength":1,"maxLength":64000},"seed":{"type":"integer","minimum":0,"maximum":4294967295}},"required":["language","code","seed"],"additionalProperties":false}},"required":["version","title","source","settings"],"additionalProperties":false},"visibility":{"enum":["public","unlisted","private"],"default":"public"},"parentId":{"type":"string"}}}}}}}},"/api/v1/projects/{id}":{"get":{"operationId":"getProject","summary":"Fetch an accessible complete publication","tags":["projects"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","parentId","rootId","title","chip","tags","visibility","createdAt","contentHash","profile","favourites","favourited","owned"],"properties":{"id":{"type":"string"},"title":{"type":"string"},"chip":{"enum":["2a03","dmg","md","snes","c64"]},"tags":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"integer","description":"Unix milliseconds"},"favourites":{"type":"integer"},"favourited":{"type":"boolean"},"owned":{"type":"boolean"},"renditions":{"type":"array","items":{"type":"object","required":["id","kind","status","engine"],"properties":{"id":{"type":"string"},"kind":{"enum":["preview","full"]},"status":{"type":"string"},"engine":{"type":"string"}}}},"parentId":{"type":["string","null"]},"rootId":{"type":"string"},"project":{"type":"object","properties":{"version":{"enum":[1]},"title":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","minLength":0,"maxLength":2000},"author":{"type":"string","minLength":0,"maxLength":80},"licence":{"enum":["reserved","CC0-1.0","CC-BY-4.0"]},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":24},"minItems":0,"maxItems":8},"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["score"]},"score":{"type":"object","properties":{"id":{"type":"string","minLength":0,"maxLength":120},"bpm":{"type":"number","minimum":40,"maximum":300},"stepsPerBeat":{"enum":[4,12]},"patterns":{"type":"array","items":{"type":"object","properties":{"bass":{"type":"string","minLength":0,"maxLength":4096},"lead":{"type":"string","minLength":0,"maxLength":4096},"chord":{"type":"string","minLength":0,"maxLength":4096},"perc":{"type":"string","minLength":0,"maxLength":4096},"chordShape":{"type":"array","items":{"type":"array","items":{"type":"integer","minimum":-127,"maximum":127},"minItems":1,"maxItems":32},"minItems":1,"maxItems":256}},"required":["bass","lead","chord","perc","chordShape"],"additionalProperties":false},"minItems":1,"maxItems":64},"order":{"type":"array","items":{"type":"integer","minimum":0,"maximum":63},"minItems":1,"maxItems":256},"gain":{"type":"number","minimum":0,"maximum":1},"chip":{"type":"string","enum":["2a03","dmg","md","snes","c64"]},"intent":{"type":"object","properties":{"lead":{"type":"string","enum":["soft","bright","round"]},"chord":{"type":"string","enum":["plucked","held"]},"bass":{"type":"string","enum":["round","hollow","bright"]},"perc":{"type":"string","enum":["tight","soft"]}},"required":[],"additionalProperties":false}},"required":["bpm","patterns","order"],"additionalProperties":false}},"required":["kind","score"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["performance"]},"performance":{"type":"object","properties":{"version":{"enum":[1]},"title":{"type":"string","minLength":0,"maxLength":240},"ticksPerBeat":{"type":"integer","minimum":1,"maximum":9007199254740991},"endTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"loopStartTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"tempos":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"microsecondsPerBeat":{"type":"integer","minimum":1,"maximum":16777215}},"required":["tick","microsecondsPerBeat"],"additionalProperties":false},"minItems":1,"maxItems":100000},"parts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"name":{"type":"string","minLength":0,"maxLength":240},"role":{"type":"string","enum":["lead","chord","bass","perc"]},"priority":{"type":"number","minimum":-100000,"maximum":100000},"program":{"type":"integer","minimum":0,"maximum":127},"muted":{"type":"boolean"},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"endTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"pitch":{"type":"number","minimum":0,"maximum":127},"velocity":{"type":"integer","minimum":1,"maximum":127},"program":{"type":"integer","minimum":0,"maximum":127},"drum":{"type":"integer","minimum":0,"maximum":127},"expression":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"pitch":{"type":"number","minimum":-96,"maximum":96},"gain":{"type":"number","minimum":0,"maximum":1},"duty":{"type":"integer","minimum":0,"maximum":3},"noisePeriod":{"type":"integer","minimum":0,"maximum":15}},"required":["tick"],"additionalProperties":false},"minItems":0,"maxItems":200000}},"required":["id","tick","endTick","pitch","velocity"],"additionalProperties":false},"minItems":0,"maxItems":100000},"origin":{"type":"object","properties":{"chip":{"type":"string","minLength":0,"maxLength":64},"voice":{"type":"string","minLength":0,"maxLength":64}},"required":["chip","voice"],"additionalProperties":false},"mix":{"type":"object","properties":{"gainDb":{"type":"number","minimum":-96,"maximum":12},"importance":{"type":"number","minimum":0,"maximum":1}},"required":[],"additionalProperties":false},"roleInference":{"type":"object","properties":{"confidence":{"type":"string","enum":["high","medium","low"]},"reason":{"type":"string","enum":["channel","name","program","polyphony","register","monophony","override"]}},"required":["confidence","reason"],"additionalProperties":false},"instruments":{"type":"object","additionalProperties":{"type":"object","properties":{"volume":{"type":"array","items":{"type":"number","minimum":0,"maximum":15},"minItems":1,"maxItems":4096},"duty":{"oneOf":[{"type":"integer","minimum":0,"maximum":3},{"type":"array","items":{"type":"integer","minimum":0,"maximum":3},"minItems":1,"maxItems":4096}]},"arp":{"type":"array","items":{"type":"number","minimum":-127,"maximum":127},"minItems":0,"maxItems":4096},"pitch":{"type":"array","items":{"type":"number","minimum":-65535,"maximum":65535},"minItems":0,"maxItems":4096},"slide":{"type":"number","minimum":-96,"maximum":96},"sustain":{"type":"boolean"},"arpLoop":{"type":"boolean"},"noiseMode":{"type":"boolean"},"vibrato":{"type":"object","properties":{"depth":{"type":"number","minimum":0,"maximum":96},"rate":{"type":"number","minimum":0.001,"maximum":100000},"delay":{"type":"number","minimum":0,"maximum":100000}},"required":["depth","rate"],"additionalProperties":false},"waveform":{"oneOf":[{"type":"string","enum":["pulse","triangle","sawtooth","noise"]},{"type":"array","items":{"type":"string","enum":["pulse","triangle","sawtooth","noise"]},"minItems":1,"maxItems":4096}]},"wave":{"type":"array","items":{"type":"integer","minimum":0,"maximum":15},"minItems":32,"maxItems":32},"fm":{"type":"object","properties":{"algorithm":{"type":"integer","minimum":0,"maximum":7},"feedback":{"type":"integer","minimum":0,"maximum":7},"ops":{"type":"array","items":{"type":"object","properties":{"dt":{"type":"integer","minimum":0,"maximum":7},"mul":{"type":"integer","minimum":0,"maximum":15},"tl":{"type":"integer","minimum":0,"maximum":127},"ks":{"type":"integer","minimum":0,"maximum":3},"ar":{"type":"integer","minimum":0,"maximum":31},"dr":{"type":"integer","minimum":0,"maximum":31},"sr":{"type":"integer","minimum":0,"maximum":31},"sl":{"type":"integer","minimum":0,"maximum":15},"rr":{"type":"integer","minimum":0,"maximum":15},"am":{"type":"boolean"}},"required":["dt","mul","tl","ks","ar","dr","sr","sl","rr"],"additionalProperties":false},"minItems":4,"maxItems":4},"ams":{"type":"integer","minimum":0,"maximum":3},"pms":{"type":"integer","minimum":0,"maximum":7}},"required":["algorithm","feedback","ops"],"additionalProperties":false},"sample":{"type":"string","minLength":1,"maxLength":80}},"required":["volume"],"additionalProperties":false}},"portableTimbres":{"type":"object","additionalProperties":{"type":"object","properties":{"sourceSignature":{"type":"string","minLength":1,"maxLength":8192},"pitchOffset":{"type":"number","minimum":-48,"maximum":48},"program":{"type":"integer","minimum":0,"maximum":127},"envelope":{"type":"array","items":{"type":"number","minimum":0,"maximum":1},"minItems":1,"maxItems":120},"rms":{"type":"number","minimum":0,"maximum":100},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["sourceSignature","pitchOffset","program","envelope","rms","confidence"],"additionalProperties":false}}},"required":["id","name","role","priority","notes"],"additionalProperties":false},"minItems":0,"maxItems":256},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["midi","native"]},"name":{"type":"string","minLength":0,"maxLength":240},"sha256":{"type":"string","minLength":0,"maxLength":64},"url":{"type":"string","minLength":0,"maxLength":2048},"description":{"type":"string","minLength":0,"maxLength":4096}},"required":["kind","name"],"additionalProperties":false},"notices":{"type":"array","items":{"type":"string","minLength":0,"maxLength":4096},"minItems":0,"maxItems":1024},"midi":{"type":"object","properties":{"format":{"type":"integer","minimum":0,"maximum":1},"events":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"track":{"type":"integer","minimum":0,"maximum":65535},"order":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"integer","minimum":0,"maximum":255},"data":{"type":"array","items":{"type":"integer","minimum":0,"maximum":255},"minItems":0,"maxItems":65536}},"required":["tick","track","order","status","data"],"additionalProperties":false},"minItems":0,"maxItems":200000}},"required":["format","events"],"additionalProperties":false}},"required":["version","title","ticksPerBeat","endTick","tempos","parts","notices"],"additionalProperties":false}},"required":["kind","performance"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["native"]},"plan":{"type":"object","properties":{"chip":{"type":"string","enum":["2a03","dmg","md","snes","c64"]},"musicStartCycle":{"type":"integer","minimum":0,"maximum":9007199254740991},"seconds":{"type":"number","minimum":0.000001,"maximum":600},"loopStartSeconds":{"type":"number","minimum":0,"maximum":600},"events":{"type":"array","items":{"type":"object","properties":{"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"addr":{"type":"integer","minimum":0,"maximum":16777215},"value":{"type":"integer","minimum":0,"maximum":255}},"required":["at","addr","value"],"additionalProperties":false},"minItems":0,"maxItems":2000000},"memory":{"type":"array","items":{"type":"object","properties":{"address":{"type":"integer","minimum":0,"maximum":16777215},"bytes":{"type":"array","items":{"type":"integer","minimum":0,"maximum":255},"minItems":0,"maxItems":8388608}},"required":["address","bytes"],"additionalProperties":false},"minItems":0,"maxItems":256},"notes":{"type":"array","items":{"type":"object","properties":{"part":{"type":"string","minLength":0,"maxLength":120},"id":{"type":"string","minLength":0,"maxLength":120},"voice":{"type":"string","minLength":0,"maxLength":120},"pitch":{"type":"number","minimum":0,"maximum":127},"at":{"type":"number","minimum":0,"maximum":600},"until":{"type":"number","minimum":0,"maximum":600}},"required":["part","id","voice","pitch","at","until"],"additionalProperties":false},"minItems":0,"maxItems":100000},"losses":{"type":"array","items":{"type":"object","properties":{"part":{"type":"string","minLength":0,"maxLength":120},"note":{"type":"string","minLength":0,"maxLength":120},"kind":{"type":"string","minLength":0,"maxLength":120},"detail":{"type":"string","minLength":0,"maxLength":4096}},"required":["part","kind","detail"],"additionalProperties":false},"minItems":0,"maxItems":200000},"silentNotes":{"type":"array","items":{"type":"object","properties":{"part":{"type":"string","minLength":0,"maxLength":120},"id":{"type":"string","minLength":0,"maxLength":120}},"required":["part","id"],"additionalProperties":false},"minItems":0,"maxItems":100000},"mix":{"type":"object","properties":{"version":{"enum":[1]},"calibratedNotes":{"type":"integer","minimum":0,"maximum":9007199254740991},"fallbackNotes":{"type":"integer","minimum":0,"maximum":9007199254740991},"diagnostics":{"type":"array","items":{"type":"object","properties":{"part":{"type":"string","minLength":0,"maxLength":120},"kind":{"type":"string","minLength":0,"maxLength":120},"detail":{"type":"string","minLength":0,"maxLength":4096}},"required":["part","kind","detail"],"additionalProperties":false},"minItems":0,"maxItems":200000}},"required":["version","calibratedNotes","fallbackNotes","diagnostics"],"additionalProperties":false}},"required":["chip","seconds","loopStartSeconds","events","memory","notes","losses"],"additionalProperties":false},"performance":{"type":"object","properties":{"version":{"enum":[1]},"title":{"type":"string","minLength":0,"maxLength":240},"ticksPerBeat":{"type":"integer","minimum":1,"maximum":9007199254740991},"endTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"loopStartTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"tempos":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"microsecondsPerBeat":{"type":"integer","minimum":1,"maximum":16777215}},"required":["tick","microsecondsPerBeat"],"additionalProperties":false},"minItems":1,"maxItems":100000},"parts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"name":{"type":"string","minLength":0,"maxLength":240},"role":{"type":"string","enum":["lead","chord","bass","perc"]},"priority":{"type":"number","minimum":-100000,"maximum":100000},"program":{"type":"integer","minimum":0,"maximum":127},"muted":{"type":"boolean"},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"endTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"pitch":{"type":"number","minimum":0,"maximum":127},"velocity":{"type":"integer","minimum":1,"maximum":127},"program":{"type":"integer","minimum":0,"maximum":127},"drum":{"type":"integer","minimum":0,"maximum":127},"expression":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"pitch":{"type":"number","minimum":-96,"maximum":96},"gain":{"type":"number","minimum":0,"maximum":1},"duty":{"type":"integer","minimum":0,"maximum":3},"noisePeriod":{"type":"integer","minimum":0,"maximum":15}},"required":["tick"],"additionalProperties":false},"minItems":0,"maxItems":200000}},"required":["id","tick","endTick","pitch","velocity"],"additionalProperties":false},"minItems":0,"maxItems":100000},"origin":{"type":"object","properties":{"chip":{"type":"string","minLength":0,"maxLength":64},"voice":{"type":"string","minLength":0,"maxLength":64}},"required":["chip","voice"],"additionalProperties":false},"mix":{"type":"object","properties":{"gainDb":{"type":"number","minimum":-96,"maximum":12},"importance":{"type":"number","minimum":0,"maximum":1}},"required":[],"additionalProperties":false},"roleInference":{"type":"object","properties":{"confidence":{"type":"string","enum":["high","medium","low"]},"reason":{"type":"string","enum":["channel","name","program","polyphony","register","monophony","override"]}},"required":["confidence","reason"],"additionalProperties":false},"instruments":{"type":"object","additionalProperties":{"type":"object","properties":{"volume":{"type":"array","items":{"type":"number","minimum":0,"maximum":15},"minItems":1,"maxItems":4096},"duty":{"oneOf":[{"type":"integer","minimum":0,"maximum":3},{"type":"array","items":{"type":"integer","minimum":0,"maximum":3},"minItems":1,"maxItems":4096}]},"arp":{"type":"array","items":{"type":"number","minimum":-127,"maximum":127},"minItems":0,"maxItems":4096},"pitch":{"type":"array","items":{"type":"number","minimum":-65535,"maximum":65535},"minItems":0,"maxItems":4096},"slide":{"type":"number","minimum":-96,"maximum":96},"sustain":{"type":"boolean"},"arpLoop":{"type":"boolean"},"noiseMode":{"type":"boolean"},"vibrato":{"type":"object","properties":{"depth":{"type":"number","minimum":0,"maximum":96},"rate":{"type":"number","minimum":0.001,"maximum":100000},"delay":{"type":"number","minimum":0,"maximum":100000}},"required":["depth","rate"],"additionalProperties":false},"waveform":{"oneOf":[{"type":"string","enum":["pulse","triangle","sawtooth","noise"]},{"type":"array","items":{"type":"string","enum":["pulse","triangle","sawtooth","noise"]},"minItems":1,"maxItems":4096}]},"wave":{"type":"array","items":{"type":"integer","minimum":0,"maximum":15},"minItems":32,"maxItems":32},"fm":{"type":"object","properties":{"algorithm":{"type":"integer","minimum":0,"maximum":7},"feedback":{"type":"integer","minimum":0,"maximum":7},"ops":{"type":"array","items":{"type":"object","properties":{"dt":{"type":"integer","minimum":0,"maximum":7},"mul":{"type":"integer","minimum":0,"maximum":15},"tl":{"type":"integer","minimum":0,"maximum":127},"ks":{"type":"integer","minimum":0,"maximum":3},"ar":{"type":"integer","minimum":0,"maximum":31},"dr":{"type":"integer","minimum":0,"maximum":31},"sr":{"type":"integer","minimum":0,"maximum":31},"sl":{"type":"integer","minimum":0,"maximum":15},"rr":{"type":"integer","minimum":0,"maximum":15},"am":{"type":"boolean"}},"required":["dt","mul","tl","ks","ar","dr","sr","sl","rr"],"additionalProperties":false},"minItems":4,"maxItems":4},"ams":{"type":"integer","minimum":0,"maximum":3},"pms":{"type":"integer","minimum":0,"maximum":7}},"required":["algorithm","feedback","ops"],"additionalProperties":false},"sample":{"type":"string","minLength":1,"maxLength":80}},"required":["volume"],"additionalProperties":false}},"portableTimbres":{"type":"object","additionalProperties":{"type":"object","properties":{"sourceSignature":{"type":"string","minLength":1,"maxLength":8192},"pitchOffset":{"type":"number","minimum":-48,"maximum":48},"program":{"type":"integer","minimum":0,"maximum":127},"envelope":{"type":"array","items":{"type":"number","minimum":0,"maximum":1},"minItems":1,"maxItems":120},"rms":{"type":"number","minimum":0,"maximum":100},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["sourceSignature","pitchOffset","program","envelope","rms","confidence"],"additionalProperties":false}}},"required":["id","name","role","priority","notes"],"additionalProperties":false},"minItems":0,"maxItems":256},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["midi","native"]},"name":{"type":"string","minLength":0,"maxLength":240},"sha256":{"type":"string","minLength":0,"maxLength":64},"url":{"type":"string","minLength":0,"maxLength":2048},"description":{"type":"string","minLength":0,"maxLength":4096}},"required":["kind","name"],"additionalProperties":false},"notices":{"type":"array","items":{"type":"string","minLength":0,"maxLength":4096},"minItems":0,"maxItems":1024},"midi":{"type":"object","properties":{"format":{"type":"integer","minimum":0,"maximum":1},"events":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"track":{"type":"integer","minimum":0,"maximum":65535},"order":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"integer","minimum":0,"maximum":255},"data":{"type":"array","items":{"type":"integer","minimum":0,"maximum":255},"minItems":0,"maxItems":65536}},"required":["tick","track","order","status","data"],"additionalProperties":false},"minItems":0,"maxItems":200000}},"required":["format","events"],"additionalProperties":false}},"required":["version","title","ticksPerBeat","endTick","tempos","parts","notices"],"additionalProperties":false}},"required":["kind","plan","performance"],"additionalProperties":false}]},"settings":{"type":"object","properties":{"chip":{"type":"string","enum":["2a03","dmg","md","snes","c64"]},"tempoScale":{"type":"number","minimum":0.1,"maximum":10},"transpose":{"type":"number","minimum":-48,"maximum":48},"gain":{"type":"number","minimum":0,"maximum":1},"mix":{"type":"string","enum":["auto","authored"]},"allowLoss":{"type":"boolean"}},"required":["chip"],"additionalProperties":false},"generator":{"type":"object","properties":{"language":{"type":"string","enum":["javascript"]},"code":{"type":"string","minLength":1,"maxLength":64000},"seed":{"type":"integer","minimum":0,"maximum":4294967295}},"required":["language","code","seed"],"additionalProperties":false}},"required":["version","title","source","settings"],"additionalProperties":false},"visibility":{"enum":["public","unlisted","private"]},"contentHash":{"type":"string"},"profile":{"type":"object","properties":{"id":{"type":"string"},"handle":{"type":["string","null"]},"displayName":{"type":"string"},"bio":{"type":"string"}}}},"additionalProperties":true}}}},"400":{"description":"Malformed request or cursor"},"401":{"description":"Sign in required"},"404":{"description":"Not found or inaccessible"},"409":{"description":"Conflicting request key, handle or audio state"},"413":{"description":"Body exceeds 4 MB"},"422":{"description":"Invalid data; issues include path/code/message/level"},"429":{"description":"Shared account rate limit; Retry-After"},"503":{"description":"Publication service unavailable"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]},"delete":{"operationId":"withdrawProject","summary":"Withdraw your publication","tags":["projects"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["ok"],"properties":{"ok":{"const":true}}}}}},"400":{"description":"Malformed request or cursor"},"401":{"description":"Sign in required"},"404":{"description":"Not found or inaccessible"},"409":{"description":"Conflicting request key, handle or audio state"},"413":{"description":"Body exceeds 4 MB"},"422":{"description":"Invalid data; issues include path/code/message/level"},"429":{"description":"Shared account rate limit; Retry-After"},"503":{"description":"Publication service unavailable"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]},{"browserSession":[]}]}},"/api/v1/projects/{id}/favourite":{"put":{"operationId":"favouriteProject","summary":"Save a public song by another author","tags":["projects"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","parentId","rootId","title","chip","tags","visibility","createdAt","contentHash","profile","favourites","favourited","owned"],"properties":{"id":{"type":"string"},"title":{"type":"string"},"chip":{"enum":["2a03","dmg","md","snes","c64"]},"tags":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"integer","description":"Unix milliseconds"},"favourites":{"type":"integer"},"favourited":{"type":"boolean"},"owned":{"type":"boolean"},"renditions":{"type":"array","items":{"type":"object","required":["id","kind","status","engine"],"properties":{"id":{"type":"string"},"kind":{"enum":["preview","full"]},"status":{"type":"string"},"engine":{"type":"string"}}}},"parentId":{"type":["string","null"]},"rootId":{"type":"string"},"project":{"type":"object","properties":{"version":{"enum":[1]},"title":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","minLength":0,"maxLength":2000},"author":{"type":"string","minLength":0,"maxLength":80},"licence":{"enum":["reserved","CC0-1.0","CC-BY-4.0"]},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":24},"minItems":0,"maxItems":8},"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["score"]},"score":{"type":"object","properties":{"id":{"type":"string","minLength":0,"maxLength":120},"bpm":{"type":"number","minimum":40,"maximum":300},"stepsPerBeat":{"enum":[4,12]},"patterns":{"type":"array","items":{"type":"object","properties":{"bass":{"type":"string","minLength":0,"maxLength":4096},"lead":{"type":"string","minLength":0,"maxLength":4096},"chord":{"type":"string","minLength":0,"maxLength":4096},"perc":{"type":"string","minLength":0,"maxLength":4096},"chordShape":{"type":"array","items":{"type":"array","items":{"type":"integer","minimum":-127,"maximum":127},"minItems":1,"maxItems":32},"minItems":1,"maxItems":256}},"required":["bass","lead","chord","perc","chordShape"],"additionalProperties":false},"minItems":1,"maxItems":64},"order":{"type":"array","items":{"type":"integer","minimum":0,"maximum":63},"minItems":1,"maxItems":256},"gain":{"type":"number","minimum":0,"maximum":1},"chip":{"type":"string","enum":["2a03","dmg","md","snes","c64"]},"intent":{"type":"object","properties":{"lead":{"type":"string","enum":["soft","bright","round"]},"chord":{"type":"string","enum":["plucked","held"]},"bass":{"type":"string","enum":["round","hollow","bright"]},"perc":{"type":"string","enum":["tight","soft"]}},"required":[],"additionalProperties":false}},"required":["bpm","patterns","order"],"additionalProperties":false}},"required":["kind","score"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["performance"]},"performance":{"type":"object","properties":{"version":{"enum":[1]},"title":{"type":"string","minLength":0,"maxLength":240},"ticksPerBeat":{"type":"integer","minimum":1,"maximum":9007199254740991},"endTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"loopStartTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"tempos":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"microsecondsPerBeat":{"type":"integer","minimum":1,"maximum":16777215}},"required":["tick","microsecondsPerBeat"],"additionalProperties":false},"minItems":1,"maxItems":100000},"parts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"name":{"type":"string","minLength":0,"maxLength":240},"role":{"type":"string","enum":["lead","chord","bass","perc"]},"priority":{"type":"number","minimum":-100000,"maximum":100000},"program":{"type":"integer","minimum":0,"maximum":127},"muted":{"type":"boolean"},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"endTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"pitch":{"type":"number","minimum":0,"maximum":127},"velocity":{"type":"integer","minimum":1,"maximum":127},"program":{"type":"integer","minimum":0,"maximum":127},"drum":{"type":"integer","minimum":0,"maximum":127},"expression":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"pitch":{"type":"number","minimum":-96,"maximum":96},"gain":{"type":"number","minimum":0,"maximum":1},"duty":{"type":"integer","minimum":0,"maximum":3},"noisePeriod":{"type":"integer","minimum":0,"maximum":15}},"required":["tick"],"additionalProperties":false},"minItems":0,"maxItems":200000}},"required":["id","tick","endTick","pitch","velocity"],"additionalProperties":false},"minItems":0,"maxItems":100000},"origin":{"type":"object","properties":{"chip":{"type":"string","minLength":0,"maxLength":64},"voice":{"type":"string","minLength":0,"maxLength":64}},"required":["chip","voice"],"additionalProperties":false},"mix":{"type":"object","properties":{"gainDb":{"type":"number","minimum":-96,"maximum":12},"importance":{"type":"number","minimum":0,"maximum":1}},"required":[],"additionalProperties":false},"roleInference":{"type":"object","properties":{"confidence":{"type":"string","enum":["high","medium","low"]},"reason":{"type":"string","enum":["channel","name","program","polyphony","register","monophony","override"]}},"required":["confidence","reason"],"additionalProperties":false},"instruments":{"type":"object","additionalProperties":{"type":"object","properties":{"volume":{"type":"array","items":{"type":"number","minimum":0,"maximum":15},"minItems":1,"maxItems":4096},"duty":{"oneOf":[{"type":"integer","minimum":0,"maximum":3},{"type":"array","items":{"type":"integer","minimum":0,"maximum":3},"minItems":1,"maxItems":4096}]},"arp":{"type":"array","items":{"type":"number","minimum":-127,"maximum":127},"minItems":0,"maxItems":4096},"pitch":{"type":"array","items":{"type":"number","minimum":-65535,"maximum":65535},"minItems":0,"maxItems":4096},"slide":{"type":"number","minimum":-96,"maximum":96},"sustain":{"type":"boolean"},"arpLoop":{"type":"boolean"},"noiseMode":{"type":"boolean"},"vibrato":{"type":"object","properties":{"depth":{"type":"number","minimum":0,"maximum":96},"rate":{"type":"number","minimum":0.001,"maximum":100000},"delay":{"type":"number","minimum":0,"maximum":100000}},"required":["depth","rate"],"additionalProperties":false},"waveform":{"oneOf":[{"type":"string","enum":["pulse","triangle","sawtooth","noise"]},{"type":"array","items":{"type":"string","enum":["pulse","triangle","sawtooth","noise"]},"minItems":1,"maxItems":4096}]},"wave":{"type":"array","items":{"type":"integer","minimum":0,"maximum":15},"minItems":32,"maxItems":32},"fm":{"type":"object","properties":{"algorithm":{"type":"integer","minimum":0,"maximum":7},"feedback":{"type":"integer","minimum":0,"maximum":7},"ops":{"type":"array","items":{"type":"object","properties":{"dt":{"type":"integer","minimum":0,"maximum":7},"mul":{"type":"integer","minimum":0,"maximum":15},"tl":{"type":"integer","minimum":0,"maximum":127},"ks":{"type":"integer","minimum":0,"maximum":3},"ar":{"type":"integer","minimum":0,"maximum":31},"dr":{"type":"integer","minimum":0,"maximum":31},"sr":{"type":"integer","minimum":0,"maximum":31},"sl":{"type":"integer","minimum":0,"maximum":15},"rr":{"type":"integer","minimum":0,"maximum":15},"am":{"type":"boolean"}},"required":["dt","mul","tl","ks","ar","dr","sr","sl","rr"],"additionalProperties":false},"minItems":4,"maxItems":4},"ams":{"type":"integer","minimum":0,"maximum":3},"pms":{"type":"integer","minimum":0,"maximum":7}},"required":["algorithm","feedback","ops"],"additionalProperties":false},"sample":{"type":"string","minLength":1,"maxLength":80}},"required":["volume"],"additionalProperties":false}},"portableTimbres":{"type":"object","additionalProperties":{"type":"object","properties":{"sourceSignature":{"type":"string","minLength":1,"maxLength":8192},"pitchOffset":{"type":"number","minimum":-48,"maximum":48},"program":{"type":"integer","minimum":0,"maximum":127},"envelope":{"type":"array","items":{"type":"number","minimum":0,"maximum":1},"minItems":1,"maxItems":120},"rms":{"type":"number","minimum":0,"maximum":100},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["sourceSignature","pitchOffset","program","envelope","rms","confidence"],"additionalProperties":false}}},"required":["id","name","role","priority","notes"],"additionalProperties":false},"minItems":0,"maxItems":256},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["midi","native"]},"name":{"type":"string","minLength":0,"maxLength":240},"sha256":{"type":"string","minLength":0,"maxLength":64},"url":{"type":"string","minLength":0,"maxLength":2048},"description":{"type":"string","minLength":0,"maxLength":4096}},"required":["kind","name"],"additionalProperties":false},"notices":{"type":"array","items":{"type":"string","minLength":0,"maxLength":4096},"minItems":0,"maxItems":1024},"midi":{"type":"object","properties":{"format":{"type":"integer","minimum":0,"maximum":1},"events":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"track":{"type":"integer","minimum":0,"maximum":65535},"order":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"integer","minimum":0,"maximum":255},"data":{"type":"array","items":{"type":"integer","minimum":0,"maximum":255},"minItems":0,"maxItems":65536}},"required":["tick","track","order","status","data"],"additionalProperties":false},"minItems":0,"maxItems":200000}},"required":["format","events"],"additionalProperties":false}},"required":["version","title","ticksPerBeat","endTick","tempos","parts","notices"],"additionalProperties":false}},"required":["kind","performance"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["native"]},"plan":{"type":"object","properties":{"chip":{"type":"string","enum":["2a03","dmg","md","snes","c64"]},"musicStartCycle":{"type":"integer","minimum":0,"maximum":9007199254740991},"seconds":{"type":"number","minimum":0.000001,"maximum":600},"loopStartSeconds":{"type":"number","minimum":0,"maximum":600},"events":{"type":"array","items":{"type":"object","properties":{"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"addr":{"type":"integer","minimum":0,"maximum":16777215},"value":{"type":"integer","minimum":0,"maximum":255}},"required":["at","addr","value"],"additionalProperties":false},"minItems":0,"maxItems":2000000},"memory":{"type":"array","items":{"type":"object","properties":{"address":{"type":"integer","minimum":0,"maximum":16777215},"bytes":{"type":"array","items":{"type":"integer","minimum":0,"maximum":255},"minItems":0,"maxItems":8388608}},"required":["address","bytes"],"additionalProperties":false},"minItems":0,"maxItems":256},"notes":{"type":"array","items":{"type":"object","properties":{"part":{"type":"string","minLength":0,"maxLength":120},"id":{"type":"string","minLength":0,"maxLength":120},"voice":{"type":"string","minLength":0,"maxLength":120},"pitch":{"type":"number","minimum":0,"maximum":127},"at":{"type":"number","minimum":0,"maximum":600},"until":{"type":"number","minimum":0,"maximum":600}},"required":["part","id","voice","pitch","at","until"],"additionalProperties":false},"minItems":0,"maxItems":100000},"losses":{"type":"array","items":{"type":"object","properties":{"part":{"type":"string","minLength":0,"maxLength":120},"note":{"type":"string","minLength":0,"maxLength":120},"kind":{"type":"string","minLength":0,"maxLength":120},"detail":{"type":"string","minLength":0,"maxLength":4096}},"required":["part","kind","detail"],"additionalProperties":false},"minItems":0,"maxItems":200000},"silentNotes":{"type":"array","items":{"type":"object","properties":{"part":{"type":"string","minLength":0,"maxLength":120},"id":{"type":"string","minLength":0,"maxLength":120}},"required":["part","id"],"additionalProperties":false},"minItems":0,"maxItems":100000},"mix":{"type":"object","properties":{"version":{"enum":[1]},"calibratedNotes":{"type":"integer","minimum":0,"maximum":9007199254740991},"fallbackNotes":{"type":"integer","minimum":0,"maximum":9007199254740991},"diagnostics":{"type":"array","items":{"type":"object","properties":{"part":{"type":"string","minLength":0,"maxLength":120},"kind":{"type":"string","minLength":0,"maxLength":120},"detail":{"type":"string","minLength":0,"maxLength":4096}},"required":["part","kind","detail"],"additionalProperties":false},"minItems":0,"maxItems":200000}},"required":["version","calibratedNotes","fallbackNotes","diagnostics"],"additionalProperties":false}},"required":["chip","seconds","loopStartSeconds","events","memory","notes","losses"],"additionalProperties":false},"performance":{"type":"object","properties":{"version":{"enum":[1]},"title":{"type":"string","minLength":0,"maxLength":240},"ticksPerBeat":{"type":"integer","minimum":1,"maximum":9007199254740991},"endTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"loopStartTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"tempos":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"microsecondsPerBeat":{"type":"integer","minimum":1,"maximum":16777215}},"required":["tick","microsecondsPerBeat"],"additionalProperties":false},"minItems":1,"maxItems":100000},"parts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"name":{"type":"string","minLength":0,"maxLength":240},"role":{"type":"string","enum":["lead","chord","bass","perc"]},"priority":{"type":"number","minimum":-100000,"maximum":100000},"program":{"type":"integer","minimum":0,"maximum":127},"muted":{"type":"boolean"},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"endTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"pitch":{"type":"number","minimum":0,"maximum":127},"velocity":{"type":"integer","minimum":1,"maximum":127},"program":{"type":"integer","minimum":0,"maximum":127},"drum":{"type":"integer","minimum":0,"maximum":127},"expression":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"pitch":{"type":"number","minimum":-96,"maximum":96},"gain":{"type":"number","minimum":0,"maximum":1},"duty":{"type":"integer","minimum":0,"maximum":3},"noisePeriod":{"type":"integer","minimum":0,"maximum":15}},"required":["tick"],"additionalProperties":false},"minItems":0,"maxItems":200000}},"required":["id","tick","endTick","pitch","velocity"],"additionalProperties":false},"minItems":0,"maxItems":100000},"origin":{"type":"object","properties":{"chip":{"type":"string","minLength":0,"maxLength":64},"voice":{"type":"string","minLength":0,"maxLength":64}},"required":["chip","voice"],"additionalProperties":false},"mix":{"type":"object","properties":{"gainDb":{"type":"number","minimum":-96,"maximum":12},"importance":{"type":"number","minimum":0,"maximum":1}},"required":[],"additionalProperties":false},"roleInference":{"type":"object","properties":{"confidence":{"type":"string","enum":["high","medium","low"]},"reason":{"type":"string","enum":["channel","name","program","polyphony","register","monophony","override"]}},"required":["confidence","reason"],"additionalProperties":false},"instruments":{"type":"object","additionalProperties":{"type":"object","properties":{"volume":{"type":"array","items":{"type":"number","minimum":0,"maximum":15},"minItems":1,"maxItems":4096},"duty":{"oneOf":[{"type":"integer","minimum":0,"maximum":3},{"type":"array","items":{"type":"integer","minimum":0,"maximum":3},"minItems":1,"maxItems":4096}]},"arp":{"type":"array","items":{"type":"number","minimum":-127,"maximum":127},"minItems":0,"maxItems":4096},"pitch":{"type":"array","items":{"type":"number","minimum":-65535,"maximum":65535},"minItems":0,"maxItems":4096},"slide":{"type":"number","minimum":-96,"maximum":96},"sustain":{"type":"boolean"},"arpLoop":{"type":"boolean"},"noiseMode":{"type":"boolean"},"vibrato":{"type":"object","properties":{"depth":{"type":"number","minimum":0,"maximum":96},"rate":{"type":"number","minimum":0.001,"maximum":100000},"delay":{"type":"number","minimum":0,"maximum":100000}},"required":["depth","rate"],"additionalProperties":false},"waveform":{"oneOf":[{"type":"string","enum":["pulse","triangle","sawtooth","noise"]},{"type":"array","items":{"type":"string","enum":["pulse","triangle","sawtooth","noise"]},"minItems":1,"maxItems":4096}]},"wave":{"type":"array","items":{"type":"integer","minimum":0,"maximum":15},"minItems":32,"maxItems":32},"fm":{"type":"object","properties":{"algorithm":{"type":"integer","minimum":0,"maximum":7},"feedback":{"type":"integer","minimum":0,"maximum":7},"ops":{"type":"array","items":{"type":"object","properties":{"dt":{"type":"integer","minimum":0,"maximum":7},"mul":{"type":"integer","minimum":0,"maximum":15},"tl":{"type":"integer","minimum":0,"maximum":127},"ks":{"type":"integer","minimum":0,"maximum":3},"ar":{"type":"integer","minimum":0,"maximum":31},"dr":{"type":"integer","minimum":0,"maximum":31},"sr":{"type":"integer","minimum":0,"maximum":31},"sl":{"type":"integer","minimum":0,"maximum":15},"rr":{"type":"integer","minimum":0,"maximum":15},"am":{"type":"boolean"}},"required":["dt","mul","tl","ks","ar","dr","sr","sl","rr"],"additionalProperties":false},"minItems":4,"maxItems":4},"ams":{"type":"integer","minimum":0,"maximum":3},"pms":{"type":"integer","minimum":0,"maximum":7}},"required":["algorithm","feedback","ops"],"additionalProperties":false},"sample":{"type":"string","minLength":1,"maxLength":80}},"required":["volume"],"additionalProperties":false}},"portableTimbres":{"type":"object","additionalProperties":{"type":"object","properties":{"sourceSignature":{"type":"string","minLength":1,"maxLength":8192},"pitchOffset":{"type":"number","minimum":-48,"maximum":48},"program":{"type":"integer","minimum":0,"maximum":127},"envelope":{"type":"array","items":{"type":"number","minimum":0,"maximum":1},"minItems":1,"maxItems":120},"rms":{"type":"number","minimum":0,"maximum":100},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["sourceSignature","pitchOffset","program","envelope","rms","confidence"],"additionalProperties":false}}},"required":["id","name","role","priority","notes"],"additionalProperties":false},"minItems":0,"maxItems":256},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["midi","native"]},"name":{"type":"string","minLength":0,"maxLength":240},"sha256":{"type":"string","minLength":0,"maxLength":64},"url":{"type":"string","minLength":0,"maxLength":2048},"description":{"type":"string","minLength":0,"maxLength":4096}},"required":["kind","name"],"additionalProperties":false},"notices":{"type":"array","items":{"type":"string","minLength":0,"maxLength":4096},"minItems":0,"maxItems":1024},"midi":{"type":"object","properties":{"format":{"type":"integer","minimum":0,"maximum":1},"events":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"track":{"type":"integer","minimum":0,"maximum":65535},"order":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"integer","minimum":0,"maximum":255},"data":{"type":"array","items":{"type":"integer","minimum":0,"maximum":255},"minItems":0,"maxItems":65536}},"required":["tick","track","order","status","data"],"additionalProperties":false},"minItems":0,"maxItems":200000}},"required":["format","events"],"additionalProperties":false}},"required":["version","title","ticksPerBeat","endTick","tempos","parts","notices"],"additionalProperties":false}},"required":["kind","plan","performance"],"additionalProperties":false}]},"settings":{"type":"object","properties":{"chip":{"type":"string","enum":["2a03","dmg","md","snes","c64"]},"tempoScale":{"type":"number","minimum":0.1,"maximum":10},"transpose":{"type":"number","minimum":-48,"maximum":48},"gain":{"type":"number","minimum":0,"maximum":1},"mix":{"type":"string","enum":["auto","authored"]},"allowLoss":{"type":"boolean"}},"required":["chip"],"additionalProperties":false},"generator":{"type":"object","properties":{"language":{"type":"string","enum":["javascript"]},"code":{"type":"string","minLength":1,"maxLength":64000},"seed":{"type":"integer","minimum":0,"maximum":4294967295}},"required":["language","code","seed"],"additionalProperties":false}},"required":["version","title","source","settings"],"additionalProperties":false},"visibility":{"enum":["public","unlisted","private"]},"contentHash":{"type":"string"},"profile":{"type":"object","properties":{"id":{"type":"string"},"handle":{"type":["string","null"]},"displayName":{"type":"string"},"bio":{"type":"string"}}}},"additionalProperties":true}}}},"400":{"description":"Malformed request or cursor"},"401":{"description":"Sign in required"},"404":{"description":"Not found or inaccessible"},"409":{"description":"Conflicting request key, handle or audio state"},"413":{"description":"Body exceeds 4 MB"},"422":{"description":"Invalid data; issues include path/code/message/level"},"429":{"description":"Shared account rate limit; Retry-After"},"503":{"description":"Publication service unavailable"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]},{"browserSession":[]}]},"delete":{"operationId":"unfavouriteProject","summary":"Remove your favourite","tags":["projects"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","parentId","rootId","title","chip","tags","visibility","createdAt","contentHash","profile","favourites","favourited","owned"],"properties":{"id":{"type":"string"},"title":{"type":"string"},"chip":{"enum":["2a03","dmg","md","snes","c64"]},"tags":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"integer","description":"Unix milliseconds"},"favourites":{"type":"integer"},"favourited":{"type":"boolean"},"owned":{"type":"boolean"},"renditions":{"type":"array","items":{"type":"object","required":["id","kind","status","engine"],"properties":{"id":{"type":"string"},"kind":{"enum":["preview","full"]},"status":{"type":"string"},"engine":{"type":"string"}}}},"parentId":{"type":["string","null"]},"rootId":{"type":"string"},"project":{"type":"object","properties":{"version":{"enum":[1]},"title":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","minLength":0,"maxLength":2000},"author":{"type":"string","minLength":0,"maxLength":80},"licence":{"enum":["reserved","CC0-1.0","CC-BY-4.0"]},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":24},"minItems":0,"maxItems":8},"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["score"]},"score":{"type":"object","properties":{"id":{"type":"string","minLength":0,"maxLength":120},"bpm":{"type":"number","minimum":40,"maximum":300},"stepsPerBeat":{"enum":[4,12]},"patterns":{"type":"array","items":{"type":"object","properties":{"bass":{"type":"string","minLength":0,"maxLength":4096},"lead":{"type":"string","minLength":0,"maxLength":4096},"chord":{"type":"string","minLength":0,"maxLength":4096},"perc":{"type":"string","minLength":0,"maxLength":4096},"chordShape":{"type":"array","items":{"type":"array","items":{"type":"integer","minimum":-127,"maximum":127},"minItems":1,"maxItems":32},"minItems":1,"maxItems":256}},"required":["bass","lead","chord","perc","chordShape"],"additionalProperties":false},"minItems":1,"maxItems":64},"order":{"type":"array","items":{"type":"integer","minimum":0,"maximum":63},"minItems":1,"maxItems":256},"gain":{"type":"number","minimum":0,"maximum":1},"chip":{"type":"string","enum":["2a03","dmg","md","snes","c64"]},"intent":{"type":"object","properties":{"lead":{"type":"string","enum":["soft","bright","round"]},"chord":{"type":"string","enum":["plucked","held"]},"bass":{"type":"string","enum":["round","hollow","bright"]},"perc":{"type":"string","enum":["tight","soft"]}},"required":[],"additionalProperties":false}},"required":["bpm","patterns","order"],"additionalProperties":false}},"required":["kind","score"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["performance"]},"performance":{"type":"object","properties":{"version":{"enum":[1]},"title":{"type":"string","minLength":0,"maxLength":240},"ticksPerBeat":{"type":"integer","minimum":1,"maximum":9007199254740991},"endTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"loopStartTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"tempos":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"microsecondsPerBeat":{"type":"integer","minimum":1,"maximum":16777215}},"required":["tick","microsecondsPerBeat"],"additionalProperties":false},"minItems":1,"maxItems":100000},"parts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"name":{"type":"string","minLength":0,"maxLength":240},"role":{"type":"string","enum":["lead","chord","bass","perc"]},"priority":{"type":"number","minimum":-100000,"maximum":100000},"program":{"type":"integer","minimum":0,"maximum":127},"muted":{"type":"boolean"},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"endTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"pitch":{"type":"number","minimum":0,"maximum":127},"velocity":{"type":"integer","minimum":1,"maximum":127},"program":{"type":"integer","minimum":0,"maximum":127},"drum":{"type":"integer","minimum":0,"maximum":127},"expression":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"pitch":{"type":"number","minimum":-96,"maximum":96},"gain":{"type":"number","minimum":0,"maximum":1},"duty":{"type":"integer","minimum":0,"maximum":3},"noisePeriod":{"type":"integer","minimum":0,"maximum":15}},"required":["tick"],"additionalProperties":false},"minItems":0,"maxItems":200000}},"required":["id","tick","endTick","pitch","velocity"],"additionalProperties":false},"minItems":0,"maxItems":100000},"origin":{"type":"object","properties":{"chip":{"type":"string","minLength":0,"maxLength":64},"voice":{"type":"string","minLength":0,"maxLength":64}},"required":["chip","voice"],"additionalProperties":false},"mix":{"type":"object","properties":{"gainDb":{"type":"number","minimum":-96,"maximum":12},"importance":{"type":"number","minimum":0,"maximum":1}},"required":[],"additionalProperties":false},"roleInference":{"type":"object","properties":{"confidence":{"type":"string","enum":["high","medium","low"]},"reason":{"type":"string","enum":["channel","name","program","polyphony","register","monophony","override"]}},"required":["confidence","reason"],"additionalProperties":false},"instruments":{"type":"object","additionalProperties":{"type":"object","properties":{"volume":{"type":"array","items":{"type":"number","minimum":0,"maximum":15},"minItems":1,"maxItems":4096},"duty":{"oneOf":[{"type":"integer","minimum":0,"maximum":3},{"type":"array","items":{"type":"integer","minimum":0,"maximum":3},"minItems":1,"maxItems":4096}]},"arp":{"type":"array","items":{"type":"number","minimum":-127,"maximum":127},"minItems":0,"maxItems":4096},"pitch":{"type":"array","items":{"type":"number","minimum":-65535,"maximum":65535},"minItems":0,"maxItems":4096},"slide":{"type":"number","minimum":-96,"maximum":96},"sustain":{"type":"boolean"},"arpLoop":{"type":"boolean"},"noiseMode":{"type":"boolean"},"vibrato":{"type":"object","properties":{"depth":{"type":"number","minimum":0,"maximum":96},"rate":{"type":"number","minimum":0.001,"maximum":100000},"delay":{"type":"number","minimum":0,"maximum":100000}},"required":["depth","rate"],"additionalProperties":false},"waveform":{"oneOf":[{"type":"string","enum":["pulse","triangle","sawtooth","noise"]},{"type":"array","items":{"type":"string","enum":["pulse","triangle","sawtooth","noise"]},"minItems":1,"maxItems":4096}]},"wave":{"type":"array","items":{"type":"integer","minimum":0,"maximum":15},"minItems":32,"maxItems":32},"fm":{"type":"object","properties":{"algorithm":{"type":"integer","minimum":0,"maximum":7},"feedback":{"type":"integer","minimum":0,"maximum":7},"ops":{"type":"array","items":{"type":"object","properties":{"dt":{"type":"integer","minimum":0,"maximum":7},"mul":{"type":"integer","minimum":0,"maximum":15},"tl":{"type":"integer","minimum":0,"maximum":127},"ks":{"type":"integer","minimum":0,"maximum":3},"ar":{"type":"integer","minimum":0,"maximum":31},"dr":{"type":"integer","minimum":0,"maximum":31},"sr":{"type":"integer","minimum":0,"maximum":31},"sl":{"type":"integer","minimum":0,"maximum":15},"rr":{"type":"integer","minimum":0,"maximum":15},"am":{"type":"boolean"}},"required":["dt","mul","tl","ks","ar","dr","sr","sl","rr"],"additionalProperties":false},"minItems":4,"maxItems":4},"ams":{"type":"integer","minimum":0,"maximum":3},"pms":{"type":"integer","minimum":0,"maximum":7}},"required":["algorithm","feedback","ops"],"additionalProperties":false},"sample":{"type":"string","minLength":1,"maxLength":80}},"required":["volume"],"additionalProperties":false}},"portableTimbres":{"type":"object","additionalProperties":{"type":"object","properties":{"sourceSignature":{"type":"string","minLength":1,"maxLength":8192},"pitchOffset":{"type":"number","minimum":-48,"maximum":48},"program":{"type":"integer","minimum":0,"maximum":127},"envelope":{"type":"array","items":{"type":"number","minimum":0,"maximum":1},"minItems":1,"maxItems":120},"rms":{"type":"number","minimum":0,"maximum":100},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["sourceSignature","pitchOffset","program","envelope","rms","confidence"],"additionalProperties":false}}},"required":["id","name","role","priority","notes"],"additionalProperties":false},"minItems":0,"maxItems":256},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["midi","native"]},"name":{"type":"string","minLength":0,"maxLength":240},"sha256":{"type":"string","minLength":0,"maxLength":64},"url":{"type":"string","minLength":0,"maxLength":2048},"description":{"type":"string","minLength":0,"maxLength":4096}},"required":["kind","name"],"additionalProperties":false},"notices":{"type":"array","items":{"type":"string","minLength":0,"maxLength":4096},"minItems":0,"maxItems":1024},"midi":{"type":"object","properties":{"format":{"type":"integer","minimum":0,"maximum":1},"events":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"track":{"type":"integer","minimum":0,"maximum":65535},"order":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"integer","minimum":0,"maximum":255},"data":{"type":"array","items":{"type":"integer","minimum":0,"maximum":255},"minItems":0,"maxItems":65536}},"required":["tick","track","order","status","data"],"additionalProperties":false},"minItems":0,"maxItems":200000}},"required":["format","events"],"additionalProperties":false}},"required":["version","title","ticksPerBeat","endTick","tempos","parts","notices"],"additionalProperties":false}},"required":["kind","performance"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["native"]},"plan":{"type":"object","properties":{"chip":{"type":"string","enum":["2a03","dmg","md","snes","c64"]},"musicStartCycle":{"type":"integer","minimum":0,"maximum":9007199254740991},"seconds":{"type":"number","minimum":0.000001,"maximum":600},"loopStartSeconds":{"type":"number","minimum":0,"maximum":600},"events":{"type":"array","items":{"type":"object","properties":{"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"addr":{"type":"integer","minimum":0,"maximum":16777215},"value":{"type":"integer","minimum":0,"maximum":255}},"required":["at","addr","value"],"additionalProperties":false},"minItems":0,"maxItems":2000000},"memory":{"type":"array","items":{"type":"object","properties":{"address":{"type":"integer","minimum":0,"maximum":16777215},"bytes":{"type":"array","items":{"type":"integer","minimum":0,"maximum":255},"minItems":0,"maxItems":8388608}},"required":["address","bytes"],"additionalProperties":false},"minItems":0,"maxItems":256},"notes":{"type":"array","items":{"type":"object","properties":{"part":{"type":"string","minLength":0,"maxLength":120},"id":{"type":"string","minLength":0,"maxLength":120},"voice":{"type":"string","minLength":0,"maxLength":120},"pitch":{"type":"number","minimum":0,"maximum":127},"at":{"type":"number","minimum":0,"maximum":600},"until":{"type":"number","minimum":0,"maximum":600}},"required":["part","id","voice","pitch","at","until"],"additionalProperties":false},"minItems":0,"maxItems":100000},"losses":{"type":"array","items":{"type":"object","properties":{"part":{"type":"string","minLength":0,"maxLength":120},"note":{"type":"string","minLength":0,"maxLength":120},"kind":{"type":"string","minLength":0,"maxLength":120},"detail":{"type":"string","minLength":0,"maxLength":4096}},"required":["part","kind","detail"],"additionalProperties":false},"minItems":0,"maxItems":200000},"silentNotes":{"type":"array","items":{"type":"object","properties":{"part":{"type":"string","minLength":0,"maxLength":120},"id":{"type":"string","minLength":0,"maxLength":120}},"required":["part","id"],"additionalProperties":false},"minItems":0,"maxItems":100000},"mix":{"type":"object","properties":{"version":{"enum":[1]},"calibratedNotes":{"type":"integer","minimum":0,"maximum":9007199254740991},"fallbackNotes":{"type":"integer","minimum":0,"maximum":9007199254740991},"diagnostics":{"type":"array","items":{"type":"object","properties":{"part":{"type":"string","minLength":0,"maxLength":120},"kind":{"type":"string","minLength":0,"maxLength":120},"detail":{"type":"string","minLength":0,"maxLength":4096}},"required":["part","kind","detail"],"additionalProperties":false},"minItems":0,"maxItems":200000}},"required":["version","calibratedNotes","fallbackNotes","diagnostics"],"additionalProperties":false}},"required":["chip","seconds","loopStartSeconds","events","memory","notes","losses"],"additionalProperties":false},"performance":{"type":"object","properties":{"version":{"enum":[1]},"title":{"type":"string","minLength":0,"maxLength":240},"ticksPerBeat":{"type":"integer","minimum":1,"maximum":9007199254740991},"endTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"loopStartTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"tempos":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"microsecondsPerBeat":{"type":"integer","minimum":1,"maximum":16777215}},"required":["tick","microsecondsPerBeat"],"additionalProperties":false},"minItems":1,"maxItems":100000},"parts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"name":{"type":"string","minLength":0,"maxLength":240},"role":{"type":"string","enum":["lead","chord","bass","perc"]},"priority":{"type":"number","minimum":-100000,"maximum":100000},"program":{"type":"integer","minimum":0,"maximum":127},"muted":{"type":"boolean"},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"endTick":{"type":"integer","minimum":0,"maximum":9007199254740991},"pitch":{"type":"number","minimum":0,"maximum":127},"velocity":{"type":"integer","minimum":1,"maximum":127},"program":{"type":"integer","minimum":0,"maximum":127},"drum":{"type":"integer","minimum":0,"maximum":127},"expression":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"pitch":{"type":"number","minimum":-96,"maximum":96},"gain":{"type":"number","minimum":0,"maximum":1},"duty":{"type":"integer","minimum":0,"maximum":3},"noisePeriod":{"type":"integer","minimum":0,"maximum":15}},"required":["tick"],"additionalProperties":false},"minItems":0,"maxItems":200000}},"required":["id","tick","endTick","pitch","velocity"],"additionalProperties":false},"minItems":0,"maxItems":100000},"origin":{"type":"object","properties":{"chip":{"type":"string","minLength":0,"maxLength":64},"voice":{"type":"string","minLength":0,"maxLength":64}},"required":["chip","voice"],"additionalProperties":false},"mix":{"type":"object","properties":{"gainDb":{"type":"number","minimum":-96,"maximum":12},"importance":{"type":"number","minimum":0,"maximum":1}},"required":[],"additionalProperties":false},"roleInference":{"type":"object","properties":{"confidence":{"type":"string","enum":["high","medium","low"]},"reason":{"type":"string","enum":["channel","name","program","polyphony","register","monophony","override"]}},"required":["confidence","reason"],"additionalProperties":false},"instruments":{"type":"object","additionalProperties":{"type":"object","properties":{"volume":{"type":"array","items":{"type":"number","minimum":0,"maximum":15},"minItems":1,"maxItems":4096},"duty":{"oneOf":[{"type":"integer","minimum":0,"maximum":3},{"type":"array","items":{"type":"integer","minimum":0,"maximum":3},"minItems":1,"maxItems":4096}]},"arp":{"type":"array","items":{"type":"number","minimum":-127,"maximum":127},"minItems":0,"maxItems":4096},"pitch":{"type":"array","items":{"type":"number","minimum":-65535,"maximum":65535},"minItems":0,"maxItems":4096},"slide":{"type":"number","minimum":-96,"maximum":96},"sustain":{"type":"boolean"},"arpLoop":{"type":"boolean"},"noiseMode":{"type":"boolean"},"vibrato":{"type":"object","properties":{"depth":{"type":"number","minimum":0,"maximum":96},"rate":{"type":"number","minimum":0.001,"maximum":100000},"delay":{"type":"number","minimum":0,"maximum":100000}},"required":["depth","rate"],"additionalProperties":false},"waveform":{"oneOf":[{"type":"string","enum":["pulse","triangle","sawtooth","noise"]},{"type":"array","items":{"type":"string","enum":["pulse","triangle","sawtooth","noise"]},"minItems":1,"maxItems":4096}]},"wave":{"type":"array","items":{"type":"integer","minimum":0,"maximum":15},"minItems":32,"maxItems":32},"fm":{"type":"object","properties":{"algorithm":{"type":"integer","minimum":0,"maximum":7},"feedback":{"type":"integer","minimum":0,"maximum":7},"ops":{"type":"array","items":{"type":"object","properties":{"dt":{"type":"integer","minimum":0,"maximum":7},"mul":{"type":"integer","minimum":0,"maximum":15},"tl":{"type":"integer","minimum":0,"maximum":127},"ks":{"type":"integer","minimum":0,"maximum":3},"ar":{"type":"integer","minimum":0,"maximum":31},"dr":{"type":"integer","minimum":0,"maximum":31},"sr":{"type":"integer","minimum":0,"maximum":31},"sl":{"type":"integer","minimum":0,"maximum":15},"rr":{"type":"integer","minimum":0,"maximum":15},"am":{"type":"boolean"}},"required":["dt","mul","tl","ks","ar","dr","sr","sl","rr"],"additionalProperties":false},"minItems":4,"maxItems":4},"ams":{"type":"integer","minimum":0,"maximum":3},"pms":{"type":"integer","minimum":0,"maximum":7}},"required":["algorithm","feedback","ops"],"additionalProperties":false},"sample":{"type":"string","minLength":1,"maxLength":80}},"required":["volume"],"additionalProperties":false}},"portableTimbres":{"type":"object","additionalProperties":{"type":"object","properties":{"sourceSignature":{"type":"string","minLength":1,"maxLength":8192},"pitchOffset":{"type":"number","minimum":-48,"maximum":48},"program":{"type":"integer","minimum":0,"maximum":127},"envelope":{"type":"array","items":{"type":"number","minimum":0,"maximum":1},"minItems":1,"maxItems":120},"rms":{"type":"number","minimum":0,"maximum":100},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["sourceSignature","pitchOffset","program","envelope","rms","confidence"],"additionalProperties":false}}},"required":["id","name","role","priority","notes"],"additionalProperties":false},"minItems":0,"maxItems":256},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["midi","native"]},"name":{"type":"string","minLength":0,"maxLength":240},"sha256":{"type":"string","minLength":0,"maxLength":64},"url":{"type":"string","minLength":0,"maxLength":2048},"description":{"type":"string","minLength":0,"maxLength":4096}},"required":["kind","name"],"additionalProperties":false},"notices":{"type":"array","items":{"type":"string","minLength":0,"maxLength":4096},"minItems":0,"maxItems":1024},"midi":{"type":"object","properties":{"format":{"type":"integer","minimum":0,"maximum":1},"events":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"integer","minimum":0,"maximum":9007199254740991},"track":{"type":"integer","minimum":0,"maximum":65535},"order":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"integer","minimum":0,"maximum":255},"data":{"type":"array","items":{"type":"integer","minimum":0,"maximum":255},"minItems":0,"maxItems":65536}},"required":["tick","track","order","status","data"],"additionalProperties":false},"minItems":0,"maxItems":200000}},"required":["format","events"],"additionalProperties":false}},"required":["version","title","ticksPerBeat","endTick","tempos","parts","notices"],"additionalProperties":false}},"required":["kind","plan","performance"],"additionalProperties":false}]},"settings":{"type":"object","properties":{"chip":{"type":"string","enum":["2a03","dmg","md","snes","c64"]},"tempoScale":{"type":"number","minimum":0.1,"maximum":10},"transpose":{"type":"number","minimum":-48,"maximum":48},"gain":{"type":"number","minimum":0,"maximum":1},"mix":{"type":"string","enum":["auto","authored"]},"allowLoss":{"type":"boolean"}},"required":["chip"],"additionalProperties":false},"generator":{"type":"object","properties":{"language":{"type":"string","enum":["javascript"]},"code":{"type":"string","minLength":1,"maxLength":64000},"seed":{"type":"integer","minimum":0,"maximum":4294967295}},"required":["language","code","seed"],"additionalProperties":false}},"required":["version","title","source","settings"],"additionalProperties":false},"visibility":{"enum":["public","unlisted","private"]},"contentHash":{"type":"string"},"profile":{"type":"object","properties":{"id":{"type":"string"},"handle":{"type":["string","null"]},"displayName":{"type":"string"},"bio":{"type":"string"}}}},"additionalProperties":true}}}},"400":{"description":"Malformed request or cursor"},"401":{"description":"Sign in required"},"404":{"description":"Not found or inaccessible"},"409":{"description":"Conflicting request key, handle or audio state"},"413":{"description":"Body exceeds 4 MB"},"422":{"description":"Invalid data; issues include path/code/message/level"},"429":{"description":"Shared account rate limit; Retry-After"},"503":{"description":"Publication service unavailable"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]},{"browserSession":[]}]}},"/api/v1/projects/{id}/report":{"post":{"operationId":"reportProject","summary":"Report an accessible publication","tags":["projects"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["ok"],"properties":{"ok":{"const":true}}}}}},"400":{"description":"Malformed request or cursor"},"401":{"description":"Sign in required"},"404":{"description":"Not found or inaccessible"},"409":{"description":"Conflicting request key, handle or audio state"},"413":{"description":"Body exceeds 4 MB"},"422":{"description":"Invalid data; issues include path/code/message/level"},"429":{"description":"Shared account rate limit; Retry-After"},"503":{"description":"Publication service unavailable"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]},{"browserSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["reason"],"additionalProperties":false,"properties":{"reason":{"type":"string","minLength":3,"maxLength":500}}}}}}}},"/api/v1/projects/{id}/render":{"post":{"operationId":"renderProject","summary":"Queue an immutable preview or complete WAV","tags":["projects"],"responses":{"200":{"description":"Existing ready rendition","content":{"application/json":{"schema":{"type":"object","required":["id","projectId","kind","status","engine","progress","bytes","error","audio"],"properties":{"id":{"type":"string"},"projectId":{"type":"string"},"kind":{"enum":["preview","full"]},"status":{"enum":["queued","rendering","cancelling","cancelled","ready","failed"]},"engine":{"type":"string","description":"SHA-256 of the bundled renderer"},"progress":{"type":"number","minimum":0,"maximum":1},"bytes":{"type":"integer"},"error":{"type":["string","null"]},"audio":{"type":["string","null"]}}}}}},"202":{"description":"Queued or rendering job","content":{"application/json":{"schema":{"type":"object","required":["id","projectId","kind","status","engine","progress","bytes","error","audio"],"properties":{"id":{"type":"string"},"projectId":{"type":"string"},"kind":{"enum":["preview","full"]},"status":{"enum":["queued","rendering","cancelling","cancelled","ready","failed"]},"engine":{"type":"string","description":"SHA-256 of the bundled renderer"},"progress":{"type":"number","minimum":0,"maximum":1},"bytes":{"type":"integer"},"error":{"type":["string","null"]},"audio":{"type":["string","null"]}}}}}},"400":{"description":"Malformed request or cursor"},"401":{"description":"Sign in required"},"404":{"description":"Not found or inaccessible"},"409":{"description":"Conflicting request key, handle or audio state"},"413":{"description":"Body exceeds 4 MB"},"422":{"description":"Invalid data; issues include path/code/message/level"},"429":{"description":"Shared account rate limit; Retry-After"},"503":{"description":"Publication service unavailable"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]},{"browserSession":[]}],"description":"Preview: up to 30 seconds. Full: complete source, max 40 MB and 240 seconds processing. Poll the returned job; exceeding limits fails explicitly.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["kind"],"additionalProperties":false,"properties":{"kind":{"enum":["preview","full"]}}}}}}}},"/api/v1/jobs/{id}":{"get":{"operationId":"getProjectJob","summary":"Read job status, progress and pinned audio URL","tags":["projects"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","projectId","kind","status","engine","progress","bytes","error","audio"],"properties":{"id":{"type":"string"},"projectId":{"type":"string"},"kind":{"enum":["preview","full"]},"status":{"enum":["queued","rendering","cancelling","cancelled","ready","failed"]},"engine":{"type":"string","description":"SHA-256 of the bundled renderer"},"progress":{"type":"number","minimum":0,"maximum":1},"bytes":{"type":"integer"},"error":{"type":["string","null"]},"audio":{"type":["string","null"]}}}}}},"400":{"description":"Malformed request or cursor"},"401":{"description":"Sign in required"},"404":{"description":"Not found or inaccessible"},"409":{"description":"Conflicting request key, handle or audio state"},"413":{"description":"Body exceeds 4 MB"},"422":{"description":"Invalid data; issues include path/code/message/level"},"429":{"description":"Shared account rate limit; Retry-After"},"503":{"description":"Publication service unavailable"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]},"delete":{"operationId":"cancelProjectJob","summary":"Cancel your queued or running render","tags":["projects"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["ok"],"properties":{"ok":{"const":true}}}}}},"400":{"description":"Malformed request or cursor"},"401":{"description":"Sign in required"},"404":{"description":"Not found or inaccessible"},"409":{"description":"Conflicting request key, handle or audio state"},"413":{"description":"Body exceeds 4 MB"},"422":{"description":"Invalid data; issues include path/code/message/level"},"429":{"description":"Shared account rate limit; Retry-After"},"503":{"description":"Publication service unavailable"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]},{"browserSession":[]}]}},"/api/v1/jobs/{id}/audio":{"get":{"operationId":"downloadProjectAudio","summary":"Download ready WAV after checking publication access","tags":["projects"],"responses":{"200":{"description":"Pinned WAV","content":{"audio/wav":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Malformed request or cursor"},"401":{"description":"Sign in required"},"404":{"description":"Not found or inaccessible"},"409":{"description":"Conflicting request key, handle or audio state"},"413":{"description":"Body exceeds 4 MB"},"422":{"description":"Invalid data; issues include path/code/message/level"},"429":{"description":"Shared account rate limit; Retry-After"},"503":{"description":"Publication service unavailable"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/profile":{"get":{"operationId":"getProfile","summary":"Your public profile, without email or authentication IDs","tags":["projects"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"handle":{"type":["string","null"]},"displayName":{"type":"string"},"bio":{"type":"string"}}}}}},"400":{"description":"Malformed request or cursor"},"401":{"description":"Sign in required"},"404":{"description":"Not found or inaccessible"},"409":{"description":"Conflicting request key, handle or audio state"},"413":{"description":"Body exceeds 4 MB"},"422":{"description":"Invalid data; issues include path/code/message/level"},"429":{"description":"Shared account rate limit; Retry-After"},"503":{"description":"Publication service unavailable"}},"security":[{"bearerAuth":[]},{"browserSession":[]}]},"put":{"operationId":"editProfile","summary":"Reserve a unique handle and edit your profile","tags":["projects"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"handle":{"type":["string","null"]},"displayName":{"type":"string"},"bio":{"type":"string"}}}}}},"400":{"description":"Malformed request or cursor"},"401":{"description":"Sign in required"},"404":{"description":"Not found or inaccessible"},"409":{"description":"Conflicting request key, handle or audio state"},"413":{"description":"Body exceeds 4 MB"},"422":{"description":"Invalid data; issues include path/code/message/level"},"429":{"description":"Shared account rate limit; Retry-After"},"503":{"description":"Publication service unavailable"}},"security":[{"bearerAuth":[]},{"browserSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["handle","displayName","bio"],"additionalProperties":false,"properties":{"handle":{"type":"string","pattern":"^[a-z][a-z0-9_]{2,23}$"},"displayName":{"type":"string","maxLength":60},"bio":{"type":"string","maxLength":500}}}}}}}},"/api/validate":{"post":{"operationId":"validateSong","summary":"Check a song without storing it","description":"Call this while writing. It is free, unlimited, and returns the same issue shape as the store route, so nothing changes shape at the moment you commit.","tags":["songs"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["bpm","patterns","order"],"properties":{"title":{"type":"string","maxLength":80},"author":{"type":"string","maxLength":60,"description":"Who or what made it"},"bpm":{"type":"integer","minimum":40,"maximum":300},"stepsPerBeat":{"type":"integer","enum":[4,12],"default":4,"description":"Steps per quarter note. 12 preserves triplets alongside straight rhythms."},"chip":{"type":"string","enum":["2a03","dmg","md","snes","c64"],"default":"2a03","description":"The NES's Ricoh 2A03, the Game Boy's DMG APU, the Mega Drive's YM2612 and SN76489, the SNES's S-DSP, or the C64's SID. The same four lines play on any, in its own idiom."},"intent":{"type":"object","description":"What each role should sound like: a word from the catalogue, the same words on every chip, each chip playing them in its own idiom. A role left out takes the default. lead: \"soft\" (the default: a 25 % pulse with a slow decay and a late vibrato), \"bright\" (a thin 12.5 % pulse that cuts through; the classic NES lead), \"round\" (a 50 % pulse, fuller and hollower). chord: \"plucked\" (the default: a short 12.5 % pluck on every step of the arpeggio), \"held\" (a softer 50 % pulse that sustains under the lead). bass: \"round\" (the default: the triangle on a NES, a triangle wave on a Game Boy or a C64), \"hollow\" (a square wave on the Game Boy's wave channel or a SID voice; a NES has only the triangle), \"bright\" (a sawtooth on the Game Boy's wave channel or a SID voice; a NES has only the triangle). perc: \"tight\" (the default kit: a kick, a snare, a closed and an open hat), \"soft\" (the same kit at two thirds, for a piece that should not celebrate)","properties":{"lead":{"type":"string","enum":["soft","bright","round"],"default":"soft"},"chord":{"type":"string","enum":["plucked","held"],"default":"plucked"},"bass":{"type":"string","enum":["round","hollow","bright"],"default":"round"},"perc":{"type":"string","enum":["tight","soft"],"default":"tight"}}},"order":{"type":"array","minItems":1,"maxItems":64,"items":{"type":"integer","minimum":0},"description":"Which patterns play, in which order. Repeats are how a song gets long."},"patterns":{"type":"array","minItems":1,"maxItems":16,"items":{"type":"object","required":["bass","lead","chord","perc","chordShape"],"properties":{"lead":{"type":"string","maxLength":4096,"description":"Melody. One token per step (stepsPerBeat defaults to 4)."},"chord":{"type":"string","maxLength":4096,"description":"Harmony, arpeggiated by chordShape."},"bass":{"type":"string","maxLength":4096,"description":"Bass. Its token count sets the pattern length."},"perc":{"type":"string","maxLength":4096,"description":"Drums. K kick, S snare, H hat, O open hat."},"chordShape":{"type":"array","minItems":1,"maxItems":256,"items":{"type":"array","minItems":1,"maxItems":32,"items":{"type":"integer"}},"description":"Semitones each chord note is arpeggiated through. [[0,3,7]] minor, [[0,4,7]] major."}}}}}}}}},"responses":{"200":{"description":"Valid. May still carry warnings.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"issues":{"type":"array","items":{"type":"object","properties":{"level":{"type":"string","enum":["error","warning"]},"track":{"type":"string"},"code":{"type":"string","description":"For example pitch_range"},"pattern":{"type":"integer","description":"Pattern index, zero-based"},"step":{"type":"integer","description":"Which grid step, zero-based"},"token":{"type":"string"},"message":{"type":"string"},"silent":{"type":"boolean","description":"True when the mistake produces no sound and no error. A mistyped note resolves to 0 Hz and is scheduled as nothing, so the only evidence is a hole in the piece."}}}},"measured":{"$ref":"#/components/schemas/Measured"}}}}}},"422":{"description":"Invalid. `issues` says what to change."}}}},"/api/songs":{"post":{"operationId":"createSong","security":[{},{"bearerAuth":[]},{"browserSession":[]}],"summary":"Store a song and get its links","description":"Validates first. Returns a short id, a page, an MP3 and a WAV.","tags":["songs"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["bpm","patterns","order"],"properties":{"title":{"type":"string","maxLength":80},"author":{"type":"string","maxLength":60,"description":"Who or what made it"},"bpm":{"type":"integer","minimum":40,"maximum":300},"stepsPerBeat":{"type":"integer","enum":[4,12],"default":4,"description":"Steps per quarter note. 12 preserves triplets alongside straight rhythms."},"chip":{"type":"string","enum":["2a03","dmg","md","snes","c64"],"default":"2a03","description":"The NES's Ricoh 2A03, the Game Boy's DMG APU, the Mega Drive's YM2612 and SN76489, the SNES's S-DSP, or the C64's SID. The same four lines play on any, in its own idiom."},"intent":{"type":"object","description":"What each role should sound like: a word from the catalogue, the same words on every chip, each chip playing them in its own idiom. A role left out takes the default. lead: \"soft\" (the default: a 25 % pulse with a slow decay and a late vibrato), \"bright\" (a thin 12.5 % pulse that cuts through; the classic NES lead), \"round\" (a 50 % pulse, fuller and hollower). chord: \"plucked\" (the default: a short 12.5 % pluck on every step of the arpeggio), \"held\" (a softer 50 % pulse that sustains under the lead). bass: \"round\" (the default: the triangle on a NES, a triangle wave on a Game Boy or a C64), \"hollow\" (a square wave on the Game Boy's wave channel or a SID voice; a NES has only the triangle), \"bright\" (a sawtooth on the Game Boy's wave channel or a SID voice; a NES has only the triangle). perc: \"tight\" (the default kit: a kick, a snare, a closed and an open hat), \"soft\" (the same kit at two thirds, for a piece that should not celebrate)","properties":{"lead":{"type":"string","enum":["soft","bright","round"],"default":"soft"},"chord":{"type":"string","enum":["plucked","held"],"default":"plucked"},"bass":{"type":"string","enum":["round","hollow","bright"],"default":"round"},"perc":{"type":"string","enum":["tight","soft"],"default":"tight"}}},"order":{"type":"array","minItems":1,"maxItems":64,"items":{"type":"integer","minimum":0},"description":"Which patterns play, in which order. Repeats are how a song gets long."},"patterns":{"type":"array","minItems":1,"maxItems":16,"items":{"type":"object","required":["bass","lead","chord","perc","chordShape"],"properties":{"lead":{"type":"string","maxLength":4096,"description":"Melody. One token per step (stepsPerBeat defaults to 4)."},"chord":{"type":"string","maxLength":4096,"description":"Harmony, arpeggiated by chordShape."},"bass":{"type":"string","maxLength":4096,"description":"Bass. Its token count sets the pattern length."},"perc":{"type":"string","maxLength":4096,"description":"Drums. K kick, S snare, H hat, O open hat."},"chordShape":{"type":"array","minItems":1,"maxItems":256,"items":{"type":"array","minItems":1,"maxItems":32,"items":{"type":"integer"}},"description":"Semitones each chord note is arpeggiated through. [[0,3,7]] minor, [[0,4,7]] major."}}}}}}}}},"responses":{"201":{"description":"Stored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Song"}}}},"422":{"description":"Invalid"},"429":{"description":"Too many writes from this address"}}}},"/api/songs/{id}":{"get":{"operationId":"getSong","summary":"Fetch a song","tags":["songs"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The song","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Song"}}}},"404":{"description":"No such song"}}},"delete":{"operationId":"deleteSong","security":[{"bearerAuth":[]},{"browserSession":[]}],"summary":"Withdraw a song you published","description":"Any active key or browser session of the publishing account may withdraw it. The row stays so its forks keep their parent, but the page and the audio stop being served. A song published anonymously cannot be withdrawn by anyone - which is the honest cost of publishing without a key.","tags":["songs"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Withdrawn"},"403":{"description":"Published by another account, or anonymously"},"404":{"description":"No such song"}}}},"/api/songs/{id}/fork":{"post":{"operationId":"forkSong","security":[{},{"bearerAuth":[]},{"browserSession":[]}],"summary":"Copy a song with changes","description":"Send only what differs - a fork changing one line does not restate the other three. The copy keeps a link back to its parent. Null clears title, author or intent; unchanged inherited patterns retain compatibility with earlier publication limits.","tags":["songs"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"title":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"author":{"anyOf":[{"type":"string","maxLength":60,"description":"Who or what made it"},{"type":"null"}]},"bpm":{"type":"integer","minimum":40,"maximum":300},"stepsPerBeat":{"type":"integer","enum":[4,12],"default":4,"description":"Steps per quarter note. 12 preserves triplets alongside straight rhythms."},"chip":{"type":"string","enum":["2a03","dmg","md","snes","c64"],"default":"2a03","description":"The NES's Ricoh 2A03, the Game Boy's DMG APU, the Mega Drive's YM2612 and SN76489, the SNES's S-DSP, or the C64's SID. The same four lines play on any, in its own idiom."},"intent":{"anyOf":[{"type":"object","description":"What each role should sound like: a word from the catalogue, the same words on every chip, each chip playing them in its own idiom. A role left out takes the default. lead: \"soft\" (the default: a 25 % pulse with a slow decay and a late vibrato), \"bright\" (a thin 12.5 % pulse that cuts through; the classic NES lead), \"round\" (a 50 % pulse, fuller and hollower). chord: \"plucked\" (the default: a short 12.5 % pluck on every step of the arpeggio), \"held\" (a softer 50 % pulse that sustains under the lead). bass: \"round\" (the default: the triangle on a NES, a triangle wave on a Game Boy or a C64), \"hollow\" (a square wave on the Game Boy's wave channel or a SID voice; a NES has only the triangle), \"bright\" (a sawtooth on the Game Boy's wave channel or a SID voice; a NES has only the triangle). perc: \"tight\" (the default kit: a kick, a snare, a closed and an open hat), \"soft\" (the same kit at two thirds, for a piece that should not celebrate)","properties":{"lead":{"type":"string","enum":["soft","bright","round"],"default":"soft"},"chord":{"type":"string","enum":["plucked","held"],"default":"plucked"},"bass":{"type":"string","enum":["round","hollow","bright"],"default":"round"},"perc":{"type":"string","enum":["tight","soft"],"default":"tight"}}},{"type":"null"}]},"order":{"type":"array","minItems":1,"maxItems":64,"items":{"type":"integer","minimum":0},"description":"Which patterns play, in which order. Repeats are how a song gets long."},"patterns":{"type":"array","minItems":1,"maxItems":16,"items":{"type":"object","required":["bass","lead","chord","perc","chordShape"],"properties":{"lead":{"type":"string","maxLength":4096,"description":"Melody. One token per step (stepsPerBeat defaults to 4)."},"chord":{"type":"string","maxLength":4096,"description":"Harmony, arpeggiated by chordShape."},"bass":{"type":"string","maxLength":4096,"description":"Bass. Its token count sets the pattern length."},"perc":{"type":"string","maxLength":4096,"description":"Drums. K kick, S snare, H hat, O open hat."},"chordShape":{"type":"array","minItems":1,"maxItems":256,"items":{"type":"array","minItems":1,"maxItems":32,"items":{"type":"integer"}},"description":"Semitones each chord note is arpeggiated through. [[0,3,7]] minor, [[0,4,7]] major."}}}}}}}}},"responses":{"201":{"description":"The fork","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Song"}}}},"404":{"description":"No such parent"}}}},"/s/{id}.mp3":{"get":{"operationId":"getMp3","summary":"The audio, rendered on request","description":"Rendered by the current engine in a worker. Stable URLs revalidate with ETags; bounded per-instance caching shares identical jobs. Deletion is checked even on cache hits.","tags":["audio"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"seconds","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":30},"description":"Defaults to two loops; if that exceeds 30 seconds, returns 422. Use an explicit duration or export locally."}],"responses":{"200":{"description":"audio/mpeg"},"304":{"description":"ETag unchanged"},"400":{"description":"Invalid duration"},"404":{"description":"No such song"},"422":{"description":"Default duration exceeds 30 seconds"},"429":{"description":"Cold render limit reached"},"503":{"description":"Worker busy or unavailable; retry after Retry-After"}}}},"/api/auth/signin":{"post":{"operationId":"signIn","summary":"Email a single-use browser sign-in link","tags":["identity"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email","maxLength":254}}}}}},"responses":{"202":{"description":"Link sent; valid for 30 minutes"},"429":{"description":"Rate limited"},"503":{"description":"Database or email unavailable"}}}},"/api/auth/redeem":{"get":{"operationId":"redeemSignIn","summary":"Consume the link and set an HttpOnly session cookie","tags":["identity"],"parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"302":{"description":"Redirect home; valid tokens establish a 30-day session without changing API keys"}}}},"/api/auth/session":{"delete":{"operationId":"signOut","summary":"Revoke the current browser session","tags":["identity"],"responses":{"200":{"description":"Signed out"},"403":{"description":"Cross-origin request refused"}}}},"/api/keys/{id}":{"delete":{"operationId":"revokeKey","security":[{"bearerAuth":[]},{"browserSession":[]}],"summary":"Revoke one of your API keys; retain song ownership","tags":["identity"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Revoked"},"401":{"description":"Not signed in"},"404":{"description":"No such key on this account"}}}},"/api/keys":{"get":{"operationId":"listKeys","security":[{"bearerAuth":[]},{"browserSession":[]}],"summary":"List up to 100 account keys without secrets","tags":["identity"],"responses":{"200":{"description":"Key metadata"},"401":{"description":"Not signed in"}}},"post":{"operationId":"requestKey","summary":"Get a key, by email","description":"The key is emailed rather than returned: a secret in a response body ends up in a proxy log and a shell history, and whoever asked for it cannot tell which. A key raises the write limit from 20 a minute to 240, marks your songs as verifiably yours, and is what makes GET /api/me possible.","tags":["identity"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email"},"label":{"type":"string","description":"What it is for, so you can tell keys apart"}}}}}},"responses":{"202":{"description":"On its way"},"422":{"description":"Not an email address"}}}},"/api/me":{"get":{"operationId":"listMySongs","security":[{"bearerAuth":[]},{"browserSession":[]}],"summary":"The latest 50 songs this account has published","description":"Keys and browser sessions share a stable account. Reissuing a key to the same email retains access to prior publications. Anonymous publications cannot be claimed later.","tags":["identity"],"responses":{"200":{"description":"Your songs, newest first"},"401":{"description":"No active key or session"}}}},"/s/{id}.wav":{"get":{"operationId":"getWav","summary":"The same audio, lossless","description":"Same 1–30 integer seconds parameter, two-loop default, ETag revalidation and render limits as MP3.","tags":["audio"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"audio/wav"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"browserSession":{"type":"apiKey","in":"cookie","name":"chipvoice_session"}},"schemas":{"Measured":{"type":"object","properties":{"loopSeconds":{"type":"number","description":"One time round, at the song's tempo"},"onsetsPerSecond":{"type":"number","description":"Notes and hits per second, all channels"},"range":{"type":"integer","description":"Melodic range in semitones"},"steps":{"type":"integer"}}},"Song":{"type":"object","properties":{"id":{"type":"string"},"parentId":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"bpm":{"type":"integer"},"url":{"type":"string"},"mp3":{"type":"string","description":"Audio URL: two loops, or an explicit 30-second preview for longer scores."},"wav":{"type":"string","description":"Audio URL: two loops, or an explicit 30-second preview for longer scores. Export complete long scores locally."},"forks":{"type":"integer"},"depth":{"type":"integer","description":"0 for an original, 1 for its fork"},"rootId":{"type":"string","description":"The first ancestor. Fetch the whole family with it"},"authorVerified":{"type":"boolean","description":"Whether the publication belongs to an authenticated account. This does not verify the free-text author name. The field is free text, so without this it is a claim rather than a credit."},"measured":{"$ref":"#/components/schemas/Measured"},"issues":{"type":"array","items":{"type":"object","properties":{"level":{"type":"string","enum":["error","warning"]},"track":{"type":"string"},"code":{"type":"string","description":"For example pitch_range"},"pattern":{"type":"integer","description":"Pattern index, zero-based"},"step":{"type":"integer","description":"Which grid step, zero-based"},"token":{"type":"string"},"message":{"type":"string"},"silent":{"type":"boolean","description":"True when the mistake produces no sound and no error. A mistyped note resolves to 0 Hz and is scheduled as nothing, so the only evidence is a hole in the piece."}}}}}},"Issue":{"type":"object","properties":{"level":{"type":"string","enum":["error","warning"]},"track":{"type":"string"},"code":{"type":"string","description":"For example pitch_range"},"pattern":{"type":"integer","description":"Pattern index, zero-based"},"step":{"type":"integer","description":"Which grid step, zero-based"},"token":{"type":"string"},"message":{"type":"string"},"silent":{"type":"boolean","description":"True when the mistake produces no sound and no error. A mistyped note resolves to 0 Hz and is scheduled as nothing, so the only evidence is a hole in the piece."}}}}}}