Audio Player

From RealMotion Wiki

Audio/Audio Player

Loads and plays an audio file. ​

Description

The Audio Player box decodes and plays an audio file. The Audio player allows looping, seeking, volume control and balance setting.

The box also supports the device Motu Audio ASIO. The Sound System may be changed in the System Configuration, tab Sound, parameter Sound System.

General Use Case: The Audio Player box exposes most of its parameters in pin to allow scripted usage. Therefore, a sound may be played in a transition or when a user is detected. The box Mean Value may be used to control the volume proportionally to the movement intensity.

Inputs

Balance Float Receives the balance level.
Filename String Receives the filename of the sound to play and reload on filename change.
Reload Trigger Reloads the audio file on reception of this event.
Looping Int Enables the audio looping when the received integer is not equal to zero.
Pause Trigger Pauses the sound on reception of this event.
Play Trigger Plays the sound on reception of this event.
Seek Trigger Seeks the sound to the inputted Seek Time on reception of this event.
Seek Time Float Receives the seek time.
Stop Trigger Stops the sound on reception of this event.
Volume Float Receives the volume level.

Outputs

Audio Audio Line Outputs the sound file played in an Audio Line.
Complete Trigger Triggers an event when the last millisecond of the sound is played.
Length Float Outputs the length of the loaded file.
Time Float Outputs the current audio time.

Parameters

General

Audio Input

Filename Toggle Enables the Filename Input Pin and overrides the Filename parameter.
Filename Uri Indicates the path of the sound file to load.
Load File Toggle Enables the Reload Input Pin. Visible only when the Input Pin Filename is enabled.
Seek Toggle Enables the Seek Input Pin to allow seeking on runtime.

Playback

Play Toggle Enables the Input Pin: Play
Pause Toggle Enables the Input Pin: Pause
Stop Toggle Enables the Input Pin: Stop
Looping Toggle Enables the Looping Input Pin and overrides the Looping parameter.
Looping Toggle Loops the video.
Enable Output Pin: Time Toggle Enables the Output Pin: Time

Volume Controls

Enable Input Pin: Volume Toggle Enables the Volume Input Pin and overrides the Volume parameter.
Volume Float Sets the video volume.
Enable Input Pin: Balance Toggle Enables the Balance Input Pin and overrides the Balance parameter,
Balance Float Balances a stereo audio file.

Advanced

Enable Output Pin: Complete Toggle Enables the Complete Output Pin and outputs an Event when the file played until the end.
Enable Output Pin: Length Toggle Enables the Length Output Pin.
Use Streaming Toggle Uses the streaming technique to load files. Streaming allows to start playing a large audio file before it is actually all loaded in memory. However, seeking in streamed files may have significant lag, as the whole file is not loaded from the disk. Disable this option to preload small audio files played repeatedly.

See Also

Boxes related

Audio Line In, Audio Mixer, Audio Out, Audio Spectrum, Web Browser, Trigger Event, Mean Value, Audio Video Line, Video Player, ​​

Version Information

Current documentation version: 2.1.0. ​ ​