の nokakoi

Nostr 曲仕様案Nostr Song Spec ProposalDraft 0.1

効果音パック(sfx-pack)の楽譜形式を「曲」に広げる姉妹仕様。複数トラックとテンポを持ち、ファミコンの音源構成を上限の目安にする。作るのはスタジオ、聴くのはギャラリー。nokakoi では naddr 引用が再生カードになる。他のクライアント向けの実装方法はカード実装ガイドへ。 A sister spec to the SFX pack spec, extending its score format to full songs: multiple tracks and a tempo, modeled on the Famicom sound chip. Make songs in the studio, listen in the gallery, and play naddr quotes as cards in nokakoi. See the card implementation guide for other clients.

1. 概要1. Overview

曲は kind:30078 に d = "sfx-song/<名前>" で公開する。効果音パックとは名前空間を分け、仕様も独立させる(パック側は安定、曲側は試行錯誤の段階)。再生はクライアント側の Web Audio で行い、音声ファイルは運ばない。

A song is published as kind:30078 with d = "sfx-song/<name>". The namespace and the spec are separate from SFX packs (packs are stable; songs are experimental). Playback is client-side Web Audio; no audio files are transferred.

2. 形式2. Format

{
  // kind: 30078, tags: [["d", "sfx-song/test-drive"]]
  "version": 1,
  "title": "テストドライブ",
  "bpm": 160,
  "loop": true,
  "tracks": [
    { "wave": "square",   "volume": 0.22, "steps": [[880, 0.5], [0, 0.5], [659.25, 1]] },
    { "wave": "square",   "volume": 0.10, "steps": [[440, 0.25], [523.25, 0.25], [659.25, 0.25], [880, 0.25]] },
    { "wave": "triangle", "volume": 0.26, "steps": [[110, 0.5], [110, 0.5], [110, 0.5], [165, 0.5]] },
    { "wave": "noise",    "volume": 0.20, "steps": [[1, 0.5], [0, 0.5], [1, 0.5], [0, 0.5]] }
  ]
}
フィールドField意味Meaning
version形式のバージョン(現在 1)Format version (currently 1)
title表示名(任意・日本語可)。d の名前は ASCII スラッグDisplay title (optional, any language). The d name is an ASCII slug
bpmテンポ。steps の長さは「拍」単位で、この bpm で秒に換算するTempo. Step lengths are in beats, converted to seconds with this bpm
loopループ再生を想定した曲かどうか(任意)Whether the song is meant to loop (optional)
tracks最大4トラック。各トラックは wave / volume / steps を持つUp to 4 tracks. Each track has wave / volume / steps

steps の表記Steps

3. ファミコン式の制限3. Famicom-style limits

4. 更新と取り下げ4. Updates and withdrawal

5. 再生について5. Playback

公開する前にBefore you publish

他人の曲のメロディをそのまま再現したパックや曲を公開すると、作曲者など権利者の著作権を侵害する可能性があります。公開は自己責任で行ってください。カバーを作る場合は短いフレーズに留める、原曲をクレジットするなど、権利者への配慮をお願いします。効果音の音色を寄せることは一般に問題になりにくいとされますが、個別の判断はできません。

Publishing a pack or song that reproduces someone else's melody as-is may infringe the composer's or rights holder's copyright. You publish at your own responsibility. If you make a cover, keep it to a short phrase and credit the original. Imitating the timbre of sound effects is generally considered less problematic, but no guarantee can be made for individual cases.

6. 状態とロードマップ6. Status and roadmap