Hello Ventuzians!
THE FORUMS ARE CLOSED!

Please join our discord server HERE!! << click me :D

We are shutting our Ventuz Forum, but don't worry, it will all be archived for you to search in if you have a query. From now on, please add all your comments, questions or observations into our Discord Server

Thanks for the great time - see you on discord!!
Dee, Karol, Daniel and the whoooole Product and Support team!

Audio Clip remaining time

Q and A about functionality and how to solve a special task for your application.

Moderator: Support

Post Reply
Total-Image
Posts: 28
Joined: 11 Sep 2015, 14:42

Audio Clip remaining time

Post by Total-Image » 16 Mar 2018, 18:44

With the duration and position properties of the movie clip node I can calculate the exact remaining time of a movie clip, but since the audio clip node doesn't have a position property (only a duration), I'm looking for a solution to get the exact remaining time of a audio clip.
As a temporary solution I added a Timer node to the scene.
Bind the duration of the audio clip to the Start time property of the Timer node and created a event which triggers both the Timer Start and Audio clip play event simultaneously.
The problem we've is that in certain situations the Timer is elapsed earlier then the Audio clip.
I'm not sure if this has something to do with the enable audio compensation option (which is in our case off) or with the clock mode or sample rate of the sound card (RME fireface in our case) or with something else?
The audio files are most of the time *.mp3 files.
Maybe the animation node is a solution, but we don't know which audio file we've to play back in advance.

Kind regards,

Rogier

sribas
Posts: 34
Joined: 21 Oct 2016, 09:34

Re: Audio Clip remaining time

Post by sribas » 22 Mar 2018, 16:45

i think, for now, binding a timer is the only way (maybe with C# you can bypass it).
To avoid your timer to end before/after your audio, you should connect your audio duration to your StartTime

User avatar
Agalar Ragimov
Posts: 33
Joined: 02 May 2017, 11:29
Location: UAE - Dubai

Re: Audio Clip remaining time

Post by Agalar Ragimov » 25 Mar 2018, 07:11

Total-Image wrote:With the duration and position properties of the movie clip node I can calculate the exact remaining time of a movie clip, but since the audio clip node doesn't have a position property (only a duration), I'm looking for a solution to get the exact remaining time of a audio clip.
As a temporary solution I added a Timer node to the scene.
Bind the duration of the audio clip to the Start time property of the Timer node and created a event which triggers both the Timer Start and Audio clip play event simultaneously.
The problem we've is that in certain situations the Timer is elapsed earlier then the Audio clip.
I'm not sure if this has something to do with the enable audio compensation option (which is in our case off) or with the clock mode or sample rate of the sound card (RME fireface in our case) or with something else?
The audio files are most of the time *.mp3 files.
Maybe the animation node is a solution, but we don't know which audio file we've to play back in advance.

Kind regards,

Rogier
Hi Rogier,
Animation node could be a solution for your question.
Check the image below.
The number '6000' I took just as an example. You can take any number but it should be much bigger than the 'duration time' of the longest audio file you can get from the client.

P.S. If you found out a better solution, please share.
Attachments
AudioClipRemainingTime.PNG
*_* - You gotta do what you gotta do (even if you don't like it)

Total-Image
Posts: 28
Joined: 11 Sep 2015, 14:42

Re: Audio Clip remaining time

Post by Total-Image » 26 Mar 2018, 21:41

I found a solution by using the DateTime node and bind the "seconds" property to a "variable" node. The "changed" event of the "variable" node triggers the "forward" (or backward) property of a "counter" node and the "start" (or end) value to the duration of the audio clip node..... See attachment
Attachments
Capture.JPG

User avatar
Agalar Ragimov
Posts: 33
Joined: 02 May 2017, 11:29
Location: UAE - Dubai

Re: Audio Clip remaining time

Post by Agalar Ragimov » 27 Mar 2018, 07:10

Total-Image wrote:I found a solution by using the DateTime node and bind the "seconds" property to a "variable" node. The "changed" event of the "variable" node triggers the "forward" (or backward) property of a "counter" node and the "start" (or end) value to the duration of the audio clip node..... See attachment
I like it. Good and simple solution.
Image
*_* - You gotta do what you gotta do (even if you don't like it)

Post Reply