Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 0 additions & 38 deletions .github/workflows/test_conda.yml

This file was deleted.

20 changes: 8 additions & 12 deletions .github/workflows/test_pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,28 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install libnsdfile
run: |
sudo apt update
sudo apt install libsndfile1-dev libsndfile1
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8
python -m pip install -e .['tests']
curl -sSL https://install.python-poetry.org | python3 -
poetry install --with tests,docs,dev
poetry --version
poetry show
python --version
pip --version
python -m pip list
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest
poetry run python -m pytest
2 changes: 1 addition & 1 deletion LICENCE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Sebastian Rosenzweig, Simon Schwär, Meinard Müller, International Audio Laboratories Erlangen, Germany.
Copyright (c) 2022-2026 Sebastian Rosenzweig, Simon Schwär, Peter Meier, Meinard Müller, International Audio Laboratories Erlangen, Germany.
We thank the German Research Foundation (DFG) for various research grants that
allow us for conducting fundamental research in music processing.
The International Audio Laboratories Erlangen are a joint institution of the
Expand Down
39 changes: 10 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
[![Python Package using Conda](https://github.com/groupmm/libf0/actions/workflows/test_conda.yml/badge.svg)](https://github.com/groupmm/libf0/actions/workflows/test_conda.yml)
[![Python package](https://github.com/groupmm/libf0/actions/workflows/test_pip.yml/badge.svg)](https://github.com/groupmm/libf0/actions/workflows/test_pip.yml)


# libf0

This repository contains a Python package called libf0 which provides open-source implementations for four popular model-based F0-estimation approaches, YIN (Cheveigné & Kawahara, 2002), pYIN (Mauch & Dixon, 2014), an approach inspired by Melodia (Salamon & Gómez, 2012), and SWIPE (Camacho & Harris, 2008).
This repository contains a Python package called libf0 which provides open-source implementations for four popular model-based F0-estimation approaches, YIN (Cheveigné & Kawahara, 2002), pYIN (Mauch & Dixon, 2014), an approach inspired by Melodia (Salamon & Gómez, 2012), and SWIPE (Camacho & Harris, 2008).

If you use the libf0 in your research, please consider the following references.

Expand Down Expand Up @@ -32,48 +31,30 @@ Meinard Müller. Fundamentals of Music Processing – Using Python and Jupyter N

## Installing

If you just want to try our example notebook, you can run it using Binder directly in your browser: [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/groupmm/libf0/HEAD)
To install libf0, please run

To install the libf0 locally, you can use the Python package manager pip:

```
pip install libf0
```

We recommend to do this inside a conda or virtual environment (requiring at least Python 3.7).
If you want to run the example notebook locally, you **must** first install libf0 to resolve all dependencies. Then, you can clone this repository using

```
git clone https://github.com/groupmm/libf0.git
```
install Jupyter using

pip install libf0[dev,tests,docs]
```
pip install jupyter
```

and then start the notebook server via

```
jupyter notebook
```

with the following optional dependencies:
* `dev`: for development and running the demo notebook.
* `tests`: for running the unittests.
* `docs`: to build the API docs.

## Documentation
There is also an API documentation for libf0:
You can find the API documentation for libf0 here:

https://groupmm.github.io/libf0

## Contributing

We are happy for suggestions and contributions. We would be grateful for either directly contacting us via email (meinard.mueller@audiolabs-erlangen.de) or for creating an issue in our Github repository. Please do not submit a pull request without prior consultation with us.
We are happy for suggestions and contributions. We would be grateful for either directly contacting us via email (meinard.mueller@audiolabs-erlangen.de) or for creating an issue or pull request in our Github repository.

## Tests

We provide automated tests for each algorithm. To execute the test script, you will need to install extra requirements for testing:
We provide automated tests for each algorithm. To execute the test script, run

```
pip install 'libf0[tests]'
pytest tests
```

Expand Down
34 changes: 17 additions & 17 deletions demo_libf0.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "feeb7b4a",
"id": "0",
"metadata": {},
"source": [
"# libf0 - A Python Library for F0-Estimation in Music Recordings"
Expand All @@ -11,7 +11,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "8a81c6dc",
"id": "1",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -28,7 +28,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "82a6a26e-db62-41f0-9e8c-c718b1359752",
"id": "2",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -81,7 +81,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "8f646465",
"id": "3",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -120,7 +120,7 @@
},
{
"cell_type": "markdown",
"id": "a2d8f9fe",
"id": "4",
"metadata": {},
"source": [
"### YIN\n",
Expand All @@ -133,7 +133,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "a9a165be",
"id": "5",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -156,7 +156,7 @@
},
{
"cell_type": "markdown",
"id": "f27baf76",
"id": "6",
"metadata": {},
"source": [
"### pYIN\n",
Expand All @@ -169,7 +169,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "9986dfe1",
"id": "7",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -193,7 +193,7 @@
},
{
"cell_type": "markdown",
"id": "5218adb5-862b-4315-a85d-375dc69cc0e1",
"id": "8",
"metadata": {},
"source": [
"### Salience Algorithm\n",
Expand All @@ -209,7 +209,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "b0f0edcb-1e8a-47e1-a40d-9a28dae69879",
"id": "9",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -233,7 +233,7 @@
},
{
"cell_type": "markdown",
"id": "0eabab3f",
"id": "10",
"metadata": {},
"source": [
"### SWIPE\n",
Expand All @@ -246,7 +246,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "ee7a8ff4",
"id": "11",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -269,7 +269,7 @@
},
{
"cell_type": "markdown",
"id": "08b2121c",
"id": "12",
"metadata": {},
"source": [
"### SWIPE (slim)\n",
Expand All @@ -280,7 +280,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "bee19066",
"id": "13",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -304,15 +304,15 @@
{
"cell_type": "code",
"execution_count": null,
"id": "b271aa6d",
"id": "14",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -326,7 +326,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.10"
"version": "3.12.4"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SPHINXBUILD ?= poetry run sphinx-build
SOURCEDIR = source
BUILDDIR = build

Expand Down
Binary file added docs/build/doctrees/environment.pickle
Binary file not shown.
Binary file added docs/build/doctrees/getting_started.doctree
Binary file not shown.
Binary file added docs/build/doctrees/index.doctree
Binary file not shown.
Binary file added docs/build/doctrees/index_pyin.doctree
Binary file not shown.
Binary file added docs/build/doctrees/index_salience.doctree
Binary file not shown.
Binary file added docs/build/doctrees/index_swipe.doctree
Binary file not shown.
Binary file added docs/build/doctrees/index_swipe_slim.doctree
Binary file not shown.
Binary file added docs/build/doctrees/index_utils.doctree
Binary file not shown.
Binary file added docs/build/doctrees/index_yin.doctree
Binary file not shown.
4 changes: 2 additions & 2 deletions docs/build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 8c91fd5622b39f1fe68671e5fb0fa0c2
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
config: bd941ff865c337b6653a00c0cd1362e2
tags: 645f666f9bcd5a90fca523b33c5a78b7
4 changes: 4 additions & 0 deletions docs/build/html/.buildinfo.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 43df33ce4e18cc8b7d7c4bbad7c2dd53
tags: 645f666f9bcd5a90fca523b33c5a78b7
Loading