﻿================================================================
  FunScript Studio
  Waveform generator for TCode strokers
================================================================

Thank you for purchasing FunScript Studio.

This application generates new motion on the spot and drives a
compatible stroker directly, with no video and no existing
.funscript file required.


----------------------------------------------------------------
 1. Requirements
----------------------------------------------------------------

  OS        : Windows 10 / 11 (64-bit)
  Disk space: about 400 MB

  Nothing has to be installed beforehand - no Python, no runtime.
  Extract the zip and double-click the .exe.

  The device itself is not included.


----------------------------------------------------------------
 1-2. Supported devices
----------------------------------------------------------------

There are two connection methods. You switch between them inside
the app, under "Device".


[1] OSR2 / SR6  (serial connection)

  Devices running TCode firmware that appear as a COM port
  in Windows:

     - OSR2 / OSR2+
     - SR6
     - SSR1
     - FUN SR1 2.0
     - other TCode devices exposed as a COM port

  Both USB and Bluetooth work, as long as Windows shows the
  device as a COM port.

  This method supports the rotation axes (R0 / R1 / R2) on
  multi-axis devices such as the SR6.


[2] The Handy  (via Intiface)

  The Handy and other Buttplug-compatible devices.

  What you need: Intiface Central (free)

     https://intiface.com/central/

     1. Download and install Intiface Central from the page above.
     2. Start Intiface Central and press "Start Server".
     3. Connect The Handy so that it appears as a device inside
        Intiface Central.
     4. In this app, set "Device" to "The Handy", press Refresh,
        select your device and press Connect.

     Leave Intiface Central running. Closing it drops the
     connection.

     You can also see these steps inside the app. With "The Handy"
     selected, click the line under the device box that reads
     "What is Intiface Central? / Get it here..." and a guide
     window opens, with a button that takes you straight to the
     download page. The same guide appears automatically if no
     device is found.

  This method drives the stroke only. Rotation axes are not
  available, because the Buttplug linear command addresses a
  single axis. (The Rotation tab says so when this method is
  selected.)

  If Intiface supports it, other stroker-type devices may work
  through this method as well.


[Note] "It is connected over Bluetooth, so why is it not listed?"

  Bluetooth is not one single thing. Two separate layers matter:

     - How it is wired : USB / Bluetooth / Wi-Fi
     - What it speaks  : TCode / Buttplug

  OSR2 and SR6 use Bluetooth SPP, an older profile that Windows
  exposes as a COM port. That is why they appear in the port list
  and understand TCode.

  The Handy uses Bluetooth LE. Windows never turns that into a
  COM port, and The Handy does not understand TCode either. So it
  will never show up under method [1], no matter how well it is
  paired - it needs method [2], through Intiface.

     Device        Wiring            Appears as a COM port?
     ------------------------------------------------------
     OSR2 / SR6    USB               Yes
     OSR2 / SR6    Bluetooth (SPP)   Yes
     The Handy     Bluetooth (LE)    No  -> use Intiface
     The Handy     Wi-Fi             No  -> use Intiface


Please note

  Depending on your device, its firmware and your connection,
  the app may not work with your particular setup.
  Please try the trial version first and confirm that it connects
  and plays before buying.

  Operation with every device cannot be guaranteed.


----------------------------------------------------------------
 2. Installation
----------------------------------------------------------------

  1. Extract the downloaded zip anywhere you like.
     (Documents or Desktop is fine. Avoid Program Files -
     Windows may block writing settings there.)

  2. Open the extracted folder.

  3. Double-click FunScriptStudio.exe.

  There is no installer and nothing is written to the registry.
  To uninstall, delete the folder.

  Keep the exe and the _internal folder together. Moving the exe
  out on its own will stop it from starting.


----------------------------------------------------------------
 3. Starting the app
----------------------------------------------------------------

  Double-click FunScriptStudio.exe.

  If Windows shows "Windows protected your PC" (SmartScreen):
     Click "More info", then "Run anyway".
     This appears because the app is not code-signed. It is
     normal for small independent software.

  If your antivirus quarantines the app:
     Applications packaged this way are sometimes flagged by
     mistake. Please allow it, or add the folder to your
     exclusions.

  If nothing happens when you double-click:
     Look for error.log next to the exe and send it to us.


