# NIMH MonkeyLogic

## Behavioral Control and Data Acquisition in MATLAB

NIMH MonkeyLogic is a MATLAB-based software tool for behavioral control and data acquisition. It allows users to design sensory, motor, or cognitive tasks with a familiar, high-level language and execute them with high temporal accuracy. Many stimulus types are available for task composition and data can be collected during tasks from various signal sources. The timing of events can be synchronized with external devices via event code exchanges.

## Features

- Full support for latest 64-bit MATLAB
- Compatible with the original MonkeyLogic behavioral tasks
- NIMH Data Acquisition (DAQ) Toolbox

- Real-time behavior monitoring using only one DAQ board
- Support for a wide variety of input and output devices
  - Monocular or binocular eye signals (voltage or TCP/IP)
  - Up to two joysticks (voltage, USB or TCP/IP)
  - Touchscreen (multi-touch), mouse and keyboard
  - Webcams (up to four cameras)
  - Triggering remote reward devices via Bluetooth
  - Low-latency voice recording via WASAPI
  - Sampling faster than 1 kHz (secondary DAQ needed)
  - Importing data from the lab streaming layer

- MonkeyLogic Graphics Library (MGL)

- "What you see is what your monkey sees."
- Transparent images by alpha blending or color key
- Movie & sound streaming (no limit to length)
- Low-latency audio output with XAudio2 and WASAPI

- mlplayer: a trial-replay and video-exporting tool
- Simulation mode that allows testing user tasks with no special hardware

## System Requirements

- Windows 10/11 (22H2 or later) for x64 processors

- ARM processors are not supported.
- Windows N and KN editions require the Media Feature Pack.

- MATLAB R2025a or later

- No other toolbox is required.

- National Instruments Multifunction I/O Device (optional)

- No need to install two boards
- USB-type DAQ devices are supported.

The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.

- Freedom of Information Act
- HHS Vulnerability Disclosure

- National Institute of Mental Health
- National Institutes of Health
- U.S. Department of Health and Human Services
- USA.gov