Set Sound Timeposition with Number

local number = 11
local numberInsideNumber = 5.5

Lets say we have 11 Numbers and i select Number 5.5 inside 11. This would be the Middle of number. How could i go to the middle of the Sound TimePosition with it?

Explain:

Number:
1 number ------------- 11 number
------------------------
1 sec ---------------- 30 sec
Sound:

I’m sorry, it’s hard to understand what you’re trying to do.

Can you provide more details, context, and working code examples?

The Sound is 10 seconds long, The Variable Number has the Numbers to 10 and i select the 5 from Number, then its going to Sound.TimePosition 5. But how can i do that as a Example when the Sound is 15 sec long and the Variable Number is 43?

Sound.TimePosition = (numberInsideNumber / number) * Sound.TimeLength

This might be what you mean? Not entirely sure what you are asking though as it is a tad unclear.

The above should work for any case where numberInsideNumber <= number

I will try it now and i mean when Sound is 20 sec long and number is 4 and i select 3 It should go to 15 sec

1 Like

In this case what I have just said will work.

Did my method work for you? Would appreciate a juicy solution tick if so. :slight_smile:

Sorry i forgott yes it worked


1 Like

Hey do u also know how to take the Number from Timeposition in the Middle? Like just print the number in the Middle of TimePosition

Please elaborate? Getting the “middle” of a number isn’t a clear way to describe it.

1 Like

Like if TimeLength is 11 seconds long take the Number 5.5

If you just want half of the current TimePosition (?) then

print(Sound.TimePosition / 2)