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

Uploaded Python 3

File details

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

File metadata

  • Download URL: harmony_midi_token-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 f54502e0edbbc4b9fcdd7d10b444600133a76e3b6d54a3fc1dc6d907e9a5cdf1
MD5 34ca51696d9d6f291d46c1af68f7f3b0
BLAKE2b-256 5829f6604a4a31bf98f9db3d1c40fb78fdc04378c746dfd9b6756376fab999b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for harmony_midi_token-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3c0df84141a0df0d9dc07731162cb4d41a2b6940a13f7dea022d116f79bc82a2
MD5 85c39ea7c74c065db20ddd178fb5916a
BLAKE2b-256 61e3d2557ead55c4014ff7caf8884090109074f41f000ec182454bf86f16ffc9

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