This repository contains data and scripts for exporting, analyzing the presets of Diva synthesizer.
Data
dataset/dataset.json
: This file contains all the information about preset parameters and labels. It comes from dataset.json in flow synthesizer repository.
Executable python scripts:
export_dataset.py
: Exports the dataset todiva-preset-audio-dataset/
directory. You can also uncommentdump_features()
to dump audio features directly todataset/features.pkl
.plot_features.py
: Plots the features extracted bydump_features()
function.extract_mel.py
: Uses the data in thediva-preset-audio-dataset/
directory, select all the presets that have at least one timbre label, extracts the Mel-spectrogram and the labels, dumpsdataset/mel.pkl
anddataset/labels.pkl
.analyze_dataset
: Analyzes the labels dumped asdataset/labels.pkl
.model.py
: Defines several machine learning models and usesdataset/mel.pkl
anddataset/labels.pkl
as training data. Usepython model.py <model name>
to run the script. The model will be put intomodels/
directory.analyze_latent.py
: Analyzes the latent space of the auto-encoder model.
Utility script:
dataset_parser.py
: Provides utility functions to parsedataset/dataset.json
and convert the label format.config.py
: Some constant definitions.
Other scripts
osc_handler.py
: Handles the OSC message communication with Ideator plugin host.preset_parser.py
: Dedicates to parse the original preset format used by Diva synthesizer. The function is not complete for now.
To export the audio, you have to compile RenderMan.
Configuration is for MacOS:
- Install boost libs:
brew install boost-python3
(My current version is 1.73.0) - Install JUCE (the version should be JUCE 5)
- Make sure have python3.8 installed
- Get RenderMan from https://github.com/fedden/RenderMan
- Open
RenderMan-py36.jucer
in the project folder, generate XCode project. - Configure the search paths in XCode (This could be different, find the corresponding paths on your machine):
- Boost dylib path:
/usr/local/Cellar/boost-python3/1.73.0/lib
- Python dylib path:
/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib
- Python header path:
/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/include/python3.8
- Boost dylib path:
- Set the link flags:
-shared -lboost_python38 -undefined dynamic_lookup
- Build a release build
librenderman.so.dylib
, remove the extra.dylib
extension. - Copy the
librenderman.so
to your python project root directory.