Skip to main content

midi-player

Python launcher of the animated MIDI player by @cifkao & @magenta

Installation

pip install midi-player

Usage

Only tested with Jupyter Notebooks & Colab, but uses no IPython dependencies so it should work in other contexts.

from midi_player import MIDIPlayer
from midi_player.stylers import basic, cifka_advanced

midi_file_url = "https://magenta.github.io/magenta-js/music/demos/melody.mid"
midi_file = "data/test_midi.mid"

MIDIPlayer(midi_file_url, 400)  
MIDIPlayer(midi_file, 160, styler=cifka_advanced)

With wandb:

import wandb

wandb.login()
wandb.init(project="midi-player")
mp = MIDIPlayer(midi_file, 300, viz_type="waterfall")
wandb.log(wandb.Html(mp.html))
wandb.finish()

See examples/ for more.

Documentation

TO-DO. Particularly, people will want to know how to add/customize their own "stylers". See midi_player/*.py for now ;-).

Known Issues

  • Not sure why the staff view is putting out 32nd notes / how to tell it to do 8th notes instead.

Download files

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

Source Distribution

midi-player-0.2.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

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

midi_player-0.2-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file midi-player-0.2.tar.gz.

File metadata

  • Download URL: midi-player-0.2.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for midi-player-0.2.tar.gz
Algorithm Hash digest
SHA256 198da788277293e14a0ff1c6857ddb8bd8d60e8096deb294354931471c4c1d60
MD5 54e74fc7375f2c4128139b53b8aa73f6
BLAKE2b-256 c5d876e6a3d2c3a2dd93c519d0aacda0965072a281939d1c64d87dc6d833949f

See more details on using hashes here.

File details

Details for the file midi_player-0.2-py3-none-any.whl.

File metadata

  • Download URL: midi_player-0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for midi_player-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b8d31f3fd424c2b8c11bf93b86aeada0f3165beb2d5b1de266ae7808c47aa88d
MD5 7b56a0e468a3b01d15dcb1b8f5071a6e
BLAKE2b-256 e3e93d0af9e7322c2fe0aa277d98aeb92f81a5b57b522da0baba7a3d39960bad

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 Sentry Error logging StatusPage Status page