Niko Chord Progression Dataset

### Introduction

The Niko Chord Progression Dataset is used in [AccoMontage2](https://github.com/billyblu2000/AccoMontage2). It contains 5k+ chord progression pieces, labeled with styles. There are four styles in total: Pop Standard, Pop Complex, Dark and R&B. Some progressions have an 'Unknown' style. Some statistics are provided below.

|                            | Mean  | Variance |
| -------------------------- | ----- | -------- |
| Note Pitch                 | 57    | 167.70   |
| Note Velocity              | 79.05 | 457.89   |
| Note Duration (in seconds) | 1.38  | 1.62     |

### Data Formats

You can access the Niko Chord Progression Dataset in two formats: MIDI format and the quantized note matrix format. 

##### MIDI (dataset.zip)

Each chord progression piece is stored as a single MIDI file.

##### Quantized Note Matrix (dataset.pkl)

A python dictionary with format like the following. `nmat`is an 2-d matrix, each row represent a quantized note: `[start, end, pitch, velocity]`. <u>Each note is quantized at the eighth note level. eg., `start=2` means the note begins at the third eighth note.</u> `root` is also an 2-d matrix. It labels the roots of the chords using an eighth note sample rate. Each row of the `root` represents a bar. Each element is an integer ranged from 0 (C note) to 11 (B note).

```python
{'piece name': 
 	{'nmat': [[0, 3, 60, 60], ...],    # 2-d matrix: note matrix
     'root': [[0,0,0,0,0,0,0,0], ...], # 2-d matrix: root label
     'style': 'some style',            # pop_standard, pop_complex, dark, r&b, unknown
     'mode': 'some mode',              # M, m
     'tonic': 'some tonic'			   # C, Db, ... B
    }, 
 ...
}

# load the dataset using pickle
import pickle
with open('dataset_path_and_name.pkl', 'rb') as file:
    dataset = pickle.load(file)
```

### Supplementary description

##### Original Dataset

The Niko Chord Progression Dataset is a re-organized version of the original Niko Dataset. The original Niko Dataset have duplicate progressions and unnecessary labels, it was thus processed and converted to this version.

##### Style Mapping

The style label was mapped from the original dataset to the new dataset. The style label in the original dataset is stored as folder names, and thus the style can be obtained from the file path. The following shows a detailed description of the style mapping function.

```
// Structure of the original dataset
.
├─A Major - F# Minor  		---> progressions are sorted based on tonics and modes
│  ├─1 - Best Melodies      ---> eliminated
│  │  ├─Catchy
│  │  ├─Dark_HipHop_Trap
│  │  ├─EDM
│  │  ├─Emotional
│  │  ├─Pop
│  │  └─R&B_Neosoul
│  ├─2 - Best Chords
│  │  ├─Dark_HipHop_Trap	---> New style: Dark
│  │  ├─EDM
│  │  │  ├─Classy_7th_9th	---> New style: Pop Complex
│  │  │  ├─Emotional		---> New style: Pop Complex
│  │  │  └─Standard			---> New style: Pop Standard
│  │  ├─Emotional			---> New style: Pop Complex
│  │  ├─Pop
│  │  │  ├─Classy_7th_9th	---> New style: Pop Complex
│  │  │  ├─Emotional		---> New style: Pop Complex
│  │  │  └─Standard			---> New style: Pop Standard
│  │  └─R&B_Neosoul			---> New style: R&B
│  └─3 - Rest Of Pack
│      ├─A-Bm-D (I-ii-IV)   ---> progressions sorted based on root pattern
│      │  ├─Arps			---> eliminated
│      │  ├─Basslines		---> eliminated
│      │  ├─Chord Breakdown	---> New style: Unknown
│      │  ├─Chord Progression -> New style: Unknown
│      │  ├─Epic Endings	---> eliminated
│      │  ├─Fast Chord Rhythm -> eliminated
│      │  │  ├─Back & Forth	
│      │  │  └─Same Time	
│      │  ├─Melodies		---> eliminated
│      │  │  ├─115-130bpm
│      │  │  ├─130-160bpm
│      │  │  ├─160-180bpm
│      │  │  └─90-115bpm
│      │  └─Slow Chord Rhythm -> New style: Unknown
...
```

### Cite

```
L. Yi, H. Hu, J. Zhao, and G. Xia, “AccoMontage2: A Complete Harmonization and Accompaniment Arrangement System”, in Proceedings of the 23rd International Society for Music Information Retrieval Conference, Bengaluru, India, 2022.
```

### License

MIT Licensed. Copyright © 2022 New York University Shanghai Music X Lab. All rights reserved.

Introducing paper: AccoMontage2: A Complete Harmonization and Accompaniment Arrangement System