Download

Get duration of sound wave crashes engine

Hey guys!

Here’s a very strange and very specific problem…
Say you want a macro with a sound wave input:

Untitled.png

And then you want to get the duration of that file inside the macro:

eb762d089307c0933def720893a5de83b56ce95f.png

What happens? Well, the engine crashes. Note that you have to use the “duration” variable somehow, such as printing it, or using it as a delay.
However this is very specific. If instead of a pin variable you have a variable:

a6664732d40e5247a0bc8cdd52391b3c88e2ee39.png

It works fine. Also, it works outside of a macro… just not inside.
I’ve tried multiple ways of using the duration, as well as different sound files. Nothing worked.
If anyone could help me, I’d be much obliged.

Thanks!

No one knows why this happens? ;_;

where are you calling this macro? in event graph or in a function?

functions cant use delay node so that might be the reason of crash. You should not use this macro in a function. only with a event in event graph

Yeah, it’s a event.
I decided to be cheap and use a variable, so that works, I guess. Thanks.