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.

Quick Links

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)

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.4.0

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.4.0
File Size Uploaded
repp_tapping-1.4.0.tar.gz 61.4 kB Details

Built distribution (wheel)

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

Total release size: 126.9 kB

Release files / repp_tapping-1.4.0.tar.gz

Download URL repp_tapping-1.4.0.tar.gz
Size 61.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d0f6cb172044631af07ffb69b312db1bdea87bbe21c899783f15250fa3a98dc2
BLAKE2b-256 checksum
How to use checksums
d8f7565fa8f551c3d11e6be6c2b3da1e6100296e5af081a8a07538d16a0d2108
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

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

Download URL repp_tapping-1.4.0-py3-none-any.whl
Size 65.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0215c73bd4084984aab12c72ff29cfdbe11e306202996b0da87ba777c0029e82
BLAKE2b-256 checksum
How to use checksums
55a461e5776f478f3c68310aa5d3a0139a1472800a5e57adb9dd78d888ba2382
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Release history Release notifications | RSS feed

This release

1.4.0 This release

2 release files

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