----------------------------------------------------------------
 4. Basic use (three steps)
----------------------------------------------------------------

  Step 1 - Generate
     Choose your parameters in the left sidebar and press
     "Generate". The preview heatmap fills in.
     Not sure where to start? Press the dice button next to
     Generate and it picks everything for you.

  Step 2 - Connect
     Under "Device", choose your connection method, pick the
     port or device, and press "Connect".

  Step 3 - Play
     Press the play button. The device follows the waveform
     shown on screen.

  You can change almost anything while it is playing. The app
  always eases from where the device actually is, so nothing
  jumps.


----------------------------------------------------------------
 5. The screen
----------------------------------------------------------------

Parameters (left sidebar)

  Length (min)
     How long the generated script is.

  Fastest stroke time (s)
     Seconds per full stroke at the fastest moment.
     Smaller is faster.

  Slowest stroke time (s)
     Seconds per full stroke at the slowest moment.
     Speed drifts randomly between these two values.

  Upward range / Downward range
     How far the stroke travels above and below the centre.

  Centre (0-100)
     The middle of the motion. 0 is the top, 100 is the bottom.

Pattern

  Simple
     A steady rhythm, with the period drifting slightly so it
     does not feel mechanical.

  Varied
     Sections such as slow & deep, shallow & fast, grinding and
     gradual build-up switch automatically every 20-50 seconds.

Preview (heatmap)

  The whole script at a glance. Orange is fast, purple is slow.
  Hover to zoom into that part, click to jump there.
  Seeking eases the device across rather than snapping.

Live motion

  The waveform 10 seconds either side of the playhead, so you
  can see what is coming.

Presets

  Save a set of parameters under a name and recall it later.
  Once you change a value, the preset name shows "(edited)" so
  you always know whether what you hear matches the name.

Language (Japanese / English)

  At the bottom of the "Behaviour" tab. Switching restarts the
  app; playback stops and your settings are saved first.
  On first launch the language follows your Windows setting.


----------------------------------------------------------------
 6. Effects
----------------------------------------------------------------

  All of these can be toggled during playback, and the motion
  stays smooth across the change.

Fade in
  Raises the range from 0% to 100% over the number of seconds
  you set, so playback starts gently.

Build up
  The range moves from a start percentage to an end percentage
  as the script plays.

Edging
  Motion stops at random moments, teases, then eases back in.
  Interval (s) is roughly how often it stops; the actual timing
  varies by about a fifth either way, so it never feels like a
  metronome. Hold (s) is roughly how long each stop lasts
  (varying by about 40%). Rotation stops as well.

Random pacing
  Fast and slow stretches alternate at random.

Finish (during playback only)
  Raises speed and range to maximum over the number of seconds
  you set.

Wait (during playback only)
  An emergency brake. Press it and the motion slows right down;
  press again and it eases back to speed over about two seconds.
  Pressing it during Finish cancels Finish and brakes.


----------------------------------------------------------------
 7. Rotation axes (supported devices only)
----------------------------------------------------------------

  Available with connection method [1] (serial TCode) on
  multi-axis devices such as the SR6.

     R0  Twist (left/right)
     R1  Roll (tilt)
     R2  Pitch (nod)

  Each axis has two modes:

     Linked
        Rotates in time with the stroke. "Phase offset" delays
        the rotation relative to the stroke - around 90 gives a
        spiralling motion.

     Independent
        Rotates at its own rhythm, set by "Cycle (s)", with no
        relation to the stroke.

  "Amount %" sets how far the axis rotates.

  Tick only the axes your device actually has.


----------------------------------------------------------------
 8. Saving and loading files
----------------------------------------------------------------

  Save
     Writes the current waveform to a .funscript file, so you
     can use it in other software.
     Choose the destination with "Choose save folder..." first.

  Load
     Opens a saved .funscript file and plays it. You can also
     drag and drop a file onto the window.

  Loaded scripts play back through the same engine, so the
  effects and the Wait button work on them too.


