An AI for Music Generation

Overview

MuseGAN

MuseGAN is a project on music generation. In a nutshell, we aim to generate polyphonic music of multiple tracks (instruments). The proposed models are able to generate music either from scratch, or by accompanying a track given a priori by the user.

We train the model with training data collected from Lakh Pianoroll Dataset to generate pop song phrases consisting of bass, drums, guitar, piano and strings tracks.

Sample results are available here.

Looking for a PyTorch version? Check out this repository.

Prerequisites

Below we assume the working directory is the repository root.

Install dependencies

  • Using pipenv (recommended)

    Make sure pipenv is installed. (If not, simply run pip install pipenv.)

    # Install the dependencies
    pipenv install
    # Activate the virtual environment
    pipenv shell
  • Using pip

    # Install the dependencies
    pip install -r requirements.txt

Prepare training data

The training data is collected from Lakh Pianoroll Dataset (LPD), a new multitrack pianoroll dataset.

# Download the training data
./scripts/download_data.sh
# Store the training data to shared memory
./scripts/process_data.sh

You can also download the training data manually (train_x_lpd_5_phr.npz).

As pianoroll matrices are generally sparse, we store only the indices of nonzero elements and the array shape into a npz file to save space, and later restore the original array. To save some training data data into this format, simply run np.savez_compressed("data.npz", shape=data.shape, nonzero=data.nonzero())

Scripts

We provide several shell scripts for easy managing the experiments. (See here for a detailed documentation.)

Below we assume the working directory is the repository root.

Train a new model

  1. Run the following command to set up a new experiment with default settings.

    # Set up a new experiment
    ./scripts/setup_exp.sh "./exp/my_experiment/" "Some notes on my experiment"
  2. Modify the configuration and model parameter files for experimental settings.

  3. You can either train the model:

    # Train the model
    ./scripts/run_train.sh "./exp/my_experiment/" "0"

    or run the experiment (training + inference + interpolation):

    # Run the experiment
    ./scripts/run_exp.sh "./exp/my_experiment/" "0"

Collect training data

Run the following command to collect training data from MIDI files.

# Collect training data
./scripts/collect_data.sh "./midi_dir/" "data/train.npy"

Use pretrained models

  1. Download pretrained models

    # Download the pretrained models
    ./scripts/download_models.sh

    You can also download the pretrained models manually (pretrained_models.tar.gz).

  2. You can either perform inference from a trained model:

    # Run inference from a pretrained model
    ./scripts/run_inference.sh "./exp/default/" "0"

    or perform interpolation from a trained model:

    # Run interpolation from a pretrained model
    ./scripts/run_interpolation.sh "./exp/default/" "0"

Outputs

By default, samples will be generated alongside the training. You can disable this behavior by setting save_samples_steps to zero in the configuration file (config.yaml). The generated will be stored in the following three formats by default.

  • .npy: raw numpy arrays
  • .png: image files
  • .npz: multitrack pianoroll files that can be loaded by the Pypianoroll package

You can disable saving in a specific format by setting save_array_samples, save_image_samples and save_pianoroll_samples to False in the configuration file.

The generated pianorolls are stored in .npz format to save space and processing time. You can use the following code to write them into MIDI files.

from pypianoroll import Multitrack

m = Multitrack('./test.npz')
m.write('./test.mid')

Sample Results

Some sample results can be found in ./exp/ directory. More samples can be downloaded from the following links.

Papers

Convolutional Generative Adversarial Networks with Binary Neurons for Polyphonic Music Generation
Hao-Wen Dong and Yi-Hsuan Yang
in Proceedings of the 19th International Society for Music Information Retrieval Conference (ISMIR), 2018.
[website] [arxiv] [paper] [slides(long)] [slides(short)] [poster] [code]

MuseGAN: Multi-track Sequential Generative Adversarial Networks for Symbolic Music Generation and Accompaniment
Hao-Wen Dong,* Wen-Yi Hsiao,* Li-Chia Yang and Yi-Hsuan Yang, (*equal contribution)
in Proceedings of the 32nd AAAI Conference on Artificial Intelligence (AAAI), 2018.
[website] [arxiv] [paper] [slides] [code]

MuseGAN: Demonstration of a Convolutional GAN Based Model for Generating Multi-track Piano-rolls
Hao-Wen Dong,* Wen-Yi Hsiao,* Li-Chia Yang and Yi-Hsuan Yang (*equal contribution)
in Late-Breaking Demos of the 18th International Society for Music Information Retrieval Conference (ISMIR), 2017. (two-page extended abstract)
[paper] [poster]

