Token导航 LogoToken导航TokenDH.com
音频生成external-servicegithub未标认证来源可访问许可证需确认审计通过

topos-of-music音乐主题

Agent Skill

用于辅助音频、音乐、语音转写、语音合成或声音素材处理。它适合让 Agent 生成配乐说明、整理音频流程、调用语音工具或处理播客和视频配音素材。使用时需要确认输入音频来源、输出格式、时长和模型限制;涉及人声克隆、版权音乐或公开发布时,应先核对授权和合规边界。

总安装

238

周安装

10

GitHub Stars

17

下载量

83
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:topos-of-music(音乐主题)
来源仓库:https://github.com/plurigrid/asi
仓库路径:skills/topos-of-music
安装命令:
npx skills add https://github.com/plurigrid/asi --skill topos-of-music
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/plurigrid/asi --skill topos-of-music

简介

用于辅助音频、音乐、语音转写与合成等声音素材处理。

  • 适合让 Agent 生成配乐说明、调用语音工具或处理播客配音。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装使用。
  • 使用时需确认输入来源、输出格式与时长限制,涉及人声克隆或版权音乐时应核对授权边界。
  • topos-of-music 属于音频生成类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Topos of Music Skill

Trit: +1 (PLUS - generator) Color: Red (#D82626)

Overview

Implements Guerino Mazzola's *Topos of Music* categorical framework:

  • Forms: Types in the musical topos (Simple, Limit, Colimit, List)
  • Denotators: Instances of forms (notes, chords, scores)
  • Morphisms: Structure-preserving transformations
  • Neo-Riemannian: PLR group operations on triads

Forms (Types)

abstract type Form end

struct SimpleForm <: Form
    name::Symbol
    module_type::Symbol  # :Z, :R, :Q
end

struct LimitForm <: Form      # Product type
    name::Symbol
    factors::Vector{Form}
end

struct ColimitForm <: Form    # Sum type
    name::Symbol
    summands::Vector{Form}
end

struct ListForm <: Form       # Powerset type
    name::Symbol
    element_form::Form
end

# Standard musical forms
const PitchForm = SimpleForm(:Pitch, :Z)
const OnsetForm = SimpleForm(:Onset, :R)
const DurationForm = SimpleForm(:Duration, :R)
const LoudnessForm = SimpleForm(:Loudness, :R)

const NoteForm = LimitForm(:Note, [PitchForm, OnsetForm, DurationForm, LoudnessForm])
const ChordForm = ListForm(:Chord, NoteForm)
const ScoreForm = ListForm(:Score, ChordForm)

Denotators (Instances)

function Note(pitch::Int, onset::Float64, duration::Float64, loudness::Float64=0.8)
    LimitDenotator(NoteForm, [
        SimpleDenotator(PitchForm, pitch),
        SimpleDenotator(OnsetForm, onset),
        SimpleDenotator(DurationForm, duration),
        SimpleDenotator(LoudnessForm, loudness)
    ])
end

function Chord(notes::Vector)
    ListDenotator(ChordForm, notes)
end

Morphisms (Transformations)

struct TranspositionMorphism <: Morphism
    semitones::Int
end

struct InversionMorphism <: Morphism
    axis::Int
end

struct RetrogradeMotion <: Morphism end

struct AugmentationMorphism <: Morphism
    factor::Float64
end

# Apply transposition
function apply(m::TranspositionMorphism, d::SimpleDenotator)
    if d.form == PitchForm
        SimpleDenotator(PitchForm, mod(d.value + m.semitones, 12))
    else
        d
    end
end

Neo-Riemannian PLR Group

const P = PLROperation(:P)  # Parallel: change third quality
const L = PLROperation(:L)  # Leading-tone exchange
const R = PLROperation(:R)  # Relative

function apply_plr(op::Symbol, triad::Vector{Int})
    root, third, fifth = triad

    if op == :P
        # Major ↔ minor
        if mod(third - root, 12) == 4
            [root, mod(third - 1, 12), fifth]
        else
            [root, mod(third + 1, 12), fifth]
        end
    elseif op == :L
        # Leading-tone exchange
        if mod(third - root, 12) == 4
            [mod(root - 1, 12), third, fifth]
        else
            [root, third, mod(fifth + 1, 12)]
        end
    elseif op == :R
        # Relative major/minor
        if mod(third - root, 12) == 4
            [root, third, mod(fifth + 2, 12)]
        else
            [mod(root - 2, 12), third, fifth]
        end
    end
end

PLR Example

C Major [0, 4, 7]
  P → c minor [0, 3, 7]
  L → e minor [11, 4, 7] → [7, 11, 4] normalized
  R → a minor [0, 4, 9] → [9, 0, 4] normalized

Gay.jl Color Integration

const NOTE_NAMES = ["C", "C#", "D", "Eb", "E", "F", "F#", "G", "G#", "A", "Bb", "B"]

function hue_to_pitch_class(hue::Float64)::Int
    mod(round(Int, hue / 30.0), 12)
end

function pitch_class_to_hue(pc::Int)::Float64
    mod(pc, 12) * 30.0 + 15.0
end

function color_to_note(color)::Int
    rgb = convert(RGB, color)
    hsl = convert(HSL, rgb)
    hue_to_pitch_class(hsl.h)
end

# CatSharp trit mapping
function pitch_class_to_trit(pc::Int)::Int
    pc = mod(pc, 12)
    if pc ∈ [0, 4, 8]      # Augmented
        return 1
    elseif pc ∈ [3, 6, 9]  # Diminished
        return 0
    else
        return -1
    end
end

Tonnetz Navigation

struct Tonnetz
    minor_third::Int   # 3 semitones
    major_third::Int   # 4 semitones
    fifth::Int         # 7 semitones
end

const STANDARD_TONNETZ = Tonnetz(3, 4, 7)

function tonnetz_neighbors(pc::Int, t::Tonnetz=STANDARD_TONNETZ)
    [
        mod(pc + t.minor_third, 12),
        mod(pc - t.minor_third, 12),
        mod(pc + t.major_third, 12),
        mod(pc - t.major_third, 12),
        mod(pc + t.fifth, 12),
        mod(pc - t.fifth, 12)
    ]
end

Klumpenhouwer Networks

struct KNet
    nodes::Vector{Int}
    arrows::Vector{Tuple{Int,Int,Symbol,Int}}  # (from, to, T/I, n)
end

function verify_knet(knet::KNet)::Bool
    for (from, to, op, n) in knet.arrows
        pc_from = knet.nodes[from]
        pc_to = knet.nodes[to]
        expected = if op == :T
            mod(pc_from + n, 12)
        else  # :I
            mod(n - pc_from, 12)
        end
        if expected != pc_to
            return false
        end
    end
    true
end

GF(3) Triads

gay-mcp (-1) ⊗ catsharp-galois (0) ⊗ topos-of-music (+1) = 0 ✓
rubato-composer (-1) ⊗ ordered-locale (0) ⊗ topos-of-music (+1) = 0 ✓

Commands

# Run Topos of Music demo
julia dev/gadgets/topos_of_music.jl

# Apply PLR transformation
just plr-transform triad="0 4 7" op=P

# Navigate Tonnetz
just tonnetz-walk start=0 steps="m3 M3 P5"

# Verify K-net
just knet-verify nodes="0 4 7" arrows="T4 T3 T7"

Related Skills

  • catsharp-galois (0): Galois connection to Plurigrid
  • gay-mcp (-1): Color ↔ pitch mapping
  • rubato-composer (-1): Rubato Composer integration
  • ordered-locale (0): Frame structure for scales

References

  • Mazzola, G. *The Topos of Music* (2002)
  • Mazzola, G. *Musical Performance* (2011)
  • Fiore & Noll. "Commuting Groups and the Topos of Triads"
  • Cohn, R. "Neo-Riemannian Operations, Parsimonious Trichords"

适合场景

01

生成背景音乐

02

生成歌曲或旋律

03

视频和播客配乐

04

社媒内容音频素材

能力概览

能力 1

调用音乐生成模型

能力 2

支持文本到音乐或歌曲生成

能力 3

提供 CLI 示例和使用场景

能力 4

适合音频内容工作流

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.97%
按下载量换算30

Claude

30.45%
按下载量换算25

Cursor

20.24%
按下载量换算17

Gemini CLI

10.09%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills