Metadata-Version: 2.1
Name: stimuli
Version: 1.0.2
Summary: Precise auditory stimuli.
Author-email: Mathieu Scheltienne <mathieu.scheltienne@gmail.com>
Maintainer-email: Mathieu Scheltienne <mathieu.scheltienne@gmail.com>
License: MIT License
        
        Copyright (c) 2022 Mathieu Scheltienne
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
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: License :: OSI Approved :: MIT License
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: 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: 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.5.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"

[![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)
```
