Monster-Piano / README.md
asigalov61's picture
Update README.md
b7340d2 verified
|
raw
history blame
2.36 kB
metadata
license: cc-by-sa-4.0
language:
  - en
tags:
  - MIDI
  - Monster
  - Piano
  - Representations
pretty_name: monsterpiano
size_categories:
  - 100K<n<1M
dataset_info:
  features:
    - name: midi_hash
      dtype: string
    - name: midi_score
      sequence: int64
  splits:
    - name: train
      num_bytes: 29760009360
      num_examples: 580204
  download_size: 3984483820
  dataset_size: 29760009360
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train-*

Monster Piano

580204 solo Piano MIDI scores representations from Monster MIDI dataset

Monster-Piano-Logo.jpg


Installation and use


Load dataset

from datasets import load_dataset

monster_piano = load_dataset('asigalov61/Monster-Piano')

dataset_split = 'train'
dataset_entry_index = 0

dataset_entry = monster_piano[dataset_split][dataset_entry_index]

midi_hash = dataset_entry['midi_hash']
midi_score = dataset_entry['midi_score']

print(midi_hash)
print(midi_score[:15])

Decode to MIDI

import TMIDIX

#===================================================================

def decode_to_ms_MIDI_score(midi_score):

    score = []

    time = 0
    
    for m in midi_score:

        if 0 <= m < 128:
            time += m * 32

        elif 128 < m < 256:
            dur = (m-128) * 32

        elif 256 < m < 384:
            pitch = (m-256)

        elif 384 < m < 512:
            vel = (m-384)

            score.append(['note', time, dur, 0, pitch, vel, 0])

    return score
    
#===================================================================

ms_MIDI_score = decode_to_ms_MIDI_score(midi_score)

#===================================================================

detailed_stats = TMIDIX.Tegridy_ms_SONG_to_MIDI_Converter(ms_MIDI_score,
                                                          output_signature = midi_hash,
                                                          output_file_name = midi_hash,
                                                          track_name='Project Los Angeles'
                                                          )

Project Los Angeles

Tegridy Code 2024