Tone Generator Element

Modified on 2018/07/16 01:52 by Administrator — Categorized as: Auditory Stimuli, Base Elements, Elements

Summary

Element Icon Tone Generator
Info
Category: Audio Stimuli AddIn: Base Layer
Creator: OkazoLab Scope: Parent event
Owns Snippets: None Usage: Snippets

Properties

NameDescription                              ConstraintsTypeOn
runtime
change
Settings
Frequency        Define the frequency of the generated audio tone                Double         
Duration        Define the duration (ms) of the generated audio tone                clTime         
Sampling Rate                        Int32         
Wave Type        Define the wave type the generated audio tone                Int32         
Playback Mode        Defines the playback mode for audio tone generated by the element. In the default mode (Auto Playback), the tone is played once on the onset of the parent event. In the Manual mode the playback process is controlled in the snippets by changing the Is Playing property.                stPlay..         
Asynchronous Monitoring        Defines whether the element asynchronously monitors the playback process. Enabling this property may allow more accurate detection of the end of the playback. As a drawback, monitoring may marginally impair the timing accuracy of the playback start and, therefore, is not recommended for precise stimulus presentation.                Boolean         
Hardware Settings
Playback API        Defines API for the audio playback. WASAPI is not supported in Windows XP but can be the best choice in Windows Vista and higher. ASIO API may require hardware that support it and appropriate drivers.                stSoun..         
Sound Device        Defines a sound device for the audio playback, when multiple devices are available in the system. Different playback APIs return their own device list for selection                Int32         
WASAPI Share Mode        Defines whether the selected sound device will be used in the shared or exclusive mode. This setting is relevant only when WASAPI is chosen. The exclusive mode greatly improves timing accuracy of audio playback and is recommended for stimulus presentation. As a drawback, only one Wave Player element per experiment can access the particular sound device in the exclusive mode.                AudioC..         
ASIO Control Panel        Opens a control panel with ASIO driver settings                Boolean         
Buffer Latency        Defines the size of the internal audio buffer (in ms), in which an audio is loaded just before playback. Small buffers may cause CPU overhead, but guarantee faster playback adjustments, e.g. for the volume. Large buffers usually are better for smooth playback. The typical range for the property value is between 25- 500 ms.  The property value is ignored when ASIO API is used.                Int32         
Test Playback        Initiates a single playback of the currently generated tone with the chosen hardware settings. An error message is returned, if the playback is failed.                Boolean         
Playback Controls
Volume        Defines the playback volume from the ground (0) to full (100) level                Double         
Balance        Defines the stereophonic balance, left (-100) to right (100) of the audio tone                Int32         
Start Position        Defines the start position of the further audio playbacks in percentages to the total duration of the generated tone.                Double         
Playing Position        Indicates the current playing position (in percentages to the total duration) of the audio tone.. Changes are accepted only if the audio tone is currently playing.                 Double         
Is Playing        Returns or sets the current playback state of the element. In the manual playback mode, the value can be set before the onset of the parent event. In all modes, the property can be used to control the currently playing audio: assigning false/true to the property causes pause/continuing the playback, correspondingly.                Boolean         
Runtime Status
Triggering Time        Returns the local event time in ms, when the last playback has reached the end.                clTime         
Is Triggered        Indicates that the element has been triggered by end of the playback at least once, since the onset of the parent event.                Boolean         
Control
Is Enabled        If set to false the element is completely omitted when the experiment is run                Boolean         
Title        Title of the element                String         

Tone Generator Element generates and play audio tones with predefined duration, frequency and wave type. The element allows choosing an audio playback API and ooutput device. Among them, WSAPI in the exclusive mode is recommended for the best temporal accuracy.

Description

...

Snapshots

Snapshot 1

Snapshot 1

Snapshot 2

Snapshot 2

Practical Use

...

Technique 1

  1. Step 1
  2. Step 2
    ...
    === Technique 2 ===
  3. Step 1
  4. Step 2
    ...

     // Check the trial outcome. Result and RT just other user variables
    
    // insert code snippet here..
               
    ...
    == Notes ==
    ...
  5. Insert Notes here..
  6. Insert Notes here..