Open 48productions opened 2 years ago
For now, there's a new function inside the Song object that will perform the same operation called PlayPreviewMusic()
. It'll send the song object to the soundmanager with all of its sync data so actors that have timing effects set can react to it.
local song = [your song object here]
song:PlayPreviewMusic()
Even if it's just a temporary/to be expanded on later thing, the idea behind this new function works for what I wanted to use it for, so I'll take it!
I think I've mentioned it in the Discord before a bit ago, but worth reiterating (especially now that I've tested/re-confirmed it on the 4.12 release), I've noticed a few things through testing it out:
SampleMusicLoops
metric is ignored if it's specified on the current screen, opting to always loop.PlayPreviewMusic()
at this time, I'm not sure how to go about testing this.But other than that, it seems like this new function is working well!
Is your feature request related to a problem?
No
Describe the solution you'd like
For beat-based actor effects, it is to my understanding not possible to manually set the BPM/timing data that effectclock beat uses via lua. I'm requesting a way to make this possible.
As an example, effectclock beat will automatically sync actor effects to the beat of the currently playing song preview in ScreenSelectMusic. Similar functionality cannot be replicated on other screens, which might be wanted on, for example, a totally custom, lua-based select music screen (currently, effectclock beat would only sync to the custom screen's menu music in this case, to my understanding).
Describe alternatives you've considered
No response
Additional context
(Relevant conversation and Jose_Varela's proposed solution on the Outfox discord)