Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/s-omranpour/DeepMusic
A python package for high level musical data manipulation and preprocessing, making data ready to be fed to a neural network.
https://github.com/s-omranpour/DeepMusic
ai-music deep-learning midi miditoolkit music python symbolic-music
Last synced: 3 months ago
JSON representation
A python package for high level musical data manipulation and preprocessing, making data ready to be fed to a neural network.
- Host: GitHub
- URL: https://github.com/s-omranpour/DeepMusic
- Owner: s-omranpour
- License: mit
- Created: 2021-05-05T21:37:47.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-19T20:34:47.000Z (almost 3 years ago)
- Last Synced: 2024-07-05T13:25:46.193Z (4 months ago)
- Topics: ai-music, deep-learning, midi, miditoolkit, music, python, symbolic-music
- Language: Python
- Homepage:
- Size: 448 KB
- Stars: 39
- Watchers: 1
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
*** 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
```python
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](https://github.com/slSeanWU/MusDr)