fcaspe / dx7pytorch

A musical instrument audio dataset generated on-the-fly using FM synthesis.
GNU General Public License v2.0
30 stars 1 forks source link

dx7pytorch

A Pytorch FM Synthesizer for audio deep learning.

Intent

Music instrument datasets are scarce and usually very large, composed by thousands of very small files, being difficult to handle and of limited versatility. dx7pytorch addresses this problem by bundling an FM Synthesizer core into a Pytorch dataset wrapper.

The synthesizer core is a C++ emulator of the famous Yamaha DX7, a programmable digital instrument for which rich and varied timbres can be created by manipulating its internal parameters. Each combination of parameters is called patch and describes a particular timbre.

The timbres described by the patches can be synthesized into sound samples at any note or velocity. Hence, the dataset only requires to store patch information, occupying only a couple of Megabytes.

There exist thousands of patches for this instrument. This dataset includes a collection of 29830 unique patches extracted from a public source and filtered by a CRC32 hash filter. See next sections to know how to replicate the filtering process and compile your own DX7 patch dataset.

Features

How do I use it?

dx7pytorch in 4 simple steps!

  1. In your Pytorch script, create an instance of the dx7pytorch dataset class, specifying:
    • Path to the patch collection.
    • MIDI note and velocity range to synthesize.
    • Sampling frequency and Instance length.
    • The use of a patch filter if desired.
  2. Use the dataset interface or a Pytorch dataloader to request audio instances.
    • A specific MIDI note and velocity within the specified range is sent to the synthesizer.
  3. The audio samples are generated on-the-fly, every time a request is received.
  4. The Pytorch wrapper can additionally deliver MIDI annotation or patch information.

Try it!

  1. Install this Python package:
    pip3 install git+https://github.com/fcaspe/dx7pytorch
  2. Now, check out the tests directory at this repo!

Compile your own patch collection

This dataset contains a subset of unique patches extracted from Bobby Blues webpage.

Acknowledgements