HarmonyMIDIToken
The brand-new MIDI tokenizer based on music21 — designed around Future Bounce workflows and harmonic structure.
HarmonyMIDIToken은 MIDI 토크나이저로, pitch에 따른 악기(Instrument) 구분이 완료된 Future Bounce MIDI를 화성학적으로 표현 가능한 JSON과 LSTM을 위한 타임스텝 시퀀스로 직렬화/역직렬화하는 것을 목표로 합니다.
패키지는 PyPI에 harmony-midi-token 이름으로 공개되어 있으며, Python 3.11 이상을 요구합니다. (PyPI)
✨ Key Features
- music21 기반 파이프라인: MIDI → 토큰 / 토큰 → MIDI 왕복을 클래식한 음악 정보 구조 위에서 수행
- 모델 친화적 형식: 생성 모델 학습에 바로 투입 가능한 정수 시퀀스/사전 포맷 제공
- 양방향 변환 보장: 토큰에서 MIDI로 되돌릴 수 있도록 가역성(reversibility)을 중시한 규칙 설계
📦 Installation
pip install harmony-midi-token
# Requires Python 3.11+
참고: 프로젝트의 라이선스는 MIT이며, 리포지토리는 GitHub에서 공개되어 있습니다.
🚀 Quick Start
- 아래 예시 코드를 참고하여 사용해 주세요.
from HarmonyMIDIToken import HarmonyMIDIToken
MIDI = HarmonyMIDIToken()
MIDI.set_midi("examples/future_bounce.mid")
MIDI.to_midi() # Music21 Score 객체를 리턴
MIDI.to_json() # JSON 형식의 문자열 리턴
MIDI.token_id # 정수 Timestep 시퀀스 토큰
MIDI.set_id([[90, 1, 60, 3, 1, 50, 1]]) # 토큰을 객체로 변환
🤝 Contributing
이슈/PR 환영합니다!
버그 리포트 시 OS, Python 버전(3.11+), 패키지 버전(예: 1.0.3), 최소 재현 코드를 포함해 주세요.
PR 작성 시 어떤 부분을 수정하였는지, 수정 목적(예: 몇번 이슈의 버그 수정)를 포함해 주세요
ISLAND 멤버라면, PR 할 필요없이 커밋해도 상관 없으나, 버그나 추가해야 할 사항이 있다면 꼭 이슈를 작성해주세요
🙏 Acknowledgements
- music21
- pychord
Metadata
Release files for harmony-midi-token 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| harmony_midi_token-1.1.0.tar.gz | 7.1 kB | Without provenance | Details for harmony_midi_token-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| harmony_midi_token-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for harmony_midi_token-1.1.0-py3-none-any.whl |
Total release size: 14.4 kB
Release files / harmony_midi_token-1.1.0.tar.gz
| Download URL | harmony_midi_token-1.1.0.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0b4f3b5cc7a918c76d4f2b93f51c393edbbae0c3299f1b753db20fefd72424e7
|
|
BLAKE2b-256 checksum How to use checksums |
4827b7eac35792e72521473bcb874517d98148b8f20a8b87f7d78a3f06d69a57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.13
|
Release files / harmony_midi_token-1.1.0-py3-none-any.whl
| Download URL | harmony_midi_token-1.1.0-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ae77795d4bcece1aec30ad8d9282effadc28c9e3c3de2dad2720950afeb220c6
|
|
BLAKE2b-256 checksum How to use checksums |
c1c58600b64dae418d22f22cdc5dd38870e9ab52242942c2f0b8f0e36661aad0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.13
|
Security for harmony-midi-token 1.1.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.