repp-tapping 1.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- repp_tapping-1.4.0/.gitignore +12 -0
- repp_tapping-1.4.0/CHANGELOG.md +136 -0
- repp_tapping-1.4.0/LICENSE +21 -0
- repp_tapping-1.4.0/PKG-INFO +265 -0
- repp_tapping-1.4.0/README.md +199 -0
- repp_tapping-1.4.0/pyproject.toml +105 -0
- repp_tapping-1.4.0/repp/__init__.py +5 -0
- repp_tapping-1.4.0/repp/analysis.py +1217 -0
- repp_tapping-1.4.0/repp/cli.py +14 -0
- repp_tapping-1.4.0/repp/click01.wav +0 -0
- repp_tapping-1.4.0/repp/config.py +225 -0
- repp_tapping-1.4.0/repp/extensions/__init__.py +17 -0
- repp_tapping-1.4.0/repp/extensions/beat_detection.py +1233 -0
- repp_tapping-1.4.0/repp/extensions/beatfinding_cyclic.py +988 -0
- repp_tapping-1.4.0/repp/extensions/iterated_tapping.py +605 -0
- repp_tapping-1.4.0/repp/signal_processing.py +1119 -0
- repp_tapping-1.4.0/repp/stimulus.py +614 -0
- repp_tapping-1.4.0/repp/utils.py +135 -0
- repp_tapping-1.4.0/repp/version.py +1 -0
- repp_tapping-1.4.0/reppextension/__init__.py +17 -0
- repp_tapping-1.4.0/reppextension/beat_detection.py +3 -0
- repp_tapping-1.4.0/reppextension/beatfinding_cyclic.py +3 -0
- repp_tapping-1.4.0/reppextension/iterated_tapping.py +3 -0
- repp_tapping-1.4.0/reppextension/version.py +1 -0
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# CHANGELOG
|
|
2
|
+
|
|
3
|
+
All important changes to the repp-tapping package will be documented here.
|
|
4
|
+
|
|
5
|
+
The changelog format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and the project uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
## [v1.4.0]
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Merged the standalone `reppextension` functionality into the main repository under the canonical `repp.extensions` namespace.
|
|
12
|
+
- Added compatibility wrappers so existing `reppextension.*` imports continue to work during the transition.
|
|
13
|
+
- Added extension regression tests covering canonical imports, compatibility imports, and legacy beat-detection facade exports.
|
|
14
|
+
- Added merged extension demos for beat detection, iterated tapping, and memory-based iterated tapping.
|
|
15
|
+
- Added legacy sample audio assets from `reppextension` into `input/` (kept in the source repository for development and demos; not shipped in the published distribution due to size — clone the GitLab repository to access them).
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- Migrated packaging from `setup.py` to `pyproject.toml` with hatchling build backend.
|
|
20
|
+
- Dropped Python 3.7 and 3.8 support; minimum version is now Python 3.9.
|
|
21
|
+
- Version is now managed in `repp/version.py` instead of `repp/VERSION`.
|
|
22
|
+
- Moved `sounddevice` and `soundfile` from core dependencies to `notebook` optional extra.
|
|
23
|
+
- Removed `importlib-metadata` dependency (no longer needed with Python >=3.9).
|
|
24
|
+
- Updated minimum dependency versions for Python 3.9+ compatibility.
|
|
25
|
+
- Removed unused dev dependencies (`mypy`, `pytest-benchmark`, `pytest-cov`, `pytest-xdist`).
|
|
26
|
+
- Removed `requirements.txt` (dependencies now managed in `pyproject.toml`).
|
|
27
|
+
- Fixed project URLs to point to correct GitLab repository.
|
|
28
|
+
- Renamed the published distribution to `repp-tapping` while keeping the Python import namespace and CLI as `repp` for compatibility.
|
|
29
|
+
- Updated first-party docs and demos to use `repp.extensions.*` as the canonical import path.
|
|
30
|
+
- Exposed the legacy beat-detection surface through `repp.extensions.beat_detection` to reduce structural churn while preserving compatibility.
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
|
|
34
|
+
- Fixed prerecorded beat-finding demo paths to use the merged input assets and a consistent repository-root working directory.
|
|
35
|
+
- Fixed beat-detection demo JSON serialization for NumPy-backed stimulus metadata.
|
|
36
|
+
|
|
37
|
+
## [v1.3.3]
|
|
38
|
+
|
|
39
|
+
### Added
|
|
40
|
+
|
|
41
|
+
- Added beat finding functionality and notebook for pre-recorded audio.
|
|
42
|
+
- Added `display_zoomed_markers` parameter.
|
|
43
|
+
- Added `soundfile` dependency.
|
|
44
|
+
|
|
45
|
+
### Fixed
|
|
46
|
+
|
|
47
|
+
- Bug fixes for demos.
|
|
48
|
+
|
|
49
|
+
## [v1.3.2]
|
|
50
|
+
|
|
51
|
+
### Added
|
|
52
|
+
|
|
53
|
+
- Cleaned up code (round 2).
|
|
54
|
+
- Added more tests.
|
|
55
|
+
- Enhanced documentation.
|
|
56
|
+
|
|
57
|
+
## [v1.3.1]
|
|
58
|
+
|
|
59
|
+
### Added
|
|
60
|
+
|
|
61
|
+
- Cleaned up code in stimulus.py and analysis.py
|
|
62
|
+
- Added tests.
|
|
63
|
+
- Enhanced documentation.
|
|
64
|
+
|
|
65
|
+
## [v1.3.0]
|
|
66
|
+
|
|
67
|
+
### Added
|
|
68
|
+
|
|
69
|
+
- Major code cleanup and modernization
|
|
70
|
+
- Added cursor support for improved code navigation
|
|
71
|
+
- General codebase improvements and updates
|
|
72
|
+
|
|
73
|
+
## [v1.2.6]
|
|
74
|
+
|
|
75
|
+
### Added
|
|
76
|
+
|
|
77
|
+
- Beat finding code contributed by Vani Rajendran
|
|
78
|
+
|
|
79
|
+
## [v1.2.5]
|
|
80
|
+
|
|
81
|
+
### Added
|
|
82
|
+
|
|
83
|
+
- Made repo public
|
|
84
|
+
- Updated documentation to publication
|
|
85
|
+
- Fixed issue #10: stereo audio
|
|
86
|
+
- Added debug demo and folder
|
|
87
|
+
|
|
88
|
+
## [v1.2.4]
|
|
89
|
+
|
|
90
|
+
### Added
|
|
91
|
+
|
|
92
|
+
- Added unittest for basic analyses
|
|
93
|
+
- Benchmark for performance speed
|
|
94
|
+
|
|
95
|
+
## [v1.2.3]
|
|
96
|
+
|
|
97
|
+
### Added
|
|
98
|
+
|
|
99
|
+
- Fixed bug in alignment
|
|
100
|
+
- Updated Readme
|
|
101
|
+
- Code shared in beta phase
|
|
102
|
+
|
|
103
|
+
## [v1.2.2]
|
|
104
|
+
|
|
105
|
+
### Added
|
|
106
|
+
|
|
107
|
+
- Added relative phase + alignment plots
|
|
108
|
+
- Improved documentation
|
|
109
|
+
- Improved requirements
|
|
110
|
+
- Python 3.9
|
|
111
|
+
|
|
112
|
+
## [v1.2.0]
|
|
113
|
+
|
|
114
|
+
### Added
|
|
115
|
+
|
|
116
|
+
- Main classes with all methods: REPPStimulus anb REPPAnalysis
|
|
117
|
+
- New module organisation
|
|
118
|
+
- Docs
|
|
119
|
+
|
|
120
|
+
## [v1.1.1]
|
|
121
|
+
|
|
122
|
+
### Added
|
|
123
|
+
|
|
124
|
+
- Minor refactoring of low-level functions to increase clarity
|
|
125
|
+
- First round of complete docs
|
|
126
|
+
|
|
127
|
+
## [v1.1.0]
|
|
128
|
+
|
|
129
|
+
### Added
|
|
130
|
+
|
|
131
|
+
- Added stimulus preparation step
|
|
132
|
+
- Added onset extraction step
|
|
133
|
+
- Added onset alignment step
|
|
134
|
+
- Added analysis step
|
|
135
|
+
- Added jupyter notebook demos
|
|
136
|
+
- Added basic docs
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026, Manuel Anglada-Tort, Peter Harrison, and Nori Jacoby
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: repp-tapping
|
|
3
|
+
Version: 1.4.0
|
|
4
|
+
Summary: Online technology for measuring sensorimotor synchronization
|
|
5
|
+
Project-URL: Documentation, https://computational-audition.gitlab.io/repp/
|
|
6
|
+
Project-URL: Homepage, https://gitlab.com/computational-audition/repp
|
|
7
|
+
Project-URL: Issues, https://gitlab.com/computational-audition/repp/-/issues
|
|
8
|
+
Project-URL: Repository, https://gitlab.com/computational-audition/repp
|
|
9
|
+
Project-URL: Dataset, https://osf.io/r2pxd/
|
|
10
|
+
Author-email: Manuel Anglada-Tort <manel.anglada.tort@gmail.com>, Peter Harrison <pmch2@cam.ac.uk>, Nori Jacoby <nori.jacoby@ae.mpg.de>
|
|
11
|
+
Maintainer-email: Manuel Anglada-Tort <manel.anglada.tort@gmail.com>, Frank Höger <fh337@cornell.edu>
|
|
12
|
+
License: MIT License
|
|
13
|
+
|
|
14
|
+
Copyright (c) 2026, Manuel Anglada-Tort, Peter Harrison, and Nori Jacoby
|
|
15
|
+
|
|
16
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
17
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
18
|
+
in the Software without restriction, including without limitation the rights
|
|
19
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
20
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
21
|
+
furnished to do so, subject to the following conditions:
|
|
22
|
+
|
|
23
|
+
The above copyright notice and this permission notice shall be included in all
|
|
24
|
+
copies or substantial portions of the Software.
|
|
25
|
+
|
|
26
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
27
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
28
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
29
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
30
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
31
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
32
|
+
SOFTWARE.
|
|
33
|
+
License-File: LICENSE
|
|
34
|
+
Keywords: experiments,psychology,sensorimotor,synchronization,tapping
|
|
35
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
36
|
+
Classifier: Intended Audience :: Science/Research
|
|
37
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
38
|
+
Classifier: Operating System :: OS Independent
|
|
39
|
+
Classifier: Programming Language :: Python :: 3
|
|
40
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
41
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
42
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
43
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
44
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
45
|
+
Classifier: Topic :: Scientific/Engineering
|
|
46
|
+
Requires-Python: >=3.9
|
|
47
|
+
Requires-Dist: click
|
|
48
|
+
Requires-Dist: matplotlib
|
|
49
|
+
Requires-Dist: numpy
|
|
50
|
+
Requires-Dist: scipy
|
|
51
|
+
Provides-Extra: dev
|
|
52
|
+
Requires-Dist: black; extra == 'dev'
|
|
53
|
+
Requires-Dist: flake8; extra == 'dev'
|
|
54
|
+
Requires-Dist: pytest; extra == 'dev'
|
|
55
|
+
Provides-Extra: docs
|
|
56
|
+
Requires-Dist: sphinx; extra == 'docs'
|
|
57
|
+
Requires-Dist: sphinx-rtd-theme; extra == 'docs'
|
|
58
|
+
Provides-Extra: notebook
|
|
59
|
+
Requires-Dist: jupyter; extra == 'notebook'
|
|
60
|
+
Requires-Dist: sounddevice; extra == 'notebook'
|
|
61
|
+
Requires-Dist: soundfile; extra == 'notebook'
|
|
62
|
+
Provides-Extra: publish
|
|
63
|
+
Requires-Dist: build; extra == 'publish'
|
|
64
|
+
Requires-Dist: twine; extra == 'publish'
|
|
65
|
+
Description-Content-Type: text/markdown
|
|
66
|
+
|
|
67
|
+
# REPP: Large-Scale Online Tapping Experiments
|
|
68
|
+
|
|
69
|
+
**Manuel Anglada-Tort, Peter Harrison, and Nori Jacoby**\
|
|
70
|
+
[Computational Auditory Perception Group](https://www.aesthetics.mpg.de/en/research/research-group-computational-auditory-perception.html)\
|
|
71
|
+
Max Planck Institute for Empirical Aesthetics
|
|
72
|
+
|
|
73
|
+
_REPP (Rhythm ExPeriment Platform)_ is a Python package for measuring sensorimotor synchronization (SMS) in laboratory and online settings.
|
|
74
|
+
|
|
75
|
+
## Quick Links
|
|
76
|
+
|
|
77
|
+
- [Documentation](https://computational-audition.gitlab.io/repp/)
|
|
78
|
+
- [Source Code](https://gitlab.com/computational-audition/repp)
|
|
79
|
+
- [Dataset](https://osf.io/r2pxd/) - Tapping datasets supporting the paper (2022)
|
|
80
|
+
|
|
81
|
+
## Citation
|
|
82
|
+
|
|
83
|
+
If you use this package, please cite:
|
|
84
|
+
|
|
85
|
+
```text
|
|
86
|
+
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
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Installation
|
|
90
|
+
|
|
91
|
+
### Prerequisites
|
|
92
|
+
|
|
93
|
+
- Python 3.9 or newer (tested with 3.9–3.13)
|
|
94
|
+
- macOS (primary testing platform)
|
|
95
|
+
|
|
96
|
+
### Setting up a Virtual Environment
|
|
97
|
+
|
|
98
|
+
1. Install virtualenv and virtualenvwrapper:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
pip3 install virtualenv virtualenvwrapper
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
2. Configure virtualenvwrapper:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
export WORKON_HOME=$HOME/.virtualenvs
|
|
108
|
+
mkdir -p $WORKON_HOME
|
|
109
|
+
export VIRTUALENVWRAPPER_PYTHON=$(which python3)
|
|
110
|
+
source $(which virtualenvwrapper.sh)
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
3. Create and activate virtual environment:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
mkvirtualenv repp --python $(which python3)
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Optional: Add to shell configuration (~/.zshrc):
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
echo "export VIRTUALENVWRAPPER_PYTHON=$(which python3)" >> ~/.zshrc
|
|
123
|
+
echo "source $(which virtualenvwrapper.sh)" >> ~/.zshrc
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
To activate the environment later:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
workon repp
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Installing REPP
|
|
133
|
+
|
|
134
|
+
The published distribution name is `repp-tapping`, while the Python import
|
|
135
|
+
namespace and CLI remain `repp` for compatibility.
|
|
136
|
+
|
|
137
|
+
1. Clone the repository:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
git clone git@gitlab.com:computational-audition-lab/repp.git
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
2. Navigate to the project directory:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
cd repp
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
3. Install REPP in editable mode (this also installs all runtime dependencies declared in `pyproject.toml`):
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
pip3 install -e .
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
To install the published package from an index instead of a local checkout:
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
pip3 install repp-tapping
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
4. Verify installation:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
repp --version
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Running Tests
|
|
168
|
+
|
|
169
|
+
Basic test execution:
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
# Run all tests in the project
|
|
173
|
+
pytest -v -s
|
|
174
|
+
|
|
175
|
+
# Run a specific test file
|
|
176
|
+
pytest tests/test_repp.py
|
|
177
|
+
pytest tests/test_signal_processing.py -v
|
|
178
|
+
pytest tests/test_analysis.py -v
|
|
179
|
+
pytest tests/test_stimulus.py -v
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
## Requirements
|
|
183
|
+
|
|
184
|
+
Runtime dependencies (installed automatically with `pip install repp-tapping`):
|
|
185
|
+
|
|
186
|
+
- numpy
|
|
187
|
+
- scipy
|
|
188
|
+
- matplotlib
|
|
189
|
+
- click
|
|
190
|
+
|
|
191
|
+
Optional extras:
|
|
192
|
+
|
|
193
|
+
- `dev` — pytest, flake8, black
|
|
194
|
+
- `docs` — sphinx, sphinx-rtd-theme
|
|
195
|
+
- `notebook` — jupyter, sounddevice, soundfile (needed to run the demo notebooks)
|
|
196
|
+
|
|
197
|
+
Install an extra with, e.g.:
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
pip install -e ".[dev]"
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
The full list and any version constraints are declared in [`pyproject.toml`](pyproject.toml).
|
|
204
|
+
|
|
205
|
+
## Contributors
|
|
206
|
+
|
|
207
|
+
- **Vani Rajendran**: Developed analysis and plotting methods for beat detection tasks (see `beatfinding_cyclic` demo)
|
|
208
|
+
|
|
209
|
+
## Contributing
|
|
210
|
+
|
|
211
|
+
We welcome contributions supporting new paradigms or improvements to the current code. Please contact the authors if you would like to contribute.
|
|
212
|
+
|
|
213
|
+
## Running Demos
|
|
214
|
+
|
|
215
|
+
REPP comes with several demo notebooks to help you get started. The
|
|
216
|
+
demos live in the source repository (under `demos/`) and rely on
|
|
217
|
+
sample audio assets in `input/`. Those assets are kept in the
|
|
218
|
+
repository but are **not shipped with the PyPI distribution** (they
|
|
219
|
+
are too large for PyPI's per-file limits). To run the demos you need
|
|
220
|
+
a source checkout of the
|
|
221
|
+
[GitLab repository](https://gitlab.com/computational-audition/repp).
|
|
222
|
+
|
|
223
|
+
1. Activate your virtual environment if not already active:
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
workon repp
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
2. Install the notebook extras:
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
pip install -e ".[notebook]"
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
3. Start Jupyter Notebook:
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
jupyter notebook
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
4. Navigate to the `demos/` directory in the Jupyter interface and open any of the available demos:
|
|
242
|
+
|
|
243
|
+
- `sms_tapping.ipynb`: SMS tapping experiments, including metronome and music
|
|
244
|
+
- `unconstrained_tapping.ipynb`: Unconstrained tapping paradigms, including free and fast tapping
|
|
245
|
+
- `debug_recording.ipynb`: Debugging and troubleshooting examples
|
|
246
|
+
- `beat_detection.ipynb`: Beat-detection workflow using `repp.extensions.beat_detection`
|
|
247
|
+
- `beat_finding.ipynb`: Beat-finding demo using a repeating audio token
|
|
248
|
+
- `beat_finding_prerecorded.ipynb`: Beat-finding analysis using prerecorded audio
|
|
249
|
+
- `beatfinding_cyclic.ipynb`: Cyclic beat-finding analysis and visualization
|
|
250
|
+
- `iterated_tapping.ipynb`: Iterated tapping workflow using `repp.extensions.iterated_tapping`
|
|
251
|
+
- `itap_memory.ipynb`: Memory-based iterated tapping workflow
|
|
252
|
+
|
|
253
|
+
## License
|
|
254
|
+
|
|
255
|
+
MIT License
|
|
256
|
+
|
|
257
|
+
## Future Improvements
|
|
258
|
+
|
|
259
|
+
- [ ] Add type hints and a `py.typed` marker
|
|
260
|
+
- [ ] Add code-formatting and linting configuration (black/ruff/flake8)
|
|
261
|
+
- [ ] Add `CONTRIBUTING.md` and `CODE_OF_CONDUCT.md`
|
|
262
|
+
- [ ] Add a tag-triggered PyPI publish job to the GitLab CI pipeline (using PyPI Trusted Publishing)
|
|
263
|
+
- [ ] Automate creation of a GitLab Release (with changelog and built artifacts) on every tagged version
|
|
264
|
+
- [ ] Add more robust error handling
|
|
265
|
+
- [ ] Improve demos
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
# REPP: Large-Scale Online Tapping Experiments
|
|
2
|
+
|
|
3
|
+
**Manuel Anglada-Tort, Peter Harrison, and Nori Jacoby**\
|
|
4
|
+
[Computational Auditory Perception Group](https://www.aesthetics.mpg.de/en/research/research-group-computational-auditory-perception.html)\
|
|
5
|
+
Max Planck Institute for Empirical Aesthetics
|
|
6
|
+
|
|
7
|
+
_REPP (Rhythm ExPeriment Platform)_ is a Python package for measuring sensorimotor synchronization (SMS) in laboratory and online settings.
|
|
8
|
+
|
|
9
|
+
## Quick Links
|
|
10
|
+
|
|
11
|
+
- [Documentation](https://computational-audition.gitlab.io/repp/)
|
|
12
|
+
- [Source Code](https://gitlab.com/computational-audition/repp)
|
|
13
|
+
- [Dataset](https://osf.io/r2pxd/) - Tapping datasets supporting the paper (2022)
|
|
14
|
+
|
|
15
|
+
## Citation
|
|
16
|
+
|
|
17
|
+
If you use this package, please cite:
|
|
18
|
+
|
|
19
|
+
```text
|
|
20
|
+
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
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Installation
|
|
24
|
+
|
|
25
|
+
### Prerequisites
|
|
26
|
+
|
|
27
|
+
- Python 3.9 or newer (tested with 3.9–3.13)
|
|
28
|
+
- macOS (primary testing platform)
|
|
29
|
+
|
|
30
|
+
### Setting up a Virtual Environment
|
|
31
|
+
|
|
32
|
+
1. Install virtualenv and virtualenvwrapper:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pip3 install virtualenv virtualenvwrapper
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
2. Configure virtualenvwrapper:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
export WORKON_HOME=$HOME/.virtualenvs
|
|
42
|
+
mkdir -p $WORKON_HOME
|
|
43
|
+
export VIRTUALENVWRAPPER_PYTHON=$(which python3)
|
|
44
|
+
source $(which virtualenvwrapper.sh)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
3. Create and activate virtual environment:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
mkvirtualenv repp --python $(which python3)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Optional: Add to shell configuration (~/.zshrc):
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
echo "export VIRTUALENVWRAPPER_PYTHON=$(which python3)" >> ~/.zshrc
|
|
57
|
+
echo "source $(which virtualenvwrapper.sh)" >> ~/.zshrc
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
To activate the environment later:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
workon repp
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Installing REPP
|
|
67
|
+
|
|
68
|
+
The published distribution name is `repp-tapping`, while the Python import
|
|
69
|
+
namespace and CLI remain `repp` for compatibility.
|
|
70
|
+
|
|
71
|
+
1. Clone the repository:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
git clone git@gitlab.com:computational-audition-lab/repp.git
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
2. Navigate to the project directory:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
cd repp
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
3. Install REPP in editable mode (this also installs all runtime dependencies declared in `pyproject.toml`):
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
pip3 install -e .
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
To install the published package from an index instead of a local checkout:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
pip3 install repp-tapping
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
4. Verify installation:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
repp --version
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Running Tests
|
|
102
|
+
|
|
103
|
+
Basic test execution:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
# Run all tests in the project
|
|
107
|
+
pytest -v -s
|
|
108
|
+
|
|
109
|
+
# Run a specific test file
|
|
110
|
+
pytest tests/test_repp.py
|
|
111
|
+
pytest tests/test_signal_processing.py -v
|
|
112
|
+
pytest tests/test_analysis.py -v
|
|
113
|
+
pytest tests/test_stimulus.py -v
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Requirements
|
|
117
|
+
|
|
118
|
+
Runtime dependencies (installed automatically with `pip install repp-tapping`):
|
|
119
|
+
|
|
120
|
+
- numpy
|
|
121
|
+
- scipy
|
|
122
|
+
- matplotlib
|
|
123
|
+
- click
|
|
124
|
+
|
|
125
|
+
Optional extras:
|
|
126
|
+
|
|
127
|
+
- `dev` — pytest, flake8, black
|
|
128
|
+
- `docs` — sphinx, sphinx-rtd-theme
|
|
129
|
+
- `notebook` — jupyter, sounddevice, soundfile (needed to run the demo notebooks)
|
|
130
|
+
|
|
131
|
+
Install an extra with, e.g.:
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
pip install -e ".[dev]"
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
The full list and any version constraints are declared in [`pyproject.toml`](pyproject.toml).
|
|
138
|
+
|
|
139
|
+
## Contributors
|
|
140
|
+
|
|
141
|
+
- **Vani Rajendran**: Developed analysis and plotting methods for beat detection tasks (see `beatfinding_cyclic` demo)
|
|
142
|
+
|
|
143
|
+
## Contributing
|
|
144
|
+
|
|
145
|
+
We welcome contributions supporting new paradigms or improvements to the current code. Please contact the authors if you would like to contribute.
|
|
146
|
+
|
|
147
|
+
## Running Demos
|
|
148
|
+
|
|
149
|
+
REPP comes with several demo notebooks to help you get started. The
|
|
150
|
+
demos live in the source repository (under `demos/`) and rely on
|
|
151
|
+
sample audio assets in `input/`. Those assets are kept in the
|
|
152
|
+
repository but are **not shipped with the PyPI distribution** (they
|
|
153
|
+
are too large for PyPI's per-file limits). To run the demos you need
|
|
154
|
+
a source checkout of the
|
|
155
|
+
[GitLab repository](https://gitlab.com/computational-audition/repp).
|
|
156
|
+
|
|
157
|
+
1. Activate your virtual environment if not already active:
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
workon repp
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
2. Install the notebook extras:
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
pip install -e ".[notebook]"
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
3. Start Jupyter Notebook:
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
jupyter notebook
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
4. Navigate to the `demos/` directory in the Jupyter interface and open any of the available demos:
|
|
176
|
+
|
|
177
|
+
- `sms_tapping.ipynb`: SMS tapping experiments, including metronome and music
|
|
178
|
+
- `unconstrained_tapping.ipynb`: Unconstrained tapping paradigms, including free and fast tapping
|
|
179
|
+
- `debug_recording.ipynb`: Debugging and troubleshooting examples
|
|
180
|
+
- `beat_detection.ipynb`: Beat-detection workflow using `repp.extensions.beat_detection`
|
|
181
|
+
- `beat_finding.ipynb`: Beat-finding demo using a repeating audio token
|
|
182
|
+
- `beat_finding_prerecorded.ipynb`: Beat-finding analysis using prerecorded audio
|
|
183
|
+
- `beatfinding_cyclic.ipynb`: Cyclic beat-finding analysis and visualization
|
|
184
|
+
- `iterated_tapping.ipynb`: Iterated tapping workflow using `repp.extensions.iterated_tapping`
|
|
185
|
+
- `itap_memory.ipynb`: Memory-based iterated tapping workflow
|
|
186
|
+
|
|
187
|
+
## License
|
|
188
|
+
|
|
189
|
+
MIT License
|
|
190
|
+
|
|
191
|
+
## Future Improvements
|
|
192
|
+
|
|
193
|
+
- [ ] Add type hints and a `py.typed` marker
|
|
194
|
+
- [ ] Add code-formatting and linting configuration (black/ruff/flake8)
|
|
195
|
+
- [ ] Add `CONTRIBUTING.md` and `CODE_OF_CONDUCT.md`
|
|
196
|
+
- [ ] Add a tag-triggered PyPI publish job to the GitLab CI pipeline (using PyPI Trusted Publishing)
|
|
197
|
+
- [ ] Automate creation of a GitLab Release (with changelog and built artifacts) on every tagged version
|
|
198
|
+
- [ ] Add more robust error handling
|
|
199
|
+
- [ ] Improve demos
|