Skip to content
/ pitcheon Public

tag WAV files with pitch metadata, manually or with pitch detection

License

Notifications You must be signed in to change notification settings

ahihi/pitcheon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pitcheon

a utility for tagging WAV files with pitch metadata.

pitch can be specified manually or automatically detected with CREPE. the metadata is stored in the smpl chunk, in particular the MIDI unity note and MIDI pitch fraction fields.

installation

with pitch detection

in theory:

pip install .[crepe]

in practice... tensorflow stuff seems to work better when installed by conda:

conda create -n pitcheon -c conda-forge 'python>=3.7' numpy openblas 'tensorflow>=2.8,<3' 'crepe>=0.0.12'
conda activate pitcheon
pip install .[crepe]

without pitch detection

pip install .

usage

THIS IS EXPERIMENTAL SOFTWARE! make sure you have backups of your WAV files.

pitcheon --help
usage: pitcheon [-h] [-p PITCH] [-d] [-o] path

tag WAV files with pitch metadata.

positional arguments:
  path                  file or directory to process. if a directory is given, all *.wav files
                        inside it (and subdirectories) will be processed

optional arguments:
  -h, --help            show this help message and exit
  -p PITCH, --pitch PITCH
                        the pitch; valid values are 12-TET notes +/- cents (e.g. 'C3', 'A#4',
                        'Db2+25'), absolute frequencies (e.g. '654.32Hz'), raw MIDI unity note /
                        pitch fraction pairs (e.g. '60,134217728'), or 'crepe' (automatic pitch
                        detection)
  -d, --dry             don't modify any files, just print what would be done
  -o, --overwrite       when a file has an existing smpl chunk, overwrite it

known issues

  • CREPE produces a time series of pitch and confidence. pitcheon currently boils this down to a single pitch by computing a weighted median, but there are probably better methods.

About

tag WAV files with pitch metadata, manually or with pitch detection

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages