Managing Audio files in Custom Events

Greetings,

Is it possible to create a custom event that will play just a portion of an audio file? I know I can do this in Producer. However, I would like to have the audio independent of a timeline. Here's the situation. We have a green screened interview with the PI of the HST PHAT project. Ideally we would like use these as transparent (chroma keyed) video files that plays over Uniview. (I don't know that is possible... yet)
So, in the meantime, we are using a simple image billboard of the scientist and the audio.

So, I want to create a series of custom events that will play various answers to  questions the presenter poses to the audience. I know I can create a series of "audioplayer1 .... AudioplayerN files, but this is a bit cumbersome.  I'm hoping for a more elegant solution.

The following syntax works to trigger WHEN to start and audio file, I just am not sure I can send a trigger, or a timer that STOPS where I want.

AudioPlayer.playing True;
AudioPlayer.seek 54
# This syntax will start the file at 54 sec in... Now, how to stop it later, like
AudioPlayer.stop 55 (which does NOT work)... or "pause 10" then AudioPlayer.stop

Thanks!


Ist dieser Artikel hilfreich?

Hey Joel,


AudioPlayer.stop is not a vailid Runtime command


Uniview parses the syntax in a CEB all at the same time so you would need to make a custom event that would stop it like


AudioPlayer.prop.Playing False


The reset of the runtime commands for audio objects can be found in your Run-Time Command Syntax help guide in Uniview or I will just paste it here


sgAudioObject

Typical ObjectsAudio Container

Prefix<UID>.prop.

 SYNTAX ExampleEnable looping on the audio container:
audioContainer.prop.Looping True

Command

Arguments

Description

Looping

True | False

Enables or disables the looping of the audio.

Playing

True | False

This allows the user to decide whether the sound starts playing upon startup. If “playing” is set to “False”, autoPause will have no effect until “playing” is changed to “True” which can be done through the audio object’s properties.

CameraRelative

True | False

Specify If the sound is be placed relative to the camera.

Mute

True | False

This enable/disable the muting of the audio. .

Offset

<x> <y> <z>

The offset for the position placement of the sound. (Makes it possible for the surround sound effect)

Autopause

True | False

This allows the user to control whether the audio object plays continuously or automatically pauses itself when it is effectively inaudible (volume is less than 0.1%). This is a useful feature which enables the user to set up descriptive audio for an object which will only start up as the user approaches it.

PitchShift

<value>

Change the default pitch. Valid values lies from 0.1 to 10.

TimeOffset

<value>

Specifies the <value> time (in seconds) offset added to the seek command.

Volume

<value>

Specifies the volume of the audio.

Prefix<UID>.

 SYNTAX ExampleTo rewind the audio to the start type both:
audioContainer.prop.Playing False
audioContainer
.seek 0

Command

Arguments

Description

file

<filename>

This specifies the audio file to be played.

distance

<dist> <unit>

This defines the distance by which the volume of the audio will fall to 1%, the volume when you are directly next to the object being 100%. E.g: audioContainer.distance 1 AU

seek

<num>

Places the audio playback marker to the <num> seconds + timeoffset specified.


Copyright 2012 SCISS AB. All rights reserved.

Thanks Greg,


OK, So it appears the TimeOffset is to be used in conjunction with the Seek command. So, I'm not having success, unless I'm missing something. Here's a string I tried.

AudioPlayer.prop.playing True;

AudioPlayer.prop.seek 54;
AudioPlayer.prop.TimeOffset 2;

AudioPlayer.seek 0,

AudioPlayer.playing False;


Hmm... Am I missing something or not understanding how TimeOffset works?


Joel

Antwort
Scheduled to Release

I thought I posted this earlier so I apologize about this.


Basically the timeoffset is a component of the seek command. You do not enter it in with the same string of commands. What is does, is to set the time offset of the seek command. For example if you entered the command as you did here, it would offset the seek command by 2 seconds. 


Uniview parses all of the commands at the same time, so if you have a string of commands you enter at the same time, they all going at the same time. You will need to create different custom event buttons for the starting and stopping of the audio.