Skip to main content

The Brand New Midi Tokenizer based on Music21

Project description

HarmonyMIDIToken

The brand-new MIDI tokenizer based on music21 — designed around Future Bounce workflows and harmonic structure.

PyPI

Python

License: MIT

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 # 정수 시퀀스 토큰
MIDI.set_id([128, 100, 10, 79, 2]) # 토큰을 객체로 변환

🤝 Contributing

이슈/PR 환영합니다!

버그 리포트 시 OS, Python 버전(3.11+), 패키지 버전(예: 0.4.0), 최소 재현 코드를 포함해 주세요.

PR 작성 시 어떤 부분을 수정하였는지, 수정 목적(예: 몇번 이슈의 버그 수정)를 포함해 주세요

ISLAND 멤버라면, PR 할 필요없이 커밋해도 상관 없으나, 버그나 추가해야 할 사항이 있다면 꼭 이슈를 작성해주세요


🙏 Acknowledgements

  • music21
  • pychord

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

harmony_midi_token-1.0.2.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

harmony_midi_token-1.0.2-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file harmony_midi_token-1.0.2.tar.gz.

File metadata

  • Download URL: harmony_midi_token-1.0.2.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for harmony_midi_token-1.0.2.tar.gz
Algorithm Hash digest
SHA256 0a846a27bcefb34f7e2e9a05edfede9dbfdf54f73698305428a3d9c452d57230
MD5 6d8434dc38f50acf8e8cc0f44d7ad09a
BLAKE2b-256 f143ba092cef3511c0d62fa23d99a716938f607b43809b20b9ba1b60b26b7b5d

See more details on using hashes here.

File details

Details for the file harmony_midi_token-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for harmony_midi_token-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 501705b84678f57bfaeaa0e70ddc9ae585eeb8008e767b1d355a6318ee9f11c4
MD5 8081a3c9c6fe307676c76f23b1472562
BLAKE2b-256 0b27af2bbc415970f68584e118c922b254fb6a9e59392065b403a65e80da1853

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page