Audio Player Element

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

Summary

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

Properties

NameDescription                              ConstraintsTypeOn
runtime
change
Settings
Test Audio        Click to test playback of the current audio clip                Boolean         
Playback Mode        Play Method                stPlay..         
Playback
Volume        Volume, from ground (0) to full (100), of the audio clip                Int32         
Balance        Stereophonic balance, left (-100) to right (100), of the audio clip                 Int32         
Duration        The duration of the current audio clip in ms.                Double         
Playback Position        The current playing position (percentages, 0..100, to the total duration) of the audio clip.                Double         
Is Playing        Indicates the playback state of an audio clip. Can be used to control playback process, e.g. pause it, at runtimeChange in runtime causes toggling between the play/pause states.                Boolean         
Material List
Selected Index        Defines an index of the active item in the material list of this element                Int32         
Selected Item        Defines a name if the active library item in the material list of this element                String         
Item Count        Returns the total number of material items in the list of this element                Int32         
Control
Is Enabled        If set to false the element is completely omitted when the experiment is run                Boolean         
Title        Title of the element                String         

Audio Player Element allows a playback of audio clips stored in Material Library. Various audio formats, such as mp3 and midi, are supported in contrast to the Wave Player and Direct Sound elements, which can work only with clip in the WAVE format. The Audio Player element provides all playback controls and onset playback synchronization. The element supports a switchable stimulus list, when multiple clips are loaded from Material Library into the element.




Description

Selecting Event – Add Element command and selecting Audio Player under the Audio Stimuli category will add a new Audio Player element. The audio clip element can play audio files, of different formats, stored as resources in the Material Library. The element is designed for delivering audio feedback to participants or playing voice instructions. Several audio items can be loaded into an element's resource list, in order to make a switchable stimuli set. Different audio formats are supported provided that the appropriate codecs are installed on the system being used (the files have to be played correctly by other software players). The playback of some audio formats may be delayed due to a decoding script run by a background codec program, so this should be checked where necessary.

Snapshots

Snapshot 1

Snapshot 1

Snapshot 2

Snapshot 2


Practical Use

If, under the Properties tab, the Behaviour property is set to pmOnce or pmLoop, the start of playback is aligned with the activation of the parent event. Playback can also be controlled manually by setting the property IsPlaying to true or false at the runtime. Other playback properties such as the volume, balance and playing position also can be adjusted dynamically.