効果音パック(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.
曲は 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.
{
// 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 |
[周波数, 拍] の並び。休符は周波数 0。音名表記("A4")も受理してよい[frequency, beats]. Frequency 0 is a rest. Note names ("A4") may also be acceptednoise トラックでは周波数の代わりに 1 = 打つ / 0 = 休み(ドラム用)noise track, use 1 = hit / 0 = rest instead of a frequency (for drums)d で新しい版を公開すれば置き換わるd replaces ittracks を空にした版で上書きすると「取り下げ」。NIP-09 の削除リクエスト(kind:5)も併用できるが、全コピーの消去は保証されないtracks withdraws the song. NIP-09 deletion requests (kind:5) may also be used, but erasure of all copies is not guaranteed公開する前に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.