OutFox icon indicating copy to clipboard operation
OutFox copied to clipboard

[Feature Request] Add a way to set the BPM/timing effectclock beat uses in lua

Open 48productions opened this issue 4 years ago • 2 comments

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)

48productions avatar Nov 20 '21 21:11 48productions

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()

JoseVarelaP avatar Dec 31 '21 18:12 JoseVarelaP

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:

  • The SampleMusicLoops metric is ignored if it's specified on the current screen, opting to always loop.
  • Sample music doesn't seem to play for a few specific songs in different packs (noticed, among others, on "birth", "Doki Doki", and "not eternity" from the DDR XX pack, along with "Broken" and "Heartbeat" in the Serenity pack). I assume this isn't theme specific, but since I'm not sure if any other themes (or the default one) use PlayPreviewMusic() at this time, I'm not sure how to go about testing this.

(log.txt, if needed)

But other than that, it seems like this new function is working well!

48productions avatar Jan 03 '22 00:01 48productions