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)

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.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.5.0
File Size Uploaded Provenance Actions
repp_tapping-1.5.0.tar.gz 64.6 kB Without provenance Details for repp_tapping-1.5.0.tar.gz

Built distribution (wheel)

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

Total release size: 132.0 kB

Release files / repp_tapping-1.5.0.tar.gz

Download URL repp_tapping-1.5.0.tar.gz
Size 64.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1f08b94141a160f7093b83e26b508ca3889cadbe036599e7b042107190d629ed
BLAKE2b-256 checksum
How to use checksums
3d947a004ab1b06a19940f87beccbc33eb02a61f46a1505aa973d35ec65a4e6c
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.0-py3-none-any.whl

Download URL repp_tapping-1.5.0-py3-none-any.whl
Size 67.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
17bc146b9d84996dcc62b7083931ce81bad5a16497ce4fea7ba1e8006d63fb81
BLAKE2b-256 checksum
How to use checksums
ed6ee5329e2e4a0b5de10d8a8e7e37652460c0ab7f934eca9d7c11c53c58211f
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.0

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