OFS script converter extension for rotary fuck machines (Hismith, Lovense, etc)

OFS script converter extension for rotary fuck machines

Description

This is an OpenFunscripter extension that can convert funscript patterns into power level variations suitable for any buttplug.io-supported rotary fuck machine.

Most penetrative fuck machines are built using piston motion systems. This makes them cheap to produce, but it also means their stroke position cannot be controlled in the same way that linear motion systems can. By contrast, most funscripts are made for masturbation sleeve devices, which can precisely adjust their stroke position. This allows them to be controlled effectively by alternating motion between 0-100 position values.

However, attempting to play back a regular funscript while connected to a rotary fuck machine results in irregular, uncontrollable bursts of power, which is very dangerous and can cause serious injuries. This extension aims to solve that problem, giving you control over the power level of your fuck machine while also attempting to match the machine’s RPM to the rhythm of the action.

Features

  • A simple yet accurate cycle-time-to-power-level converter that only requires the min. and max. RPM of your device (with the toy attached) to work effectively
  • Create and store custom device profiles for faster conversion
  • A built-in unit converter utility helps you quickly translate between several types of values (cycle duration, power level, RPM, etc.)
  • A built-in device profile estimator automatically computes the min. and max. RPM values for your device profile from just a few measurements
  • Conversion logic based fully on peaks and troughs means not having to worry about how detailed the funscript patterns are
  • Ample conversion options help you tailor the power level graph to better fit the content you are working on
  • Quickly test your converted script by following the funscript-to-machine setup guide!
  • Developed for OFS v3

Installation

  1. Download and extract the latest version of the extension from Releases
  2. Copy the FM script converter directory and add it to the OFS extensions directory (%appdata%/OFS3_data/extensions/)
  3. Start OpenFunscripter
  4. In the Extensions tab, hover over the FM script converter list item and tick Enabled and Show window
  5. Optionally, you can pin the extension window to the OFS GUI. I prefer dedicating the left side of the GUI to this extension

Changelog

v1.1.0 (02-Nov-23)
  • Added device profile persistence via a Lua JSON library and profile management options (create/modify/remove)
  • Renamed the “Device power level calculator” utility into a broader “Unit converter” utility and added “Number of cycles” and “Time period” fields to it
  • Added a “Min./Max. RPM estimator” utility to make it easier to create custom device profiles
  • Combined utilities into a “Device profile calibration utilities” menu
  • Restructured the code into separate modules (main.lua now only handles the GUI)
  • Updated README to reflect new enhancements
v1.0.1 (26-Oct-23)
  • Added functionality for debug options that was excluded by accident from the initial release.
v1.0.0 (25-Oct-23)
  • Initial release.

Usage & Guides

Please read through the GitHub README as it contains ample usage instructions and several useful guides, such as measuring the RPM of devices and setting up the funscript-to-machine connection.

GUI Showcase

If you like this extension, please spread the word about it! May you happen to find the perfect configuration for your device? Be sure to share that knowledge in the comment sections where this is posted, or through GitHub issues (include your test results if possible)! Any feedback is welcome, so feel free to share your thoughts, suggestions for improvements or any bugs you may find.

Also, check out my other OFS extension project:

20 Likes

Thank you so much for this. This is an awesome and much needed tool!

May I suggest an improvement though? Do you think some sort of “tap to RPM” feature could be implemented? I’m thinking tapping the space key in sync with the action in a video to directly map the speed/frequency.
That way (rotary) fuck machine funscripts could be created a lot quicker and easier!

Hi! Thank you for the kind words :3
I think what you’re looking for may already be included in the default OFS interface. The scripting mode tab already provides several ways to add actions on the funscript, including by recording your mouse/controller position, using a set of two alternating action positions and so on. Here’s an example of how that looks:

image

On top of that, you should check out the OFS keybinding menu (Options > Keys), which gives you many ways to bind keys for your scripting needs.

Holy shit you’re the GOAT

1 Like

Hey all, I’ve just released v1.1.0 of the extension. It includes several enhancements, such as persistent device profiles, more helpful built-in utilities and a code restructure for easier continued support.

If you have any suggestions for improvements or found any bugs, please share these in the comments below! Likewise, feel free to share your own device profiles (name and min./max. RPM) and measurements! Having community-outsourced profiles makes it easier for people to find the right configuration for their device.

1 Like

