Duplicate from jg583/NSynth
Browse filesCo-authored-by: John Gillen <jg583@users.noreply.huggingface.co>
- .gitattributes +55 -0
- NSynth.py +101 -0
- README.md +220 -0
- data/test/test.parquet +3 -0
- data/train/batch_0.parquet +3 -0
- data/train/batch_1.parquet +3 -0
- data/train/batch_10.parquet +3 -0
- data/train/batch_11.parquet +3 -0
- data/train/batch_12.parquet +3 -0
- data/train/batch_13.parquet +3 -0
- data/train/batch_14.parquet +3 -0
- data/train/batch_15.parquet +3 -0
- data/train/batch_16.parquet +3 -0
- data/train/batch_17.parquet +3 -0
- data/train/batch_18.parquet +3 -0
- data/train/batch_19.parquet +3 -0
- data/train/batch_2.parquet +3 -0
- data/train/batch_20.parquet +3 -0
- data/train/batch_21.parquet +3 -0
- data/train/batch_22.parquet +3 -0
- data/train/batch_23.parquet +3 -0
- data/train/batch_24.parquet +3 -0
- data/train/batch_25.parquet +3 -0
- data/train/batch_26.parquet +3 -0
- data/train/batch_27.parquet +3 -0
- data/train/batch_28.parquet +3 -0
- data/train/batch_29.parquet +3 -0
- data/train/batch_3.parquet +3 -0
- data/train/batch_30.parquet +3 -0
- data/train/batch_31.parquet +3 -0
- data/train/batch_32.parquet +3 -0
- data/train/batch_33.parquet +3 -0
- data/train/batch_34.parquet +3 -0
- data/train/batch_4.parquet +3 -0
- data/train/batch_5.parquet +3 -0
- data/train/batch_6.parquet +3 -0
- data/train/batch_7.parquet +3 -0
- data/train/batch_8.parquet +3 -0
- data/train/batch_9.parquet +3 -0
- data/validation/validation.parquet +3 -0
.gitattributes
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.lz4 filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
# Audio files - uncompressed
|
| 38 |
+
*.pcm filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
*.sam filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
*.raw filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
# Audio files - compressed
|
| 42 |
+
*.aac filter=lfs diff=lfs merge=lfs -text
|
| 43 |
+
*.flac filter=lfs diff=lfs merge=lfs -text
|
| 44 |
+
*.mp3 filter=lfs diff=lfs merge=lfs -text
|
| 45 |
+
*.ogg filter=lfs diff=lfs merge=lfs -text
|
| 46 |
+
*.wav filter=lfs diff=lfs merge=lfs -text
|
| 47 |
+
# Image files - uncompressed
|
| 48 |
+
*.bmp filter=lfs diff=lfs merge=lfs -text
|
| 49 |
+
*.gif filter=lfs diff=lfs merge=lfs -text
|
| 50 |
+
*.png filter=lfs diff=lfs merge=lfs -text
|
| 51 |
+
*.tiff filter=lfs diff=lfs merge=lfs -text
|
| 52 |
+
# Image files - compressed
|
| 53 |
+
*.jpg filter=lfs diff=lfs merge=lfs -text
|
| 54 |
+
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
| 55 |
+
*.webp filter=lfs diff=lfs merge=lfs -text
|
NSynth.py
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import json
|
| 2 |
+
import datasets
|
| 3 |
+
import os
|
| 4 |
+
from scipy.io import wavfile
|
| 5 |
+
|
| 6 |
+
_CITATION = """\
|
| 7 |
+
@misc{nsynth2017,
|
| 8 |
+
Author = {Jesse Engel and Cinjon Resnick and Adam Roberts and
|
| 9 |
+
Sander Dieleman and Douglas Eck and Karen Simonyan and
|
| 10 |
+
Mohammad Norouzi},
|
| 11 |
+
Title = {Neural Audio Synthesis of Musical Notes with WaveNet Autoencoders},
|
| 12 |
+
Year = {2017},
|
| 13 |
+
Eprint = {arXiv:1704.01279},
|
| 14 |
+
}
|
| 15 |
+
"""
|
| 16 |
+
|
| 17 |
+
_DESCRIPTION = """\
|
| 18 |
+
The NSynth dataset is an audio dataset containing over 300,000 musical notes across over 1000 commercially-sampled instruments, distinguished by pitch, timbre, and envelope. Each recording was made by playing and holding a musical note for three seconds and letting it decay for one second. The collection of four-second recordings ranges over every pitch on a standard MIDI piano (or as many as possible for the given instrument), played at five different velocities.
|
| 19 |
+
This dataset was created as an attempt to establish a high-quality entry point into audio machine learning, in response to the surge of breakthroughs in generative modeling of images due to the abundance of approachable image datasets (MNIST, CIFAR, ImageNet). NSynth is meant to be both a benchmark for audio ML and a foundation to be expanded on with future datasets.
|
| 20 |
+
"""
|
| 21 |
+
|
| 22 |
+
_HOMEPAGE = "https://magenta.tensorflow.org/datasets/nsynth"
|
| 23 |
+
|
| 24 |
+
_LICENSE = "Creative Commons Attribution 4.0 International (CC BY 4.0)"
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
class NSynth(datasets.GeneratorBasedBuilder):
|
| 28 |
+
def _info(self):
|
| 29 |
+
features = datasets.Features({
|
| 30 |
+
"note": datasets.Value("int64"),
|
| 31 |
+
"note_str": datasets.Value("string"),
|
| 32 |
+
"instrument": datasets.Value("int64"),
|
| 33 |
+
"instrument_str": datasets.Value("string"),
|
| 34 |
+
"pitch": datasets.Value("int64"),
|
| 35 |
+
"velocity": datasets.Value("int64"),
|
| 36 |
+
"sample_rate": datasets.Value("int64"),
|
| 37 |
+
"qualities": datasets.features.Sequence(datasets.Value("int64")),
|
| 38 |
+
"qualities_str": datasets.features.Sequence(datasets.Value("string")),
|
| 39 |
+
"instrument_family": datasets.Value("int64"),
|
| 40 |
+
"instrument_family_str": datasets.Value("string"),
|
| 41 |
+
"instrument_source": datasets.Value("int64"),
|
| 42 |
+
"instrument_source_str": datasets.Value("string"),
|
| 43 |
+
"audio": datasets.features.Audio(sampling_rate=16000),
|
| 44 |
+
})
|
| 45 |
+
|
| 46 |
+
return datasets.DatasetInfo(
|
| 47 |
+
description=_DESCRIPTION,
|
| 48 |
+
features=features,
|
| 49 |
+
homepage=_HOMEPAGE,
|
| 50 |
+
license=_LICENSE,
|
| 51 |
+
citation=_CITATION,
|
| 52 |
+
)
|
| 53 |
+
|
| 54 |
+
def _split_generators(self, dl_manager):
|
| 55 |
+
dl_paths = dl_manager.download_and_extract({
|
| 56 |
+
'train': 'http://download.magenta.tensorflow.org/datasets/nsynth/nsynth-train.jsonwav.tar.gz',
|
| 57 |
+
'validation': 'http://download.magenta.tensorflow.org/datasets/nsynth/nsynth-valid.jsonwav.tar.gz',
|
| 58 |
+
'test': 'http://download.magenta.tensorflow.org/datasets/nsynth/nsynth-test.jsonwav.tar.gz',
|
| 59 |
+
})
|
| 60 |
+
return[
|
| 61 |
+
datasets.SplitGenerator(
|
| 62 |
+
name=datasets.Split.TRAIN,
|
| 63 |
+
gen_kwargs={"filepath": dl_paths['train']}
|
| 64 |
+
),
|
| 65 |
+
datasets.SplitGenerator(
|
| 66 |
+
name=datasets.Split.VALIDATION,
|
| 67 |
+
gen_kwargs={"filepath": dl_paths['validation']}
|
| 68 |
+
),
|
| 69 |
+
datasets.SplitGenerator(
|
| 70 |
+
name=datasets.Split.TEST,
|
| 71 |
+
gen_kwargs={"filepath": dl_paths['test']}
|
| 72 |
+
),
|
| 73 |
+
]
|
| 74 |
+
|
| 75 |
+
def _generate_examples(self, filepath):
|
| 76 |
+
dir_list = os.listdir(filepath)
|
| 77 |
+
folder_path = os.path.join(filepath, dir_list[0])
|
| 78 |
+
examples_path = os.path.join(folder_path, 'examples.json')
|
| 79 |
+
with open(examples_path) as examples_file:
|
| 80 |
+
examples = json.load(examples_file)
|
| 81 |
+
wav_dict = {}
|
| 82 |
+
audio_path = os.path.join(folder_path, "audio")
|
| 83 |
+
for filename in os.listdir(audio_path):
|
| 84 |
+
audio_filename = os.path.join(audio_path, filename)
|
| 85 |
+
key = filename.replace('.wav', '')
|
| 86 |
+
yield key, {
|
| 87 |
+
"note": examples[key]["note"],
|
| 88 |
+
"note_str": examples[key]["note_str"],
|
| 89 |
+
"instrument": examples[key]["instrument"],
|
| 90 |
+
"instrument_str": examples[key]["instrument_str"],
|
| 91 |
+
"pitch": examples[key]["pitch"],
|
| 92 |
+
"velocity": examples[key]["velocity"],
|
| 93 |
+
"sample_rate": examples[key]["sample_rate"],
|
| 94 |
+
"qualities": examples[key]["qualities"],
|
| 95 |
+
"qualities_str": examples[key]["qualities_str"],
|
| 96 |
+
"instrument_family": examples[key]["instrument_family"],
|
| 97 |
+
"instrument_family_str": examples[key]["instrument_family_str"],
|
| 98 |
+
"instrument_source": examples[key]["instrument_source"],
|
| 99 |
+
"instrument_source_str": examples[key]["instrument_source_str"],
|
| 100 |
+
"audio": {'path': audio_filename, 'bytes': wavfile.read(audio_filename)[1]},
|
| 101 |
+
}
|
README.md
ADDED
|
@@ -0,0 +1,220 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-4.0
|
| 3 |
+
dataset_info:
|
| 4 |
+
features:
|
| 5 |
+
- name: id
|
| 6 |
+
dtype: string
|
| 7 |
+
- name: note
|
| 8 |
+
dtype: int64
|
| 9 |
+
- name: note_str
|
| 10 |
+
dtype: string
|
| 11 |
+
- name: instrument
|
| 12 |
+
dtype: int64
|
| 13 |
+
- name: instrument_str
|
| 14 |
+
dtype: string
|
| 15 |
+
- name: pitch
|
| 16 |
+
dtype: int64
|
| 17 |
+
- name: velocity
|
| 18 |
+
dtype: int64
|
| 19 |
+
- name: sample_rate
|
| 20 |
+
dtype: int64
|
| 21 |
+
- name: qualities
|
| 22 |
+
sequence: int64
|
| 23 |
+
- name: qualities_str
|
| 24 |
+
sequence: string
|
| 25 |
+
- name: instrument_family
|
| 26 |
+
dtype: int64
|
| 27 |
+
- name: instrument_family_str
|
| 28 |
+
dtype: string
|
| 29 |
+
- name: instrument_source
|
| 30 |
+
dtype: int64
|
| 31 |
+
- name: instrument_source_str
|
| 32 |
+
dtype: string
|
| 33 |
+
- name: audio
|
| 34 |
+
dtype: audio
|
| 35 |
+
splits:
|
| 36 |
+
- name: train
|
| 37 |
+
num_bytes: 129511245
|
| 38 |
+
num_examples: 289205
|
| 39 |
+
- name: validation
|
| 40 |
+
num_bytes: 5679042
|
| 41 |
+
num_examples: 12678
|
| 42 |
+
- name: test
|
| 43 |
+
num_bytes: 1830670
|
| 44 |
+
num_examples: 4096
|
| 45 |
+
download_size: 25233566634
|
| 46 |
+
dataset_size: 137020957
|
| 47 |
+
task_categories:
|
| 48 |
+
- audio-to-audio
|
| 49 |
+
- audio-classification
|
| 50 |
+
tags:
|
| 51 |
+
- music
|
| 52 |
+
pretty_name: NSynth
|
| 53 |
+
size_categories:
|
| 54 |
+
- 100K<n<1M
|
| 55 |
+
---
|
| 56 |
+
# Dataset Card for NSynth
|
| 57 |
+
|
| 58 |
+
<!-- Provide a quick summary of the dataset. -->
|
| 59 |
+
|
| 60 |
+
The NSynth dataset is an audio dataset containing over 300,000 musical notes across over 1000 commercially-sampled instruments, distinguished by pitch, timbre, and envelope. Each recording was made by playing and holding a musical note for three seconds and letting it decay for one second. The collection of four-second recordings ranges over every pitch on a standard MIDI piano (or as many as possible for the given instrument), played at five different velocities.
|
| 61 |
+
This dataset was created as an attempt to establish a high-quality entry point into audio machine learning, in response to the surge of breakthroughs in generative modeling of images due to the abundance of approachable image datasets (MNIST, CIFAR, ImageNet). NSynth is meant to be both a benchmark for audio ML and a foundation to be expanded on with future datasets.
|
| 62 |
+
|
| 63 |
+
### Dataset Description
|
| 64 |
+
|
| 65 |
+
<!-- Provide a longer summary of what this dataset is. -->
|
| 66 |
+
|
| 67 |
+
Since some instruments are not capable of producing all 88 pitches in the MIDI piano's range, there is an average of 65.4 pitches per instrument. Furthermore, the commercial sample packs occasionally contain duplicate sounds across multiple velocities, leaving an average of 4.75 unique velocities per pitch.
|
| 68 |
+
|
| 69 |
+
Each of the notes is annotated with three additional pieces of information based on a combination of human evaluation and heuristic algorithms:
|
| 70 |
+
1. Source: The method of sound production for the note’s instrument. This can be one of `acoustic` or `electronic` for instruments that were recorded from acoustic or electronic instruments, respectively, or `synthetic` for synthesized instruments.
|
| 71 |
+
|Index|ID|
|
| 72 |
+
|:----|:----|
|
| 73 |
+
|0|acoustic|
|
| 74 |
+
|1|electronic|
|
| 75 |
+
|2|synthetic|
|
| 76 |
+
|
| 77 |
+
|
| 78 |
+
|
| 79 |
+
|
| 80 |
+
|
| 81 |
+
2. Family: The high-level family of which the note’s instrument is a member. Each instrument is a member of exactly one family. See the complete list of families and their frequencies by source below.
|
| 82 |
+
|**Index**|**ID**|
|
| 83 |
+
|:---|:---|
|
| 84 |
+
|0|bass|
|
| 85 |
+
|1|brass|
|
| 86 |
+
|2|flute|
|
| 87 |
+
|3|guitar|
|
| 88 |
+
|4|keyboard|
|
| 89 |
+
|5|mallet|
|
| 90 |
+
|6|organ|
|
| 91 |
+
|7|reed|
|
| 92 |
+
|8|string|
|
| 93 |
+
|9|synth_lead|
|
| 94 |
+
|10|vocal|
|
| 95 |
+
|
| 96 |
+
|**Family**|**Acoustic**|**Electronic**|**Synthetic**|**Total**|
|
| 97 |
+
|:----|:----|:----|:----|:----|
|
| 98 |
+
|Bass|200|8387|60368|68955|
|
| 99 |
+
|Brass|13760|70|0|13830|
|
| 100 |
+
|Flute|6572|35|2816|9423|
|
| 101 |
+
|Guitar|13343|16805|5275|35423|
|
| 102 |
+
|Keyboard|8508|42645|3838|54991|
|
| 103 |
+
|Mallet|27722|5581|1763|35066|
|
| 104 |
+
|Organ|176|36401|0|36577|
|
| 105 |
+
|Reed|14262|76|528|14866|
|
| 106 |
+
|String|20510|84|0|20594|
|
| 107 |
+
|Synth Lead|0|0|5501|5501|
|
| 108 |
+
|Vocal|3925|140|6688|10753|
|
| 109 |
+
|**Total**|108978|110224|86777|305979|
|
| 110 |
+
|
| 111 |
+
3. Qualities: Sonic qualities of the note. See below for descriptions of the qualities, and [here](https://magenta.tensorflow.org/datasets/nsynth#quality-co-occurrences) for information on co-occurences between qualities.
|
| 112 |
+
|
| 113 |
+
|**Index**|**ID**|**Description**|
|
| 114 |
+
|:----|:----|:----|
|
| 115 |
+
|0|`bright`|A large amount of high frequency content and strong upper harmonics.|
|
| 116 |
+
|1|`dark`|A distinct lack of high frequency content, giving a muted and bassy sound. Also sometimes described as ‘Warm’.|
|
| 117 |
+
|2|`distortion`|Waveshaping that produces a distinctive crunchy sound and presence of many harmonics. Sometimes paired with non-harmonic noise.|
|
| 118 |
+
|3|`fast_decay`|Amplitude envelope of all harmonics decays substantially before the ‘note-off’ point at 3 seconds.|
|
| 119 |
+
|4|`long_release`|Amplitude envelope decays slowly after the ‘note-off’ point, sometimes still present at the end of the sample 4 seconds.|
|
| 120 |
+
|5|`multiphonic`|Presence of overtone frequencies related to more than one fundamental frequency.|
|
| 121 |
+
|6|`nonlinear_env`|Modulation of the sound with a distinct envelope behavior different than the monotonic decrease of the note. Can also include filter envelopes as well as dynamic envelopes.|
|
| 122 |
+
|7|`percussive`|A loud non-harmonic sound at note onset.|
|
| 123 |
+
|8|`reverb`|Room acoustics that were not able to be removed from the original sample.|
|
| 124 |
+
|9|`tempo-synced`|Rhythmic modulation of the sound to a fixed tempo.|
|
| 125 |
+
|
| 126 |
+
|
| 127 |
+
|
| 128 |
+
### Dataset Sources
|
| 129 |
+
|
| 130 |
+
<!-- Provide the basic links for the dataset. -->
|
| 131 |
+
|
| 132 |
+
- **Homepage:** https://magenta.tensorflow.org/datasets/nsynth
|
| 133 |
+
- **Paper:** https://arxiv.org/abs/1704.01279
|
| 134 |
+
|
| 135 |
+
## Uses
|
| 136 |
+
|
| 137 |
+
<!-- Address questions around how the dataset is intended to be used. -->
|
| 138 |
+
This dataset has seen much use in models for generating audio, and some of these models have even been used by high-profile artists. Another obvious application of the dataset could be for classification (identifying instruments or perhaps even qualities of music, which could be useful in things like music recommendation). See [here](https://colab.research.google.com/drive/16u5dvqWxA7o9S0iC6E8B3S77piFZ0BYL#scrollTo=Q5BGqIb87Pek&uniqifier=2) one such example (which is a work in progress).
|
| 139 |
+
|
| 140 |
+
|
| 141 |
+
## Dataset Structure
|
| 142 |
+
|
| 143 |
+
<!-- This section provides a description of the dataset fields, and additional information about the dataset structure such as criteria used to create the splits, relationships between data points, etc. -->
|
| 144 |
+
The dataset has three splits:
|
| 145 |
+
* Train: A training set with 289,205 examples. Instruments do not overlap with valid or test.
|
| 146 |
+
* Valid: A validation set with 12,678 examples. Instruments do not overlap with train.
|
| 147 |
+
* Test: A test set with 4,096 examples. Instruments do not overlap with train.
|
| 148 |
+
|
| 149 |
+
See below for descriptions of the features.
|
| 150 |
+
|
| 151 |
+
|Feature|Type|Description|
|
| 152 |
+
|:----|:----|:----|
|
| 153 |
+
|note|`int64`|A unique integer identifier for the note.|
|
| 154 |
+
|note_str|`str`|A unique string identifier for the note in the format `<instrument_str>-<pitch>-<velocity>`.|
|
| 155 |
+
|instrument|`int64`|A unique, sequential identifier for the instrument the note was synthesized from.|
|
| 156 |
+
|instrument_str|`str`|A unique string identifier for the instrument this note was synthesized from in the format `<instrument_family_str>-<instrument_production_str>-<instrument_name>`.|
|
| 157 |
+
|pitch|`int64`|The 0-based MIDI pitch in the range \[0, 127\].|
|
| 158 |
+
|velocity|`int64`|The 0-based MIDI velocity in the range \[0, 127\].|
|
| 159 |
+
|sample_rate|`int64`|The samples per second for the audio feature.|
|
| 160 |
+
|qualities|`[int64]`|A binary vector representing which sonic qualities are present in this note.|
|
| 161 |
+
|qualities_str|`[str]`|A list IDs of which qualities are present in this note selected from the sonic qualities list.|
|
| 162 |
+
|instrument_family|`int64`|The index of the instrument family this instrument is a member of.|
|
| 163 |
+
|instrument_family_str|`str`|The ID of the instrument family this instrument is a member of.|
|
| 164 |
+
|instrument_source|`int64`|The index of the sonic source for this instrument.|
|
| 165 |
+
|instrument_source_str|`str`|The ID of the sonic source for this instrument.|
|
| 166 |
+
|audio|`{'path': str, 'array': [float], 'sampling_rate': int64}`|A dictionary containing a path to the corresponding audio file, a list of audio samples represented as floating point values in the range \[-1,1\], and the sampling rate.|
|
| 167 |
+
|
| 168 |
+
|
| 169 |
+
An example instance generated with the loading script (note that this differs from the example instance on the homepage, as the script integrates the audio into the respective JSON files):
|
| 170 |
+
|
| 171 |
+
```
|
| 172 |
+
{'note': 84147,
|
| 173 |
+
'note_str': 'bass_synthetic_033-035-050',
|
| 174 |
+
'instrument': 417,
|
| 175 |
+
'instrument_str': 'bass_synthetic_033',
|
| 176 |
+
'pitch': 35,
|
| 177 |
+
'velocity': 50,
|
| 178 |
+
'sample_rate': 16000,
|
| 179 |
+
'qualities': [0, 1, 0, 0, 0, 0, 0, 0, 0, 0],
|
| 180 |
+
'qualities_str': ['dark'],
|
| 181 |
+
'instrument_family': 0,
|
| 182 |
+
'instrument_family_str': 'bass',
|
| 183 |
+
'instrument_source': 2,
|
| 184 |
+
'instrument_source_str': 'synthetic',
|
| 185 |
+
'audio': {'path': '/root/.cache/huggingface/datasets/downloads/extracted/335ef507846fb65b0b87154c22cefd1fe87ea83e8253ef1f72648a3fdfac9a5f/nsynth-test/audio/bass_synthetic_033-035-050.wav',
|
| 186 |
+
'array': array([0., 0., 0., ..., 0., 0., 0.]),
|
| 187 |
+
'sampling_rate': 16000}
|
| 188 |
+
}
|
| 189 |
+
```
|
| 190 |
+
|
| 191 |
+
## Potential Shortcomings
|
| 192 |
+
|
| 193 |
+
There are quite a few family-source pairings with little or no representation. While this is understandable in some cases - no acoustic Synth Lead, for instance - it may be problematic in others (no synthetic brass, strings, nor organ, < 100 electronic brass, flute, reed, and string samples). This can be particularly troublesome in classification problems, as there may not be sufficient data for a model to correctly distinguish between sources for a particular family of instruments. In music generation, on the other hand, these disparities may yield a bias toward the use of one source over others for a given family.
|
| 194 |
+
|
| 195 |
+
|
| 196 |
+
## Citation
|
| 197 |
+
|
| 198 |
+
<!-- If there is a paper or blog post introducing the dataset, the APA and Bibtex information for that should go in this section. -->
|
| 199 |
+
```
|
| 200 |
+
Jesse Engel, Cinjon Resnick, Adam Roberts, Sander Dieleman, Douglas Eck,
|
| 201 |
+
Karen Simonyan, and Mohammad Norouzi. "Neural Audio Synthesis of Musical Notes
|
| 202 |
+
with WaveNet Autoencoders." 2017.
|
| 203 |
+
```
|
| 204 |
+
|
| 205 |
+
**BibTeX:**
|
| 206 |
+
|
| 207 |
+
```
|
| 208 |
+
@misc{nsynth2017,
|
| 209 |
+
Author = {Jesse Engel and Cinjon Resnick and Adam Roberts and
|
| 210 |
+
Sander Dieleman and Douglas Eck and Karen Simonyan and
|
| 211 |
+
Mohammad Norouzi},
|
| 212 |
+
Title = {Neural Audio Synthesis of Musical Notes with WaveNet Autoencoders},
|
| 213 |
+
Year = {2017},
|
| 214 |
+
Eprint = {arXiv:1704.01279},
|
| 215 |
+
}
|
| 216 |
+
```
|
| 217 |
+
|
| 218 |
+
## Dataset Card Authors
|
| 219 |
+
|
| 220 |
+
John Gillen
|
data/test/test.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:68ad599a7f64541843e55d6f304ab03c0ac1cfa70107718e28d44eda4b0650e5
|
| 3 |
+
size 406437840
|
data/train/batch_0.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:62b3dba596f8920469cbdd0c80be1472e81fb4804ad8ca1c7ce73199a50ac64b
|
| 3 |
+
size 796358021
|
data/train/batch_1.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5ba3ffd63e7522c1080889d0ade804437125277173e0f80725dbcd4a5e8baed1
|
| 3 |
+
size 787265462
|
data/train/batch_10.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0eab1fa5b78135ff4398d95343800b4d6e73a28f7c437d5b0e07db35fedca16a
|
| 3 |
+
size 788564276
|
data/train/batch_11.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9a7b0dfd4e2c9c835ebb1923a2b2737a503e3e1991aded72aa50b59e233bda6e
|
| 3 |
+
size 793792540
|
data/train/batch_12.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6a3932a180ae6da3638d22864787ab9891ce2c84b3c784bfe9ae44cbf8b9812d
|
| 3 |
+
size 791452074
|
data/train/batch_13.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e101a0b73589dc1fbd58a153129154da4ecf0a801aad8319eef030bb6d390325
|
| 3 |
+
size 792405546
|
data/train/batch_14.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8af03ee3cd106f4e4a5a70259a19ee3a64d64c857775b2a1d460c503ab6dec83
|
| 3 |
+
size 785843313
|
data/train/batch_15.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fddc46e7ae6d2d2f05f2c8fa16440dbaf5aad6b9cf098c692c3ab42a9d7c27e3
|
| 3 |
+
size 787700308
|
data/train/batch_16.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:92a710d9830aded2ea931d75e6f0185ab85f0ebbd4cefe9a599e2faad0fbef06
|
| 3 |
+
size 786338275
|
data/train/batch_17.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c958a3b0cf97f079f7bf5bc6cd49553529ae65b5431459ea1839522e7c5d1657
|
| 3 |
+
size 791784796
|
data/train/batch_18.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:43f3fc38af291384130fbcdf142b7fb2d1b449eb62aebc97b09ce9de6818a8c9
|
| 3 |
+
size 790403110
|
data/train/batch_19.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:acb51647daa51fb554858a1a55f473102768e0723b8f3822613e84190fcb55d2
|
| 3 |
+
size 793020988
|
data/train/batch_2.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8ad0550064515d11d0c61b7875364ffb77cfea85894cdaa85ebaea601f488d54
|
| 3 |
+
size 793116148
|
data/train/batch_20.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7034b3c03f85c8ef8a5c89677c68afa836edc83719a56e70e184255a4a15891d
|
| 3 |
+
size 788754696
|
data/train/batch_21.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:27b8d47a737e8db7c175a2fcadd81dde1ca3b0df9553bc55bff536d678cf058e
|
| 3 |
+
size 787232056
|
data/train/batch_22.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:99bbbdd48bbbfb2ef55e156e7570546861bd66beb61aef4100d4887ba263c730
|
| 3 |
+
size 789507755
|
data/train/batch_23.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d0687de391bfc162634865e991335b01536863ad44e57f3636e91df359894311
|
| 3 |
+
size 792273241
|
data/train/batch_24.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f74e7b1d0e0929d9250403365fa7b667b6883c35118942f879b7d7e4e6e3f956
|
| 3 |
+
size 792650672
|
data/train/batch_25.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:87b13f2e6aae8ba663ad2c0984b3a274a6a6e070ec7b96de900966ba00210a28
|
| 3 |
+
size 790447665
|
data/train/batch_26.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5d352b53732d7d3ec491d19ca5a3938ba6dd8a99ac7bbda591fdb4072a1b7205
|
| 3 |
+
size 791299957
|
data/train/batch_27.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:64b49f4ccbce2c140be8230f18ff5239d3279efdd2cc9de738c9c0f984829724
|
| 3 |
+
size 793537750
|
data/train/batch_28.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dd05cc8eb2f9a5af9764a59141a0ab8d586a1032c2514484da28654dc13b8091
|
| 3 |
+
size 784191126
|
data/train/batch_29.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b70ee588308bec78ba53d527228aafa7c10442195c5ba2e08581211a9171fb3d
|
| 3 |
+
size 791995324
|
data/train/batch_3.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:56ab21d1a8a18d0ef5fe1ad43c4e008f75d1db8f9baac607c2ab16775e635241
|
| 3 |
+
size 789498122
|
data/train/batch_30.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bd522f736fcdbc133403ff0368d1cfb10cbb18b7899de51080c68c5185032251
|
| 3 |
+
size 792410824
|
data/train/batch_31.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:32f611cb1b36e74cc2bfae41078cbdeff26e1124e67d7f1c5cba68340e52cfd8
|
| 3 |
+
size 793853930
|
data/train/batch_32.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3c426f26c6f96e7a66c38a1587d35dbd7fd76e695ac67496391d697ff9a2ffb1
|
| 3 |
+
size 788387592
|
data/train/batch_33.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:97bdcbc84e60bd2c65a63d138239cb14b20f124f12dc3353e453ae4461f7658c
|
| 3 |
+
size 796676660
|
data/train/batch_34.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:369fddd5af08573c2a6e15d380873cd5a2e231169f5084daa7dfb7087ab9a7cd
|
| 3 |
+
size 787803324
|
data/train/batch_4.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3f2b709d945503f0af8439dc9a05d9e23b5cfd61ce8d04a692dca126de54f4ee
|
| 3 |
+
size 790927202
|
data/train/batch_5.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7cf31d7365ec7217fc0d9b9587a5e6afd4316b378a1ced5af154027a790d8c94
|
| 3 |
+
size 788673006
|
data/train/batch_6.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6af7b835f2c81ea9157fbe00afa898f1a2f74c09d0f05f984e209ad913f177e8
|
| 3 |
+
size 792314514
|
data/train/batch_7.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1728425026256e7578f65964e76f06bab0590a70ee67246eebac5c3eff39aa6e
|
| 3 |
+
size 790371194
|
data/train/batch_8.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e8e47d55bb1f4c76674e7cedd1063bbf03092f741d30b7bf89ef3f476c91daa5
|
| 3 |
+
size 787038522
|
data/train/batch_9.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b53220bbd7f914f87664491ee0d7d648574b7c119afe627aa04dc36f4b99ffcb
|
| 3 |
+
size 788911126
|
data/validation/validation.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a8f5b5b6db152c25c7f5bb6a72737470d1ae7744cd4d8e933bd5637decf3ac44
|
| 3 |
+
size 1247167762
|