samplifi
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.2%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: hyve9
- License: mit
- Language: Python
- Default Branch: main
- Size: 149 MB
Statistics
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
- Releases: 1
Metadata Files
README.md
Samplifi

Add harmonic content to music to help hearing impaired listeners hear music better.
Requirements
Install packages:
sudo apt install libasound2-dev portaudio19-dev
Create conda environment:
conda create -f environment.yml -n samplifi
conda activate samplifi
Because the conda environment complains about tensorflowjs and ddsp, you'll need to install them manually. For example, with tensorflowjs:
pip install tensorflowjs --no-deps
Running
Samplifi can be run on single inputs or MIR datasets. Single input
python run-samplifi.py --input <input.wav>
Dataset:
python run-samplifi.py --dataset medley_solos_db
Usually against a dataset you will want scores. There are two scoring metrics: HAAQI, and spectral measures (from librosa, corresponding to musical perceptual qualities).
python run-samplifi.py --dataset medley_solos_db --score-haaqi --score-spectral
Downloading datasets
run-samplifi.py does not download any datasets and will fail if you haven't done so already. Download can be done with download-mir-dataset.py
python download-mir-dataset.py --dataset medley_solos_db
Running analysis
analyze-results.py can be used to analyze the results of a run, generating graphs and other statistical data.
python analyze-results.py --file evaluation_medley_solos_db.json
Full usage
``` usage: download-mir-dataset.py [-h] --dataset DATASET
Download an MIR dataset.
optional arguments: -h, --help show this help message and exit --dataset DATASET The name of the MIR dataset to download ```
``` usage: run-samplifi.py [-h] [--input INPUT] [--output] [--dataset DATASET] [--sample-size SAMPLE_SIZE] [--eval-haaqi] [--eval-spectral] [--titrate] [--spectrogram] [--audiogram] [--ddsp DDSP]
optional arguments: -h, --help show this help message and exit --input INPUT Input --output Write output files (this always happens when running against a single input file) --dataset DATASET Run against a MIR dataset. (Run download-mir-dataset.py first to download the dataset.) --sample-size SAMPLE_SIZE Number of samples to run against the dataset (0 for all samples) --eval-haaqi Compute HAAQI scores --eval-spectral Compute spectral evaluations of signal --titrate Try several different mixture ratios --spectrogram Display spectrograms --audiogram Display audiograms --ddsp DDSP What instrument to attempt timbre transfer ```
``` usage: analyze-results.py [-h] --file FILE [--include-f0]
Analyze results from Samplifi run.
optional arguments: -h, --help show this help message and exit --file FILE The analysis results file to parse --include-f0 Include the f0 ratio data for line graphs ```
Using as a module
You can include samplifi.py as a module for your work.
git submodule add git@github.com:hyve9/samplifi.git
git submodule update --init
Then in your code:
``` samplifidir = (Path.cwd() / 'samplifi/') sys.path.append(str(samplifidir)) from samplifi import apply_samplifi
Load audio
origsarr, origsr = librosa.load(input_path, sr=None) # ndarray of amplitude values
Run samplifi
sarr, marr, f0contour, f0mix, sr = applysamplifi(origsarr, orig_sr)
```
I'll get around to making a proper PyPi module one day ;)
Acknowledgments
This project uses code from:
- Basic Pitch: Developed by [Spotify AB], available under the Apache License. [https://github.com/spotify/basic-pitch]
- Clarity: Developed by [The PyClarity Team], available under the MIT License. [https://github.com/claritychallenge/clarity]
- DDSP: Developed by [Google LLC.], available under the Apache License. [https://github.com/magenta/ddsp/]
See individual files for specific attributions.
Owner
- Login: hyve9
- Kind: user
- Repositories: 1
- Profile: https://github.com/hyve9
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: Samplifi
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: A.
family-names: Brewer
email: afb8252@nyu.edu
affiliation: New York University
repository-code: 'https://github.com/hyve9/samplifi'
url: 'https://samplifi.net/'
abstract: >-
Add harmonic content to music to help hearing impaired
listeners hear music better.
keywords:
- hearing loss
- machine learning
- automatic transcription
- music
license: MIT
version: 1.0.0
date-released: '2024-04-19'
GitHub Events
Total
- Push event: 1
Last Year
- Push event: 1
Dependencies
- actions/checkout v4 composite
- actions/upload-artifact v4 composite
- conda-incubator/setup-miniconda v3 composite
- jlumbroso/free-disk-space main composite
- basic_pitch ==0.3.0
- gin ==0.1.6
- librosa ==0.10.1
- matplotlib ==3.8.3
- mir-eval ==0.7
- mirdata ==0.3.8
- numpy ==1.23.5
- pandas ==2.2.1
- pretty_midi ==0.2.10
- pyclarity ==0.4.1
- scipy ==1.12.0
- setuptools ==68.2.2
- tensorflow ==2.16.1
- absl-py ==1.4.0
- aiohttp ==3.9.3
- aiosignal ==1.3.1
- antlr4-python3-runtime ==4.9.3
- array-record ==0.5.0
- asttokens ==2.4.1
- astunparse ==1.6.3
- async-timeout ==4.0.3
- attrs ==23.2.0
- basic-pitch ==0.3.0
- beautifulsoup4 ==4.12.3
- black ==24.3.0
- bokeh ==3.4.0
- cachetools ==5.3.3
- chardet ==5.2.0
- click ==8.1.7
- cloudml-hypertune ==0.1.0.dev6
- cloudpickle ==3.0.0
- contourpy ==1.2.0
- crepe ==0.0.12
- cycler ==0.12.1
- decorator ==5.1.1
- deprecated ==1.2.14
- dill ==0.3.4
- dm-tree ==0.1.8
- etils ==1.5.2
- exceptiongroup ==1.2.0
- executing ==2.0.1
- flatbuffers ==24.3.7
- fonttools ==4.50.0
- frozenlist ==1.4.1
- fsspec ==2024.3.1
- gast ==0.4.0
- gdown ==5.1.0
- gin ==0.1.6
- gin-config ==0.5.0
- google-api-core ==2.18.0
- google-auth ==2.29.0
- google-auth-oauthlib ==0.4.6
- google-cloud-core ==2.4.1
- google-cloud-storage ==2.16.0
- google-crc32c ==1.5.0
- google-pasta ==0.2.0
- google-resumable-media ==2.7.0
- googleapis-common-protos ==1.63.0
- grpcio ==1.62.1
- h5py ==3.10.0
- hmmlearn ==0.2.7
- hydra-core ==1.3.2
- hydra-submitit-launcher ==1.2.0
- imageio ==2.34.0
- importlib-metadata ==7.1.0
- importlib-resources ==6.4.0
- intervaltree ==3.1.0
- ipython ==8.18.1
- jams ==0.3.4
- jedi ==0.19.1
- joblib ==1.3.2
- jsonschema ==4.21.1
- jsonschema-specifications ==2023.12.1
- keras ==3.1.1
- kiwisolver ==1.4.5
- lazy-loader ==0.3
- libclang ==18.1.1
- librosa ==0.10.1
- lightning-utilities ==0.11.1
- llvmlite ==0.42.0
- markdown ==3.6
- markdown-it-py ==3.0.0
- matplotlib ==3.8.3
- matplotlib-inline ==0.1.6
- mdurl ==0.1.2
- mido ==1.2.10
- mir-eval ==0.7
- mirdata ==0.3.8
- ml-dtypes ==0.3.2
- mpmath ==1.3.0
- msgpack ==1.0.8
- multidict ==6.0.5
- mypy-extensions ==1.0.0
- namex ==0.0.7
- networkx ==3.2.1
- note-seq ==0.0.3
- numba ==0.59.1
- numpy ==1.23.5
- nvidia-cublas-cu12 ==12.1.3.1
- nvidia-cuda-cupti-cu12 ==12.1.105
- nvidia-cuda-nvrtc-cu12 ==12.1.105
- nvidia-cuda-runtime-cu12 ==12.1.105
- nvidia-cudnn-cu12 ==8.9.2.26
- nvidia-cufft-cu12 ==11.0.2.54
- nvidia-curand-cu12 ==10.3.2.106
- nvidia-cusolver-cu12 ==11.4.5.107
- nvidia-cusparse-cu12 ==12.1.0.106
- nvidia-nccl-cu12 ==2.19.3
- nvidia-nvjitlink-cu12 ==12.4.99
- nvidia-nvtx-cu12 ==12.1.105
- oauthlib ==3.2.2
- omegaconf ==2.3.0
- opt-einsum ==3.3.0
- optree ==0.10.0
- packaging ==22.0
- pandas ==2.2.1
- parso ==0.8.3
- pathspec ==0.12.1
- pexpect ==4.9.0
- pillow ==10.2.0
- platformdirs ==4.2.0
- pretty-midi ==0.2.10
- promise ==2.3
- prompt-toolkit ==3.0.43
- proto-plus ==1.23.0
- protobuf ==3.20.3
- psutil ==5.9.8
- ptyprocess ==0.7.0
- pure-eval ==0.2.2
- pyasn1 ==0.5.1
- pyasn1-modules ==0.3.0
- pybind11 ==2.11.1
- pyclarity ==0.4.1
- pyflac ==2.2.0
- pygments ==2.17.2
- pyloudnorm ==0.1.1
- pysocks ==1.7.1
- pystoi ==0.4.1
- python-dateutil ==2.9.0.post0
- pytorch-lightning ==2.2.1
- pytz ==2024.1
- pyyaml ==6.0.1
- referencing ==0.34.0
- requests ==2.31.0
- requests-oauthlib ==2.0.0
- rich ==13.7.1
- rpds-py ==0.18.0
- rsa ==4.9
- scikit-learn ==1.4.1.post1
- scipy ==1.12.0
- smart-open ==7.0.3
- sortedcontainers ==2.4.0
- sounddevice ==0.4.6
- soundfile ==0.12.1
- soupsieve ==2.5
- soxr ==0.3.7
- stack-data ==0.6.3
- submitit ==1.5.1
- sympy ==1.12
- tensorboard ==2.16.2
- tensorboard-data-server ==0.7.2
- tensorboard-plugin-wit ==1.8.1
- tensorflow ==2.16.1
- tensorflow-datasets ==4.9.0
- tensorflow-estimator ==2.11.0
- tensorflow-hub ==0.12.0
- tensorflow-io-gcs-filesystem ==0.36.0
- tensorflow-metadata ==1.13.0
- tensorflow-probability ==0.24.0
- termcolor ==2.4.0
- tf-keras ==2.16.0
- tflite-runtime ==2.14.0
- tflite-support ==0.4.4
- toml ==0.10.2
- tomli ==2.0.1
- torch ==2.2.1
- torchaudio ==2.2.1
- torchmetrics ==1.3.2
- tornado ==6.4
- tqdm ==4.66.2
- traitlets ==5.14.2
- triton ==2.2.0
- typing-extensions ==4.10.0
- tzdata ==2024.1
- wcwidth ==0.2.13
- xyzservices ==2023.10.1
- yarl ==1.9.4
- zipp ==3.18.1