Comments
  • Error: no module named SharedArray

    Error: no module named SharedArray

    The full error is below:

    Traceback (most recent call last): File "main.py", line 8, in '.'.join(('musegan', CONFIG['exp']['model'], 'models'))) File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\lib\importlib_init_.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 994, in _gcd_import File "", line 971, in _find_and_load File "", line 955, in _find_and_load_unlocked File "", line 665, in _load_unlocked File "", line 678, in exec_module File "", line 219, in _call_with_frames_removed File "C:\Users\PU40005904\Downloads\musegan-master\musegan-master\musegan\musegan\models.py", line 9, in from musegan.utils.metrics import Metrics File "C:\Users\PU40005904\Downloads\musegan-master\musegan-master\musegan\utils\metrics.py", line 7, in import SharedArray as sa ModuleNotFoundError: No module named 'SharedArray'

    SharedArray is not being installed when pip install sharedarray is ran, error is:

    Failed building wheel for sharedarray Running setup.py clean for sharedarray Failed to build sharedarray Installing collected packages: sharedarray Running setup.py install for sharedarray ... error Complete output from command "c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\python.exe" -u -c "import setuptools, tokenize;file='C:\Users\PU40005904\AppData\Local\Temp\pip-install-6nedy54o\sharedarray\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\PU40005904\AppData\Local\Temp\pip-record-n229w795\install-record.txt --single-version-externally-managed --compile: running install running build running build_ext building 'SharedArray' extension creating build creating build\temp.win-amd64-3.6 creating build\temp.win-amd64-3.6\Release creating build\temp.win-amd64-3.6\Release\src C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD "-Ic:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages\numpy\core\include" "-Ic:\program files (x86)\microsoft visual studio\shared\anaconda3_64\include" "-Ic:\program files (x86)\microsoft visual studio\shared\anaconda3_64\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /Tc.\src\map_owner.c /Fobuild\temp.win-amd64-3.6\Release.\src\map_owner.obj map_owner.c .\src\map_owner.c(19): fatal error C1083: Cannot open include file: 'sys/mman.h': No such file or directory error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX86\x64\cl.exe' failed with exit status 2

    ----------------------------------------
    

    Command ""c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\python.exe" -u -c "import setuptools, tokenize;file='C:\Users\PU40005904\AppData\Local\Temp\pip-install-6nedy54o\sharedarray\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\PU40005904\AppData\Local\Temp\pip-record-n229w795\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\PU40005904\AppData\Local\Temp\pip-install-6nedy54o\sharedarray\

    If someone has a way to make this work, please help. thanks.

    opened by iris03 8
  • some error in google colab

    some error in google colab

    Hi, I am trying to run training process using this line ./scripts/run_train.sh "./exp/my_experiment/" "0" in google colab with gpu and have this error:

    musegan.train INFO Using parameters: {'beat_resolution': 12, 'condition_track_idx': None, 'data_shape': [4, 48, 84, 5], 'is_accompaniment': False, 'is_conditional': False, 'latent_dim': 128, 'nets': {'discriminator': 'default', 'generator': 'default'}, 'use_binary_neurons': False} musegan.train INFO Using configurations: {'adam': {'beta1': 0.5, 'beta2': 0.9}, 'batch_size': 64, 'colormap': [[1.0, 0.0, 0.0], [1.0, 0.5, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0], [0.0, 0.5, 1.0]], 'config': './exp/my_experiment//config.yaml', 'data_filename': 'train_x_lpd_5_phr', 'data_source': 'sa', 'eval_dir': '/content/musegan/exp/my_experiment/eval', 'evaluate_steps': 100, 'exp_dir': '/content/musegan/exp/my_experiment', 'gan_loss_type': 'wasserstein', 'gpu': '0', 'initial_learning_rate': 0.001, 'learning_rate_schedule': {'end': 50000, 'end_value': 0.0, 'start': 45000}, 'log_dir': '/content/musegan/exp/my_experiment/logs/train', 'log_loss_steps': 100, 'midi': {'is_drums': [1, 0, 0, 0, 0], 'lowest_pitch': 24, 'programs': [0, 0, 25, 33, 48], 'tempo': 100}, 'model_dir': '/content/musegan/exp/my_experiment/model', 'n_dis_updates_per_gen_update': 5, 'n_jobs': 20, 'params': './exp/my_experiment//params.yaml', 'sample_dir': '/content/musegan/exp/my_experiment/samples', 'sample_grid': [8, 8], 'save_array_samples': True, 'save_checkpoint_steps': 10000, 'save_image_samples': True, 'save_pianoroll_samples': True, 'save_samples_steps': 100, 'save_summaries_steps': 0, 'slope_schedule': {'end': 50000, 'end_value': 5.0, 'start': 10000}, 'src_dir': '/content/musegan/exp/my_experiment/src', 'steps': 50000, 'use_gradient_penalties': True, 'use_learning_rate_decay': True, 'use_random_transpose': False, 'use_slope_annealing': False, 'use_train_test_split': False} musegan.train INFO Loading training data. musegan.train INFO Training data size: 102378 musegan.train INFO Building dataset. tensorflow WARNING From /usr/local/lib/python3.6/dist-packages/tensorflow/python/data/ops/dataset_ops.py:429: py_func (from tensorflow.python.ops.script_ops) is deprecated and will be removed in a future version. Instructions for updating: tf.py_func is deprecated in TF V2. Instead, use tf.py_function, which takes a python function which manipulates tf eager tensors instead of numpy arrays. It's easy to convert a tf eager tensor to an ndarray (just call tensor.numpy()) but having access to eager tensors means tf.py_functions can use accelerators such as GPUs as well as being differentiable using a gradient tape.

    musegan.model INFO Building model. musegan.model INFO Building training nodes. tensorflow WARNING From /usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version. Instructions for updating: Colocations handled automatically by placer. tensorflow WARNING From /content/musegan/src/musegan/presets/ops.py:16: conv3d_transpose (from tensorflow.python.layers.convolutional) is deprecated and will be removed in a future version. Instructions for updating: Use keras.layers.conv3d_transpose instead. tensorflow WARNING From /content/musegan/src/musegan/presets/ops.py:21: batch_normalization (from tensorflow.python.layers.normalization) is deprecated and will be removed in a future version. Instructions for updating: Use keras.layers.batch_normalization instead. tensorflow WARNING From /content/musegan/src/musegan/presets/ops.py:12: conv3d (from tensorflow.python.layers.convolutional) is deprecated and will be removed in a future version. Instructions for updating: Use keras.layers.conv3d instead. tensorflow WARNING From /content/musegan/src/musegan/presets/ops.py:8: dense (from tensorflow.python.layers.core) is deprecated and will be removed in a future version. Instructions for updating: Use keras.layers.dense instead. musegan.model INFO Building losses. tensorflow WARNING From /usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/math_ops.py:3066: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version. Instructions for updating: Use tf.cast instead. musegan.model INFO Building training ops. tensorflow WARNING From /usr/local/lib/python3.6/dist-packages/tensorflow/python/training/learning_rate_decay_v2.py:321: div (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version. Instructions for updating: Deprecated in favor of operator or tf.math.divide. musegan.model INFO Building summaries. musegan.train INFO Number of trainable parameters in Model: 3,943,968 musegan.train INFO Number of trainable parameters in Generator: 2,578,127 musegan.train INFO Number of trainable parameters in Discriminator: 1,365,841 musegan.train INFO Loading sample_z. musegan.model INFO Building prediction nodes. musegan.train INFO Training start. tensorflow INFO Create CheckpointSaverHook. tensorflow INFO Graph was finalized. 2019-06-09 19:03:56.671015: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA 2019-06-09 19:03:56.852445: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:998] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2019-06-09 19:03:56.853229: I tensorflow/compiler/xla/service/service.cc:150] XLA service 0x10943340 executing computations on platform CUDA. Devices: 2019-06-09 19:03:56.853277: I tensorflow/compiler/xla/service/service.cc:158] StreamExecutor device (0): Tesla T4, Compute Capability 7.5 2019-06-09 19:03:56.855500: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2300000000 Hz 2019-06-09 19:03:56.855683: I tensorflow/compiler/xla/service/service.cc:150] XLA service 0x109431e0 executing computations on platform Host. Devices: 2019-06-09 19:03:56.855721: I tensorflow/compiler/xla/service/service.cc:158] StreamExecutor device (0): , 2019-06-09 19:03:56.856041: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1433] Found device 0 with properties: name: Tesla T4 major: 7 minor: 5 memoryClockRate(GHz): 1.59 pciBusID: 0000:00:04.0 totalMemory: 14.73GiB freeMemory: 14.60GiB 2019-06-09 19:03:56.856089: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1512] Adding visible gpu devices: 0 2019-06-09 19:03:56.856787: I tensorflow/core/common_runtime/gpu/gpu_device.cc:984] Device interconnect StreamExecutor with strength 1 edge matrix: 2019-06-09 19:03:56.856809: I tensorflow/core/common_runtime/gpu/gpu_device.cc:990] 0 2019-06-09 19:03:56.856819: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1003] 0: N 2019-06-09 19:03:56.857079: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 14202 MB memory) -> physical GPU (device: 0, name: Tesla T4, pci bus id: 0000:00:04.0, compute capability: 7.5) tensorflow WARNING From /usr/local/lib/python3.6/dist-packages/tensorflow/python/training/saver.py:1266: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version. Instructions for updating: Use standard file APIs to check for files with this prefix. tensorflow INFO Restoring parameters from /content/musegan/exp/my_experiment/model/model.ckpt-0 tensorflow WARNING From /usr/local/lib/python3.6/dist-packages/tensorflow/python/training/saver.py:1070: get_checkpoint_mtimes (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version. Instructions for updating: Use standard file utilities to get mtimes. tensorflow INFO Running local_init_op. tensorflow INFO Done running local_init_op. tensorflow INFO Saving checkpoints for 0 into /content/musegan/exp/my_experiment/model/model.ckpt. 2019-06-09 19:04:11.607825: I tensorflow/stream_executor/dso_loader.cc:152] successfully opened CUDA library libcublas.so.10.0 locally musegan.train INFO step=100, gen_loss=-1.2372E+02, dis_loss=-1.9598E+02 musegan.train INFO Running sampler musegan.train INFO Running evaluation ./scripts/run_train.sh: line 19: 879 Bus error (core dumped) python3 "$DIR/../src/train.py" --exp_dir "$1" --params "$1/params.yaml" --config "$1/config.yaml" --gpu "$gpu"

    opened by TatianaZobnina 6
  • FileNotFoundError: [Errno 2] No such file or directory

    FileNotFoundError: [Errno 2] No such file or directory

    I found the project very interesting. I want to run to learn. I tried to run main.py but I came across the error: FileNotFoundError: [Errno 2] No such file or directory: 'lastfm_alternative_8b_phrase'.

    I downloaded this lastfm_alternative_8b_phrase.npy file. I put it in the training_data folder and also inside the musegan folder. Then I tried to enter the full path of the file. I also removed the .npy extension but it still did not work. what am I doing wrong?

    Thank you!

    opened by eurismarpires 6
  • training results

    training results

    hello, how can i achieve same results on your official website? The current training results are not continuous in time. Can you help me? what should I do? Looking forward to your reply. thx

    opened by gxd1994 6
  • the preprocessing of train dataset

    the preprocessing of train dataset

    Hi ,I don't know how to get 'tra_X_phrase_all' in main.py, I run the preprocess code and I only get many npz files. What I should do to get the 'tra_X_phrase_all' file? Thank you very much!

    opened by zzdang 6
  • How to convert wav into midi?

    How to convert wav into midi?

    I've been trying to convert wav file into midi file using the software WaoN, waves to notes transcriber. But the problem is, irrespective of what instruments are in the .wav file, the .mid always have a single instrumental piano and hence one track. I need to get multitrack output, by which I mean, tracks of piano, drums, and like these.

    Using a python module pypianoroll -

    For a song that is already in midi, here, let it be - "Bohemian Rhapsody", I get output something like this:

    >>> pypianoroll.Multitrack('Bohemian_Rhapsody.mid')
    Multitrack(tracks=['', '', '', '', '', '', '', '', '', '', '', '', ''], tempo=array([78.000078, 78.000078, 78.000078, ..., 78.000078, 78.000078,
       78.000078]), downbeat=array([ True, False, False, ..., False, False, False]), beat_resolution=24, name=unknown)
    

    It shows, it has 13 different track in it.

    But when I convert a wav of this file, into midi using WaoN, there it shows me

    >>> pypianoroll.Multitrack('Bohemian_Rhapsody.mid')
    Multitrack(tracks=[''], tempo=array([120., 120., 120., ..., 120., 120., 120.]), downbeat=None, beat_resolution=24, name=unknown)
    

    With a single track.

    This happens every time, with every file; when I get a result in multitrack.

    I can use some help. Can anyone point out what's wrong? Or give a suggestion on how to proceed?

    opened by techcentaur 5
  • Does anyone have a copy of the original training data?

    Does anyone have a copy of the original training data?

    We accidentally deleted the original training data (tra_phr.npy and tra_bar.npy). If you have a copy, please let us know so that we can put them back on the website. Thanks!

    opened by salu133445 5
  • cannot find version tensorflow-gpu==1.10.1

    cannot find version tensorflow-gpu==1.10.1

    Couldn't successfully run 'pip install -r requirements.txt' because 1.10.1 is too old. I change tensorflow version to 1.15.2 in the requirements.txt and successfully install it.

    dependencies 
    opened by jamesliu 4
  • I want to construct a dataset(.npz) with my midi data.

    I want to construct a dataset(.npz) with my midi data.

    Hi! Thanks for sharing the MuseGan source code!!

    But, how can I consist of dataset using my midi data? If you don't mind, could you share the source code or reference(documents) which how did you consist 'train_x_lpd_5_phr.npz' with midi data? I already looked the 'https://github.com/wayne391/symbolic-musical-datasets/tree/master/5-track-pianoroll' and 'https://salu133445.github.io/pypianoroll/' but I'm still not sure about it.

    Thanks :)

    question 
    opened by bokyungJ 4
  • Where to start?

    Where to start?

    Hello @salu133445 and the rest of the crew :)

    First off, I would like to thank you for sharing this project as an open source one! I think you've done an amazing job with this project.

    However, I'm a bit confused as to what exactly I should focus on if I want to start off from the most recent or the most well optimized base? Would you actually recommend going for bmusegan?

    musegan/V2 seems like a great start that's much more simplified and seems just as recent (and I think I'm having success porting it to Google Colab), but then it says there: "Warning: this version is no longer maintained", so I'm confused. Does that statement refer to musegan in general (as being replaced by bmusegan) or just to the musegan in the V2 folder?

    I apologize if this was not the right place to ask questions like these, but I assumed it is ok, since I've read other posts here in the issues. Please bear with my newbiness about how to use Github, I'm both forking and posting an issue for the first time ever :)

    question 
    opened by VegetaDTX 4
  • ValueError: Cannot load file containing pickled data when allow_pickle=False

    ValueError: Cannot load file containing pickled data when allow_pickle=False

    ./scripts/process_data.sh Loading data from '/mnt/c/Users/kiomer/musegan/scripts/../data/train_x_lpd_5_phr.npz'. Traceback (most recent call last): File "/mnt/c/Users/kiomer/musegan/scripts/../src/process_data.py", line 76, in main() File "/mnt/c/Users/kiomer/musegan/scripts/../src/process_data.py", line 63, in main with np.load(filepath) as loaded: File "/home/kiomer/.local/lib/python3.8/site-packages/numpy/lib/npyio.py", line 444, in load raise ValueError("Cannot load file containing pickled data " ValueError: Cannot load file containing pickled data when allow_pickle=False

    Problem as above

    opened by kiomer404 4
  • Bump setuptools from 39.1.0 to 65.5.1

    Bump setuptools from 39.1.0 to 65.5.1

    Bumps setuptools from 39.1.0 to 65.5.1.

    Release notes

    Sourced from setuptools's releases.

    v65.5.1

    No release notes provided.

    v65.5.0

    No release notes provided.

    v65.4.1

    No release notes provided.

    v65.4.0

    No release notes provided.

    v65.3.0

    No release notes provided.

    v65.2.0

    No release notes provided.

    v65.1.1

    No release notes provided.

    v65.1.0

    No release notes provided.

    v65.0.2

    No release notes provided.

    v65.0.1

    No release notes provided.

    v65.0.0

    No release notes provided.

    v64.0.3

    No release notes provided.

    v64.0.2

    No release notes provided.

    v64.0.1

    No release notes provided.

    v64.0.0

    No release notes provided.

    v63.4.3

    No release notes provided.

    v63.4.2

    No release notes provided.

    ... (truncated)

    Changelog

    Sourced from setuptools's changelog.

    v65.5.1

    Misc ^^^^

    • #3638: Drop a test dependency on the mock package, always use :external+python:py:mod:unittest.mock -- by :user:hroncok
    • #3659: Fixed REDoS vector in package_index.

    v65.5.0

    Changes ^^^^^^^

    • #3624: Fixed editable install for multi-module/no-package src-layout projects.
    • #3626: Minor refactorings to support distutils using stdlib logging module.

    Documentation changes ^^^^^^^^^^^^^^^^^^^^^

    • #3419: Updated the example version numbers to be compliant with PEP-440 on the "Specifying Your Project’s Version" page of the user guide.

    Misc ^^^^

    • #3569: Improved information about conflicting entries in the current working directory and editable install (in documentation and as an informational warning).
    • #3576: Updated version of validate_pyproject.

    v65.4.1

    Misc ^^^^

    • #3613: Fixed encoding errors in expand.StaticModule when system default encoding doesn't match expectations for source files.
    • #3617: Merge with pypa/distutils@6852b20 including fix for pypa/distutils#181.

    v65.4.0

    Changes ^^^^^^^

    v65.3.0

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Project dependencies may have API risk issues

    Project dependencies may have API risk issues

    Hi, In musegan, inappropriate dependency versioning constraints can cause risks.

    Below are the dependencies and version constraints that the project is using

    setuptools==39.1.0
    absl-py==0.4.1
    astor==0.7.1
    gast==0.2.0
    grpcio==1.14.2
    imageio==2.3.0
    Markdown==2.6.11
    mido==1.2.8
    numpy==1.14.5
    Pillow==5.2.0
    pretty-midi==0.2.8
    protobuf==3.6.1
    pypianoroll==0.4.6
    PyYAML==3.13
    scipy==1.1.0
    SharedArray==3.0.0
    six==1.11.0
    tensorboard==1.10.0
    tensorflow-gpu==1.10.1
    termcolor==1.1.0
    Werkzeug==0.14.1
    

    The version constraint == will introduce the risk of dependency conflicts because the scope of dependencies is too strict. The version constraint No Upper Bound and * will introduce the risk of the missing API Error because the latest version of the dependencies may remove some APIs.

    After further analysis, in this project, The version constraint of dependency imageio can be changed to >=1.1-linux32,<=2.19.3. The version constraint of dependency numpy can be changed to >=1.8.0,<=1.23.0rc3.

    The above modification suggestions can reduce the dependency conflicts as much as possible, and introduce the latest version as much as possible without calling Error in the projects.

    The invocation of the current project includes all the following methods.

    The calling methods from the imageio
    imageio.imwrite
    
    The calling methods from the numpy
    numpy.linalg.norm
    
    The calling methods from the all methods
    is_piano
    segment_quality
    args.input_dir.glob
    ops.dense.get_shape
    args.outfile.endswith
    pprint.pformat
    tensorflow.sqrt
    tensorflow.reduce_mean.get_shape
    get_metric_ops
    musegan.utils.backup_src
    tracks.append
    tensorflow.assign_add
    os.path.dirname
    tensorflow.train.AdamOptimizer
    tensorflow.variable_scope
    tensorflow.maximum
    pianoroll.set_shape
    tensorflow.tile
    pypianoroll.Track
    tensorflow.truncated_normal_initializer
    tensorflow.summary.scalar
    tensorflow.norm
    op.outputs.consumers.consumers
    argparse.ArgumentParser.add_argument
    tensorflow.layers.conv2d_transpose
    musegan.config.SHUFFLE_BUFFER_SIZE.dataset.shuffle.repeat.batch.prefetch
    is_string
    tconv_layer
    len
    musegan.data.get_dataset.make_one_shot_iterator
    update_not_none
    tensorflow.zeros
    setup
    input
    sys.exit
    join
    binary_ops.binary_stochastic_ST
    numpy.pad
    numpy.random.choice
    shutil.copytree
    diff.transpose.reshape
    f.readline.split.strip
    self.dis
    musegan.config.SHUFFLE_BUFFER_SIZE.dataset.shuffle.repeat
    numpy.errstate
    pass_through_sigmoid
    tensorflow.get_default_graph.gradient_override_map
    numpy.arccos
    musegan.utils.update_not_none
    tensorflow.trainable_variables
    tensorflow.get_collection
    _array_to_image.items
    numpy.roll
    main
    op.graph.get_operation_by_name
    pianorolls.items
    ok_segment_list.extend
    binary_round
    tensorflow.train.polynomial_decay
    musegan.utils.load_component
    _gen_data
    f.readline.split
    numpy.zeros
    logging.FileHandler.setFormatter
    _save_pianoroll
    numpy.arange
    musegan.io_utils.image_grid
    numpy.prod
    numpy.matmul
    self.get_train_nodes
    load_data_from_npy
    tensorflow.pad.get_shape
    polyphonic_rate
    xv.flatten.flatten
    song_ok_segments.append
    tensorflow.transpose
    _drum_pattern_mask
    numpy.concatenate.nonzero
    shutil.rmtree
    scipy.stats.truncnorm.rvs
    array.astype
    tensorflow.expand_dims
    op.outputs.consumers
    tensorflow.python.framework.ops.name_scope
    os.path.splitext
    slerp
    load_or_create_samples
    argparse.ArgumentParser
    tensorflow.nn.relu
    tensorflow.reduce_mean
    musegan.data.get_dataset
    qualified_note_rate
    ops.get_normalization
    numpy.linspace
    tensorflow.py_func
    check_which_family
    logging.FileHandler
    numpy.diff.transpose
    self.gen
    binary_stochastic_REINFORCE
    tensorflow.truncated_normal
    musegan.model.Model
    vars
    numpy.sum
    tensorflow.Variable
    musegan.io_utils.vector_to_image
    numpy.random.uniform
    tensorflow.cast
    tensorflow.reduce_sum
    max
    create_shared_array
    yaml.safe_load
    sum
    tensorflow.get_default_graph.get_collection
    conv_layer
    os.path.basename
    numpy.save
    f.readline
    tensorflow.train.Saver
    numpy.concatenate
    input.lower
    is_guitar
    tensorflow.group
    numpy.load
    numpy.product
    SharedArray.attach
    musegan.metrics.get_save_metric_ops
    tensorflow.round
    musegan.data.load_data
    numpy.reshape
    tensorflow.matmul
    logging.getLogger.info
    data.astype.astype
    dict2.items
    _save_array
    SharedArray.delete
    empty_bar_rate
    numpy.dot
    _scale_mask
    params.load_component
    _to_tonal_space
    musegan.config.SHUFFLE_BUFFER_SIZE.dataset.shuffle.repeat.batch
    range
    tensorflow.constant.reshape
    numpy.expand_dims
    random_transpose
    get_n_params
    numpy.cos
    tensorflow.shape
    ops.conv3d
    musegan.io_utils.pianoroll_to_image
    save_array_ops.append
    int
    pianoroll.squeeze.clip.reshape
    is_bass
    numpy.reshape.astype
    tensor_logger_values.items
    list
    _save_colored_images
    tensorflow.assign
    numpy.tile
    tensorflow.layers.dense
    musegan.config.SHUFFLE_BUFFER_SIZE.dataset.shuffle.repeat.batch.shuffle
    logging.basicConfig
    to_chroma
    tensorflow.count_nonzero
    tensorflow.control_dependencies
    arrays.items
    tensorflow.data.Dataset.from_generator
    _save_images
    tensorflow.losses.sigmoid_cross_entropy
    save_image_ops.append
    musegan.utils.load_yaml
    numpy.random.randint
    imageio.imwrite
    tensorflow.square
    SharedArray.create
    os.path.realpath
    tensorflow.train.NanTensorHook
    tensorflow.get_default_graph.add_to_collection
    musegan.data.get_samples
    tensorflow.ones
    numpy.pad.reshape
    numpy.array
    os.path.join
    numpy.empty
    l_bar.get_shape
    os.makedirs
    _array_to_image
    l_bar.get_shape.as_list
    tensorflow.python.framework.ops.RegisterGradient
    _save_image_grid
    musegan.utils.make_sure_path_exists
    tensorflow.constant_initializer
    loss_fn
    logging.getLogger
    numpy.transpose
    format
    array.reshape
    enumerate
    norm
    ops.dense
    sess.should_stop
    numpy.diff
    ops.tconv3d
    importlib.import_module
    numpy.random.permutation
    numpy.count_nonzero
    os.path.exists
    pypianoroll.Multitrack
    zip
    set_pianoroll_shape
    tensorflow.random_uniform
    tensorflow.placeholder
    logger.addHandler
    name.startswith
    tensorflow.reduce_any
    numpy.savez_compressed
    open
    numpy.flip
    tensorflow.ceil
    filepath.endswith
    diff.transpose.reshape.nonzero
    ACTIVATION
    add_file_handler
    tensorflow.gradients
    _qualified_note_rate
    params.get
    get_input_z
    tensorflow.reshape
    sess.run
    numpy.sin
    n_pitches_used
    in_scale_rate
    open.close
    dataset.make_one_shot_iterator.get_next
    tensorflow.add_to_collection
    str
    getattr
    tensorflow.train.global_step
    numpy.copyto
    tensorflow.as_string
    tensorflow.train.MonitoredTrainingSession
    numpy.issubdtype
    bernoulli_sample
    self.get_predict_nodes
    tensorflow.constant
    tensorflow.Session
    tensorflow.ConfigProto
    tensorflow.layers.conv3d
    _get_filepath
    TypeError
    is_instr_act
    musegan.io_utils.save_pianoroll
    musegan.losses.get_adv_losses
    tensorflow.ones_like
    setup_dirs
    numpy.linalg.norm
    logging.FileHandler.setLevel
    binary_stochastic_ST
    tensorflow.concat
    yv.flatten.flatten
    tensorflow.sigmoid
    tensorflow.reshape.astype
    tensorflow.cond
    ValueError
    numpy.repeat
    var.get_shape
    numpy.where
    _tonal_matrix
    tensorflow.train.get_or_create_global_step
    harmonicity
    tensorflow.train.Saver.restore
    musegan.utils.load_yaml.get
    shutil.ignore_patterns
    op.graph.get_collection.get
    tensorflow.train.get_global_step
    pianoroll.squeeze.clip
    logging.Logger.manager.loggerDict.keys
    print
    tensorflow.layers.conv3d_transpose
    load_yaml
    open.write
    argparse.ArgumentParser.parse_args
    drum_in_pattern_rate
    numpy.append
    set_label_shape
    load_training_data
    tensorflow.get_variable
    parse_arguments
    compiled_list.append
    tensorflow.layers.batch_normalization
    tensorflow.zeros_like
    musegan.utils.setup_loggers
    pianorolls.append
    args.input_dir.rglob
    logging.Formatter
    pianoroll.squeeze.clip.astype
    op.graph.get_collection
    array.astype.astype
    label.set_shape
    pypianoroll.Multitrack.save
    tensorflow.gradients.get_shape
    tensorflow.pad
    lerp
    tensorflow.train.AdamOptimizer.minimize
    musegan.config.SHUFFLE_BUFFER_SIZE.dataset.shuffle.repeat.batch.map
    tensorflow.layers.conv2d
    pianoroll.squeeze.clip.squeeze
    load_data_from_npz
    get_scheduled_variable
    tensorflow.get_default_graph
    tensorflow.name_scope
    save_pianoroll_ops.append
    tensor.get_shape
    model
    numpy.meshgrid
    tensorflow.nn.tanh
    map
    get_metric_ops.items
    

    @developer Could please help me check this issue? May I pull a request to fix it? Thank you very much.

    opened by PyDeps 0
  • run collect.sh Errors

    run collect.sh Errors

    When I run collect_data.sh, I am trying to train using a single MIDI file, That error occur.

    image

    So I Add that code. image

    And run again, but another error again... image

    I can't find a way to fix that error. How to fix this error?

    opened by MONO-ON 1
  • [Question] Can I use Hybrid model with the latest code?

    [Question] Can I use Hybrid model with the latest code?

    I want to train and run inference on three separate models (Jamming, hybrid and composer). I want to know if I can change something in the config/params to achieve this?

    opened by affanmehmood 0
Owner
Hao-Wen Dong
PhD Candidate in Computer Science at UC San Diego | Previous Intern at Dolby and Yamaha | Music x AI
Hao-Wen Dong
Okaeri-Music is a telegram music bot project, allow you to play music on voice chat group telegram.

??️ PROJECT MUSIC,THIS IS MAINTAINED Okaeri-Music is a telegram bot project that's allow you to play music on telegram voice chat group Features ?? Th

Okaeri-Project 2 Dec 23, 2021
NovaMusic is a music sharing robot. Users can get music and music lyrics using inline queries.

A music sharing telegram robot using Redis database and Telebot python library using Redis database.

Hesam Norin 7 Oct 21, 2022
Music player - endlessly plays your music

Music player First, if you wonder about what is supposed to be a music player or what makes a music player different from a simple media player, read

Albert Zeyer 482 Dec 19, 2022
Music player and music library manager for Linux, Windows, and macOS

Ex Falso / Quod Libet - A Music Library / Editor / Player Quod Libet is a music management program. It provides several different ways to view your au

Quod Libet 1.2k Jan 7, 2023
SU Music Player — The first open-source PyTgCalls based Pyrogram bot to play music in voice chats

SU Music Player — The first open-source PyTgCalls based Pyrogram bot to play music in voice chats Note Neither this, or PyTgCalls are fully

SU Projects 58 Jan 2, 2023
Oliva music bot help to play vc music

OLIVA V2 ?? Requirements ?? FFmpeg NodeJS nodesource.com Python 3.7+ PyTgCalls Commands ?? For all in group /play - reply to youtube url or song file

SOUL々H҉A҉C҉K҉E҉R҉ 2 Oct 22, 2021
A small project where I identify notes and key harmonies in a piece of music and use them further to recreate and generate the same piece of music through Python

A small project where I identify notes and key harmonies in a piece of music and use them further to recreate and generate the same piece of music through Python

null 5 Oct 7, 2022
We built this fully functioning Music player in Python. The music player allows you to play/pause and switch to different songs easily.

We built this fully functioning Music player in Python. The music player allows you to play/pause and switch to different songs easily.

null 1 Nov 19, 2021
Royal Music You can play music and video at a time in vc

Royals-Music Royal Music You can play music and video at a time in vc Commands SOON String STRING_SESSION Deployment ?? Credits • ??ᴏᴍʏᴀ⃝??ᴇᴇᴛ • ??ғғɪ

null 2 Nov 23, 2021
This is an OverPowered Vc Music Player! Will work for you and play music in Voice Chatz

VcPlayer This is an OverPowered Vc Music Player! Will work for you and play music in Voice Chatz Telegram Voice-Chat Bot [PyTGCalls] ⇝ Requirements ⇜

null 1 Dec 20, 2021
This Is Telegram Music UserBot To Play Music Without Being Admin

This Is Telegram Music UserBot To Play Music Without Being Admin

Krishna Kumar 36 Sep 13, 2022
Just-Music - Spotify API Driven Music Web app, that allows to listen and control and share songs

Just Music... Just Music Is A Web APP That Allows Users To Play Song Using Spoti

Ayush Mishra 3 May 1, 2022
Xbot-Music - Bot Play Music and Video in Voice Chat Group Telegram

XBOT-MUSIC A Telegram Music+video Bot written in Python using Pyrogram and Py-Tg

Fariz 2 Jan 20, 2022
Noinoi music is smoothly playing music on voice chat of telegram.

NOINOI MUSIC BOT ✨ Features Music & Video stream support MultiChat support Playlist & Queue support Skip, Pause, Resume, Stop feature Music & Video do

null 2 Feb 13, 2022
XA Music Player - Telegram Music Bot

XA Music Player Requirements ?? FFmpeg (Latest) NodeJS nodesource.com (NodeJS 17+) Python (3.10+) PyTgCalls (Lastest) MongoDB (3.12.1) 2nd Telegram Ac

RexAshh 3 Jun 30, 2022
Multi-Track Music Generation with the Transfomer and the Johann Sebastian Bach Chorales dataset

MMM: Exploring Conditional Multi-Track Music Generation with the Transformer and the Johann Sebastian Bach Chorales Dataset. Implementation of the pap

null 102 Dec 8, 2022
Muzic: Music Understanding and Generation with Artificial Intelligence

Muzic is a research project on AI music that empowers music understanding and generation with deep learning and artificial intelligence.

Microsoft 2.6k Dec 30, 2022
Music generation using ml / dl

Data analysis Document here the project: deep_music Description: Project Description Data Source: Type of analysis: Please document the project the be

null 0 Jul 3, 2022
Python library for audio and music analysis

librosa A python package for music and audio analysis. Documentation See https://librosa.org/doc/ for a complete reference manual and introductory tut

librosa 5.6k Jan 6, 2023