The StringPatternEngine is a PatternEngine that uses a pattern that is provided by a string.

The StringPatternEngine randomly chooses one of the provided <string> tags and uses the contained pattern.


Tag Attribute Type # Example Description
string ticksPerBeat int 0/1 4 Specifies how many ticks in this pattern are considered to be a beat. If the actual ticks-per-beat value of the song is different from the one provided here, all note/pause length are scaled by the appropriate factor. For example, if the pattern uses 4 and the song uses 12, each pattern note/pause length is multiplied by 3. If this attribute is not provided, no length scaling is done. Available since version 0.8.
string - string 1-n -/2,0,-/2,0,-,0 Comma-separated list of numbers, wildcards or pauses, optional velocity, optional number of ticks and optional legato flag. The full syntax is "number:velocity/ticks~". Instead of a number, a wildcard character or pause ("-") can be used. The velocity must be between 0 and 32767 and defaults to 32767. The number of ticks must be greater than 0 and defaults to 1. The legato flag defaults to false (no "~", i.e., tilde, character).

Configuration example

<patternEngine class="StringPatternEngine">
  <string ticksPerBeat="4">-,-,-,-,2,-,-,-,-,-,-,-,4,-,-,-</string>

Add new comment