Skip to content

Rail Options

adosikas edited this page Oct 28, 2023 · 10 revisions

Rail Options

Note that the order of operation is always as they are listed here, regardless in which order you specify them.
If you want a different order or run a single operation multiple times, you need to run the tool multiple times, or use multiple lines in a action.txt preset file.

All operations support filtering options to apply to certain types only.

See the measurement system in the glossary for more details regarding the expected format of parameters.

Interpolate

Either --interpolate=<segment interval>
Or: --interpolate-linear=<segment interval>

Places intermediate notes along the rail with the given spacing, which replaces the current nodes

Regular --interpolate places the nodes similar to how the editor renders it.

With --interpolate-linear the positions are placed along straight lines connecting the existing nodes.

This option is less useful on its own and mainly for use with --spiral and --spikes.

Example

  • Place nodes every 1/64 of a measure: --interpolate=1/64
    The first 1/64 of the green rail was removed for visibility.
  • Place nodes every 1/5 of a measure: --interpolate-linear=1/5
    Note how the first and last part of the output rail (green) follow a straight line between the original nodes (blue)
Spline Linear
spline example linear example

Shorten Rails

--shorten-rails=<distance>

Removes the given distance from the end of rails. When the distance is negative, it will instead remove from the start of the rail (you may also want to use --keep-alignment to avoid moving the whole selection forward).
The position will be interpolated between the closest nodes, when there isn't one already.

Examples

  • Remove last 1/64 measure of each rail: --shorten-rails=1/64
  • Remove first 1/2 measure of each rail (realigning the selection with the new first note): --shorten-rails=-1/2
  • Remove first 1/2 measure of each rail, without realigning the selection to the first note: --shorten-rails=-1/2 --keep-alignment

Spiral

--spiral=<nodes_per_rot> and optionally --radius=<radius> (default 1) and/or --start-angle=<start_angle> (default 0°, ie right of start)

GUI: nodes_per_rot is now specified as angle in the GUI.
So if want 2 nodes per rotation, use Angle=180 (360/2 = 180)

This creates a spiral around the original rail. For this, each node of the rail (use --interpolate to create evenly spaced ones) is moved outwards by radius, rotating around the rail such that a full rotation is completed in nodes_per_rot nodes.
By default starts to the right (start_angle=0) and rotates counterclockwise (positive nodes_per_rot, use negative for clockwise).

Note that nodes_per_rot can be any number, no matter if it results in an even number of rotations. For a full rotation you actually need nodes_per_rot + 1 nodes, and --interpolate=1/<x> --spiral=<x> produces a full rotation per measure

A nodes_per_rot of 2 produces zigzag rails, and values near 2 (ie 2.1) result in the zigzag slowly tilting.

Examples

  • Quick rotation with 4 "corners" and a radius of 2: --interpolate=1/8 --spiral=4 --radius=2
    Note that the input rail (blue) is 1 measure long and with interpolate has 9 nodes, with 4 corners this is 2 full rotations.
    fast spiral example
  • Slow rotation clockwise: --interpolate=1/8 --spiral=-16 --radius=3
    Note that the input rail (blue) is 1 measure long and with interpolate has 9 nodes, with 16 nodes per rot, this results in an even 180 degrees
    slow spiral example
  • Generate a rotating zigzag along a rail, starting on the left: --interpolate=1/16 --spiral=1.9 --start-angle=180
    Note how the zigzag slowly rotates counterclockwise, since just below 2 nodes would be needed for each full rotation.
    zigzag example

Spikes

--spikes=<nodes_per_rot> and optionally --radius=<radius>, --start-angle=<start_angle> and/or --spike-width=<width> (default=1/32)

GUI: nodes_per_rot is now specified as angle in the GUI. So if want 2 nodes per rotation, use Angle=180 (360/2 = 180)

Turns each node into a triplet of nodes, to produce "Spike" or "Buzz" Rails.
This behaves similar to spiral in regards to the input with one exception: When nodes_per_rot is 0, the angles are determined completely randomly.
The spike width determines the total length of the triplet, ie with width 1/32 (the default), the nodes are placed 1/64 apart from another. Going below 1/32 may result in nodes being placed in the the same 1/64 output slot, use at your own risk.

Examples

  • Generate lots of spikes at 90 degrees from another: --interpolate=1/16 --spikes=4 --radius=2
    Note that half the time is spend on the rail, since the spikes are 1/16 apart and 1/32 long.
    many spike example
  • Generate some random spikes: --interpolate=1/8 --spikes=0 --radius=2
    Note that 75% the time is spend on the rail, since the spikes are 1/8 apart and 1/32 long.
    random spike example