HandyControl - How to create scripts with the Script Sequencer
This topic describes how to create scripts with the Script Sequencer from HandyControl.
All generated scripts can be exported as funscript and also used in other applications.
If you have questions or a problem with a script you can ask here.
You can access the Script Sequencer throught the context menu.
If one of the csv files is altered then you can reload the files here.
On selection of an element HandyControl generates the script.
The Script Sequencer is a feature that allows you to generate scripts with help of a spreadsheet application like Excel or Google Sheets. You can use any app that supports a .csv export.
The Script Sequencer supports either ,
or ;
as separator so you don’t have to care about the language setting. The csv file will look like this.
The headers must not be changed or the file is flagged as invalid.
Lines that only contain separators can be used anywhere below the header. They are ignored during import.
Setup
Get the newest version of HandyControl and also download the Sequencer.zip from the same download folder. This collection contains templates that will be used here for explanation and also a lot of working examples.
The Excel template in the zip file can be imported to Google Sheets so can don’t have to copy the structure if you don’t own Excel. The file contains a macro to automate the csv file export. If you want to use it you need to allow macros. The save location can be changed in the macro editor.
Spreadsheet Structure
The table contains two sheets.
Patterns (Patterns + Variants)
Sequences
Patterns
This is the place where you create the single parts of a script that are then combined in the Sequence sheet.
Currently there are three types of patterns:
The pattern type is detected on how the fields are used.
Pattern Type 1: Normal script sequences that are cut from scripts or generated elsewhere. The timestamps must increase with each row. Time and Position must be used.
Pattern Type 2: Sequence created from speed and stroke values. Position must be empty.
Pattern Type 3: This is a break. Only use fields as shown in the image.
By default a pattern always starts at the lower point and goes up with the next timestamp. A pattern will always end in the same location where it started so if the first point was low then the last point will be also low. This is neccessary for easier calculation if you build bigger patterns and sequences.
The duration has always priority. If the last stroke goes over the defined duration then the script will be shifted left so the last timestamp matches the given duration. It’s also possible that the script is shifted right. In real it’s a little bit more complicated but you should know that if you want to create a sync beat then you probably have to calculate some values to avoid this little correction.
Pattern
Name of the pattern. Every row with the same name will be part of the pattern. The order on import is the same as seen on the sheet. A single row is called a SubScript. You can add empty rows.
Variant
Name for the variant. All rows that belong to a single variant are combined. You can use variants to create random scripts. In the example above there are three patterns with five different variants each.
A variant can be also build with multiple rows. The SubScripts are combined in the order of the rows.
Repeat
How often a row is repeated. 0 will disable the row.
Time
Type 1: Timestamp in milliseconds
Type 2: Duration in milliseconds
Position
Type 1: Position in % 0-100
Type 2: Must be left empty!
Speed_1
Type 1: Can be left empty.
Type 2: Speed at t = 0
Speed_2
Type 1: Can be left empty.
Type 2: Speed at t = time
Speed_img
If used then this has higher priority than the speed values.
Type 1: Can be left empty.
Type 2: Can be left empty or enter a filename of a png file without extension
Stroke_1L
Type 1: Can be left empty.
Type 2: Lower Stroke position at t = 0
Stroke_1U
Type 1: Can be left empty.
Type 2: Upper Stroke position at t = 0
Stroke_2L
Type 1: Can be left empty.
Type 2: Lower Stroke position at t = duration
Stroke_2U
Type 1: Can be left empty.
Type 2: Upper Stroke position at t = duration
Stroke_img
If used then this has higher priority than the stroke values.
Type 1: Can be left empty.
Type 2: Can be left empty or enter a filename of a png file without extension
Options
A possibility to influence the SubScript generation.
If multiple options are used then the #
separator must be used. Option1#Option2#Option3…
INV: Inverts all positions in a SubScript line. The SubScript is mirrored at the 50% center line.
DOWN: Changes the starting position to the upper stroke position for beat patterns so the beats go down. If this is not set then all variants start with the lower stroke position. You only have to set this on the first line in a variant if you want to change the direction.
UP: Same as DOWN but the other way.
Description:
You can use it to describe what you are doing here.
This column is ignored on import.
Speed minimum and stroke difference minimum = 10%
Speed below this minimum will create bad patterns. Zero is also a problem.
Images must be located in the same folder than the pattern csv file.
Sequence
The sequence csv file is where you combine your patterns to create scripts. Although you can also create scripts in the pattern csv it’s easier here as you need less rows.
Sequence
This is the name of the sequence
Pattern
Name of the pattern in the pattern csv file.
Variant
Name of a variant of the given pattern. If you leave the variant empty then a random variant of the pattern is used.
Repeat
Repeats this line x times. 0 will disable the row. If no variant is selected and repeat >= 1 then repeat will select a random variant x times. This is not shuffling the variants.
Options
Currently nothing defined here.
Repeat
Description:
You can use it to describe what you are doing here.
This column is ignored on import.
Images
Images allow you to create dynamic stroke and speed path and save you much rows of values. Basically you just draw your script instead of writing it.
The image width is the duration from start to end of a pattern row no matter how large the image is. It will be always scalled to the duration. The image height is always 0-100% for speed/stroke.
The image needs to be a transparent png file so its easier to detect the borderlines. For the stroke range we need two borders so we can define the stroke range from top to bottom. In the above image the lower border line will be the ground at zero. For speed we only need a single value. Here we always use the upper borderline.
If you use the same image for speed and stroke this will look like this.
The upper borderline of a speed image must always be above 10% of the image height. The lower borderline bust be at the bottom.
The vertical distance between the upper boarderline and the lower borderline must always be bigger than 10% of the image height.
A break is currently not possible inside an image.
You can use any colors you like. The Script Sequencer will only analyse the alpha channel in the png image.
Anything that has an opacity >95% will be used to detect the borderlines. This means that you can add semi transparent drawings in the image that are ignored by the Script Sequencer. The 10% grid lines in the images above are an example. They have an opacity of 50%.
Only the most upper and most lower boardline is used. So if you have a donut shape image then the hole in the middle is ignored.
You can find the example shapes in the Photoshop template of the sequencer zip.
To draw smooth curves you should use the path and shape tools in Photoshop so you can adjust your drawing anytime.
If you dont have Photoshop you can use any other application that can export transparent png images.