----------------------------------------------------------------
 9. Troubleshooting
----------------------------------------------------------------

The device does not appear in the port list

  - Check the cable, and try a different USB port.
  - Open Windows Device Manager and see whether the device is
    listed under "Ports (COM & LPT)".
  - Over Bluetooth, remove the pairing and pair it again.
  - For The Handy, use connection method [2]. It will never
    appear as a COM port. See section 1-2.

  Still nothing? Check the USB-serial driver.

    Many devices, the FUN SR1 2.0 among them, use a CH340 / CH341
    USB-to-serial chip. Without that driver Windows will not turn
    the connection into a COM port at all.

    In Device Manager, look under "Ports (COM & LPT)". If the
    device is not there, check "Other devices" for an entry with
    a warning mark. If you find one, installing the CH340 / CH341
    driver (usually named CH341SER) will make it appear.
    Get it from your device vendor's instructions.

    This driver is not part of this application - Windows needs it
    to see the device at all, and other software such as
    MultiFunPlayer needs it too.

"Could not connect"

  - Another application (MultiFunPlayer, a serial terminal,
    and so on) may be holding the same port. Close it.
  - A second copy of this app may still be running. Check the
    taskbar and Task Manager.
  - Unplug and replug the cable, or restart the device.

The Handy is not found

  - Is Intiface Central running, with "Start Server" pressed?
  - Does the device appear inside Intiface Central itself?
    If it does not appear there, this app cannot see it either.
  - Press Refresh again after the device shows up.

The motion stutters, or feels rough

  Create a file named advanced.json next to the exe with the
  contents below, then restart the app.

     {
       "STREAM_I_MS": 20,
       "BP_MIN_INTERVAL_MS": 30,
       "BP_MIN_DURATION_MS": 20,
       "BUTTPLUG_URL": "ws://127.0.0.1:12345"
     }

     STREAM_I_MS
        Interpolation time in milliseconds attached to each
        TCode command. If your firmware is old and behaves
        oddly, set it to 0.

     BP_MIN_INTERVAL_MS
        Minimum gap between commands sent to The Handy.
        Raise it (40-50) if the device cannot keep up.

     BP_MIN_DURATION_MS
        Minimum movement duration for The Handy.

     BUTTPLUG_URL
        Only needed if you changed the port Intiface listens on.

  Any value you leave out keeps its default. If the file has a
  syntax error it is ignored, and the app starts normally.

The device moves the wrong way round

  Tick "Invert direction" on the Behaviour tab. Only the device
  direction changes; the display and any saved file stay the
  same. It cannot be changed during playback.

The app will not start

  Look for error.log next to the exe. Please send it to us with
  a short description of what happened.


----------------------------------------------------------------
 10. Using it safely
----------------------------------------------------------------

  - Start with a small range and confirm how the device behaves
    before increasing it.
  - Stop immediately if you feel pain or anything unusual.
  - Keep the device clear of hair, clothing and cables.
  - Do not leave it running unattended.
  - Follow the safety instructions that came with your device.


----------------------------------------------------------------
 11. Disclaimer
----------------------------------------------------------------

  - This software is provided as is. The author accepts no
    liability for any damage or injury arising from its use.
  - Operation with every device and every environment cannot be
    guaranteed.
  - Redistribution, resale and reuploading of this software are
    prohibited.
  - The trial version may be redistributed freely.


----------------------------------------------------------------
 12. Files included
----------------------------------------------------------------

  FunScriptStudio.exe   The application (double-click this)
  _internal/            Files the application needs
                        (do not delete or move)
  README.txt            Japanese version of this file
  README_EN.txt         This file

  Created automatically after the first run:
     last_config.json   Your last settings
     presets.json       Your saved presets
     error.log          Only if an error occurs

  advanced.json is a file you create yourself, only if you need
  it (see section 9).


----------------------------------------------------------------
 13. Version history
----------------------------------------------------------------

  v1.0.0  First release


----------------------------------------------------------------

  Contact: [X:@LewdiaX9340]

================================================================
