Metadata-Version: 2.4
Name: sing4me
Version: 1.4.0rc0
Summary: Python package for online and laboratory singing experiments
Project-URL: Homepage, https://gitlab.com/computational-audition-lab/sing4me
Project-URL: Repository, https://gitlab.com/computational-audition-lab/sing4me
Project-URL: Issues, https://gitlab.com/computational-audition-lab/sing4me/-/issues
Author-email: Manuel Anglada-Tort <manel.anglada.tort@gmail.com>, Nori Jacoby <nori.jacoby@ae.mpg.de>
Maintainer-email: Manuel Anglada-Tort <manel.anglada.tort@gmail.com>, Frank Höger <fh337@cornell.edu>
License: Copyright (c) 2018 Computational Auditory Perception Research Group
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: audio,experiments,music,pitch,psychology,singing
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Multimedia :: Sound/Audio :: Analysis
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.9
Requires-Dist: click
Requires-Dist: markupsafe
Requires-Dist: matplotlib
Requires-Dist: numpy
Requires-Dist: praat-parselmouth
Requires-Dist: scipy
Requires-Dist: textgrid
Provides-Extra: dev
Requires-Dist: black; extra == 'dev'
Requires-Dist: flake8; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Provides-Extra: notebook
Requires-Dist: jupyter; extra == 'notebook'
Requires-Dist: sounddevice; extra == 'notebook'
Requires-Dist: soundfile; extra == 'notebook'
Provides-Extra: psynet
Requires-Dist: psynet; extra == 'psynet'
Provides-Extra: publish
Requires-Dist: build; extra == 'publish'
Requires-Dist: twine; extra == 'publish'
Description-Content-Type: text/markdown

# sing4me — Singing Experiments

[Computational Auditory Perception Group](https://www.aesthetics.mpg.de/en/research/research-group-computational-auditory-perception.html)\
Max Planck Institute for Empirical Aesthetics

_sing4me_ is a Python package for running singing experiments in laboratory and online settings. It installs two modules:

1. `sing4me`: signal-processing code for singing extraction, plus the bundled Praat `syllable_extract.praat` script.
2. `sing_experiments`: helpers for running singing experiments — methods to generate and transform melodies, prescreening tests, parameter presets, and questionnaires.

## Quick Links

- [Source code](https://gitlab.com/computational-audition-lab/sing4me)
- [Issues](https://gitlab.com/computational-audition-lab/sing4me/-/issues)

## Installation

### Prerequisites

- Python 3.9 or newer (tested with 3.9–3.13)
- macOS (primary testing platform)

### Setting up a Virtual Environment

```bash
pip3 install virtualenv virtualenvwrapper

export WORKON_HOME=$HOME/.virtualenvs
mkdir -p $WORKON_HOME
export VIRTUALENVWRAPPER_PYTHON=$(which python3)
source $(which virtualenvwrapper.sh)

mkvirtualenv sing4me --python $(which python3)
```

The virtual environment is now active. To activate it later:

```bash
workon sing4me
```

### Installing sing4me

To install the published package from PyPI:

```bash
pip install sing4me
```

To install from a source checkout in editable mode (this also installs the runtime dependencies declared in `pyproject.toml`):

```bash
git clone git@gitlab.com:computational-audition-lab/sing4me.git
cd sing4me
pip install -e .
```

Optional extras:

- `dev` — pytest, flake8, black
- `notebook` — jupyter, sounddevice, soundfile (needed for the demo notebooks)
- `psynet` — pulls in [PsyNet](https://gitlab.com/PsyNetDev/PsyNet); only required if you import `sing_experiments.questionnaire` or `sing_experiments.resources` (the rest of `sing_experiments` and all of `sing4me` works without PsyNet)

Install an extra with, e.g.:

```bash
pip install -e ".[dev]"
```

### Verify installation

```bash
sing4me --version
```

## Tests

The unit tests live in `sing_experiments/test/` and run with pytest:

```bash
pip install -e ".[dev]"
pytest -v
```

Note: the directory `sing4me/tests/` in the source checkout contains a large collection of sample `.wav` / `.png` / `.txt` files used for manual / pilot inspection (not pytest tests). Those samples are **kept in the repository for development but are not shipped with the PyPI distribution** (they would exceed PyPI's per-file limits). To use them, work from a source checkout.

## Running Demos

The demo notebooks in `demos/` rely on the local `input/` directory of sample audio. Like the manual test samples, those audio assets are **not shipped with the PyPI distribution** — clone the repository if you want to run the demos:

```bash
git clone git@gitlab.com:computational-audition-lab/sing4me.git
cd sing4me
pip install -e ".[notebook]"
jupyter notebook
```

Then open one of:

- `demos/iterated_singing_demo.ipynb`
- `demos/debug_singing_extract.ipynb`
- `demos/debug_singing_extract-with-singing.ipynb`

## License

MIT License
