MultiFunPlayer v1.32.0 - Multi axis funscript player - Now with SLR script streaming

feature request: smart limit for twist to not move if stroke axis L0 is below anywhere 10-30%. The idea is for it to not spin if the thing is pressed against you.

I wont hardcode it like that but I’ll just make smart limit usable on all axes and user configurable so you will be able to set it how you want.
Added to todo on github.

1 Like

hi,
How do we advance the script of 15 or 20 seconds compared to the video?
thank you.

Script offset slider only goes from -5s to +5s, it was meant for small adjustments. For such big offsets I would edit the script itself, there must be an easy tool to offset a script.
But I’ll add your suggestion to allow bigger offset ranges.

thank you.

MultiFunPlayer v1.20.2:

Download: Release MultiFunPlayer v1.20.2 · Yoooi0/MultiFunPlayer · GitHub
Patreon build: https://www.patreon.com/posts/65965859

1.20.2:

Additional patreon only changelog:

  • Fix SLR Interactive clearing automatically loaded scripts

Changelog:

  • Add self-contained releases that come with prepackaged .NET and VC++ dependencies
  • Fix motion providers with linked script spazzing out when they are idle
  • Fix auto skip settings not loading and always defaulting to enabled
  • Fix script libraries not respecting recursive setting
  • Fix axis being linked multiple times when reloading
  • Prevent UpdateMotionProviderWithAxis pointing to itself

v1.20.1:

Additional patreon only changelog:

  • Fix condition where SLR script could be cleared if loaded before the video, which required toggling “fleshlight” button on/off
  • Dont require DeoVR to be running locally for SLR interactive to connect to allow DeoVR/SLR interactive on remote devices/headsets

