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.0.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.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: harmony_midi_token-1.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 c47d9bf6cbf68fc29c1d86b8b4c148ce361d282d15a1187446a9a858329aa72b
MD5 1526674f17d255cb07e487c8cb410a7c
BLAKE2b-256 c1ac65e833306a23571b9dd05a62583916b917c689d0583aabe6b75c2b02d0f0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for harmony_midi_token-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2450ea842e916fcb44307ead5259f6e09232b0c46110d92049f9c2fa1de7ee91
MD5 cbeb1733803a76bbd6176040dcfbbb5d
BLAKE2b-256 438a843b3a9816dc37811f5c3000e1b8d4572a61f740d285405e4679997a0169

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