Skip to main content

musicpipeline

仓库:https://gitee.com/siwpan/mp | 许可:MIT(见 LICENSE) 注:文中 <PATH> 为路径占位符,请替换为你本机实际的目录 / 可执行文件路径。

随机音乐生成器 + WMP 风格可视化,纯 Python 标准库实现(tkinter 图形界面)。 独立仓 siwpan/mp(本地 <PATH>)。

类型

代码项目(Python)

目录要点

  • musicpipeline/:Python 包,拆分为多模块:
    • core.py:合成引擎(音符/音阶/音色/ADSR/混响/滤波/旋律·低音·铺底·鼓轨生成/generate_music)
    • analysis.py:频谱分析(Goertzel 算法 + 帧能量)
    • visualizer.py:tkinter GUI 与 7 种可视化效果
    • __init__.py:公开接口与 __version__
    • __main__.py:python -m musicpipeline 命令行入口
  • *.wav / *.mp3:生成的音频产物(已 gitignore,不入库)
  • mumu/:本地采样/素材目录(音频产物,已 gitignore)

用途

随机生成音乐并做可视化演示,导出 WAV 文件,无外部依赖。

测试状态

包通过 py_compile 语法检查;import musicpipeline 与 generate_music(return_samples=True) 可生成有效 WAV(非 GUI 冒烟通过);GUI 未运行。

运行

python -m musicpipeline            # 启动图形界面(默认)
python -m musicpipeline --random   # 直接随机生成一首 wav(写入当前目录)
python -m musicpipeline --batch 5  # 批量生成 5 首

安装后也可用 console_script:

pip install musicpipeline
musicpipeline --random

作为库调用:

from musicpipeline import generate_music
path, params = generate_music(bpm=120, n_bars=8, scale_name="大调")

发布面与许可

  • gitee:siwpan/mp,release v2.0.0(便携源码 zip)。
  • PyPI:musicpipeline 2.0.0。
  • 许可:MIT · Copyright (c) 2026 siwpan

Metadata

Release files for musicpipeline 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for musicpipeline 2.0.0
File Size Uploaded Provenance Actions
musicpipeline-2.0.0.tar.gz 17.9 kB Without provenance Details for musicpipeline-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for musicpipeline 2.0.0
File Interpreter ABI Platform Actions
musicpipeline-2.0.0-py3-none-any.whl Python 3 none any Details for musicpipeline-2.0.0-py3-none-any.whl

Total release size: 36.7 kB

Release files / musicpipeline-2.0.0.tar.gz

Download URL musicpipeline-2.0.0.tar.gz
Size 17.9 kB
Tags Source
SHA-256 checksum
How to use checksums
93bbe9f1b99184b0e4465d3d33ae65ff836ca1ee0a3fd88173ec47944cfd4125
BLAKE2b-256 checksum
How to use checksums
eb202cdbf205d71e547235920e534dbaa2a07c733bb52e026fff90c7eea495be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / musicpipeline-2.0.0-py3-none-any.whl

Download URL musicpipeline-2.0.0-py3-none-any.whl
Size 18.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
be1e5e4b45b56ca08ae5d3a8c1d95d411bfb75281659df01b6e864d86e09e086
BLAKE2b-256 checksum
How to use checksums
41987eda96becb2c8baa443a9a76ca73220498cade07fb6ca628d830ca49682a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for musicpipeline 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page