Thanks for explanation, much appreciated!

I do have another suggestion (though I’m not sure if a lua that achieves this might exist already). Would it be possible to include an option that limits the converter output to discrete power levels steps (e.g. 5%)? Any value in between is rounded up or down. This would result in a smoother run and require less spinning up/down from the machine.

Thanks again for your work, I’m really enjoying it so far!

Yeah, that should be an easy option to add, as the converter is already using rounding to the nearest percent when computing the power level. I will queue this up together with GUI tooltips which I am planning to add in the next patch (hopefully next week).

Did you make any progress with this?

After playing around with your tool a bit more, I can confirm that quite often the converted power levels fluctuate quite a bit (depending on the frame rate of the video, 1-frame differences in cycle time can result in power level differences of >5%). To solve this I believe it would be best to add an option that averages the conversion result of multiple cycles (rolling average).

I think that would be more effective than my previous suggestion at achieving a smooth yet accurate script conversion.

Hey again! Sorry for having been absent, but a lot of interesting developments have been in the works behind the scenes regarding this extension!

First of all, I actually already implemented the feature you suggested some time ago, but haven’t yet made that into a release of its own. If you look at the latest GitHub commit, you’ll see it there. You can actually just download the code of the latest commit from GitHub and follow the installation steps. Just make sure to preserve your config.json file when updating the extension to a new version, that file stores the device profiles you created using the extension.

But yeah, the reason for my absence is that I’ve actually been working together with a friend on a complete revamp of the converter “engine” so to say. My original implementation was fairly simple and based on trying to reduce complexity as much as possible. It just took the peaks and troughs of the graph and used a manually written decision tree based on the finite amount of possibilities it could encounter.

While that works reasonably fine for some scripts, it has edge cases where it won’t work well. It also wouldn’t work with most of the scripts on this website, since they are meant for linear devices that can handle very intense patterns like vibrations. Those would give you super crazy speeds with the original converter.

With the new converter engine, we’re basically trying to actually physically simulate the piston movement system of the machine. While it is more complicated, this should do away with any kind of edge case while delivering the same kind of script the original converter could. It also will enable more accurate thrusting simulation mode(s), which attempt to match half-stroke timings by varying the power levels very accurately. We call it the “hard difficulty” in our testing :stuck_out_tongue: I believe Hismith has a default pattern on their app that also kinda does this, but ours should be way more accurate and not create (too much) uncontrolled/uneven thrusting behavior. But that’s still experimental, and will be labelled as such when implemented.

Anyway, we’ve been working on this for over a month now. The implementation is currently done in Matlab as my friend used that for his simulation calculations, but in a few days I will start porting his code over to Lua for use in this extension. I’m estimating it will take until early next year to get that ready and make a full v2 release. Until then, the jury’s still out on whether I’ll have enough time to keep updating the existing extension code with small improvements, as i’ve also had a pretty busy time IRL with getting a new job and also working on some other hobby projects.

But yeah, expect interesting developments from this in the near future! And definitely I will consider adding more features to control the outputted script such as the rolling average you suggested!

4 Likes

Getting my premium machine in early january, fingers crossed you have the new software rolled out by then!

Honestly, after learning how to script a little and using this extention, it’s pretty accurate. In general the extention works best on scripts with consistant up and down motion (i know there is more to it than just that). Like scripts for thehandy. It stumbles a little on transitions as the up and down motion varies or varies too much, as the script takes the time it take for the up and down motion and matches it to the rpm that requires the same time it takes for the sex machine to do those same up and down (or in and out) motion. If the script has constant small jittery motion instead of a fully up( or 90%) or fully down, the extention would calculate as if it was a full motion and the machine rpm would increase. On the flip side, if the up and down motion takes too long to long, you are hardware limited by the machine as it is unable to operate so slowly. But despite these flaws, im very happy with the extention. With some editing on your own, you can set it to an acceptable performance

1 Like

In the v2 of the converter engine we are working on, we’ve solved the issue of vibration patterns in handy scripts, which is currently the biggest issue with the v1 converter as you pointed out. I don’t have an ETA for it yet other than early next year, we’re working on it in our spare time and you know how year end periods are when it comes to spare time :stuck_out_tongue:

But i’m very glad that you all are finding this extension useful and accurate! I will keep supporting this and eventually will also make it into a standalone python tool so it can be used outside of OFS also, once v2 conversion is translated from Matlab to Lua.

