diff --git a/.github/workflows/test_conda.yml b/.github/workflows/test_conda.yml deleted file mode 100644 index 76fe582..0000000 --- a/.github/workflows/test_conda.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: build conda - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - build-linux: - runs-on: ubuntu-latest - strategy: - max-parallel: 5 - - steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.8 - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - name: Add conda to system path - run: | - # $CONDA is an environment variable pointing to the root of the miniconda directory - echo $CONDA/bin >> $GITHUB_PATH - - name: Install dependencies - run: | - conda install -c conda-forge libsndfile python=3.8 - python -m pip install -e .['tests'] - - name: Lint with flake8 - run: | - conda install flake8 - # stop the build if there are Python syntax errors or undefined names - 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 - - name: Test with pytest - run: | - pytest diff --git a/.github/workflows/test_pip.yml b/.github/workflows/test_pip.yml index b52da37..702d3a3 100644 --- a/.github/workflows/test_pip.yml +++ b/.github/workflows/test_pip.yml @@ -16,7 +16,7 @@ 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 @@ -24,24 +24,20 @@ jobs: 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 diff --git a/LICENCE b/LICENCE index 7e7c938..565af42 100644 --- a/LICENCE +++ b/LICENCE @@ -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 diff --git a/README.md b/README.md index 915cf6f..0514f51 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,9 @@ -[](https://github.com/groupmm/libf0/actions/workflows/test_conda.yml) [](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. @@ -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: [](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 ``` diff --git a/demo_libf0.ipynb b/demo_libf0.ipynb index a8c37ba..5d28ef8 100644 --- a/demo_libf0.ipynb +++ b/demo_libf0.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "feeb7b4a", + "id": "0", "metadata": {}, "source": [ "# libf0 - A Python Library for F0-Estimation in Music Recordings" @@ -11,7 +11,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8a81c6dc", + "id": "1", "metadata": {}, "outputs": [], "source": [ @@ -28,7 +28,7 @@ { "cell_type": "code", "execution_count": null, - "id": "82a6a26e-db62-41f0-9e8c-c718b1359752", + "id": "2", "metadata": {}, "outputs": [], "source": [ @@ -81,7 +81,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8f646465", + "id": "3", "metadata": {}, "outputs": [], "source": [ @@ -120,7 +120,7 @@ }, { "cell_type": "markdown", - "id": "a2d8f9fe", + "id": "4", "metadata": {}, "source": [ "### YIN\n", @@ -133,7 +133,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a9a165be", + "id": "5", "metadata": {}, "outputs": [], "source": [ @@ -156,7 +156,7 @@ }, { "cell_type": "markdown", - "id": "f27baf76", + "id": "6", "metadata": {}, "source": [ "### pYIN\n", @@ -169,7 +169,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9986dfe1", + "id": "7", "metadata": {}, "outputs": [], "source": [ @@ -193,7 +193,7 @@ }, { "cell_type": "markdown", - "id": "5218adb5-862b-4315-a85d-375dc69cc0e1", + "id": "8", "metadata": {}, "source": [ "### Salience Algorithm\n", @@ -209,7 +209,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b0f0edcb-1e8a-47e1-a40d-9a28dae69879", + "id": "9", "metadata": {}, "outputs": [], "source": [ @@ -233,7 +233,7 @@ }, { "cell_type": "markdown", - "id": "0eabab3f", + "id": "10", "metadata": {}, "source": [ "### SWIPE\n", @@ -246,7 +246,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ee7a8ff4", + "id": "11", "metadata": {}, "outputs": [], "source": [ @@ -269,7 +269,7 @@ }, { "cell_type": "markdown", - "id": "08b2121c", + "id": "12", "metadata": {}, "source": [ "### SWIPE (slim)\n", @@ -280,7 +280,7 @@ { "cell_type": "code", "execution_count": null, - "id": "bee19066", + "id": "13", "metadata": {}, "outputs": [], "source": [ @@ -304,7 +304,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b271aa6d", + "id": "14", "metadata": {}, "outputs": [], "source": [] @@ -312,7 +312,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -326,7 +326,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.10" + "version": "3.12.4" } }, "nbformat": 4, diff --git a/docs/Makefile b/docs/Makefile index d0c3cbf..59f4366 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -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 diff --git a/docs/build/doctrees/environment.pickle b/docs/build/doctrees/environment.pickle new file mode 100644 index 0000000..c0b8550 Binary files /dev/null and b/docs/build/doctrees/environment.pickle differ diff --git a/docs/build/doctrees/getting_started.doctree b/docs/build/doctrees/getting_started.doctree new file mode 100644 index 0000000..900985e Binary files /dev/null and b/docs/build/doctrees/getting_started.doctree differ diff --git a/docs/build/doctrees/index.doctree b/docs/build/doctrees/index.doctree new file mode 100644 index 0000000..95862ad Binary files /dev/null and b/docs/build/doctrees/index.doctree differ diff --git a/docs/build/doctrees/index_pyin.doctree b/docs/build/doctrees/index_pyin.doctree new file mode 100644 index 0000000..be3f400 Binary files /dev/null and b/docs/build/doctrees/index_pyin.doctree differ diff --git a/docs/build/doctrees/index_salience.doctree b/docs/build/doctrees/index_salience.doctree new file mode 100644 index 0000000..ab1c12a Binary files /dev/null and b/docs/build/doctrees/index_salience.doctree differ diff --git a/docs/build/doctrees/index_swipe.doctree b/docs/build/doctrees/index_swipe.doctree new file mode 100644 index 0000000..b6b7357 Binary files /dev/null and b/docs/build/doctrees/index_swipe.doctree differ diff --git a/docs/build/doctrees/index_swipe_slim.doctree b/docs/build/doctrees/index_swipe_slim.doctree new file mode 100644 index 0000000..b92411f Binary files /dev/null and b/docs/build/doctrees/index_swipe_slim.doctree differ diff --git a/docs/build/doctrees/index_utils.doctree b/docs/build/doctrees/index_utils.doctree new file mode 100644 index 0000000..eb162e5 Binary files /dev/null and b/docs/build/doctrees/index_utils.doctree differ diff --git a/docs/build/doctrees/index_yin.doctree b/docs/build/doctrees/index_yin.doctree new file mode 100644 index 0000000..f1a3370 Binary files /dev/null and b/docs/build/doctrees/index_yin.doctree differ diff --git a/docs/build/html/.buildinfo b/docs/build/html/.buildinfo index ebfd061..aa5ae16 100644 --- a/docs/build/html/.buildinfo +++ b/docs/build/html/.buildinfo @@ -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 diff --git a/docs/build/html/.buildinfo.bak b/docs/build/html/.buildinfo.bak new file mode 100644 index 0000000..58643eb --- /dev/null +++ b/docs/build/html/.buildinfo.bak @@ -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 diff --git a/docs/build/html/_modules/index.html b/docs/build/html/_modules/index.html index 927db6c..603c95f 100644 --- a/docs/build/html/_modules/index.html +++ b/docs/build/html/_modules/index.html @@ -1,21 +1,20 @@ + + - +
-