Skip to main content

Extract and separate audio signals by pitch from `.mp3` or `.wav` files.

Project description

audio-pitch-separation

Extract and separate audio signals by pitch from .mp3 or .wav files. Harmonic, percussive, and note-wise components are visualized and saved as .wav files automatically.

track visualization

Features

  • Supports both mp3 and wav audio input
  • Separates harmonic & percussive components using HPSS
  • Extracts note-wise waveforms via Constant-Q Transform (CQT)
  • Visualizes all audio tracks as waveform plots
  • Saves each pitch as an individual .wav file
  • Easy GUI file picker (via PyQt5)

Installation

git clone https://github.com/Hepheir/audio-pitch-separation.git
cd audio-pitch-separation
pip install -r requirements.txt

Requirements

  • numpy
  • matplotlib
  • librosa
  • PyQt5
  • soundfile
  • pydub

You can install all dependencies via:

pip install -r requirements.txt

Usage

python -m audipart
  1. A GUI window will prompt you to select an .mp3 or .wav audio file.
  2. From the selected audio, the following will be generated:
    • harmonic.wav and percussive.wav using HPSS
    • .wav files for each pitch from C2 to C8
    • A waveform plot saved as figure.png
  3. All output files will be saved in a new folder named after the input file (excluding the extension).

you can also import audipart like this demo.

Example

For example, if you select song.mp3, the following directory will be created:

song/
├── harmonic.wav
├── percussive.wav
├── C2.wav
├── C#2.wav
├── ...
├── C8.wav
└── figure.png

TODO

  • Extract note-wise MIDI representation

License

MIT License.

Acknowledgements

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

audipart-0.0.1.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

audipart-0.0.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file audipart-0.0.1.tar.gz.

File metadata

  • Download URL: audipart-0.0.1.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.16

File hashes

Hashes for audipart-0.0.1.tar.gz
Algorithm Hash digest
SHA256 603b583c1b313c29f26a257bf6d7406cd719da0e89aa5096f00dbd4142177c1c
MD5 23e92ee42e97178d61dfbe2a00f0ab4d
BLAKE2b-256 62a9143e1f4f26839d6f9940109f821467d7f46aba2a11ab4290a3ef43fe241d

See more details on using hashes here.

File details

Details for the file audipart-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: audipart-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.16

File hashes

Hashes for audipart-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d955b35e16ee3fe343f1af4eed5d2aebaee2a2c97ca1e62d4d310dcf61a877b5
MD5 87bf9686d7a594b8bf97a902b929e96a
BLAKE2b-256 5e7a9952551cb2340ec2101b2316258bb409f5aa0818b3082f972645a68ab997

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page