{"id":28799716,"url":"https://github.com/choimoe/simaicut","last_synced_at":"2026-04-26T08:34:08.683Z","repository":{"id":296549371,"uuid":"993756241","full_name":"Choimoe/SimaiCut","owner":"Choimoe","description":"SimaiCut - Simai 谱面音频剪辑器","archived":false,"fork":false,"pushed_at":"2025-05-31T14:02:36.000Z","size":30,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-18T07:01:44.544Z","etag":null,"topics":["arcade","ffmpeg","maimai","python","simai"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Choimoe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-31T13:04:21.000Z","updated_at":"2025-06-07T08:44:28.000Z","dependencies_parsed_at":"2025-06-01T01:45:54.683Z","dependency_job_id":"ab5a8086-df39-4918-a193-0566d3fcc2d3","html_url":"https://github.com/Choimoe/SimaiCut","commit_stats":null,"previous_names":["choimoe/simaicut"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Choimoe/SimaiCut","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Choimoe%2FSimaiCut","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Choimoe%2FSimaiCut/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Choimoe%2FSimaiCut/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Choimoe%2FSimaiCut/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Choimoe","download_url":"https://codeload.github.com/Choimoe/SimaiCut/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Choimoe%2FSimaiCut/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260506988,"owners_count":23019449,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arcade","ffmpeg","maimai","python","simai"],"created_at":"2025-06-18T07:00:26.222Z","updated_at":"2026-04-26T08:34:08.675Z","avatar_url":"https://github.com/Choimoe.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[Read this document in English (阅读英文版)](README_en.md)\n\n# SimaiCut - Simai 谱面音频剪辑器\n\nSimaiCut 是一个 Python 工具集，旨在帮助用户处理、剪辑和拼接 Simai 格式的音乐游戏谱面及其对应的音频文件。它可以方便地从现有谱面中提取片段，调整速度，并将多个片段组合成新的谱面和音频。\n\n## 主要功能\n\n* **谱面与音频同步处理**：对谱面 (`maidata.txt`) 和音频 (`track.mp3`) 进行统一的剪辑和变换操作。\n* **片段裁剪**：精确裁剪指定时间段的谱面和音频。\n* **速度调整**：同步加速或减速谱面事件和音频。\n* **多片段拼接**：\n    * 将多个（裁剪后的）谱面和音频片段按顺序拼接。\n    * 在片段间自动计算并插入可配置时长的静音音频。\n    * 在谱面层面，于拼接间隙使用前一首歌的末尾 BPM 填充适当数量的占位音符和逗号事件。\n    * 支持在音频拼接处添加淡入/淡出效果。\n\n## 开始使用\n\n### 依赖环境\n\n* **Python 3.7+**\n* **FFmpeg**: 必须安装并将其可执行文件路径添加到系统的 `PATH` 环境变量中。FFmpeg 用于所有音频处理操作。\n* **[SimaiParser](https://github.com/Choimoe/PySimaiParser)**: 本项目依赖于 `SimaiParser` 库来解析和重建 Simai 谱面数据。请确保该库已正确安装或位于项目的 Python 路径中。你可以使用下面命令来安装：\n  ```bash\n  pip install PySimaiParser\n  ```\n\n### 项目结构\n\n```\nSimaiCut/\n├── SimaiCut/\n│   ├── init.py\n│   ├── audio.py              # 音频处理模块\n│   ├── chart.py              # 谱面编辑逻辑 (裁剪、加速、拼接)\n│   ├── editor.py             # Simai谱面编辑器类 (包装 SimaiParser)\n│   ├── processor.py          # 核心处理器类，协调音频和谱面操作\n│   └── util.py               # 辅助函数 (BPM计算、时间对齐等)\n├── README.md                 # 本文档\n└── README_en.md              # 英文版文档\n```\n\n## 模块概览\n\n* **`processor.SongProcessor`**:\n    核心类，封装了对单个歌曲（音频+谱面）的加载、处理（裁剪、加速）以及与其他 `SongProcessor` 实例拼接的功能。它管理着临时的音频和谱面文件。\n* **`editor.SimaiEditor`**:\n    包装了 `SimaiParser`，提供了更高级的谱面编辑接口。它将 Simai 文本谱面转换为内部 JSON 结构进行操作，并能将修改后的结构转换回 Simai 文本。\n    * `crop()`: 裁剪谱面。\n    * `accelerate()`: 加速谱面。\n    * `concatenate()`: 将另一个谱面拼接到当前谱面，并处理间隙。\n* **`audio.AudioProcessor`**:\n    包含一系列静态方法，使用 FFmpeg 执行音频操作，如获取时长、裁剪、加速、应用淡入淡出、创建静音和拼接音频文件列表。\n* **`chart.py`**:\n    包含 `SimaiEditor` 类实际的谱面操作逻辑（裁剪、加速、拼接的具体实现）。这些方法被动态赋值给 `SimaiEditor` 类。\n* **`util.py`**:\n    提供一些通用辅助函数，例如在谱面特定时间点获取BPM、将时间点对齐到音乐网格等。\n\n## 贡献\n\n欢迎提交 Pull Request 或提出 Issues 来改进本项目！","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchoimoe%2Fsimaicut","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchoimoe%2Fsimaicut","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchoimoe%2Fsimaicut/lists"}