Git Product home page Git Product logo

feilong123 / ofs-fm-script-converter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rriik/ofs-fm-script-converter

0.0 0.0 0.0 42 KB

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

Home Page: https://discuss.eroscripts.com/t/ofs-script-converter-extension-for-rotary-fuck-machines-hismith-lovense-etc/127919/7

License: MIT License

Lua 100.00%

ofs-fm-script-converter's Introduction

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.

Table of contents

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 below!
  • Developed for OFS v3

GUI showcase

Example 1 Example 2

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

Usage

After completing the installation steps, you should be able to load up any OFS project and use the converter tool. Below are some instructions to get you started. Be sure to also check out the guides to better understand how to use the tool.

1. Make a copy of the funscript you want to convert

This is important, as it will allow you to have a backup of the original script. It is also very convenient, as you can have multiple scripts loaded in an OFS project. So you can have both the original and the converted funscripts side by side, which should help you with further tweaking the converted script to your liking. You can name the converted script as <original-script-name>_<device-profile-name>.funscript for a nicer classification or if you want to tailor the scripts for each device profile.

2. Create your device profile

The extension comes with pre-configured profiles, such as for the popular Hismith Pro 1 fuck machine using a 1kg toy. These profiles may be either personally tested or community-outsourced. You can also create new profiles, modify existing ones or remove them from the list. Your modifications will persist between OFS sessions. Note: all profiles created must have different names.

The extension offers built-in ways to determine the minimum and maximum RPM of a device. These are located under the "Device profile calibration utilities" menu (see the GUI showcase). Using the steps below, you should be able to easily determine the right minimum and maximum RPM values to enter for your device profile:

  1. Attach the toy you wish to use to the machine
  2. Using Intiface Central, MultiFunPlayer or other software that implements the buttplug.io protocol, set the device to run at a certain power level between [1-100]
  3. Using a stopwatch, start measuring a large (e.g. 30-50) number of machine cycles
  4. In the extension GUI, open the "Unit converter" sub-menu and write down the number of cycles and time period you just measured
  5. Copy the RPM value from the converter
  6. In the extension GUI, open the "Min./Max. RPM estimator" sub-menu and write down the power level and RPM value into one of the measurement fields (use the "Add measurement" button to create more fields if needed)
  7. Repeat steps 2-6 several times (at minimum 2, recommended 5 or more times) using a wide range of power levels (the more varied, the better)
  8. Below the list of measurements, you will find the estimated minimum and maximum RPM values. Set these values as your device profile configuration
  9. (Optional) Check the accuracy of the model by setting different power levels from those you measured in the unit converter utility, and testing the accuracy of the predicted cycle duration and RPM values

You can read more about measuring the RPM of devices in the guides below.

3. Adjust the conversion options

The current set of conversion options primarily affects when the power level is and isn't recorded (in the form of an action on the converted funscript). You can choose whether to enable recording the power level on single peaks, single troughs, peak series and trough series. PeaksTroughs In addition to that, you can choose whether the converter should treat peak and trough series as dead zones where the device power level drops to 0. You also get to control how quickly the transition to and from a drop-off occurs. However, if the total series duration is shorter than the combined drop-off enter and exit intervals, only one drop-off action will be placed in the middle of the series duration instead. This feature is definitely more useful when used with longer duration pauses during thrusts, as rotary fuck machines tend to have mechanical inertia themselves and may take a brief moment to spool up or down. And finally, you can tell the converter to keep 0-position actions as-is, since these may obviously serve multiple purposes in your script.

Depending on which options you have enabled, the converted script can behave very differently. ConversionOptions Of course, this is just a quick mockup serving as an example. Longer and properly made scripts would have more nuance, but what this shows is that you can mix and match the options available to create more granularity in the power level fluctuations, drop the power level to 0 during peak and trough series, and more.

4. Convert your funscript

You can choose between converting the whole funscript or only the selected actions. To do so, simply load and select the script you want to convert, then press the buttons at the bottom of the conversion options menu.

Note: While this tool can effectively do most of the conversion work for you, it is not always a one-click-deploy solution. There may be specific segments of funscripts that need to be tweaked before or after applying the conversion. For example, transitional segments, orgasm moments, artificially boosted rhythms meant to create vibration in masturbation sleeves and other situations. Always double-check the whole script after conversion to ensure you are fully comfortable with the result. Remember, you should always have control over the machine, not the other way around.

5. Test the result

Finally, you can link your fuck machine and the OFS editor through middleware that implements the buttplug.io protocol. I have also written a guide to describe my own setup, if you want to learn more. If everything is configured correctly, you should be able to use the OFS video controls to synchronize the funscript and video with your device (make sure you have the converted funscript track selected in the editor).

Guides

Measuring the RPM of devices

Device profiles are actually just linear growth functions described by the minimum (1% power) and maximum (100% power) RPM values you configure. This is because rotary fuck machine controllers are typically built with a linear RPM step-increase in mind. Sometimes the linearity may taper off at the highest speed settings, but small RPM differences at high speeds are not as perceivable as they are at lower speeds.

For higher speed devices (200+ RPM), the cycle times at high power levels get very small, and it can become challenging to measure RPM correctly. The peak RPM will also vary based on load mass and shape. Lighter toys have lower inertia (e.g. 500g vs. 1kg) and toys with a lower center of mass have less sway (e.g. short, tapered vs. long, top-heavy).

