Metadata-Version: 2.4
Name: stimuli
Version: 1.1.0
Summary: Precise auditory stimuli.
Author-email: Mathieu Scheltienne <mathieu.scheltienne@gmail.com>
Maintainer-email: Mathieu Scheltienne <mathieu.scheltienne@gmail.com>
License-Expression: MIT
Project-URL: documentation, https://mscheltienne.github.io/stimuli/
Project-URL: source, https://github.com/mscheltienne/stimuli
Project-URL: tracker, https://github.com/mscheltienne/stimuli/issues
Keywords: audio,auditory,python,stimuli,trigger
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Natural Language :: English
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: Unix
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click
Requires-Dist: matplotlib
Requires-Dist: numpy>=1.23
Requires-Dist: packaging
Requires-Dist: psutil
Requires-Dist: pynput
Requires-Dist: scipy
Requires-Dist: sounddevice
Provides-Extra: all
Requires-Dist: stimuli[build]; extra == "all"
Requires-Dist: stimuli[doc]; extra == "all"
Requires-Dist: stimuli[lsl]; extra == "all"
Requires-Dist: stimuli[pport]; extra == "all"
Requires-Dist: stimuli[style]; extra == "all"
Requires-Dist: stimuli[test]; extra == "all"
Provides-Extra: build
Requires-Dist: build; extra == "build"
Requires-Dist: twine; extra == "build"
Provides-Extra: doc
Requires-Dist: furo; extra == "doc"
Requires-Dist: intersphinx_registry>=0.2410.1; extra == "doc"
Requires-Dist: matplotlib; extra == "doc"
Requires-Dist: memory-profiler; extra == "doc"
Requires-Dist: numpydoc; extra == "doc"
Requires-Dist: sphinx; extra == "doc"
Requires-Dist: sphinx-copybutton; extra == "doc"
Requires-Dist: sphinx-design; extra == "doc"
Requires-Dist: sphinx-gallery; extra == "doc"
Requires-Dist: sphinx-issues; extra == "doc"
Requires-Dist: sphinxcontrib-bibtex; extra == "doc"
Provides-Extra: full
Requires-Dist: stimuli[all]; extra == "full"
Provides-Extra: lsl
Requires-Dist: mne_lsl>=1.8.0; extra == "lsl"
Provides-Extra: pport
Requires-Dist: pyparallel; sys_platform == "linux" and extra == "pport"
Requires-Dist: pyserial; extra == "pport"
Provides-Extra: style
Requires-Dist: bibclean; extra == "style"
Requires-Dist: codespell[toml]>=2.2.4; extra == "style"
Requires-Dist: pre-commit; extra == "style"
Requires-Dist: ruff>=0.6.0; extra == "style"
Requires-Dist: toml-sort; extra == "style"
Requires-Dist: yamllint; extra == "style"
Provides-Extra: test
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: pytest-timeout; extra == "test"
Requires-Dist: pytest>=8.0.0; extra == "test"
Requires-Dist: stimuli[lsl]; extra == "test"
Requires-Dist: stimuli[pport]; extra == "test"
Dynamic: license-file

[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
[![codecov](https://codecov.io/gh/mscheltienne/stimuli/graph/badge.svg?token=92BKRPSD0V)](https://codecov.io/gh/mscheltienne/stimuli)
[![tests](https://github.com/mscheltienne/stimuli/actions/workflows/pytest.yaml/badge.svg?branch=main)](https://github.com/mscheltienne/stimuli/actions/workflows/pytest.yaml)
[![doc](https://github.com/mscheltienne/stimuli/actions/workflows/doc.yaml/badge.svg?branch=main)](https://github.com/mscheltienne/stimuli/actions/workflows/doc.yaml)
[![PyPI version](https://badge.fury.io/py/stimuli.svg)](https://badge.fury.io/py/stimuli)
[![Downloads](https://static.pepy.tech/personalized-badge/stimuli?period=total&units=international_system&left_color=grey&right_color=blue&left_text=pypi%20downloads)](https://pepy.tech/project/stimuli)
[![Conda Version](https://img.shields.io/conda/vn/conda-forge/stimuli.svg)](https://anaconda.org/conda-forge/stimuli)
[![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/stimuli.svg)](https://anaconda.org/conda-forge/stimuli)
[![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/stimuli.svg)](https://anaconda.org/conda-forge/stimuli)

# Stimuli

This repository contains auditory stimuli that do not require
[PsychoPy](https://www.psychopy.org/). The auditory stimuli use the python
[sounddevice](https://python-sounddevice.readthedocs.io/en/latest/) library.

# Installation

This repository is available for `python ≥ 3.11` on `pip` with the command
`pip install stimuli` or on `conda-forge` with the command
`conda install -c conda-forge stimuli`.

# Usage

## Audio stimulus

```
from stimuli.audio import Tone
from stimuli.time import sleep
from stimuli.trigger import ParallelPortTrigger

trigger = ParallelPortTrigger("/dev/parport0")
sound = Tone(frequency=1000, volume=80, duration=1)
sound.play(when=0.2)
sleep(0.2)
trigger.signal(1)
```
