Coder Social home page Coder Social logo

miditoolkit's Introduction

miditoolkit

A python package for working with MIDI data.

  • Version: 0.1.16
  • Latest update date: 2022/4/18

The usage is similar to pretty_midi, while miditoolkit handles MIDI events in symbolic timing (ticks, instead of seconds). Furthermore, the toolkit can parse MIDI tracks into piano-rolls for computation or visualization purposes.

Main Features

  • MIDI
    • Global
      • ticks per beat
      • tempo changes
      • key signatures
      • time signatures
      • lyrics
      • markers
    • Instruments
      • control changes
      • pitch bend
    • Editing
      • chunk/cropping
    • IO
      • BytesIO
  • Piano-rolls
    • Tools
      • notes to piano-rolls
      • piano-rolls to notes
      • chromagram
    • Visualization
  • External Library

TODO

  • better documentation
  • absolute timing
  • cropping: Control Changes
  • cropping: bars
  • symbolic features
  • new structural analysis

Installation

  • current version: 0.1.15
  • python 2 is not supported
  • Install the miditoolkit via PYPI:
pip install miditoolkit

Example Usage

import miditoolkit
path_midi = miditoolkit.midi.utils.example_midi_file()
midi_obj = miditoolkit.midi.parser.MidiFile(path_midi)
print(midi_obj)

"""
Output:

ticks per beat: 480
max tick: 72002
tempo changes: 68
time sig: 2
key sig: 0
markers: 71
lyrics: False
instruments: 2

"""

A. Parse and create MIDI files
B. Piano-roll Manipulation

Philosophy

  • pretty_midi can parse MIDI files and generate pianorolls in absolute timing (seconds).
  • pypianoroll can parse MIDI files into pianorolls in symbolic timing (through beat resolution).
  • mido processes MIDI files in the lower level such as messages and ports.

Miditoolkit is designed for handling MIDI in symbolic timing (ticks), which is the native format of MIDI timing. We keep the midi parser as simple as possible, and offer several important functions to complete the versatility. For example, piano-rolls, tick-to-second, chromagram, and etc.

To customize settings and maximum the degree of freedom, users can use additional libraries like visualization, which are excluded in the toolkit.

miditoolkit's People

Contributors

15805383399 avatar joann8512 avatar joouis avatar jzq2000 avatar natooz avatar wayne391 avatar yilin-zhang avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.