P.S: i should actually add gifs that show it working on a real use case, such as some furry animations I scripted. That should hopefully help people understand what it does better than I am currently conveying it. Thanks for giving me the idea, though indirectly haha.

4 Likes

Any possibility of getting this to work via xtoys or similar mobile-app? I know i can probably get the python script running via termux on androidbut it would be a “one trick pony” . xtoys is javascript based unfortunately. But xtoys are much better equipped for customizing scripts, syncing with video and using other toys along side the sex-machine.
And it already has funscript integration aswell! :slight_smile:

Would be nice to control everything with one hand rather than having the laptop nearby.

Love what you’ve done so far, can’t wait for v2!

I don’t know enough about how XToys works to give you an answer on that right now, but i will definitely look into it when the time comes. I’m also quite interested in having a solution for playing and cycling through already scripted videos that wouldn’t require lots of fiddling with middleware like in the case of buttplug.io. Like something where you could add your own videos and associate funscript files in a persistent way, and then play the videos with an option to quickly switch funscript tracks while playing.

Funscript Video Player for Generic Output on xtoys can do this. It is setup so you can use different script settings for different vids, linked from a script depository. Vids are linked from pornhub, xvideos, spankbang etc.

But the solution to easily browse and switch between already made scripts are there. What is missing is the conversion script to make it sync the scripts to your spesific maxhine min/max rpm, so it matches the bpm of the music, or action based script better.

Here is a more bare bones solution, lets you choose a local video and a up to several local script files that sync between different toys at the same time:

X toys works so that you can combine several scripts, this is what is refered to as a “tease”.

So I would look at integrating your tech as an Xtoy script. Then everyone who are familiar with xtoys can help out.

The UI is not all that pretty. But the possibilities and functionality makes up for it.
Look at the bottom of the post for screenshots of the tools already programmed in.
You can use the following PRECONFIGURED tools/measurements as triggers or as an action of a trigger. Link these, time them and sync them together in infinite ways.

For instance, you can have it setup so that when xtoys notices you are at a certain arousal level (by measuring muscle contractions or pulse, or a combination of the two.) the toy stops and the video pauses.
And you set it so that the video starts up again once arousal levels are below a set threshold again. Edging you for aslong as you allow the app to do so.

Or for the hell of it, make it react everytime trump posts a new tweet. You will need tons of lube come election time in the U.S!

You can even sync it to your favourite video game!

Tl;dr : make it work as an x toys script, and the community will do all sorts of crazy stuff with it!




Hmm… that’s a lot to look into lol. But this is for after v2 of this project and converting to Python. I’ve also never written Javascript before so that would be breaking new territory for me. But then again these scripts were my first dive into Lua as well so i’m sure i’d get the gist of it after a while. I’m an embedded softeng personally so C/C++ and Python are my mains, but i like me a new challenge every once in a while. So yeah don’t expect this any time soon but maybe as a future prospect, who knows. ;}

1 Like

You can almost automate the conversion to javascript with the new chatgpts, but that wont really teach you js if that is part of the fun for you.
Aslong as you have the math formulas you use for the calculations, they shouldnt be too hard to convert. I can take a crack at it once 2.0 is out on github, if you allow forks ofc :slight_smile:

Python main myself, eve online nerd that needed fancy excel sheets, helloooo pyxll addon! And I’ve been hooked on coding ever since.

Of course i allow forks, it’s like the whole point of open sourcing xD it’s actually nice to know someone likes my code enough to expand on it haha

1 Like

So i tested the machine made scripts with xtoys. And it works like a charm! Xtoys already has profile for the machine, you can even add a script on top of the funscript/video sync based on the percentage change in power values based on the weight pref when making the script. So I’ve made 4 versions of each, only difference is weight of toy attachment in the calculations, to give more flexibility in which toy you want to use the script with.

I added pulse tracking from my garmin HRM chest band aswell, and added a edging script that pauses the video and the script if you get above a set heart rate, and only starts when you are below it again.

I also added a voice control script, so saying fuck me avtivates machine/loaded funscript/video.

And pause and stop commands both pause it. So if you are for instance tied up, you can still stop it in an emergency.

All these addons can be turned off/on with a single click before you start a self care session :slight_smile: excited for 2.0 :drooling_face:

1 Like

Any news in the last two months?