Skip to main content

REPP: Large-Scale Online Tapping Experiments

Manuel Anglada-Tort, Peter Harrison, and Nori Jacoby
Computational Auditory Perception Group
Max Planck Institute for Empirical Aesthetics

REPP (Rhythm ExPeriment Platform) is a Python package for measuring sensorimotor synchronization (SMS) in laboratory and online settings.

Citation

If you use this package, please cite:

Anglada-Tort, M., Harrison, P.M.C. & Jacoby, N. REPP: A robust cross-platform solution for online sensorimotor synchronization experiments. Behavior Research Methods (2022). https://doi.org/10.3758/s13428-021-01722-2

Installation

Prerequisites

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

Setting up a Virtual Environment

  1. Install virtualenv and virtualenvwrapper:
pip3 install virtualenv virtualenvwrapper
  1. Configure virtualenvwrapper:
export WORKON_HOME=$HOME/.virtualenvs
mkdir -p $WORKON_HOME
export VIRTUALENVWRAPPER_PYTHON=$(which python3)
source $(which virtualenvwrapper.sh)
  1. Create and activate virtual environment:
mkvirtualenv repp --python $(which python3)

Optional: Add to shell configuration (~/.zshrc):

echo "export VIRTUALENVWRAPPER_PYTHON=$(which python3)" >> ~/.zshrc
echo "source $(which virtualenvwrapper.sh)" >> ~/.zshrc

To activate the environment later:

workon repp

Installing REPP

The published distribution name is repp-tapping, while the Python import namespace and CLI remain repp for compatibility.

  1. Clone the repository:
git clone git@gitlab.com:computational-audition-lab/repp.git
  1. Navigate to the project directory:
cd repp
  1. Install REPP in editable mode (this also installs all runtime dependencies declared in pyproject.toml):
pip3 install -e .

To install the published package from an index instead of a local checkout:

pip3 install repp-tapping
  1. Verify installation:
repp --version

Running Tests

Basic test execution:

# Run all tests in the project
pytest -v -s

# Run a specific test file
pytest tests/test_repp.py
pytest tests/test_signal_processing.py -v
pytest tests/test_analysis.py -v
pytest tests/test_stimulus.py -v

Requirements

Runtime dependencies (installed automatically with pip install repp-tapping):

  • numpy
  • scipy
  • matplotlib
  • click

Optional extras:

  • dev — pytest, flake8, black
  • docs — sphinx, sphinx-rtd-theme
  • notebook — jupyter, sounddevice, soundfile (needed to run the demo notebooks)

Install an extra with, e.g.:

pip install -e ".[dev]"

The full list and any version constraints are declared in pyproject.toml.

Contributors

  • Vani Rajendran: Developed analysis and plotting methods for beat detection tasks (see beatfinding_cyclic demo)
  • Sagar Dutta: Beat-detection plot and alignment improvements
  • William Botticelli-Wells: Fixes, improvements, and tests for the analysis and the beat-detection extensions

Contributing

We welcome contributions supporting new paradigms or improvements to the current code. Please contact the authors if you would like to contribute.

Running Demos

REPP comes with several demo notebooks to help you get started. The demos live in the source repository (under demos/) and rely on sample audio assets in input/. Those assets are kept in the repository but are not shipped with the PyPI distribution (they are too large for PyPI's per-file limits). To run the demos you need a source checkout of the GitLab repository.

  1. Activate your virtual environment if not already active:
workon repp
  1. Install the notebook extras:
pip install -e ".[notebook]"
  1. Start Jupyter Notebook:
jupyter notebook
  1. Navigate to the demos/ directory in the Jupyter interface and open any of the available demos:
  • sms_tapping.ipynb: SMS tapping experiments, including metronome and music
  • unconstrained_tapping.ipynb: Unconstrained tapping paradigms, including free and fast tapping
  • debug_recording.ipynb: Debugging and troubleshooting examples
  • beat_detection.ipynb: Beat-detection workflow using repp.extensions.beat_detection
  • beat_finding.ipynb: Beat-finding demo using a repeating audio token
  • beat_finding_prerecorded.ipynb: Beat-finding analysis using prerecorded audio
  • beatfinding_cyclic.ipynb: Cyclic beat-finding analysis and visualization
  • iterated_tapping.ipynb: Iterated tapping workflow using repp.extensions.iterated_tapping
  • itap_memory.ipynb: Memory-based iterated tapping workflow

License

MIT License

Future Improvements

  • Add type hints and a py.typed marker
  • Add code-formatting and linting configuration (black/ruff/flake8)
  • Add CONTRIBUTING.md and CODE_OF_CONDUCT.md
  • Add a tag-triggered PyPI publish job to the GitLab CI pipeline (using PyPI Trusted Publishing)
  • Automate creation of a GitLab Release (with changelog and built artifacts) on every tagged version
  • Add more robust error handling
  • Improve demos

Metadata

Release files for repp-tapping 1.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for repp-tapping 1.5.1
File Size Uploaded Provenance Actions
repp_tapping-1.5.1.tar.gz 64.9 kB Without provenance Details for repp_tapping-1.5.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for repp-tapping 1.5.1
File Interpreter ABI Platform Actions
repp_tapping-1.5.1-py3-none-any.whl Python 3 none any Details for repp_tapping-1.5.1-py3-none-any.whl

Total release size: 132.3 kB

Release files / repp_tapping-1.5.1.tar.gz

Download URL repp_tapping-1.5.1.tar.gz
Size 64.9 kB
Tags Source
SHA-256 checksum
How to use checksums
47519df21908d7290a8f984b4c8414c9ecf28e0a825892acb9a28247f3cfed1f
BLAKE2b-256 checksum
How to use checksums
7b47fed0b89b5df137269bbaac40689697fb89a9a7fa6a8a87bebf1640fa7184
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / repp_tapping-1.5.1-py3-none-any.whl

Download URL repp_tapping-1.5.1-py3-none-any.whl
Size 67.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d8f6411420db56e07c90a6ca0b473abd30c05c002679e45b2dc035079200cdac
BLAKE2b-256 checksum
How to use checksums
cc656e085faa39473888adad70cf79733c18ba8c3aac7b2e0c28088200f88ecc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for repp-tapping 1.5.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page