Skip to content

File Stimulation

Common Use Cases

Play custom waveforms from a list of files on disk, which includes WAV files and MAT files. Use this for speech studies, psychoacoustics, or for custom audio or electrical stimulus presentations.

Data Stored
Epoc (optional) Parameter values when triggered
Stream (optional) Raw stimulus waveform
Outputs
Stim Stimulus waveform, single channel floating point
StimSync Logic signal when file stimulation is active
Par Output Full parameter stream

Gizmo Help Slides

Reference

The File Stimulation gizmo plays stimulus waveforms from a list of files. It supports timing control and dynamic parameters.

File Stimulation Runtime Interface

If enabled in the gizmo configuration, a control tab is added at runtime. Parameters that can be controlled dynamically are shown in black (active). You can enter a value in the field, use up and down arrows, or drag a slider to modify to parameter value. You can show only the elements you need or hide the entire control.

Two Versions of the File Stimulation Runtime Tab

The illustrations above, show two version of the floated tab, one with all the parameters shown and one with only the runtime widget controlled parameter and the Param In line (with override selected) shown.

Click and release the Strobe Button to trigger a manual strobe pulse.

Select the Mute Button check box to zero the stimulus signal.

Select the Monitor Feeds check box to show stimulus parameters controlled by an input signal. Also adds an Override column and check box to the left. Select the Override check box to adjust the parameter value manually instead of using the input signal.

Select the Show Constant check box to display values for parameters set to Constant. They will appear gray.

File Stimulation Configuration Options

General Tab

General Tab

Timing

You can choose to use the whole file or segments of the file. When using file segments, you can choose to set the duration of the stimulus waveform per Pulse, per Parameter, or per Strobe. You may also have to define the onset, or starting point of the segment, and step size in the parameter table. The step size allows you to use every nth sample in the signal.

When the Pulsing Active check box is selected, pulse duration and pulse count parameters are enabled in the parameter table and the stimulus is triggered when the strobe goes high, the pulse parameters are then followed and the stimulus ends with the pulse count is met or the strobe goes low. The next stimulus is triggered by the next strobe input.

Gating

Gates serve to attenuate the signal during the onset and offset of the signal, gaining or decreasing in intensity, for the purpose of removing onset/offset related artifacts from this signal. You can choose one of several common gate shapes to apply to the signal. The R/F Time defines the length of time over which the gate is applied, therefore, the length of time in which the signal goes from 0 to full signal strength or visa-versa.

Signal Features

Features available here depend on the file type. When the check box is selected, the corresponding parameter is enabled in the parameter table.

Misc

In this section you can apply a signal gain factor and choose to output either a stimulus or pulse timing Sync Output signal.

Files Tab

Files Tab

Working Directory

The default working directory is C:\TDT\Synapse\StimFiles. You can select a different directory or stick with the default. If you add files to the directory or choose a new directory, you can click Refresh to update the displayed list of available files below.

The lower portion of the window serves as a simple graphical interface for displaying, filtering, and selecting stimulus files for play out.

Available Files

In the list on the left, all stimulus files found in the working directory are displayed. Stimulus files can be any of the following types:

  • continuous 32-bit floating points (*.f32)

  • continuous 32-bit integers (*.i32)

  • continuous 16-bit integers (*.i16)

  • Wave (*.wav)

  • MATLAB arrays (*.mat)

  • text file with one value per line (*.txt)

  • text file with comma-separated values (*.csv)

A Show Types drop-down filter, below the Available Files area, narrows the displayed files to the selected file type. The Sub Directory drop-down menu allows you to drill down to subdirectories within the working directory.

Selected Files

The area to the right, serves as a list of files to be loaded as the stimuli.

File Buttons

Use the file buttons, located between the two lists, to choose the files to use.

Button Description
move a file from available to selected
move all files to Selected Files
move a file from selected to available
move all files to Available Files
move file to top of list
move file up in list
move file down in list
move file to the bottom of the list

Import /Export

These buttons can be used to import or export stimulus files.

Parameters Tab

Parameter Tab

File Stim Parameters

The table lists parameters relevant to configuring the stimulus. Each row represents a parameter and rows are shown or hidden in response to selections made on the General tab. Use the Show All check box to display hidden rows.

Tip

See Using Parameters for more information on controlling parameter tables.

Mode

In the Mode column, you can choose to make individual parameter Constant, controlled by a runtime Widget, or controlled by an Input line.

Value Columns

Enter values in the Value, Jit% (Jitter), Min, and Max columns to set the Constant value or to set the initial value when a Widget control will be used.

Epoc

In the Epoc column, you can choose to save the individual parameter value on stimulus or pulse onset.

ID and Auto ID check box

Synapse automatically generates a store name. TDT recommends using Auto ID to ensure no store names are duplicated. A "/" is appended to the name to indicate when the full epoc is stored (and is not appended when only saving the onset). To make your own store names, clear the Auto ID check box.

Misc Options Tab

Misc Options Tab

Required Sample Rate

The minimum rate required. Synapse looks through the entire system and sets the sample rate according to this and other limiting factors.

Hide Run-Time Windows check box

By default a runtime tab is added in preview or record mode. The contents of the tab are defined with configuration options on the General and Parameter options tab. Select the check box to hide the runtime tab.

Manual Strobe Control check box

When selected a manual strobe control is added to the runtime eStim tab. Clear the check box to hide the manual strobe control at runtime.

Mute Control

Select the default behavior of the runtime mute control. Mute allows you to mute or temporarily zero the stimulus during runtime. You can choose to hide or show the control and, if show, set the default start state.

Parameter List

Select whether to store the value of all parameters, at each stimulus or pulse onset. This generates a multi-channel list of scalar values. The channels map directly to the rows of the parameter table on the parameters tab. By default, some parameters are hidden in the table, but values for are stored for all parameters.

Raw Waveform

Select whether to store a copy of the raw stimulus waveform. You can choose to store continuously or only when the stimulus is active.