Online technology for measuring sensorimotor synchronization
Project description
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
- Documentation
- Source Code
- Dataset - Tapping datasets supporting the paper (2022)
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
- Install virtualenv and virtualenvwrapper:
pip3 install virtualenv virtualenvwrapper
- Configure virtualenvwrapper:
export WORKON_HOME=$HOME/.virtualenvs
mkdir -p $WORKON_HOME
export VIRTUALENVWRAPPER_PYTHON=$(which python3)
source $(which virtualenvwrapper.sh)
- 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.
- Clone the repository:
git clone git@gitlab.com:computational-audition-lab/repp.git
- Navigate to the project directory:
cd repp
- 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
- 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, blackdocs— sphinx, sphinx-rtd-themenotebook— 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_cyclicdemo)
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.
- Activate your virtual environment if not already active:
workon repp
- Install the notebook extras:
pip install -e ".[notebook]"
- Start Jupyter Notebook:
jupyter notebook
- 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 musicunconstrained_tapping.ipynb: Unconstrained tapping paradigms, including free and fast tappingdebug_recording.ipynb: Debugging and troubleshooting examplesbeat_detection.ipynb: Beat-detection workflow usingrepp.extensions.beat_detectionbeat_finding.ipynb: Beat-finding demo using a repeating audio tokenbeat_finding_prerecorded.ipynb: Beat-finding analysis using prerecorded audiobeatfinding_cyclic.ipynb: Cyclic beat-finding analysis and visualizationiterated_tapping.ipynb: Iterated tapping workflow usingrepp.extensions.iterated_tappingitap_memory.ipynb: Memory-based iterated tapping workflow
License
MIT License
Future Improvements
- Add type hints and a
py.typedmarker - Add code-formatting and linting configuration (black/ruff/flake8)
- Add
CONTRIBUTING.mdandCODE_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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file repp_tapping-1.4.0.tar.gz.
File metadata
- Download URL: repp_tapping-1.4.0.tar.gz
- Upload date:
- Size: 61.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0f6cb172044631af07ffb69b312db1bdea87bbe21c899783f15250fa3a98dc2
|
|
| MD5 |
e8b6d913e0d12ef5604d67896e3cad05
|
|
| BLAKE2b-256 |
d8f7565fa8f551c3d11e6be6c2b3da1e6100296e5af081a8a07538d16a0d2108
|
File details
Details for the file repp_tapping-1.4.0-py3-none-any.whl.
File metadata
- Download URL: repp_tapping-1.4.0-py3-none-any.whl
- Upload date:
- Size: 65.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0215c73bd4084984aab12c72ff29cfdbe11e306202996b0da87ba777c0029e82
|
|
| MD5 |
39b963f5a31468b357458937e262e355
|
|
| BLAKE2b-256 |
55a461e5776f478f3c68310aa5d3a0139a1472800a5e57adb9dd78d888ba2382
|