Perceived RPM also heavily depends on the device's motor and the friction between the toy and the human body. Devices with less powerful motors may struggle to deliver the torque needed for consistent lower speeds and may underperform at higher speeds when facing friction resistance. The resulting peak speeds can be within ± 5-10% of the manufacturer's stated max RPM. You may need to slightly adjust the extension-estimated min./max. RPM values to account for this.

You should only test up to the highest speeds you can reliably measure. For the most accurate results, you can make several profiles per device using different toy shapes and sizes/weights. Or you can average all of them to obtain a generic profile.

Setting up the funscript-to-machine connection

This guide may be different for your device or may change with the advent of new and better solutions in the future. But for now, it is a tried and tested solution and should give you an idea of what it takes to set this up.

You will need to install the following software (besides OFS):

Below is a diagram showing how the different parts of the setup interact with one another:

FuckMachineSystem

You should also read through both the Intiface Central and MultiFunPlayer project documentation to better understand their feature sets. But as an overall checklist, these are the broad steps to follow:

  1. Plug in and turn on your buttplug.io-supported rotary fuck machine
  2. Turn on the Bluetooth connection on your computer (for desktop PCs, ensure you have a motherboard with Wi-Fi/BT connectivity and that your external antenna is connected, if the motherboard comes with such an add-on)
  3. Open Intiface Central, open the Devices section, start the server (big play button), then click on "Start Scanning". It should automatically find and connect to your machine
  4. Open an OFS project that contains a converted script you wish to test (ensure you have the converted script selected in the editor)
  5. In the OFS GUI, turn on the websocket server (View > Websocket API > "Server active" checkbox, keep the port number as is unless you have a custom websocket chain setup)
  6. Open MultiFunPlayer. In the top right corner, select "Toggle media source" (+ button) and select OFS. Then click the "Connect" button below the OFS tab (play button). If done correctly, a graph of the funscript will also show up in the middle section of the window
  7. In MultiFunPlayer, in the middle section, select the axis where the OFS websocket is linked. You should see the file name of the script you want to play and a websocket address above it (typically defaults to L0). In the menu below the axis selection, you will see a green "Auto-home" button. Click that and set all the fields to 0, while leaving the Auto-home option enabled. This is important, it ensures that when you pause the OFS video player, the machine also fully stops immediately. Otherwise, the auto-home behavior makes it default to a 50% power level and/or takes longer to stop it, which can be dangerous if you are unprepared
  8. In MultiFunPlayer, in the bottom right corner, select "Add output" (+ button) and select Buttplug.io. Then click the "Connect" button below the Buttplug.io tab (play button). Select the dropdown arrow in the bottom right corner, then select the "Device map" menu. Fill in the dropdown boxes with your device information and the same axis you modified above. This is how the MultiFunPlayer window should look like at this point:

image

  1. If you followed all the steps correctly, when you click the green + button to add the new device to the device map, nothing should happen (the machine should be at power level 0). And then, if you start playing the script in OFS, the machine should start being speed-controlled. If you then pause the video playback, it should immediately pause as well

After following these instructions, you're free to use Spacedesk or other software to enhance your play session by mirroring the OFS window to a tablet or other remote device and controlling the action from a distance.

Designing scripts for fuck machines

While it may not be the focus of this extension, I think it may be worth pushing the funscript development community towards developing scripts for both masturbation sleeves and fuck machines. The buttplug.io project has only recently begun supporting smart fuck machines (start of 2023), so it is still an up-and-coming part of the fanbase, but I wholeheartedly encourage efforts to expand in this direction because I believe this would achieve the full potential of the funscripting ecosystem.

What I personally like doing is to create the "raw" penetration graph as the base funscript. I established certain rules for this too:

  • The position value of an action should denote the penetrating percentage related to the full length of the shaft. 0 means no penetration, 100 means full penetration (entire shaft), 33 means one third penetration and so on
  • Actions should be placed (at least) at the beginning of every thrust and every pullback. Bonus points if you have the patience to make these frame-perfect and add intermediate positions to the thrust curve to match the content more closely
  • If there are noticeable pause periods (usually >100ms) between thrusts, actions with the same position value should be placed at the start and end of the pause period
  • Adding "standby" actions during non-penetrative parts of the content is up to the creator's preference, though I personally just like those periods to be fully unpowered (marked with 0-position actions)

These rules are meant to be usable also by linear motion fuck machines, which I find to be superior to rotary fuck machines as they can accurately reproduce the patterns you are designing (much like the masturbation sleeves). And although those machines may be capable of vibration patterns, that should be separated into a different funscript variation. The base funscript for fuck machines should instead aim for maximum device compatibility.

About peaks and troughs

Peaks and troughs are mathematical local maxima and minima (points on a plot which are highest/lowest among their vicinity). In this case, they are the actions with the highest/lowest position value in their vicinity. The script analyzer respects the mathematical rules that dictate what should count as local extrema. This means that:

  • a script with less than 2 actions or where all actions have the same position does not have local extrema
  • multiple actions in a row that have the same position value will be considered local extrema if at least one fulfills the requirements for that
  • the first and last actions (edges) of a script will be considered local extrema

To get a better sense of which actions are counted as peaks and troughs, you can check the debug section of the extension GUI. This section contains buttons that highlight the peaks and troughs by selecting the respective actions in the timeline.

Notes

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:

  • OFS script statistics - enables detailed script-wide statistics as an addition to the default statistics panel

A big thank-you goes to Dr. Sirius Graham Weldon for his contributions and support during the development of this tool.

ofs-fm-script-converter's People

Contributors

rriik avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.