Giter Site home page Giter Site logo

s-omranpour / deepmusic Goto Github PK

View Code? Open in Web Editor NEW
39.0 1.0 5.0 459 KB

A python package for high level musical data manipulation and preprocessing, making data ready to be fed to a neural network.

License: MIT License

Python 100.00%
python midi miditoolkit symbolic-music deep-learning ai-music music

deepmusic's Introduction

*** A newer version of Deepmusic package with more features and better interface is available at the multitrack branch. However, it is still under development ***

DeepMusic

DeepMusic is a high level python package with following features:

  • supporting different formats like MIDI, REMI, Compound Word and pianoroll. [1, 2]
  • representing musical data in a very simple but useful way for high level music theoretic manipulations.
  • preprocessing musical data in order to feed them to neural networks (chord extraction, quantization and numericalization).
  • supporting metrics used for evaluating generated sequences. [3, 4]

Install

With pip

pip install deepmusic

From source

git clone https://github.com/s-omranpour/DeepMusic
cd DeepMusic
pip install .

Usage

from deepmusic import MusicRepr

## reading a midi file
seq = MusicRepr.from_file('test.mid')

## displaying first 10 events
print(seq[:10])

## export to remi representation
remi = seq.to_remi(ret='token')

## export to compound word representation
cp = seq.to_cp()
print(cp.shape) ## (num_events, 8)

## splitting song's bars
bars = seq.get_bars()
print(len(bars))

for more details please see examples.

References

[1] Pop Music Transformer: Beat-based Modeling and Generation of Expressive Pop Piano Compositions, Yu-Siang Huang, Yi-Hsuan Yang

[2] Compound Word Transformer: Learning to Compose Full-Song Musicover Dynamic Directed Hypergraphs, Wen-Yi Hsiao, Jen-Yu Liu, Yin-Cheng Yeh, Yi-Hsuan Yang

[3] The Jazz Transformer on the Front Line: Exploring the Shortcomings of AI-composed Music through Quantitative Measures, Shih-Lun Wu, Yi-Hsuan Yang

[4] https://github.com/slSeanWU/MusDr

deepmusic's People

Contributors

s-omranpour avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

deepmusic's Issues

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.