Changelog:

  • Fix TCode interval being passed as seconds instead of milliseconds causing stutters (#56)
  • Fix buttplug.io exception when loading device map (#57)
  • Fix buttplug.io client connected state not always updating
  • Fix axis being marked as dirty when its value overshoots valid range
  • Fix build not running without dotnet 6.0.2/6.0.3
  • Don’t update motion provider if configured axis is auto homing
  • Don’t show error dialog when closing MPC-HC/BE window

v1.20.0:

Additional patreon only changelog:

  • Add SLR script streaming support
    2022-03-14_23-15-25

Changelog:

  • Add dynamic outputs (#50), you can now add multiple outputs of the same type and/or remove the outputs you dont use. Allows for example one network output to OSR with another network output to BusDriver VaM plugin, or output to multiple serial/network OSR devices at the same time. MFP will migrate old static outputs to the new system when loading previous configuration.
    2022-03-14_23-16-47
  • Add WebSocket output target
  • Add overview of enabled and script overriding features under axis name
    2022-03-14_23-20-11
    • L: Axis Link, green when enabled, red when enabled with priority
    • M: Motion Provider, green when enabled, red when enabled and provider blend is 50% or more
    • S: Speed Limit, green when enabled, red when motion is being limited
  • Reset DeoVR and HereSphere state when not watching video
  • Improve auto skip to script start behaviour for streamed videos
  • Fix video file not refreshing when adding/removing/editing path modifiers
  • Fix high motion provider time drift
  • Fix link axis not updating under certain conditions
  • UI tweaks

If you like what I’m doing, please consider supporting me on Patreon

Thank you for the constant updates and improvements!!! Hardest working programmer that we got. Ya’ll need to join Yoooi’s Patreon!

2 Likes

it is done. :smiley: :smiley: :smiley:

I connected it to MPV and buttplug. moves fine in buttplug, but doesn’t move at all when the script is functioning and moving the bars.

Did you map your devices in buttplug.io settings in MultiFunPlayer?

thanks, this needs to be in the How to section too

Is there anyway to export instances of the interpolated data? I’m looking for a solution to my question over at:

TBH I dont know what exactly do you mean by “interpolated”, I didnt know in that post too, but I will try to add a feature to only enable motion providers when there is a gap.
There is no way to export axis motion data at the moment, but ability to record to a file is not a bad idea.

1 Like

Perhaps I am mistaken on what is occurring. I am simply referring to other Axes inferring movement based upon L0. If it’s randomized in movement; But not Speed it’s still a sort of interpolation imo.

If you link axes its basically a copy of the script.
If you add motion provider to an axis with a script you basically have two “tracks”, one is the script, the second one is the motion generated from motion provider. Then those two tracks are blended/mixes together based on the blend slider to produce the output value, which is I think what you call interpolation?

I call it “blending” since they are separate tracks, kinda like you blend two images together. It technically does use linear interpolation under the hood, but I would call it “interpolation” when interpolating between two points in the same data set, for example the interpolation of script points to make smooth curves with something like pchip/makima or interpolating between two pixels on an image.

But it doesn’t matter, just different words with similar meaning, I just couldn’t perfectly understand what you meant.

1 Like

Hi. I use DeoVR with MFP v1.20.2.0 and a TCode device controlled directly from MFP. I noticed that the syncing is inaccurate, the device regularly responds too late or too early. I verified with a camera that the sync seems to oscillate between 300ms ahead and 300ms behind with a period of about 20 seconds.

I looked at wireshark data, comparing the packet time with the “current Time” field in the json api, the jitter is only ~30ms max, which doesn’t explain this problem.

With OpenFunScripter, the device follows the script movements accurately (also verified with camera). MFP + MPC-HC on the same computer also works fine. I tested with low and high serial refresh rates.

In DeoVRVideoSourceViewModel.cs the code attempts to read the propery “currentTime”, but the DeoVR API mixes between “current Time” and “currentTime”. Perhaps this is part of the problem?

1 Like

So any other player works correctly, only DeoVR has this issue?
Are the “Axis Values” bars also out of sync?
Such time difference shouldnt really happen unless playback rate gets out of sync.

Never had the api return “current Time”, are you sure its not just wireshark text formatting?
If you switch log level to trace you should see Received VideoPositionMessage messages every 1 second.

I did some more digging…

I setup a video camera with the following elements visible:
MPC-HC playing a video of a metronome.
DeoVR playing the same video.
MFP pointed at MPC-HC with the axis value clearly visible, interpolation Step
MFP pointed at DroVR with the axis value clearly visible, interpolation Step.

I created a simple funscript and recorded a video (60fps) of this setup. I carefully inspected the video writing down how many frames ahead/behind each thing was relative to MPC-HC, once per second.

The orange line shows that DeoVR plays the video at a slightly slower rate than MPC-HC. We can probably ignore this here.
The Grey line shows that MFP (deovr) axis value moves between -8 frames earlier to +15 frames later than expected (-130ms, +250ms).
The orange line shows that MFP (MPC-HC) axis value moves between -1 frames earlier and +8 frames later than expected (-20ms, +130ms).

Both DeoVR and MPC-HC show a very clear sine wave.

I also checked the logs, everything looks normal. If I compare the log timestamp with the VideoPositionMessage, DeoVR has a jitter <30ms with no noticeable pattern or drift, MPC-HC has a jitter of <60ms with no noticeable pattern but a small drift (0.06s over 60 seconds, probably 30/29.97fps crap).

I suspect that:
OFP does some sort of signal filtering that results in unstable behavior.
MPC-HC sends 5 position updates per second and DeoVR only 1 per second. As a result the unstable behavior is less bad with MPC-HC.

This code looks like a prime candidate for causing the observed behavior:

ScriptViewModel.cs
        var error = float.IsFinite(CurrentPosition) ? newPosition - CurrentPosition : 0;
        _playbackSpeedCorrection = MathUtils.Clamp(_playbackSpeedCorrection + error * 0.1f, 0.9f, 1.1f);

That sure looks unstable.

You’re right, my bad.

2 Likes

Thanks for a nice analysis!
I guess thats what happens when I only test with MPV…

Yup, basically a full PID will be needed.
Added this issue to github.

Actually knowing that each video player has different update rate PID will not work well.
So for now I dont have any good ideas on how to solve that properly.